mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-78427 core_theme: Add theme usage report and icon
In addition to adding in theme usage reports, there is also the addition of an icon on the theme cards which takes you to the report. This icon only appears for that theme if it has been used in any overriding context.
This commit is contained in:
parent
f30110b5eb
commit
40d397ab5f
24 changed files with 1157 additions and 10 deletions
|
@ -101,6 +101,15 @@ function cohort_update_cohort($cohort) {
|
|||
if (empty($CFG->allowcohortthemes) && isset($cohort->theme)) {
|
||||
unset($cohort->theme);
|
||||
}
|
||||
|
||||
// Delete theme usage cache if the theme has been changed.
|
||||
if (isset($cohort->theme)) {
|
||||
$oldcohort = $DB->get_record('cohort', ['id' => $cohort->id]);
|
||||
if ($cohort->theme != $oldcohort->theme) {
|
||||
theme_delete_used_in_context_cache($cohort->theme, $oldcohort->theme);
|
||||
}
|
||||
}
|
||||
|
||||
$cohort->timemodified = time();
|
||||
|
||||
// Update custom fields if there are any of them in the form.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue