Skip to content

refix #2279: get associated ContestProblem with Clarification entity #2607

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Jun 23, 2024

Conversation

moesoha
Copy link
Contributor

@moesoha moesoha commented Jun 17, 2024

This PR fixes #2279 indeed. In the previous commit 0219d8e, this issue was accidentally "fixed" by abusing LEFT JOIN. Thanks to Doctrine's mapping & collection strategies, that commit works.

This PR implements getContestProblem(Problem $problem) in Contest entity by moving the codes in TwigExtension::problemBadgeForProblemAndContest, and adds a getter for the associated ContestProblem in Clarification entity. With these helpers, the key code of #2279 (clarification.problem.contestProblems.first) can be replaced with clarification.contestProblem.

By the way, I renamed the twig filter problemBadgeForProblemAndContest to problemBadgeForContest, as the Problem is redundant here.

0219d8e is reverted in this PR, so the bug mentioned in #2600 no longer exists.

@moesoha
Copy link
Contributor Author

moesoha commented Jun 22, 2024

Any update? Sorry for disturbing but I would like to request a review @vmcj

@vmcj
Copy link
Member

vmcj commented Jun 22, 2024

Any update? Sorry for disturbing but I would like to request a review @vmcj

Hi @moesoha, I think all of us are currently very busy so it might take a bit more time.

Copy link
Member

@vmcj vmcj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me, but I'll wait with merging for someone else to also take a look.

@meisterT meisterT added this pull request to the merge queue Jun 23, 2024
Merged via the queue into DOMjudge:main with commit affacb4 Jun 23, 2024
23 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In the contestant's clarifications block, the shortname and color of the problem are not displayed correctly.
4 participants