diff --git a/mod/quiz/comment.php b/mod/quiz/comment.php index c1961ab..3b0e11b 100644 --- a/mod/quiz/comment.php +++ b/mod/quiz/comment.php @@ -78,7 +78,12 @@ if (data_submitted() && confirm_sesskey()) { 'other' => array( 'quizid' => $attemptobj->get_quizid(), 'attemptid' => $attemptobj->get_attemptid(), - 'slot' => $slot + /* + The following line is a VLACS HACK FOR MANUAL_GRADING_TODO + It allows to retrieve the question attempt. + */ + 'questionusageid' => $attemptobj->get_question_attempt($slot)->get_usage_id(), + 'slot' => $slot, ) ); $event = \mod_quiz\event\question_manually_graded::create($params); diff --git a/mod/quiz/report/grading/report.php b/mod/quiz/report/grading/report.php index 138a2ec..29ed54b 100644 --- a/mod/quiz/report/grading/report.php +++ b/mod/quiz/report/grading/report.php @@ -499,6 +499,11 @@ class quiz_grading_report extends quiz_default_report { 'other' => array( 'quizid' => $attemptobj->get_quizid(), 'attemptid' => $attemptobj->get_attemptid(), + /* + The following line is a VLACS HACK FOR MANUAL_GRADING_TODO + It allows to retrieve the question attempt. + */ + 'questionusageid' => $attemptobj->get_question_attempt($assumedslotforevents)->get_usage_id(), 'slot' => $assumedslotforevents ) );