|
| rename (int $cmid, string $name) |
| Rename a course module.
|
|
| set_visibility (int $cmid, int $visible, int $visibleoncoursepage=1, bool $rebuildcache=true) |
| Update a course module.
|
|
|
stdClass stdClass | $course |
| the course object.
|
|
◆ get_cm_info()
core_courseformat\local\baseactions::get_cm_info |
( |
| $cmid | ) |
|
|
protectedinherited |
Get the cm info.
- Parameters
-
- Return values
-
cm_info|null | Information for numbered cm or null if not found |
◆ get_course()
core_courseformat\local\baseactions::get_course |
( |
| ) |
|
|
protectedinherited |
Get the course.
- Return values
-
stdClass | the course object. |
◆ get_format()
core_courseformat\local\baseactions::get_format |
( |
| ) |
|
|
protectedinherited |
Get the course format.
- Return values
-
course_format | the course format. |
◆ get_section_info()
core_courseformat\local\baseactions::get_section_info |
( |
| $sectionid, |
|
|
int | $strictness = IGNORE_MISSING ) |
|
protectedinherited |
Get the section info.
- Parameters
-
int | $sectionid | the section id. |
int | $strictness | Use MUST_EXIST to throw exception if it doesn't |
- Return values
-
section_info|null | Information for numbered section or null if not found |
◆ rename()
core_courseformat\local\cmactions::rename |
( |
int | $cmid, |
|
|
string | $name ) |
Rename a course module.
- Parameters
-
int | $cmid | the course module id. |
string | $name | the new name. |
- Return values
-
bool | true if the course module was renamed, false otherwise. |
◆ set_visibility()
core_courseformat\local\cmactions::set_visibility |
( |
int | $cmid, |
|
|
int | $visible, |
|
|
int | $visibleoncoursepage = 1, |
|
|
bool | $rebuildcache = true ) |
Update a course module.
- Parameters
-
int | $cmid | the course module id. |
int | $visible | state of the module |
int | $visibleoncoursepage | state of the module on the course page |
bool | $rebuildcache | If true (default), perform a partial cache purge and rebuild. |
- Return values
-
bool | whether course module was updated |
◆ update_delegated()
core_courseformat\local\cmactions::update_delegated |
( |
stdClass | $cm, |
|
|
array | $sectionfields, |
|
|
bool | $rebuildcache = true ) |
|
protected |
Update a course delegated section linked to the given module.
- Parameters
-
stdClass | $cm | |
array | $sectionfields | to change in section database record. |
bool | $rebuildcache | If true (default), perform a partial cache purge and rebuild. |
- Return values
-
bool | true if any delegated section has been updated, false otherwise. |
The documentation for this class was generated from the following file:
- course/format/classes/local/cmactions.php