MDL-40063 mod_quiz: replaced 'addcategory' add_to_log call with an event

This commit is contained in:
Mark Nelson 2013-11-19 20:49:17 -08:00
parent 5e8f736565
commit 58940b190a
5 changed files with 167 additions and 3 deletions

View file

@ -404,6 +404,15 @@ class question_category_object {
$cat->sortorder = 999;
$cat->stamp = make_unique_id_code();
$categoryid = $DB->insert_record("question_categories", $cat);
// Log the creation of this category.
$params = array(
'objectid' => $categoryid,
'contextid' => $contextid
);
$event = \core\event\question_category_created::create($params);
$event->trigger();
if ($return) {
return $categoryid;
} else {