mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-72736-master-v3' of git://github.com/peterRd/moodle
This commit is contained in:
commit
03eca63387
2 changed files with 10 additions and 6 deletions
|
@ -79,6 +79,7 @@ class content implements renderable, templatable {
|
||||||
* @return stdClass data context for a mustache template
|
* @return stdClass data context for a mustache template
|
||||||
*/
|
*/
|
||||||
public function export_for_template(\renderer_base $output) {
|
public function export_for_template(\renderer_base $output) {
|
||||||
|
global $PAGE;
|
||||||
$format = $this->format;
|
$format = $this->format;
|
||||||
|
|
||||||
// Most formats uses section 0 as a separate section so we remove from the list.
|
// Most formats uses section 0 as a separate section so we remove from the list.
|
||||||
|
@ -99,12 +100,13 @@ class content implements renderable, templatable {
|
||||||
// The single section format has extra navigation.
|
// The single section format has extra navigation.
|
||||||
$singlesection = $this->format->get_section_number();
|
$singlesection = $this->format->get_section_number();
|
||||||
if ($singlesection) {
|
if ($singlesection) {
|
||||||
$sectionnavigation = new $this->sectionnavigationclass($format, $singlesection);
|
if (!$PAGE->theme->usescourseindex) {
|
||||||
$data->sectionnavigation = $sectionnavigation->export_for_template($output);
|
$sectionnavigation = new $this->sectionnavigationclass($format, $singlesection);
|
||||||
|
$data->sectionnavigation = $sectionnavigation->export_for_template($output);
|
||||||
$sectionselector = new $this->sectionselectorclass($format, $sectionnavigation);
|
|
||||||
$data->sectionselector = $sectionselector->export_for_template($output);
|
|
||||||
|
|
||||||
|
$sectionselector = new $this->sectionselectorclass($format, $sectionnavigation);
|
||||||
|
$data->sectionselector = $sectionselector->export_for_template($output);
|
||||||
|
}
|
||||||
$data->hasnavigation = true;
|
$data->hasnavigation = true;
|
||||||
$data->singlesection = array_shift($data->sections);
|
$data->singlesection = array_shift($data->sections);
|
||||||
$data->sectionreturn = $singlesection;
|
$data->sectionreturn = $singlesection;
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
"blocks/tests/behat/hide_blocks.feature",
|
"blocks/tests/behat/hide_blocks.feature",
|
||||||
"blocks/tests/behat/move_blocks.feature",
|
"blocks/tests/behat/move_blocks.feature",
|
||||||
"course/tests/behat/activity_navigation.feature",
|
"course/tests/behat/activity_navigation.feature",
|
||||||
"course/tests/behat/activity_navigation_with_restrictions.feature"
|
"course/tests/behat/activity_navigation_with_restrictions.feature",
|
||||||
|
"course/tests/behat/paged_course_navigation.feature",
|
||||||
|
"course/tests/behat/section_visibility.feature"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue