Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-28602

Quiz attempt report wrong duration

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1.2
    • Component/s: Quiz
    • Labels:
      None
    • Testing Instructions:
      Hide
      • Make sure there's a completed quiz attempt in a course.
      • As an admin, visit the course and find the quiz.
      • Access the list of quiz attempts
      • Note the duration listed in this table (should be the actual, correct duration), see err01.png
      • Click the review attempt link below the users name
      • Note the duration - it appears to be very different than before noted, see err02.png
      Show
      Make sure there's a completed quiz attempt in a course. As an admin, visit the course and find the quiz. Access the list of quiz attempts Note the duration listed in this table (should be the actual, correct duration), see err01.png Click the review attempt link below the users name Note the duration - it appears to be very different than before noted, see err02.png
    • Workaround:
      Hide

      The problem appears to be caused by format_time() being called twice on the $timetaken variable in moodle/mod/quiz/review.php.
      Removing the call to format_time() from line 176 in that file, fixes the issue:
      Before:
      'content' => format_time($timetaken),
      After:
      'content' => $timetaken,

      Show
      The problem appears to be caused by format_time() being called twice on the $timetaken variable in moodle/mod/quiz/review.php. Removing the call to format_time() from line 176 in that file, fixes the issue: Before: 'content' => format_time($timetaken), After: 'content' => $timetaken,
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When viewing the details of a quiz attempt, the duration is invalid. Often indicates few seconds even if the actual duration is more than an hour.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Oct/11