|
static | execute (string $action, int $courseid, array $ids=[], ?int $targetsectionid=null, ?int $targetcmid=null) |
| This webservice will execute any action from the course editor.
|
|
static | execute_parameters () |
| Webservice parameters.
|
|
static | execute_returns () |
| Webservice returns.
|
|
◆ execute()
static core_courseformat\external\update_course::execute |
( |
string | $action, |
|
|
int | $courseid, |
|
|
array | $ids = [], |
|
|
?int | $targetsectionid = null, |
|
|
?int | $targetcmid = null ) |
|
static |
This webservice will execute any action from the course editor.
The default actions are located in {
- See also
- core_courseformat\stateactions} but the format plugin can extend that class in format_XXX\course.
The specific action methods will register in a {
- See also
- 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 also
- 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.
- Parameters
-
string | $action | the action name to execute |
int | $courseid | the course id |
int[] | $ids | the affected ids (section or cm depending on the action) |
int | null | $targetsectionid | optional target section id (for move action) |
int | null | $targetcmid | optional target cm id (for move action) |
- Return values
-
string | Course state in JSON |
◆ execute_parameters()
static core_courseformat\external\update_course::execute_parameters |
( |
| ) |
|
|
static |
Webservice parameters.
- Return values
-
external_function_parameters | |
◆ execute_returns()
static core_courseformat\external\update_course::execute_returns |
( |
| ) |
|
|
static |
Webservice returns.
- Return values
-
The documentation for this class was generated from the following file:
- course/format/classes/external/update_course.php