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

Additional HTML not added in full screen mode for a quiz

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.2, 2.6.1, 2.7
    • Fix Version/s: 2.5.5, 2.6.2
    • Component/s: Quiz, Themes
    • Labels:
    • Testing Instructions:
      Hide
      1. Add something obvious like <script type="text/javascript">alert('hello world!');</script> to Admin -> Appearance -> Additional HTML -> Before BODY is closed (additionalhtmlfooter).
      2. Create a quiz with Browser security set to ... pop-up ....
      3. Attempt that quiz as a student. make sure that when the quiz loads in the pop-up, you see the alert.
      Show
      Add something obvious like <script type="text/javascript">alert('hello world!');</script> to Admin -> Appearance -> Additional HTML -> Before BODY is closed (additionalhtmlfooter). Create a quiz with Browser security set to ... pop-up .... Attempt that quiz as a student. make sure that when the quiz loads in the pop-up, you see the alert.
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Additional html is not included in full screen mode of a quiz. To reproduce:

      In the additional html section of administration, add a footer with javascript e.g.

      <script type="text/javascript">

      //<![CDATA[

      alert("hello");

      //]]></script>

      Of course this will create an alert on every page navigation. The alert will appear in all quiz pages as expected.

      Now edit a quiz setting and in the Extra restrictions on attempts section choose browser security as Full screen pop-up with some javascript security. After setting the extra security the alert will still show on all pages except quiz pages. The alert does not show even when taking the quiz as an administrator (sort of preview). Viewing the source shows that the alert footer is added to all pages except the quiz pages. This happens for both https and http.

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            moodleuseruk Wayne Prescott
            Peer reviewer:
            Mary Evans
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Petr Skoda
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Bas Brands
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              10/Mar/14