Differences Between: [Versions 400 and 402] [Versions 400 and 403]
(no description)
File Size: | 158 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
update_course:: (2 methods):
execute_parameters()
execute()
must:: (1 method):
execute_returns()
Class: update_course - X-Ref
External secrvie to update the course from the course editor components.execute_parameters() X-Ref |
Webservice parameters. return: external_function_parameters |
execute(string $action, int $courseid, array $ids = [],?int $targetsectionid = null, ?int $targetcmid = null) X-Ref |
This webservice will execute any action from the course editor. The default actions are located in {@see \core_courseformat\stateactions} but the format plugin can extend that class in format_XXX\course. The specific action methods will register in a {@see \core_courseformat\stateupdates} all the affected sections, cms and course attribute. This object (in JSON) will be sent back to the frontend editor to refresh the updated state elements. By default, {@see \core_courseformat\stateupdates} will register only create, delete and update events on cms, sections and the general course data. However, if some plugin needs adhoc messages for its own mutation module, extend this class in format_XXX\course. return: string Course state in JSON param: string $action the action name to execute param: int $courseid the course id param: int[] $ids the affected ids (section or cm depending on the action) param: int|null $targetsectionid optional target section id (for move action) param: int|null $targetcmid optional target cm id (for move action) |
execute_returns() X-Ref |
Webservice returns. return: external_value |