Skip to content

Commit

Permalink
MDL-24927 fixed orphaned activities regression when single topic sele…
Browse files Browse the repository at this point in the history
…cted
  • Loading branch information
skodak committed Oct 29, 2010
1 parent 8dc68e3 commit 36b1c87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion course/format/topics/format.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
$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
$modinfo = get_fast_modinfo($course);
foreach ($sections as $section=>$thissection) {
Expand Down
2 changes: 1 addition & 1 deletion course/format/weeks/format.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
$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
$modinfo = get_fast_modinfo($course);
foreach ($sections as $section=>$thissection) {
Expand Down

0 comments on commit 36b1c87

Please sign in to comment.