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

Quiz sometimes displays incorrect time left when quiz close date before time limit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.5.5, 3.6.3
    • 2.3.10, 2.4.7, 2.5.3, 2.6, 3.3.4, 3.4.2
    • Quiz

      The quiz timer displays incorrect time remaining for quizzes where the time limit is greater than the time left before the quiz closes and where there is more than an hour left before closing.

      For example:

      Quiz close time: 5:00 pm
      Quiz time limit: 3 hours

      In this example, if the student starts an exam any time between 2:01 pm and 3:59 pm, they will receive a timer that extends passed the closing time of the exam. If they trust the timer and submit any time after 5:00 pm ( +grace period ), the exam will not submit.

      The following cases are true:

      If the student opens/reloads the exam at 1:30 pm the timer will show 3 hours, this is correct.
      If the student opens/reloads the exam at 3:00 pm the timer will show 3 hours, this is not correct (2 hours remain).
      If the student opens/reloads the exam at 4:15 pm the timer will show 45 minutes, this is correct.

      The problem exists within the openclosedate rule located in mod/quiz/accessrule/openclosedate/rule.php:106. The rule only returns a time_left_display if the time left is less than QUIZ_SHOW_TIME_BEFORE_DEADLINE which is defined as 3600 (1 hour) at mod/quiz/locallib.php:49

      Since the openclosedate rule only returns a time if the quiz is within an hour before closing, the evaluation of the lowest time remaining (done at mod/quiz/accessmanager.php:442) results in the timer value.

            rezaie9 Shamim Rezaie
            smbader Steve Bader
            Tim Hunt Tim Hunt
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            11 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.