Add question_deleted and question_removed_from_quiz to course audit events - refs #3040

pull/3053/head
Yannick Warnier 6 years ago
parent e0787a5ad8
commit 03903ef0f2
  1. 10
      main/exercise/question.class.php
  2. 2
      main/inc/lib/api.lib.php

@ -1412,6 +1412,11 @@ abstract class Question
'QuizQuestionDeleted',
api_get_user_id()
);
Event::addEvent(
LOG_QUESTION_DELETED,
LOG_QUESTION_ID,
$this->iid
);
$this->removePicture();
} else {
// just removes the exercise from the list
@ -1428,6 +1433,11 @@ abstract class Question
'QuizQuestionDeleted',
api_get_user_id()
);
Event::addEvent(
LOG_QUESTION_REMOVED_FROM_QUIZ,
LOG_QUESTION_ID,
$this->iid
);
}
return true;

@ -279,6 +279,8 @@ define('LOG_USER_DELETE_ACCOUNT_REQUEST', 'user_delete_account_request');
define('LOG_QUESTION_CREATED', 'question_created');
define('LOG_QUESTION_UPDATED', 'question_updated');
define('LOG_QUESTION_DELETED', 'question_deleted');
define('LOG_QUESTION_REMOVED_FROM_QUIZ', 'question_removed_from_quiz');
define('USERNAME_PURIFIER', '/[^0-9A-Za-z_\.-]/');

Loading…
Cancel
Save