|
static | format_name_and_intro (\stdClass $modinstance, string $component) |
| Format the module name an introduction ready to be exported to a web service.
|
|
static | standard_coursemodule_element_values (\stdClass $modinstance, string $component, string $capabilityforgroups='moodle/course:manageactivities', string $capabilityforintro=null) |
| Add the value of all the standard fields to the results to be returned by the service.
|
|
static | standard_coursemodule_elements_returns (bool $introoptional=false) |
| Get the list of standard fields, to add to the declaration of the return values.
|
|
◆ format_name_and_intro()
static core_course\external\helper_for_get_mods_by_courses::format_name_and_intro |
( |
\stdClass | $modinstance, |
|
|
string | $component ) |
|
static |
Format the module name an introduction ready to be exported to a web service.
Note that $modinstance is updated in-place.
- Parameters
-
stdClass | $modinstance | one of the objects returned from a call to { |
- See also
- get_all_instances_in_courses()}.
- Parameters
-
string | $component | the plugin name, e.g. 'mod_book'. |
◆ standard_coursemodule_element_values()
static core_course\external\helper_for_get_mods_by_courses::standard_coursemodule_element_values |
( |
\stdClass | $modinstance, |
|
|
string | $component, |
|
|
string | $capabilityforgroups = 'moodle/course:manageactivities', |
|
|
string | $capabilityforintro = null ) |
|
static |
Add the value of all the standard fields to the results to be returned by the service.
This is designed to be used in the implementation of the get_..._by_courses web service methods.
Note that $modinstance is also updated in-place.
- Parameters
-
stdClass | $modinstance | one of the objects returned from a call to { |
- See also
- get_all_instances_in_courses()}.
- Parameters
-
string | $component | the plugin name, e.g. 'mod_book'. |
string | $capabilityforgroups | capability to check before including group/visible/section info in the results. |
string | null | $capabilityforintro | capability to check before including intro info in the results. null means always include (the default). |
- Return values
-
array | with the containing all the values declared in { |
- See also
- standard_coursemodule_elements_returns()}.
◆ standard_coursemodule_elements_returns()
static core_course\external\helper_for_get_mods_by_courses::standard_coursemodule_elements_returns |
( |
bool | $introoptional = false | ) |
|
|
static |
Get the list of standard fields, to add to the declaration of the return values.
Example usage combine the fields returned here with any extra ones your activity uses:
public static function execute_returns() { return new external_single_structure([ 'bigbluebuttonbns' => new external_multiple_structure( new external_single_structure(array_merge( helper_for_get_mods_by_courses\standard_coursemodule_elements_returns(), [ 'meetingid' => new external_value(PARAM_RAW, 'Meeting id'), 'timemodified' => new external_value(PARAM_INT, 'Last time the instance was modified'), ] )) ), 'warnings' => new external_warnings(), ] ); }
- Parameters
-
bool | $introoptional | if true, the intro fields are marked as optional. Default false. |
- Return values
-
external_description[] | array of standard fields, to which you can add your activity-specific ones. |
The documentation for this class was generated from the following file:
- course/classes/external/helper_for_get_mods_by_courses.php