Merge branch 'master_MDL-74768-bulkmove-question-after-affects' of https://github.com/catalyst/moodle-MDL-72752

This commit is contained in:
Jun Pataleta
2022-07-18 13:49:44 +08:00
3 changed files with 55 additions and 3 deletions
@@ -467,6 +467,8 @@ class question_category_object {
$cat->stamp = make_unique_id_code();
}
$DB->update_record('question_categories', $cat);
// Update the set_reference records when moving a category to a different context.
move_question_set_references($cat->id, $cat->id, $oldcat->contextid, $tocontextid);
// Log the update of this category.
$event = \core\event\question_category_updated::create_from_question_category_instance($cat);