-
Notifications
You must be signed in to change notification settings - Fork 374
Fix RWS with score mode MAX_SUBTASK #1111
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
Conversation
Tasks with a score type that was not group (i.e., without subtasks) were not handled correctly. We consider them as having one subtask (as already done elsewhere in CMS).
Mmm I feel like a better solution would be to avoid altogether having tasks with score_mode = 'max_subtask' and no subtasks. A DB constraint maybe? |
Codecov Report
@@ Coverage Diff @@
## master #1111 +/- ##
==========================================
+ Coverage 62.02% 62.14% +0.11%
==========================================
Files 230 230
Lines 16588 16588
==========================================
+ Hits 10289 10308 +19
+ Misses 6299 6280 -19
Continue to review full report at Codecov.
|
That is another option, it depends on how you watch the issue. I chose this path because it is how CMS treats this situation elsewhere in the codebase (see https://github.com/cms-dev/cms/blob/master/cms/grading/scoring.py#L247-L249 ). |
Yeah, I see. Seems to make sense, but I'll take another look for the corner case you pointed out. But why does this bother you? Are you using this combination of configurations? |
Yes, I think it makes sense, since in reset_history the score is set to 0 by default (then changes are applied). |
Not intentionally (but it happened by mistake during the final round of the Italian Olympiad in Teams 😆 ) Thanks for merging the fix, at least now CMS behaves properly. For the future some more profound changes, as those suggested by @wil93, can be implemented. |
Tasks with a score type that was not group (i.e., without subtasks)
were not handled correctly.
We consider them as having one subtask (as already done elsewhere in
CMS).
Important note
I think that the proposed change can work in the event of an unscored submission (which should have 0 as score), but please double-check what is being done inside those lines. Feel free to modify them as needed.
They were disputed since their introduction and have led to a number of subtle bugs in these last months. 😂
This change is