Skip to content

Commit

Permalink
Merge branch 'MDL-53788_modlti_master' of git://github.com/nhoobin/mo…
Browse files Browse the repository at this point in the history
…odle
  • Loading branch information
andrewnicols authored and danpoltawski committed Jun 16, 2016
2 parents 00f99e2 + 1512f61 commit a029e52
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin/tool/multilangupgrade/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@

/// 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/'));
Expand Down
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
2 changes: 1 addition & 1 deletion user/profile/definelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit a029e52

Please sign in to comment.