projects
/
moodle-mod_attendance.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a4883c
)
clear course cache during upgrade
author
Dan Marsden
<dan@danmarsden.com>
Tue, 6 Aug 2013 20:49:17 +0000
(08:49 +1200)
committer
Dan Marsden
<dan@danmarsden.com>
Tue, 6 Aug 2013 20:49:17 +0000
(08:49 +1200)
locallib.php
patch
|
blob
|
history
diff --git
a/locallib.php
b/locallib.php
index
4b60f9a
..
d26e464
100644
(file)
--- a/
locallib.php
+++ b/
locallib.php
@@
-1398,4
+1398,11
@@
function attforblock_upgrade() {
// Now convert module record.
$module->name = 'attendance';
$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();
}
\ No newline at end of file