-
Improvement
-
Resolution: Fixed
-
Minor
-
2.6
-
MOODLE_26_STABLE
-
MOODLE_26_STABLE
-
wip-
MDL-41181-master -
At the moment function moveto_module($mod, $section, $beforemod=NULL) may modify the value of $mod->visible . It is only needed for /course/reset.php to serve AJAX requests to move the module.
First argument may be an instance of cm_info. In MDL-34397 I'm making all properties of cm_info read-only and this function is the only problem.
Instead moveto_module may return the new value for module visibility.
Also to mention that modifying JUST $mod->visible is not correct anyway. Other properties such as $mod->uservisible may be affected by this change as well.