-
Bug
-
Resolution: Fixed
-
Minor
-
3.5.4
-
None
-
3.5.3
-
MOODLE_35_STABLE
-
MOODLE_35_STABLE, MOODLE_36_STABLE
View All Responses menu items and links are visible to roles without the capability to view or action them. Clicking on these links takes you to a core nopermissions error. These links should be hidden from roles without the capability to view or action them.
Steps to reproduce:
1. Go to Site administration > Users > Permissions > Define roles
2. Edit the Teacher role and change the following capabilities to Not set or Prevent
- mod/questionnaire:readallresponses
- mod/questionnaire:readallresponseanytime
- mod/questionnaire:deleteresponses
- mod/questionnaire:downloadresponses
3. Logged in as a Teacher, view a questionnaire (/mod/questionnaire/view.php?id=xxx) and click on the View all Responses link. You will see the error:
Sorry, but you do not currently have permissions to do that ({$a})
More information about this error
Debug info:
Error code: nopermissions
Stack trace: * line 482 of /lib/setuplib.php: moodle_exception thrown
- line 74 of /mod/questionnaire/report.php: call to print_error()
4. In the Questionnaire administration you will see links under View all Responses - all of which take you to the Error code: nopermissions page:
- Summary,
- View Default order,
- Ascending order
- Delete ALL Responses
- Download CSV
- List of responses
- View