-
Notifications
You must be signed in to change notification settings - Fork 468
pkp/pkp-lib#12009 Add API endpoint to get a list of potential task pa… #12010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
80bea16 to
fe9702f
Compare
ewhanson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Vitaliy-1. Just a few questions, mostly around how things are anonymized. Otherwise, looks good!
|
|
||
| if ($currentUserReviewAssignments->isNotEmpty()) { | ||
| $currentUserHasDoubleBlindReview = (bool) $currentUserReviewAssignments->search(fn (ReviewAssignment $reviewAssignment) => | ||
| $reviewAssignment->getReviewMethod() == ReviewAssignment::SUBMISSION_REVIEW_METHOD_DOUBLEANONYMOUS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it matters since they should both be ints but should this be checked with === instead?
| foreach ($stageAssignments as $stageAssignment) { | ||
| if ($isReviewStage && $roleReviewer && $currentUserHasDoubleBlindReview) { | ||
| // Anonymize author if the current user is a reviewer with double-blind review | ||
| if ($stageAssignment->userGroup->roleId == Role::ROLE_ID_AUTHOR) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with this ==.
|
|
||
| foreach ($stageAssignments as $stageAssignment) { | ||
| if ($isReviewStage && $roleReviewer && $currentUserHasDoubleBlindReview) { | ||
| // Anonymize author if the current user is a reviewer with double-blind review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may not matter, but it's not completely clear to me going through the code if the authors are being anonymized (i.e. they're included but with no identifiable information) or if they're rather completely excluded (i.e. not available as a participant at all). It seems like the code is excluding them outright, but wanted to double-check because the reference to anonymizing the author were a little confusing to follow.
| $includedReviewAssignments = collect(); | ||
| foreach ($filteredReviewAssignments as $reviewAssignment) { /** @var ReviewAssignment $reviewAssignment */ | ||
|
|
||
| // Check whether participant should be anonymized |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about "anonymized" as above.
|
|
||
| return [ | ||
| 'id' => $this->id, | ||
| 'id' => $this?->id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which cases would $this be potentially null?
…rticipants