Browse Source

clear course cache during upgrade

MOODLE_23_STABLE
Dan Marsden 12 years ago
parent
commit
b1a985a486
  1. 7
      locallib.php

7
locallib.php

@ -1398,4 +1398,11 @@ function attforblock_upgrade() {
// Now convert module record. // Now convert module record.
$module->name = 'attendance'; $module->name = 'attendance';
$DB->update_record('modules', $module); $DB->update_record('modules', $module);
// Clear cache for courses with attendances.
$attendances = $DB->get_recordset('attendance', array(), '', 'courseid');
foreach ($attendances as $attendance) {
rebuild_course_cache($attendance->courseid, true);
}
$attendances->close();
} }
Loading…
Cancel
Save