Skip to content

Commit

Permalink
MDL-53788 mod_lti: fix aggressive course cache rebuilding
Browse files Browse the repository at this point in the history
  • Loading branch information
nhoobin committed Jun 15, 2016
1 parent a0a6367 commit 99a5377
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mod/lti/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,15 @@ function lti_update_type($type, $config) {
}
require_once($CFG->libdir.'/modinfolib.php');
if ($clearcache) {
rebuild_course_cache();
$sql = "SELECT DISTINCT course
FROM {lti}
WHERE typeid = ?";

$courses = $DB->get_fieldset_sql($sql, array($type->id));

foreach ($courses as $courseid) {
rebuild_course_cache($courseid, true);
}
}
}
}
Expand Down

0 comments on commit 99a5377

Please sign in to comment.