Repository navigation
Test10 45372-2: Fix participant names after user import - #11514
matheuszych wants to merge 1 commit into
Conversation
|
hi @kergomard please have a look! |
kergomard
left a comment
There was a problem hiding this comment.
Thank you very much for the PR @matheuszych
I've a more general request:
- I've the impression that during the last few weeks I've come across a too big number of PRs somehow changing the behavior of how names are displayed. Please collect all places where we are presenting the names of participants, try to classify them by their requirements (there might be special requirements,e.g. in the scoring view where people only having access through the permission to score anonymously should never see names and try to find a general solution that centralizes the generation of the names as much as possible. I completely lost the overview and I think the flood of individual changes is a really bad sign.
Please make the following changes:
- Please to not introduce a use of
TestDICinilTestEvaluationGUI,ilTestParticipantListandTestScoringByParticipantGUI, but inject theParticipantRepository. - Please move the parameter
$participant_repositoryabove$objective_parentin the constructor ofilTestResultsGUI. - Please move the parameter
$participant_repositoryabove$lngin the constructor ofDataRetrieval
Thanks again and best,
@kergomard
|
Hello @kergomard , Thank you for your feedback. I moved the Best regards |
|
Just for clarification: I will merge this request once we know more about all other places in order to not be changing things around all willy-nilly. Best, |
|
Hello @kergomard , i reviewed a test and identified several places where personal user data might be displayed. I can’t guarantee that there are no additional locations I haven’t found. Some areas behave as intended and show “Anonymous” instead of real names, but others still reveal personal data and should be reviewed. Works as intended
Possibly an issue
|
|
Thank you very much @matheuszych ! This helps a lot and I think we should tackle these issues, I will have a look at the "possibly an issue" cases myself once we have merged this. I now fought a while with this and I do think we need to change one thing:
Then a nit-pick:
On a side-note: Sorry, I only realized this during my second read-through and thanks again, |
7ffed46 to
35ebaa3
Compare
|
Hello @kergomard , thank you again for your feedback! I implemented the suggested changes. Please take a look again. Best regards |
|
@kergomard will you look into this PR before your absence, or should @thojou take over? |
kergomard
left a comment
There was a problem hiding this comment.
Thank you very much @matheuszych for the update and sorry it took me so long to look at this!
This looks nice now as far as I can see there is only one very small thing:
- I think we should stick to the pattern and make
ParticipantRepository::getUsersByActiveIds()return a\Generator. This might not be what you actually need right there, but it would make the interface more consistent
Could you then please rebase, squash, and give it a final test and then @thojou could merge and pick? This would be very kind!
Thank you very much again and best,
@kergomard
See: https://mantis.ilias.de/view.php?id=45372 After importing test users to another system, participant rows could still show wrong names because views used global user lookups or generic anonymous labels instead of test-local metadata. Resolving names via `getParticipantByActiveId()` per row also duplicated heavy participant queries in lists and tables. Introduced `ILIAS\Test\Participants\User` with identity fields and `getDisplayName()`, wired it through `Participant`, and added `ParticipantRepository::getUsersByActiveIds()` as a lightweight batched lookup against `tst_active` and `usr_data`. The method returns a `\Generator` keyed by active id, consistent with `getParticipants()`. Updated evaluation, toplist, manual scoring, and participant list call sites to batch-fetch users and use `getUser()` for user-facing data.
35ebaa3 to
eb7c9dd
Compare
|
Hello @kergomard , Best regards |
|
@thojou was ist dein Plan mit diesem und den verlinkten PRs? Auf Rückmeldung von @kergomard warten oder demnächst mergen? Und falls mergen: wann genau? |
See: https://mantis.ilias.de/view.php?id=45372
After importing test users to another system, attempts kept the anonymous user ID while participant metadata still carried the real names. Views used global user lookups or generic anonymous labels, so names appeared wrong even when the test was not anonymous. Result and scoring GUIs, the participant list, manual scoring tables, and the toplist now resolve labels via
ParticipantRepository::getParticipantByActiveIdandgetDisplayNameso imported participants display correctly./cc @thojou