mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-33952: mod_assignment Don't hide the modules on upgrade.
This commit is contained in:
parent
efbed79063
commit
15f9dfad09
@ -108,18 +108,6 @@ function xmldb_assignment_upgrade($oldversion) {
|
||||
|
||||
if ($module = $DB->get_record("modules", array("name" => "assignment"))) {
|
||||
$DB->set_field("modules", "visible", "0", array("id" => $module->id)); // Hide module.
|
||||
// Hide all course modules.
|
||||
$sql = "UPDATE {course_modules}
|
||||
SET visibleold = visible, visible = 0
|
||||
WHERE module = ?";
|
||||
$DB->execute($sql, array($module->id));
|
||||
// Increment course.cacherev for courses where we just made something invisible.
|
||||
// This will force cache rebuilding on the next request.
|
||||
increment_revision_number('course', 'cacherev',
|
||||
"id IN (SELECT DISTINCT course
|
||||
FROM {course_modules}
|
||||
WHERE visibleold = 1 AND module = ?)",
|
||||
array($module->id));
|
||||
}
|
||||
|
||||
$count = $DB->count_records('assignment');
|
||||
|
Loading…
x
Reference in New Issue
Block a user