Affects Version/s: 2.8.8
Fix Version/s: None
Component/s: Block: Configurable report
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:
- Go to Site Administration | Front Page | Turn Blocks Editing ON
- Add a Configurable Reports block instance, and chose to 'Display on ANY page'
- Go to the site front page (ie. hostname/course/view.php?id=1) | Configurable Reports Block | Import report from link above
- As an 'Administrator' - Go to a valid course (one with student results in it) and run the report (graph & data should display fine).
- As a 'Manager' - Go the the same valid course and run the report (graph should not show, but data will).