-
Bug
-
Resolution: Fixed
-
Major
-
2.3.6, 2.4.3
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MOODLE_24_STABLE, MOODLE_25_STABLE
-
If you try to initialise a timer in the browser by using yui_module or js_init_call, then there the timer will not acutally start running until those script files have loaded, which could be a delay of several seconds.
It would be better to capture the current time ASAP in <head> using some inline JS like
M.pageloadstarttime = Date();
That lets client-side JS get a timestamp that is as close as possible to when Moodle served the page.
We need this in the quiz module to set make the count-down timer as accurate as possible.