Skip to content

Commit

Permalink
Fix unit test - Resolves issue #659
Browse files Browse the repository at this point in the history
  • Loading branch information
petersistrom committed Apr 14, 2023
1 parent fdc37df commit 26843fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/modules/turnitin_quiz.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public function update_mark($attemptid, $identifier, $userid, $grade, $quizgrade
foreach ($attempt->get_slots() as $slot) {
$answer = $attempt->get_question_attempt($slot)->get_response_summary();
// Check if this is the slot the mark is for by matching content.
if (sha1($answer.$slot) == $identifier) {
$answerslot = $answer ? $answer.$slot : $answer;
if (sha1($answerslot) == $identifier) {
// Translate the TFS grade to a mark for the question.
$questionmaxmark = $attempt->get_question_attempt($slot)->get_max_mark();

Expand Down

0 comments on commit 26843fb

Please sign in to comment.