Base class to render a course module inside a course format.
More...
|
| add_alternative_content_data (stdClass &$data, renderer_base $output) |
| Add the alternative content to the data structure.
|
|
| add_availability_data (stdClass &$data, renderer_base $output) |
| Add the module availability to the data structure.
|
|
| add_cm_name_data (stdClass &$data, renderer_base $output) |
| Add course module name attributes to the data structure.
|
|
| add_completion_data (stdClass &$data, renderer_base $output) |
| Add activity completion information to the data structure.
|
|
| add_dates_data (stdClass &$data, renderer_base $output) |
| Add activity dates information to the data structure.
|
|
| add_editor_data (stdClass &$data, renderer_base $output) |
| Add course editor attributes to the data structure.
|
|
| add_format_data (stdClass &$data, array $haspartials, renderer_base $output) |
| Add activity information to the data structure.
|
|
| add_groupmode_data (stdClass &$data, renderer_base $output) |
| Add group mode information to the data structure.
|
|
| add_visibility_data (stdClass &$data, renderer_base $output) |
| Add visibility information to the data structure.
|
|
| load_classes () |
| Returns the CSS classes for the activity name/content.
|
|
|
string | $availabilityclass |
| the activity availability class name
|
|
string | $cmnameclass |
| the activity name output class name
|
|
string | $completionclass |
| the activity completion class name
|
|
string | $controlmenuclass |
| the activity control menu class name
|
|
array | $displayoptions |
| optional display options
|
|
course_format | $format |
| the course format
|
|
string | $groupmodeclass |
| the activity groupmode badge class name
|
|
cm_info | $mod |
| the course module instance
|
|
string | $visibilityclass |
| the activity visibility class name
|
|
Base class to render a course module inside a course format.
- Copyright
- 2020 Ferran Recio ferra.nosp@m.n@mo.nosp@m.odle..nosp@m.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_courseformat\output\local\content\cm::__construct |
( |
course_format | $format, |
|
|
section_info | $section, |
|
|
cm_info | $mod, |
|
|
array | $displayoptions = [] ) |
Constructor.
- Parameters
-
course_format | $format | the course format |
section_info | $section | the section info |
cm_info | $mod | the course module ionfo |
array | $displayoptions | optional extra display options |
◆ add_alternative_content_data()
core_courseformat\output\local\content\cm::add_alternative_content_data |
( |
stdClass & | $data, |
|
|
renderer_base | $output ) |
|
protected |
Add the alternative content to the data structure.
- Parameters
-
stdClass | $data | the current cm data reference |
renderer_base | $output | typically, the renderer that's calling this function |
- Return values
-
bool | if the cm has alternative content |
◆ add_availability_data()
core_courseformat\output\local\content\cm::add_availability_data |
( |
stdClass & | $data, |
|
|
renderer_base | $output ) |
|
protected |
Add the module availability to the data structure.
- Parameters
-
stdClass | $data | the current cm data reference |
renderer_base | $output | typically, the renderer that's calling this function |
- Return values
-
bool | if the cm has mod availability |
◆ add_cm_name_data()
core_courseformat\output\local\content\cm::add_cm_name_data |
( |
stdClass & | $data, |
|
|
renderer_base | $output ) |
|
protected |
Add course module name attributes to the data structure.
- Parameters
-
stdClass | $data | the current cm data reference |
renderer_base | $output | typically, the renderer that's calling this function |
- Return values
-
bool | if the cm has name data |
◆ add_completion_data()
core_courseformat\output\local\content\cm::add_completion_data |
( |
stdClass & | $data, |
|
|
renderer_base | $output ) |
|
protected |
Add activity completion information to the data structure.
- Parameters
-
stdClass | $data | the current cm data reference |
renderer_base | $output | typically, the renderer that's calling this function |
- Return values
-
bool | the module has completion information |
◆ add_dates_data()
core_courseformat\output\local\content\cm::add_dates_data |
( |
stdClass & | $data, |
|
|
renderer_base | $output ) |
|
protected |
Add activity dates information to the data structure.
- Parameters
-
stdClass | $data | the current cm data reference |
renderer_base | $output | typically, the renderer that's calling this function |
- Return values
-
bool | the module has completion information |
◆ add_editor_data()
core_courseformat\output\local\content\cm::add_editor_data |
( |
stdClass & | $data, |
|
|
renderer_base | $output ) |
|
protected |
Add course editor attributes to the data structure.
- Parameters
-
stdClass | $data | the current cm data reference |
renderer_base | $output | typically, the renderer that's calling this function |
- Return values
-
bool | if the cm has editor data |
◆ add_format_data()
core_courseformat\output\local\content\cm::add_format_data |
( |
stdClass & | $data, |
|
|
array | $haspartials, |
|
|
renderer_base | $output ) |
|
protected |
Add activity information to the data structure.
- Parameters
-
stdClass | $data | the current cm data reference |
bool[] | $haspartials | the result of loading partial data elements |
renderer_base | $output | typically, the renderer that's calling this function |
- Return values
-
bool | if the cm has format data |
◆ add_groupmode_data()
core_courseformat\output\local\content\cm::add_groupmode_data |
( |
stdClass & | $data, |
|
|
renderer_base | $output ) |
|
protected |
Add group mode information to the data structure.
- Parameters
-
stdClass | $data | the current cm data reference |
renderer_base | $output | typically, the renderer that's calling this function |
- Return values
-
bool | the module has group mode information |
◆ add_visibility_data()
core_courseformat\output\local\content\cm::add_visibility_data |
( |
stdClass & | $data, |
|
|
renderer_base | $output ) |
|
protected |
Add visibility information to the data structure.
- Parameters
-
stdClass | $data | the current cm data reference |
renderer_base | $output | typically, the renderer that's calling this function |
- Return values
-
bool | if the cm has visibility data |
◆ export_for_template()
core_courseformat\output\local\content\cm::export_for_template |
( |
renderer_base | $output | ) |
|
Export this data so it can be used as the context for a mustache template.
- Parameters
-
renderer_base | $output | typically, the renderer that's calling this function |
- Return values
-
stdClass | data context for a mustache template |
Implements templatable.
◆ get_link_classes()
core_courseformat\output\local\content\cm::get_link_classes |
( |
| ) |
|
Get the activity link classes.
- Return values
-
string | the activity link classes. |
◆ get_onclick_code()
core_courseformat\output\local\content\cm::get_onclick_code |
( |
| ) |
|
Get the activity onclick code.
- Return values
-
string | the activity onclick. |
◆ get_template_name()
core\output\named_templatable::get_template_name |
( |
\renderer_base | $renderer | ) |
|
|
inherited |
◆ get_text_classes()
core_courseformat\output\local\content\cm::get_text_classes |
( |
| ) |
|
Get the activity text/description classes.
- Return values
-
string | the activity text classes. |
The documentation for this class was generated from the following file:
- course/format/classes/output/local/content/cm.php