Moodle

Timer covers first question in secure quiz window

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9
  • Component/s: Quiz
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

If you have secure window mode on, a time limit, and not enough questions per page to make the window scrollable, then there is no way to the test taker to see the entire first question in the window, as it is perfectly covered by the timer window.

This appears to be because the timer is set down from the top of the page so that it doesn't cover the navigation bar, but in secure mode the navigation bar is absent, so the timer is down over the first question. See the attached screen shot.

I fixed it by changing line 51 in mod/quiz/jstimer.php from
var theTop = 10;
to
var theTop = <?php echo $popup ? 10 : 100; ?>;

And line 85 in mod/quiz/quiz.js from
pos += 100;
to
pos += 10;

This second change also makes the timer more 'elegant' on non-secure quizes, as it wont cover the navigation bar, but as you scroll down the timer will 'float' to the top of the page.

-eric

Issue Links

Activity

Hide
Tim Hunt added a comment -

Please search for existing issues before filing a new one.

Show
Tim Hunt added a comment - Please search for existing issues before filing a new one.
Hide
Nicolas Martignoni added a comment -

Closing as dupe.

Show
Nicolas Martignoni added a comment - Closing as dupe.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: