Motivation
The service allows a user to have multiple ContestParticipation records, but only one participation can be active at any time, determined by profile.current_contest.
When a user userX joins two contests (contestA then contestB), the following occurs:
- Create
ContestParticipation(contestA, userX) → partA
- Set
userX.current_contest = partA
- Create
ContestParticipation(contestB, userX) → partB
- Set
userX.current_contest = partB
To submit code for a contest problem, userX.current_contest must reference the participation associated with that contest.
As a result, after joining contestB, userX can no longer submit solutions to contestA unless they explicitly “join” contestA again, which only serves to reset:
userX.current_contest = partA
This behavior is unintuitive and creates unnecessary user friction.
Proposed Solution (Temporary)
As a temporary mitigation, when a user accesses a contest page, the service should:
- Look up an existing
ContestParticipation for the (user, contest) pair.
- If found, automatically set
userX.current_contest to that participation.
This removes the need for users to manually re-join a contest solely to submit solutions.
Motivation
The service allows a user to have multiple
ContestParticipationrecords, but only one participation can be active at any time, determined byprofile.current_contest.When a user
userXjoins two contests (contestAthencontestB), the following occurs:ContestParticipation(contestA, userX)→partAuserX.current_contest = partAContestParticipation(contestB, userX)→partBuserX.current_contest = partBTo submit code for a contest problem,
userX.current_contestmust reference the participation associated with that contest.As a result, after joining
contestB,userXcan no longer submit solutions tocontestAunless they explicitly “join”contestAagain, which only serves to reset:userX.current_contest = partAThis behavior is unintuitive and creates unnecessary user friction.
Proposed Solution (Temporary)
As a temporary mitigation, when a user accesses a contest page, the service should:
ContestParticipationfor the(user, contest)pair.userX.current_contestto that participation.This removes the need for users to manually re-join a contest solely to submit solutions.