| Línea 103... |
Línea 103... |
| 103 |
$result->section[] = $sectionstate->export_for_template($renderer);
|
103 |
$result->section[] = $sectionstate->export_for_template($renderer);
|
| 104 |
}
|
104 |
}
|
| 105 |
}
|
105 |
}
|
| Línea 106... |
Línea 106... |
| 106 |
|
106 |
|
| 107 |
foreach ($modinfo->cms as $cm) {
|
107 |
foreach ($modinfo->cms as $cm) {
|
| 108 |
if ($cm->is_visible_on_course_page()) {
|
108 |
if ($cm->is_visible_on_course_page() && $cm->is_of_type_that_can_display()) {
|
| 109 |
// Only return this course module data if it's visible by current user on the course page.
|
109 |
// Only return this course module data if it's visible by current user on the course page.
|
| 110 |
$section = $sections[$cm->sectionnum];
|
110 |
$section = $sections[$cm->sectionnum];
|
| 111 |
$cmstate = new $cmclass($courseformat, $section, $cm, istrackeduser: $istrackeduser);
|
111 |
$cmstate = new $cmclass($courseformat, $section, $cm, istrackeduser: $istrackeduser);
|
| 112 |
$result->cm[] = $cmstate->export_for_template($renderer);
|
112 |
$result->cm[] = $cmstate->export_for_template($renderer);
|