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

Header not printed in secure popup when students are attempting quiz

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6
    • Fix Version/s: 1.9.10
    • Component/s: Quiz, Usability
    • Labels:
      None
    • Environment:
      IE
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      When is the quiz set up to be opened in secure window, header is not printed in opened popup with input box for password. This only affects student role.
      On non english languages this can be a problem, because IE is not catching charset setting from the parent that opened a popup but is forcing charset from locale settings (imho) >> gibberish.

      Problem is in attempt.php file on line 119 in this part of the code:
      <code>
      if (empty($popup)) {
      print_header('', '', '', 'quizpassword');
      }
      </code>

      $popup is for student true, therefore header is not printed. Imho the popup check here is unnecessary. Bare header doesn't allow student to wander off the page. Or if someone can enlighten me what could be the possible problem if the header were printed on this page.

      See attached patch.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            timhunt Tim Hunt added a comment -

            I think the reason I put in the if (empty($popup)) { was because the print_footer lower down the script was wrapped in the same if, and clearly the two have to match.

            So, the right solution is to remove the 'if' statement in both places, which I have done

            Note that it seems this was already fixed in HEAD.

            Show
            timhunt Tim Hunt added a comment - I think the reason I put in the if (empty($popup)) { was because the print_footer lower down the script was wrapped in the same if, and clearly the two have to match. So, the right solution is to remove the 'if' statement in both places, which I have done Note that it seems this was already fixed in HEAD.

              People

              • Assignee:
                timhunt Tim Hunt
                Reporter:
                dolfa Petr Kalis
                Tester:
                Nobody
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Oct/10