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

Additional div defined in theme HTML is stripped out only when using 'Log in as'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.3, 3.6.3
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE

      Description

      Initial setup:

      1. Enrol a test student in a course

      2. Log in with admin account and add the following to Raw SCSS in site/admin/settings.php?section=themesettingboost>Advanced settings:

      #redtext {text-align: center; color: #ff0000;}

      3. Access test course and edit first topic section.

      4. Expand editor and enable HTML entry mode. Paste in the following HTML then save

      <div id="redtext">
      <p>This text is red and centre-aligned</p>
      </div>

       

      Scenario 1 - Admin view:
      1. View the section on the course page from initial setup

      Observed behaviour: Text displays centred and red

       

      Scenario 2 - Student account view:
      1. Open a private browsing window and log into the site using username/password of the test student enrolled in the course
      2. View the section on the course page

      Observed behaviour: Text displays centred and red

       

      Scenario 3 - 'Log in as' Student account view:
      1. Logged into the admin account, navigate to the course users list
      2. Click on the test student's name to go their profile
      3. Click 'Log in as'

      Observed behaviour: Text does not have the additional formatting. Inspecting element shows the div id attribute stripped out:

      <div>
      <p>This text is red and centre-aligned</p>
      </div>

      Expected behaviour: Text displays centred and red i.e. consistently with other views.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              prankin Phillip Rankin
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: