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

Grader report checking capabilities that may not exist

XMLWordPrintable

    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-52573-master
    • Hide
      1. As teacher in a course with a few students and graded activites
      2. Visit gradebook
      3. VERIFY: you visit the singleview through the grader report and user report
      4. Uninstall the singleview plugin
      5. VERIFY: the link to singleview is no longer present and no debuggign messages are experienced
      6. Uninstall the gradebook user report plugin
      7. VERIFY: the link to user report is no longer present and no debuggign messages are experienced
      Show
      As teacher in a course with a few students and graded activites Visit gradebook VERIFY: you visit the singleview through the grader report and user report Uninstall the singleview plugin VERIFY: the link to singleview is no longer present and no debuggign messages are experienced Uninstall the gradebook user report plugin VERIFY: the link to user report is no longer present and no debuggign messages are experienced

      The grader report checks a couple of capabilities that may or may not exist, depending on your Moodle installation:

      • gradereport/singleview:view
      • gradereport/user:view (or equivalent from another plugin that can be used as a user profile report)

      There is nothing to stop an administrator uninstalling the singleview or user plugins, so this can cause debugging messages to be output, e.g.:

      Capability "gradereport/singleview:view" was not found! This has to be fixed in code.
       
          line 387 of \lib\accesslib.php: call to debugging()
          line 539 of \lib\accesslib.php: call to has_capability()
          line 594 of \grade\report\grader\lib.php: call to has_all_capabilities()
          line 1181 of \grade\report\grader\lib.php: call to grade_report_grader->get_left_rows()
          line 179 of \grade\report\grader\index.php: call to grade_report_grader->get_grade_table()
      

      It would be a good idea if the grader report were to make sure these capabilities exist before checking them.

      To reproduce on a fresh install of Moodle,

      1. uninstall the user and singleview plugins
      2. switch debugging on
      3. open the grader report and confirm that you see debugging messages as above

            poltawski Dan Poltawski
            maherne Michael Aherne
            Michael Aherne Michael Aherne
            Andrew Lyons Andrew Lyons
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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