Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51628

Capability /moodle/course:viewsuspendedusers and /mod/assign:grade NOT independent

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Create a new role based on the teacher role, but remove mod/assign:grade capability.

      Enrol a user in the course with this new role. As that person - view and assignment. Go to the grading table for the assignment and change one of the table options in the form at the bottom of the page (filter, only active etc).

      Show
      Create a new role based on the teacher role, but remove mod/assign:grade capability. Enrol a user in the course with this new role. As that person - view and assignment. Go to the grading table for the assignment and change one of the table options in the form at the bottom of the page (filter, only active etc).
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-51628-master

      Description

      We would like to create a new role for Quality Assurance, who can see all the submissions, grades and feedbacks in different activities (for example Assignment). They are *not *allowed to change the grade but they need to check the suspended/inactive students' works as well. They need to download the original submissions and the tutors' feedback files but we don't want to give them grading permission.

      Create a new role (for example qaadmin) based on non-editing teacher.
      Change the capabilities:

      • Grade assignment (mod/assign:grade): not set
      • View suspended users (moodle/course:viewsuspendeduser): Allow
        Create a course
        Create an assignment
        Enrol one user with the new role
        Login as the user with the new _qaadmin _role
        go to the assignment
        click on View/grade all submissions
        scroll down and try to uncheck the Show only active enrolments checkbox
        you've got an error message saying:

      ??Sorry, but you do not currently have permissions to do that (Grade assignment)

      More information about this error

      Debug info:
      Error code: nopermissions
      Stack trace:
      line 786 of \lib\accesslib.php: required_capability_exception thrown
      line 5550 of \mod\assign\locallib.php: call to require_capability()
      line 495 of \mod\assign\locallib.php: call to assign->process_save_grading_options()
      line 53 of \mod\assign\view.php: call to assign->view()
      ??

      But you have got the view suspended users capability so you should be able to do that even if you are not allowed to grade them.

      Thanks
      Frank

        Attachments

          Activity

            People

            • Assignee:
              damyon Damyon Wiese
              Reporter:
              lengyelke Ferenc Lengyel
              Peer reviewer:
              Jun Pataleta
              Integrator:
              Dan Poltawski
              Tester:
              Simey Lameze
              Participants:
              Component watchers:
              Damyon Wiese, Adrian Greeve, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jan/16