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).

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).

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.