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

    • MOODLE_35_STABLE, MOODLE_36_STABLE

      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.

            Unassigned Unassigned
            prankin Phillip Rankin
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.