delta-cs / seminar-domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
2 stars 0 forks source link

Assign non-finalized contest after login #118

Closed zapotocnylubos closed 5 months ago

zapotocnylubos commented 5 months ago

When the user registers for the first time (logs in after account creation), or if the user has been inactive for a long time and logs back on, we want this user to automatically navigate to the first active (non-finalized) contest.

Now is assigns the user to the finalized contents and he may have no idea, what to do.

Corresponds with the #117

zapotocnylubos commented 5 months ago

Thanks to https://github.com/delta-cs/seminar-domjudge/blob/5d2c076ed1b62418ebb501303cf04431df0f6c67/webapp/src/Service/DOMJudgeService.php#L144 and separation of contests in https://github.com/delta-cs/seminar-domjudge/blob/5d2c076ed1b62418ebb501303cf04431df0f6c67/webapp/templates/partials/menu_change_contest.html.twig#L12 and https://github.com/delta-cs/seminar-domjudge/blob/5d2c076ed1b62418ebb501303cf04431df0f6c67/webapp/templates/partials/menu_change_contest.html.twig#L13

if we sort the contests in the jury section like this

we would get better menu options (the newest would be on top and the list would grow to the bottom. Now, the user has to scroll down to find the latest active contests.

Doing so would also yield setting the default contest after login/registering as the latest active contest.

because the domjduge service has this fallback, if it does not find the active contest

https://github.com/delta-cs/seminar-domjudge/blob/5d2c076ed1b62418ebb501303cf04431df0f6c67/webapp/src/Service/DOMJudgeService.php#L184

-> gets the first element

zapotocnylubos commented 5 months ago

@matous-volf opinion?

matous-volf commented 5 months ago

so we wouldn't have to make any more code changes, just order the contests in this way?

zapotocnylubos commented 5 months ago

exactly, it should automatically work and be more arranged

matous-volf commented 5 months ago

sounds good to me, so can we close this?

zapotocnylubos commented 5 months ago

After we sort them on pardubicky-hacker, yes, then I would just close it

matous-volf commented 5 months ago

after deployment of #122, i'll sort them and close this