MDL-34829 course - allow directly linked sections to work.
authorDan Poltawski <dan@moodle.com>
Fri, 10 Aug 2012 05:49:53 +0000 (13:49 +0800)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 14 Aug 2012 20:56:36 +0000 (22:56 +0200)
Even if not in single section mode.

course/format/topics/format.php
course/format/weeks/format.php

index 0764ceb..51acd38 100644 (file)
@@ -46,7 +46,7 @@ if (($marker >=0) && has_capability('moodle/course:setcurrentsection', $context)
 
 $renderer = $PAGE->get_renderer('format_topics');
 
-if (!empty($displaysection) && $course->coursedisplay == COURSE_DISPLAY_MULTIPAGE) {
+if (!empty($displaysection)) {
     $renderer->print_single_section_page($course, $sections, $mods, $modnames, $modnamesused, $displaysection);
 } else {
     $renderer->print_multiple_section_page($course, $sections, $mods, $modnames, $modnamesused);
index 5d70cc5..2f0eb51 100644 (file)
@@ -39,7 +39,7 @@ if ($week = optional_param('week', 0, PARAM_INT)) {
 
 $renderer = $PAGE->get_renderer('format_weeks');
 
-if (!empty($displaysection) && $course->coursedisplay == COURSE_DISPLAY_MULTIPAGE) {
+if (!empty($displaysection)) {
     $renderer->print_single_section_page($course, $sections, $mods, $modnames, $modnamesused, $displaysection);
 } else {
     $renderer->print_multiple_section_page($course, $sections, $mods, $modnames, $modnamesused);