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

Fix task submission language option re-enable when reset #1158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edisonhello
Copy link

@edisonhello edisonhello commented Jun 29, 2020

Language list will be disable when a file is selected, but will not re-enable when reset button is pressed.
This commit add a event listener on the button which calls CMS.CWSUtils.filter_languages to reset language list.


This change is Reviewable

Language list will be disable when a file is selected, but
will not re-enable when `reset` button is pressed.
This commit add a event listener on the button which calls
`CMS.CWSUtils.filter_languages` to reset language list.
@codecov
Copy link

codecov bot commented Jun 29, 2020

Codecov Report

Merging #1158 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1158      +/-   ##
==========================================
- Coverage   61.99%   61.91%   -0.08%     
==========================================
  Files         230      230              
  Lines       16604    16604              
==========================================
- Hits        10294    10281      -13     
- Misses       6310     6323      +13     
Flag Coverage Δ
#functionaltests 45.63% <ø> (+0.03%) ⬆️
#unittests 43.29% <ø> (ø)
Impacted Files Coverage Δ
cms/server/admin/handlers/contestuser.py 23.72% <0.00%> (-7.63%) ⬇️
cms/io/rpc.py 90.10% <0.00%> (-1.03%) ⬇️
cms/service/esoperations.py 78.01% <0.00%> (-0.71%) ⬇️
cms/server/admin/handlers/base.py 67.11% <0.00%> (-0.68%) ⬇️
cms/io/service.py 68.90% <0.00%> (-0.61%) ⬇️
cms/service/EvaluationService.py 67.02% <0.00%> (-0.54%) ⬇️
cms/grading/Job.py 88.62% <0.00%> (-0.48%) ⬇️
cms/db/base.py 84.04% <0.00%> (ø)
cms/db/filecacher.py 77.37% <0.00%> (+0.32%) ⬆️
cms/grading/Sandbox.py 68.23% <0.00%> (+0.36%) ⬆️
... and 2 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 d4c9e92...62f2322. Read the comment docs.

@andreyv
Copy link
Member

andreyv commented Nov 22, 2020

Thanks, I can reproduce the issue.

I think there may be an even easier fix. Could you please check if this works:

  1. Use the onreset event attribute (on <form>) instead of onclick.
  2. Just .find() the <option> elements directly and call .removeAttr() on all of them at once.

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