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

Make the quiz timer robust if the student computer's clock suddenly jumps

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.9.12, 3.10.9, 3.11.5
    • Quiz
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE

      Apparently (https://moodle.org/mod/forum/discuss.php?d=432121) a think that happens is that the computer's have their CMOS battery die. Then, when you power them on, the clock starts at 1st Jan 1970 - until the Operating system talks to a time server, and then the clock suddenly jumps to the right time. This can cause spurious quiz submissions like this:

      1. Student restarts their computer - starts off thinking that it is 1 Jan 1970.
      2. They quickly go back to Moodle, log in, and continue their quiz attempt. Let us say that happens when their computer clock shows 1970-01-01 00:02:00, and at that time, they have 0:55:00 quiz time left.
      3. So, the quiz timer starts counting down towards 1970-01-01 00:57:00.
      4. A little bit later, the student' clock gets a time-signal an auto-corrects to some time in 2022.
      5. Well, that time in 2022 is later than 1970-01-01 00:57:00, so the quiz is submitted. (Remember, computers have no common sense.)

      I wonder if we can make the timer code robust to this?

            timhunt Tim Hunt
            timhunt Tim Hunt
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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