From 95de57b8ac92ca4f4b4785986c2ed0ef5bb8d99a Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 21 May 2008 11:10:06 +0000 Subject: [PATCH] Inconsistency between quiz attempt->id and attempt.uniqueid --- mod/quiz/lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 5b9df4eb16..cc5eb56b63 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -1054,14 +1054,14 @@ function quiz_reset_userdata($data) { * Checks whether the current user is allowed to view a file uploaded in a quiz. * Teachers can view any from their courses, students can only view their own. * - * @param int $attemptid int attempt id + * @param int $attemptuniqueid int attempt id * @param int $questionid int question id * @return boolean to indicate access granted or denied */ -function quiz_check_file_access($attemptid, $questionid) { +function quiz_check_file_access($attemptuniqueid, $questionid) { global $USER; - $attempt = get_record("quiz_attempts", 'id', $attemptid); + $attempt = get_record("quiz_attempts", 'uniqueid', $attemptid); $quiz = get_record("quiz", 'id', $attempt->quiz); $context = get_context_instance(CONTEXT_COURSE, $quiz->course); -- 2.39.5