Merge branch 'MDL-49146_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE
This commit is contained in:
@@ -230,8 +230,16 @@ class format_singleactivity extends format_base {
|
||||
}
|
||||
|
||||
// Make sure the current activity is in the 0-section.
|
||||
$changed = false;
|
||||
if ($activity && $activity->sectionnum != 0) {
|
||||
moveto_module($activity, $modinfo->get_section_info(0));
|
||||
$changed = true;
|
||||
}
|
||||
if ($activity && !$activity->visible) {
|
||||
set_coursemodule_visible($activity->id, 1);
|
||||
$changed = true;
|
||||
}
|
||||
if ($changed) {
|
||||
// Cache was reset so get modinfo again.
|
||||
$modinfo = get_fast_modinfo($this->courseid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user