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

'Locally assigned roles' disabled for admin if disabled in all roles

XMLWordPrintable

    • MOODLE_31_STABLE

      To reproduce..

      • go through your roles and switch off 'activity modules' for all instances of 'Context types where this role may be assigned'.
      • now go to any activity as admin and note that 'Locally assigned roles' link has vanished from the activity's admin menu.

      For a site admin (I think) it should still be there.

      Analysis:
      The display of 'Locally assigned roles' in the navigation relies on the number of records returned from get_assignable_roles($context) being greater than zero. This in turn checks for the 'role_context_levels' table (amongst other criteria) containing entries for the relevant context level (module / 70). Because the activity modules option has been removed from all roles there are no level 70 entries at all and even the admin will get an empty array returned.

            Unassigned Unassigned
            howardsmiller Howard Miller
            Votes:
            0 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.