MDL-66446 course: Make sure tags are on when logging updated settings

This commit is contained in:
Jun Pataleta 2019-08-20 15:27:02 +08:00
parent 9e4178a465
commit 50987d04ea

View File

@ -2558,7 +2558,7 @@ function update_course($data, $editoroptions = NULL) {
// The summary might be very long, we don't wan't to fill up the log record with the full text.
$updatedfields[$field] = '(updated)';
}
} else if ($field == 'tags') {
} else if ($field == 'tags' && !empty($CFG->usetags)) {
// Tags might not have the same array keys, just check the values.
if (array_values($data->$field) !== array_values($value)) {
$updatedfields[$field] = $data->$field;