-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
4.2.6, 4.3.3
-
MOODLE_402_STABLE, MOODLE_403_STABLE
In a forum using whole forum grading (just set to "Point" grade is enough), when you click the "grade users" button, you'll see a XHR request being made to core_grades_get_gradable_users, which is presumably being called from the forum code here: https://github.com/moodle/moodle/blob/faae0874ce68e34327a9d4b2f9a37fb326f26fbd/mod/forum/amd/src/grades/grader.js#L69
This returns the users enrolled in the course but fails to take into account the role overrides a given user may have for a particular activity context - something almost every other module does fine with. Even forum's own reports seem to take this into account - the result being that you can see users in the report who you are unable to grade...
Aside from being an obvious bug, this is a huge problem for use cases like LTI (exposing a forum to other consumers elsewhere) where context-level role overrides is core to the way access control is achieved.
To replicate (I'm skipping a lot of LTI setup here but that's not the important bit):
- In the tool site, publish a forum that uses whole forum grading over LTI. Set up the resource link in the platform site. (there may be a deep linking bug still in play - see MDL-80699 which deals with that)
- From a platform site, access the forum as a student. You don't need to create any posts, but feel free to do so.
- Log out of the platform site
- Log in as the teacher in the platform site
- Launch into the forum
- Click "Grade users"
Expected: I can see the student that launched into the forum via LTI, and can grade them.
Actual: Notice the student who just launched into the forum via LTI isn't listed. You're unable to grade them.
If you do the same thing for an assignment, you'll see that the LTI user is properly listed in the grader and can be graded as we'd expect.
It might be helpful to look at get_enrolled_sql() in enrollib. This is what most things seem to use to get this context-override-aware list of users.
- is a regression caused by
-
MDL-68652 Forum grades include teacher, all roles
- Closed