Merge branch 'MDL-53788_modlti_master' of git://github.com/nhoobin/moodle

This commit is contained in:
Andrew Nicols 2016-06-15 09:10:43 +08:00 committed by Dan Poltawski
commit a029e5212d
3 changed files with 11 additions and 3 deletions

View File

@ -121,7 +121,7 @@ echo $OUTPUT->box_end();
/// Rebuild course cache which might be incorrect now
echo $OUTPUT->notification('Rebuilding course cache...', 'notifysuccess');
rebuild_course_cache();
rebuild_course_cache(0, true);
echo $OUTPUT->notification('...finished', 'notifysuccess');
echo $OUTPUT->continue_button(new moodle_url('/admin/'));

View File

@ -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);
}
}
}
}

View File

@ -322,7 +322,7 @@ function profile_delete_field($id) {
// but show the field as missing until manually corrected to something else.
// Need to rebuild course cache to update the info.
rebuild_course_cache();
rebuild_course_cache(0, true);
// Try to remove the record from the database.
$DB->delete_records('user_info_field', array('id' => $id));