Test 46659: Add Org-Unit Filter to Manual Scoring - #11508
Conversation
|
@kergomard please review! |
|
Thank you very much for the PR @matheuszych I don't think this is right: As I understand it, this would filter the participants when org-units are enabled, even if the scorer has the permission to score everybody. The logic has to be another one:
There should be a similar logic in the participants overview. There might be synergies. Thanks again and best, |
|
Hello @kergomard , Thank you for your feedback! I adjusted the code to conform to the three cases you mentioned. Best regards |
There was a problem hiding this comment.
Thank you very much @matheuszych !
So, I think we are getting there. There are still a few things though:
- Please do not cast to int here. The function does always return an
int. - We should not retrieve
$this->object->getAnonOnlyParticipantIds()here. I think that we can safely assume that we are going to need this and just load it in the constructor. - The function
PositionsFactory::filterParticipantsByScoreAccess()is not well named, as the name suggest that we are looking for participants that have something that is called "ScoreAccess" (no idea what that should be). We should call itPositionsFactory::filterParticipantsByAccessOfCurrentUser().
Ok, I do only look at the code and now I think it does the right thing. I assume you thoroughly checked that it works in the interface and that you will do so a final time now.
Best,
@kergomard
See: https://mantis.ilias.de/view.php?id=46659 When org unit position access is active for a test, the manual scoring view listed all participants. PositionsFactory now injects ilAccess and filters the participant set to users the current grader may score via ilOrgUnitOperation::OP_SCORE_PARTICIPANTS. Participant queries in ilObjTest also use a stable ORDER BY (lastname, firstname, active_id).
|
Hello @kergomard , I adjusted the mentioned things, rebased the branch, squashed the commits and tested it again. Best regards |
See: https://mantis.ilias.de/view.php?id=46659
When org unit position access is active for a test, the manual scoring view listed all participants. PositionsFactory now injects ilAccess and filters the participant set to users the current grader may score via ilOrgUnitOperation::OP_SCORE_PARTICIPANTS. Participant queries in ilObjTest also use a stable ORDER BY (lastname, firstname, active_id).
/cc @thojou