MDL-24927 fixed orphaned activities regression when single topic selected

This commit is contained in:
Petr Skoda 2010-10-29 20:01:21 +00:00
parent 8dc68e3e7c
commit 36b1c872a3
2 changed files with 2 additions and 2 deletions

View file

@ -255,7 +255,7 @@ while ($section <= $course->numsections) {
$section++; $section++;
} }
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) { if (!$displaysection and $PAGE->user_is_editing() and has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
// print stealth sections if present // print stealth sections if present
$modinfo = get_fast_modinfo($course); $modinfo = get_fast_modinfo($course);
foreach ($sections as $section=>$thissection) { foreach ($sections as $section=>$thissection) {

View file

@ -256,7 +256,7 @@ defined('MOODLE_INTERNAL') || die();
$weekdate = $nextweekdate; $weekdate = $nextweekdate;
} }
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) { if (!$displaysection and $PAGE->user_is_editing() and has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
// print stealth sections if present // print stealth sections if present
$modinfo = get_fast_modinfo($course); $modinfo = get_fast_modinfo($course);
foreach ($sections as $section=>$thissection) { foreach ($sections as $section=>$thissection) {