Skip to content
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

Join contest with current account #1191

Merged
merged 7 commits into from
Dec 20, 2021
Merged

Conversation

MaGaroo
Copy link
Contributor

@MaGaroo MaGaroo commented Sep 11, 2021

I've implemented this feature based on the #1187 discussions.
However it's my first serious contribution to cms, so I'll be pleased if you guide me in case I've done anything wrong or unclean.

@codecov
Copy link

codecov bot commented Sep 11, 2021

Codecov Report

Merging #1191 (c0b9978) into master (de5a0ca) will decrease coverage by 0.18%.
The diff coverage is 14.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1191      +/-   ##
==========================================
- Coverage   63.56%   63.38%   -0.19%     
==========================================
  Files         233      233              
  Lines       17117    17139      +22     
==========================================
- Hits        10881    10864      -17     
- Misses       6236     6275      +39     
Flag Coverage Δ
functionaltests 47.04% <14.63%> (-0.05%) ⬇️
unittests 44.06% <14.63%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cms/server/contest/handlers/main.py 42.40% <14.63%> (-3.75%) ⬇️
cms/service/Worker.py 82.65% <0.00%> (-4.09%) ⬇️
cms/service/workerpool.py 66.11% <0.00%> (-2.23%) ⬇️
cms/server/contest/handlers/tasksubmission.py 46.99% <0.00%> (-1.64%) ⬇️
cms/io/service.py 70.12% <0.00%> (-1.22%) ⬇️
cms/io/rpc.py 93.12% <0.00%> (-1.04%) ⬇️
cms/service/EvaluationService.py 72.38% <0.00%> (-1.00%) ⬇️
cms/service/ResourceService.py 59.11% <0.00%> (-0.89%) ⬇️
cms/db/util.py 52.59% <0.00%> (-0.75%) ⬇️
cms/service/esoperations.py 79.16% <0.00%> (-0.70%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de5a0ca...c0b9978. Read the comment docs.

Copy link
Member

@andreyv andreyv left a comment

Choose a reason for hiding this comment

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

Sorry for the delay!

Overall the changes look good and work fine. Please see some initial comments below.

cms/server/contest/handlers/main.py Outdated Show resolved Hide resolved
cms/server/contest/handlers/main.py Show resolved Hide resolved
cms/server/contest/templates/register.html Outdated Show resolved Hide resolved
Copy link
Member

@andreyv andreyv left a comment

Choose a reason for hiding this comment

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

Thanks! The changes look very good. I appreciate the attention to detail 🙂

I tested this form in various scenarios, and it works fine. HTML validation also passes.

Please see some small remaining comments below.

cms/server/contest/templates/register.html Outdated Show resolved Hide resolved
cms/server/contest/templates/register.html Outdated Show resolved Hide resolved
cms/server/contest/templates/register.html Outdated Show resolved Hide resolved
cms/server/contest/templates/register.html Outdated Show resolved Hide resolved
MaGaroo and others added 7 commits December 14, 2021 17:15
There are 2 tabs, one for creating new user and one for register
with an existing account. Note that the register page sould be
scrollable because of the long form inside it. So it can not use
login_box class.
The previous method had 2 different forms but the new method has a single
form and just disables extra fields if they're unused
@andreyv
Copy link
Member

andreyv commented Dec 14, 2021

I applied the above suggestions and revised translatable strings in c0b9978.

Everything looks good now 🙂 I'll merge this in a few days if there are no further comments.

@andreyv
Copy link
Member

andreyv commented Dec 20, 2021

Merging.

@andreyv andreyv merged commit 94a6c4b into cms-dev:master Dec 20, 2021
RezwanArefin01 pushed a commit to RezwanArefin01/cms that referenced this pull request Dec 27, 2021
* Update user interface to support joining to contests

There are 2 tabs, one for creating new user and one for register
with an existing account. Note that the register page sould be
scrollable because of the long form inside it. So it can not use
login_box class.

* Implement logic of join contest without user creation

* Add contributor's name and copyright

* Check participations only when joining a contest

* Disable and hide register fields when joining to contest

The previous method had 2 different forms but the new method has a single
form and just disables extra fields if they're unused

* Clear field errors after each tab switch

* Small updates

Co-authored-by: Andrey Vihrov <andrey.vihrov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants