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

Timer covers first question in secure quiz window

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              emerrill Eric Merrill
              Tester:
              Nicolas Martignoni
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08