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

CSS class `editing` is added to the body even if the user may not edit a course

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.9.6, 3.0.4
    • 2.9.4, 3.0.2
    • Themes
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-53407-editing-css
    • Easy
    • Hide

      1. Log on as a user who is a teacher in a course, but not an administrator of the page
      2. Navigate to that course
      3. Switch on editing mode
      4. Inspect the `body` element's CSS classes. `editing` should present, as the user is able to edit her own course.
      4. Navigate to the front page (not the dashboard)
      5. Inspect the `body` element's CSS classes. `editing` should not be present, as the user is not able to edit the front page.

      Show
      1. Log on as a user who is a teacher in a course, but not an administrator of the page 2. Navigate to that course 3. Switch on editing mode 4. Inspect the `body` element's CSS classes. `editing` should present, as the user is able to edit her own course. 4. Navigate to the front page (not the dashboard) 5. Inspect the `body` element's CSS classes. `editing` should not be present, as the user is not able to edit the front page.

      If a user (who is a teacher in some course) chooses to be in editing mode, the CSS class `editing` is added to the body of every page, even after the user navigates to a page/course/frontpage that she may not edit.

      This came up when I used a theme that uses this class in order to adapt the display. It surrounds block areas with dashed lines, indicating that these may be edited / that they are drop zones for blocks. The dashed lines were also visible to users that are not allowed to edit the page that they are on.

      WHAT I EXPECTED
      The CSS class `editing` should only be added if the user is in editing mode AND she is allowed to edit the rendered page.

      WHAT ACTUALLY HAPPENED
      If the user is in editing mode, the CSS class `editing` is added on every page.

            Unassigned Unassigned
            jan.dagefoerde Jan Dageförde
            Andrew Lyons Andrew Lyons
            Dan Poltawski Dan Poltawski
            Ryan Wyllie Ryan Wyllie
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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