Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
c2f4304
)
Merge branch 'MDL-49146' of git://github.com/timhunt/moodle
author
Dan Poltawski
<dan@moodle.com>
Mon, 15 Feb 2016 12:13:30 +0000
(12:13 +0000)
committer
Dan Poltawski
<dan@moodle.com>
Mon, 15 Feb 2016 12:13:30 +0000
(12:13 +0000)
course/format/singleactivity/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/course/format/singleactivity/lib.php
b/course/format/singleactivity/lib.php
index
65cd546
..
813e2c6
100644
(file)
--- a/
course/format/singleactivity/lib.php
+++ b/
course/format/singleactivity/lib.php
@@
-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);
}