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

Capability issue with gradereport - Code missing from /lib/navigationlib.php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.5, 3.3.2, 3.4
    • Fix Version/s: 3.2.6, 3.3.3
    • Component/s: Gradebook, Roles / Access
    • Labels:
    • Testing Instructions:
      Hide
      1. Enrol a user into more than one course as a student
      2. Log in as a manager.
      3. Go to "Site administration > Users > Accounts > Browse list of users"
      4. Click on a students name (from #1) to view their profile.
      5. You should see no errors.
      Show
      Enrol a user into more than one course as a student Log in as a manager. Go to "Site administration > Users > Accounts > Browse list of users" Click on a students name (from #1) to view their profile. You should see no errors.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      wip-MDL-60314-master

      Description

      Original issue logged on Moodle.org Usability Forum: https://moodle.org/mod/forum/discuss.php?d=358694
      ==============================================

      An error (possibly introduced during upgrade of 3.3.1 -> 3.3.2) is affecting our Manager roles (not the System Admins) whilst viewing a User Profile from Browse List of Users. The following errors are displayed (alongside additional stack trace):

       

      • Capability "gradereport/report_completion:view" was not found! This has to be fixed in code.
      • Capability "gradereport/report_log:view" was not found! This has to be fixed in code.
      • Capability "gradereport/report_outline:view" was not found! This has to be fixed in code.
      • Capability "gradereport/report_stats:view" was not found! This has to be fixed in code.
      • Capability "gradereport/report_usersessions:view" was not found! This has to be fixed in code.

      Moodle documentation on the Grader Report (https://docs.moodle.org/33/en/Grader_report) indicates there is a single Capability available of grader:view (https://docs.moodle.org/33/en/Capabilities/gradereport/grader:view)

      Having checked the System Admin | User | Permissions | Capability Overview, I can find only the following capabilities, the errors above are missing!

       

      • gradereport/grader:view: View the grader report
      • gradereport/history:view: View the grade history
      • gradereport/outcomes:view: View the outcomes report
      • gradereport/overview:view: View the overview report
      • gradereport/singleview:view: View report
      • gradereport/user:view: View your own grade report

      Our Manager role is Allow on all of these.

      The stack trace indicates capability code is missing from line 2423 of /lib/navigationlib.php see attachment for full error stack.

      I've also had a look in the theme | navigation customusermenuitems as this is the only other area I can find that talks about 'Grades' and 'Reports'.

      I would really value any ideas as to where to start on fixing this? Many thanks.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marina Marina Glancy
                Reporter:
                cmsitsupport CMS IT Support
                Peer reviewer:
                Mark Nelson
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Simey Lameze
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Ryan Wyllie, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Nov/17