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

        1. err01.png
          43 kB
        2. err02.png
          28 kB

          Activity

          Hide
          colchambers Colin Chambers added a comment -

          I don't have permission to review but checked both diffs. Looks good to me

          Show
          colchambers Colin Chambers added a comment - I don't have permission to review but checked both diffs. Looks good to me
          Hide
          timhunt Tim Hunt added a comment -

          Thanks for the review Colin. Submitting for integration.

          Show
          timhunt Tim Hunt added a comment - Thanks for the review Colin. Submitting for integration.
          Hide
          m.tausen Mathias Tausen added a comment -

          Thanks for the quick response & processing guys, good to see that even small bugs are taken seriously.

          Show
          m.tausen Mathias Tausen added a comment - Thanks for the quick response & processing guys, good to see that even small bugs are taken seriously.
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Thanks guys, this has been integrated now

          Show
          samhemelryk Sam Hemelryk added a comment - Thanks guys, this has been integrated now
          Hide
          nebgor Aparup Banerjee added a comment -

          worked for me.

          Show
          nebgor Aparup Banerjee added a comment - worked for me.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Sent upstream and closing, many thanks!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Sent upstream and closing, many thanks!

            People

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

              Dates

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