Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core_courseformat\external\update_course Class Reference
Inheritance diagram for core_courseformat\external\update_course:

Static Public Member Functions

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.
 

Member Function Documentation

◆ 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$actionthe action name to execute
int$courseidthe course id
int[]$idsthe affected ids (section or cm depending on the action)
int | null$targetsectionidoptional target section id (for move action)
int | null$targetcmidoptional target cm id (for move action)
Return values
stringCourse 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
external_value

The documentation for this class was generated from the following file: