-
Notifications
You must be signed in to change notification settings - Fork 376
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
Follow up to the fix to #1107 #1115
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1115 +/- ##
==========================================
+ Coverage 62% 62.17% +0.16%
==========================================
Files 230 230
Lines 16591 16591
==========================================
+ Hits 10287 10315 +28
+ Misses 6304 6276 -28
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1, 3 of 3 files at r2, 1 of 1 files at r3.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @stefano-maggiolo)
cms/server/contest/templates/task_submissions.html, line 290 at r2 (raw file):
<h2 style="margin: 40px 0 10px">{% trans %}Previous submissions{% endtrans %}</h2> {% if can_use_tokens and actual_phase == 0 %}
Caution, this is not exactly equivalent: before the check passed when some task allowed tokens, now it passes if this task allows tokens. Maybe it's what we want (didn't check), but wanted to flag this.
cms/server/contest/templates/macro/submission.html, line 12 at r1 (raw file):
s_num (int): 1-based position of the submission in the list of submissions of the currently logged in participaiton on this task. show_date (boolean): whether to display only the time or also the date.
s/boolean/bool/?
cms/server/contest/templates/macro/submission.html, line 11 at r2 (raw file):
submissions ([Submission]): all the submissions of the participation on this task. can_use_tokens (boolean): whether tokens are allowed for this task.
s/boolean/bool/?
cms/server/contest/templates/macro/submission.html, line 72 at r3 (raw file):
</thead> <tbody> {% set num_displayed = submissions|selectattr("official")|list|length if official else submissions|rejectattr("official")|list|length > 0 %}
Are you sure this works without parentheses? It's not the precedence order in Python:
In [1]: -1 if True else 1 > 0
Out[1]: -1
In [2]: -1 if False else 1 > 0
Out[2]: True
a13d6f7
to
2bd9c67
Compare
Sorry for the push -f. I think I addressed the failure AND all of the things you pointed out. If you want to take a look let me know, otherwise I'll push to master soonish (e.g., tomorrow). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 6 files at r5, 2 of 4 files at r6, 1 of 2 files at r7.
Reviewable status:complete! all files reviewed, all discussions resolved
2bd9c67
to
5c7e91d
Compare
This transforms some include in macros, which is supposedly safer (as
they don't rely on state of the context, which is error prone). Also
fixes a small bug left from the previous fix.
This change is