diff --git a/grade/classes/external/get_groups_for_search_widget.php b/grade/classes/external/get_groups_for_search_widget.php index 9486271d356..55aa1a9e3f6 100644 --- a/grade/classes/external/get_groups_for_search_widget.php +++ b/grade/classes/external/get_groups_for_search_widget.php @@ -57,13 +57,9 @@ class get_groups_for_search_widget extends external_api { * @param int $courseid * @param string $actionbaseurl The base URL for the group action. * @return array Groups and warnings to pass back to the calling widget. - * @throws coding_exception - * @throws invalid_parameter_exception - * @throws moodle_exception - * @throws restricted_context_exception * @deprecated since 4.2 */ - protected static function execute(int $courseid, string $actionbaseurl): array { + public static function execute(int $courseid, string $actionbaseurl): array { global $DB, $USER, $COURSE; $params = self::validate_parameters( diff --git a/grade/report/grader/classes/external/get_users_in_report.php b/grade/report/grader/classes/external/get_users_in_report.php index e8cd67479c7..5013f6ef163 100644 --- a/grade/report/grader/classes/external/get_users_in_report.php +++ b/grade/report/grader/classes/external/get_users_in_report.php @@ -16,7 +16,6 @@ namespace gradereport_grader\external; -use coding_exception; use context_course; use core_user_external; use core_external\external_api; @@ -26,9 +25,6 @@ use core_external\external_single_structure; use core_external\external_value; use core_external\external_warnings; use grade_report_grader; -use invalid_parameter_exception; -use moodle_exception; -use restricted_context_exception; use user_picture; defined('MOODLE_INTERNAL') || die; @@ -64,13 +60,10 @@ class get_users_in_report extends external_api { * * @param int $courseid Course ID to fetch the grader report for. * @return array Users and warnings to pass back to the calling widget. - * @throws coding_exception - * @throws invalid_parameter_exception - * @throws moodle_exception - * @throws restricted_context_exception */ - protected static function execute(int $courseid): array { + public static function execute(int $courseid): array { global $PAGE; + self::validate_parameters( self::execute_parameters(), [ diff --git a/group/classes/external/get_groups_for_selector.php b/group/classes/external/get_groups_for_selector.php index 3926c1aef4e..8dc43009bd5 100644 --- a/group/classes/external/get_groups_for_selector.php +++ b/group/classes/external/get_groups_for_selector.php @@ -58,12 +58,8 @@ class get_groups_for_selector extends external_api { * * @param int $courseid * @return array Groups and warnings to pass back to the calling widget. - * @throws coding_exception - * @throws invalid_parameter_exception - * @throws moodle_exception - * @throws restricted_context_exception */ - protected static function execute(int $courseid): array { + public static function execute(int $courseid): array { global $DB, $USER, $OUTPUT; $params = self::validate_parameters(