Affects Version/s: 3.6.5
Fix Version/s: None
Component/s: Grading form: Checklist
Plugin Version:Checklist: gradeexport_checklist 3.4+ (Build: 2019051900)
We seem to have encountered an issue with the export checklist feature when a user has the permission to view all users in their group but not all users.
- Enrol test user onto a test course with a role with the "gradeexport/checklist:viewdistrict" permission. (In our case we have a role separate from student that grants this permission, but granting the permission as an override for the course or to the student role itself doesn't seem to work in any case).
- Confirm the user should have the "gradeexport/checklist:viewdistrict" permission in "Check permissions".
- Add a checklist with an activity assigned to it as per normal.
- Logged in as test user go to Grades -> Export -> Export Excel file.
- At this point the error should appear: "You do not have permission to do this export".
If you grant the user the view all users permission rather than or in addition to the view district permission this works in that case.
In the server logs the error appears as a fairly typical Moodle permission error:
Default exception handler: You do not have permission to do this export Debug: \nError code: nopermission\n* line 494 of /lib/setuplib.php: moodle_exception thrown\n* line 51 of /grade/export/checklist/export.php: call to print_error()\n, referer: https://www.ourmoodle.com/grade/export/checklist/index.php?id=492
It would appear to be an issue introduced after upgrading to Moodle 3.6.5.
Let us know if you need any more details regarding our testing/settings with this issue or if you are having issues replicating it.