Skip to content

Commit

Permalink
display provided subtask name, rather than automatically using 1-inde…
Browse files Browse the repository at this point in the history
…xing
  • Loading branch information
AngusRitossa committed Feb 14, 2024
1 parent b77c87b commit 694fd18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cms/grading/scoretypes/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class ScoreTypeGroup(ScoreTypeAlone):
{% endif %}
<div class="subtask-head">
<span class="title">
{% trans index=st["idx"] %}Subtask {{ index }}{% endtrans %}
{% trans name=st["name"] %}{{ name }}{% endtrans %}
</span>
{% if "score_fraction" in st and "max_score" in st %}
{% set score = st["score_fraction"] * st["max_score"] %}
Expand Down Expand Up @@ -427,6 +427,7 @@ def compute_score(self, submission_result):
# correct or incorrect.
"score_fraction": st_score_fraction,
"max_score": parameter[0],
"name": parameter[2],
"testcases": testcases})
if all(self.public_testcases[tc_idx] for tc_idx in target):
public_score += st_score
Expand Down

0 comments on commit 694fd18

Please sign in to comment.