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

View All Responses menu items are retained for roles without the capability to view or action

XMLWordPrintable

      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

            mchurch Mike Churchward
            heliguy Heli Guy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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