Skip to content

Commit

Permalink
remove code for course category creation and user assignment. This fe…
Browse files Browse the repository at this point in the history
…ature is moved to local_declarativesetup
  • Loading branch information
Glutamat42 committed Dec 16, 2024
1 parent 3edbce1 commit e9c2430
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 941 deletions.
70 changes: 0 additions & 70 deletions classes/local/course_category_manager.php

This file was deleted.

117 changes: 0 additions & 117 deletions classes/local/course_category_path.php

This file was deleted.

16 changes: 0 additions & 16 deletions classes/plugin_interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use core\di;
use dml_exception;
use invalid_parameter_exception;
use local_adler\local\course_category_manager;
use local_adler\local\db\moodle_core_repository;
use local_adler\local\exceptions\not_an_adler_section_exception;
use local_adler\local\section\section;
Expand Down Expand Up @@ -34,18 +32,4 @@ public static function is_section_completed(int $section_id, int $user_id): bool
public static function get_section_name(int $section_id): string {
return di::get(moodle_core_repository::class)->get_moodle_section($section_id)->name;
}

/** Create a new course category and grant the user permission to create adler courses in it.
*
* @param string $username The username of the existing user.
* @param string $role shortname of the role to assign to the user.
* @param string|null $category_path The path of the category. If null or an empty string is passed, it initializes to "adler/{$username}".
* @return int The ID of the created category.
* @throws dml_exception
* @throws moodle_exception
* @throws invalid_parameter_exception
*/
public static function create_category_user_can_create_courses_in(string $username, string $role, string|null $category_path = Null): int {
return di::get(course_category_manager::class)::create_category_user_can_create_courses_in($username, $role, $category_path);
}
}
74 changes: 0 additions & 74 deletions cli/create_course_cat_and_assign_user_role.php

This file was deleted.

Loading

0 comments on commit e9c2430

Please sign in to comment.