Skip to content

Commit

Permalink
Add namespaces for mod_quiz
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-tii committed Dec 2, 2024
1 parent 5e7fbf8 commit d7d6173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2614,7 +2614,7 @@ public function event_handler($eventdata) {

// Queue every question submitted in a quiz attempt.
if ($eventdata['eventtype'] == 'quiz_submitted') {
$attempt = quiz_attempt::create($eventdata['objectid']);
$attempt = mod_quiz\quiz_attempt::create($eventdata['objectid']);
foreach ($attempt->get_slots() as $slot) {
$qa = $attempt->get_question_attempt($slot);
if ($qa->get_question()->get_type_name() != 'essay') {
Expand Down Expand Up @@ -3216,7 +3216,7 @@ function plagiarism_turnitin_send_queued_submissions() {

require_once($CFG->dirroot . '/mod/quiz/locallib.php');
try {
$attempt = quiz_attempt::create($queueditem->itemid);
$attempt = mod_quiz\quiz_attempt::create($queueditem->itemid);
} catch (Exception $e) {
plagiarism_turnitin_activitylog(get_string('errorcode14', 'plagiarism_turnitin'), "PP_NO_ATTEMPT");
$errorcode = 14;
Expand Down

0 comments on commit d7d6173

Please sign in to comment.