diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index 1b8b6e1c8b2..f063e2f4b37 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -237,12 +237,8 @@ "$quiz->id", $cm->id); } } else { - // log continuation of attempt only if some time has lapsed - if (($timestamp - $attempt->timemodified) > 600) { // 10 minutes have elapsed - add_to_log($course->id, 'quiz', 'continue attemp', // this action used to be called 'continue attempt' but the database field has only 15 characters - "review.php?attempt=$attempt->id", - "$quiz->id", $cm->id); - } + add_to_log($course->id, 'quiz', 'continue attemp', // this action used to be called 'continue attempt' but the database field has only 15 characters + 'review.php?attempt=' . $attempt->id, $quiz->id, $cm->id); } if (!$attempt->timestart) { // shouldn't really happen, just for robustness $attempt->timestart = time(); @@ -383,9 +379,7 @@ save_question_session($question, $closestates[$key]); } - add_to_log($course->id, 'quiz', 'close attempt', - "review.php?attempt=$attempt->id", - "$quiz->id", $cm->id); + add_to_log($course->id, 'quiz', 'close attempt', 'review.php?attempt=' . $attempt->id, $quiz->id, $cm->id); } /// Update the quiz attempt and the overall grade for the quiz