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

Global scales can give permission error when viewing help

XMLWordPrintable

    • MOODLE_22_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • Hide

      As Admin:

      1. Create a forum that use standard scale rating (eg: scale: separate and connected ways of knowing).
      2. Add a topic or post.

      As a teacher (Role = standard editingteacher and make sure teacher role doesn't has System permission)

      1. Access same rated forum.
      2. Click info/help icon beside scale.

      Make sure the scales help displays without error.

      Show
      As Admin: Create a forum that use standard scale rating (eg: scale: separate and connected ways of knowing). Add a topic or post. As a teacher (Role = standard editingteacher and make sure teacher role doesn't has System permission) Access same rated forum. Click info/help icon beside scale. Make sure the scales help displays without error.

      Viewing help for scale displays an error for a user (teacher) with the capability.

      Steps to Reproduce

      1. Click a rated forum that uses a scale as a student.
      2. Add a topic or post.
      3. As a teacher (Role = standard editingteacher) access same rated forum.
      4. Click info/help icon beside scale.
        Expected - Scales help displays.
        Actual - Error displays and reads:

      Sorry, but you do not currently have permissions to do that (View scales)

      More information about this error

      Stack trace:

      • line 691 of /lib/accesslib.php: required_capability_exception thrown
      • line 50 of /course/scales.php: call to require_capability()

      The cause:

      This is caused because the scale is associated with courseid = 0 (a global scale) so the context is set to the site instead of the course that the user is currently in.

            rwijaya Rossiani Wijaya
            bushido Mark Nielsen (Inactive)
            Mark Nelson Mark Nelson
            Dan Poltawski Dan Poltawski
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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