Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
core_courseformat\external\create_module Class Reference
Inheritance diagram for core_courseformat\external\create_module:

Static Public Member Functions

static execute (int $courseid, string $modname, int $targetsectionnum, ?int $targetcmid=null)
 This webservice will execute the create_module action from the course editor.
 
static execute_is_deprecated ()
 Mark the function as deprecated.
 
static execute_parameters ()
 Webservice parameters.
 
static execute_returns ()
 Webservice returns.
 

Member Function Documentation

◆ execute()

static core_courseformat\external\create_module::execute ( int $courseid,
string $modname,
int $targetsectionnum,
?int $targetcmid = null )
static

This webservice will execute the create_module action from the course editor.

The action 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.
Deprecated
since Moodle 5.0
Parameters
int$courseidthe course id
string$modnamethe module name
int$targetsectionnumthe target section number
int | null$targetcmidoptional target cm id
Return values
stringCourse state in JSON

◆ execute_is_deprecated()

static core_courseformat\external\create_module::execute_is_deprecated ( )
static

Mark the function as deprecated.

Return values
bool

◆ execute_parameters()

static core_courseformat\external\create_module::execute_parameters ( )
static

Webservice parameters.

Deprecated
since Moodle 5.0
Return values
external_function_parameters

◆ execute_returns()

static core_courseformat\external\create_module::execute_returns ( )
static

Webservice returns.

Deprecated
since Moodle 5.0
Return values
external_value

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