Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5977

Graph Permission Error



    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.8.8
    • Fix Version/s: None
    • Labels:
    • Plugin Version:
    • Affected Branches:


      Hi Guys,

      There is an issue with the display of charts depending on the context where the report is added (permissions don't appear to be picking up the context properly for chart).

      Specifically - If the configurable reports block is added to the Front Page (ie. ../course/view.php?id=1) and selected to display on all pages in the site (ie. so that it pushes to all courses), then in this scenario ONLY the site administrators can see the charts from the reports within the courses. No other users can see the charts (but they can run the report and see the data within). This remains the same even if the user has all configurable report capabilities set to Allow in that course (or higher) context.

      a) If we add the exact same report to the configurable report block at the course context directly (rather than being pushed to the course via the front page) then the permissions work for these users ok.
      b) Even giving the AuthUser and AuthUserFrontPage roles the block/configurable_reports:viewreports = Allow it still fails to render the Chart (but they can still see all of the report data) - only related to the Chart element.

      Clearly the permissions work fine to access the report and it's data - however there seems to be a context failure on the generation of the chart or something.

      I have added my example report here: https://www.dropbox.com/s/rooxysdmgks1hiq/Resulting%20Grade%20Letter%20Distribution.xml?dl=0 so that you can import/test.

      Steps to Replicate:

      1. Go to Site Administration | Front Page | Turn Blocks Editing ON
      2. Add a Configurable Reports block instance, and chose to 'Display on ANY page'
      3. Go to the site front page (ie. hostname/course/view.php?id=1) | Configurable Reports Block | Import report from link above
      4. As an 'Administrator' - Go to a valid course (one with student results in it) and run the report (graph & data should display fine).
      5. As a 'Manager' - Go the the same valid course and run the report (graph should not show, but data will).

      Thanks, Jason




            jleyva Juan Leyva
            jason.maddern Jason Maddern
            Component watchers:
            Juan Leyva, Sara Arjona (@sarjona)
            0 Vote for this issue
            1 Start watching this issue