feat: scoreboard show raw score
This commit is contained in:
parent
9aa04f5ac1
commit
3f8d7af725
|
@ -586,7 +586,6 @@ def joj3_all(
|
||||||
submitter,
|
submitter,
|
||||||
os.path.join(repo_path, scoreboard_file_name),
|
os.path.join(repo_path, scoreboard_file_name),
|
||||||
exercise_name,
|
exercise_name,
|
||||||
max_total_score,
|
|
||||||
)
|
)
|
||||||
tea.pot.git.add_commit(
|
tea.pot.git.add_commit(
|
||||||
repo_name,
|
repo_name,
|
||||||
|
|
|
@ -13,7 +13,6 @@ def generate_scoreboard(
|
||||||
submitter: str,
|
submitter: str,
|
||||||
scoreboard_file_path: str,
|
scoreboard_file_path: str,
|
||||||
exercise_name: str,
|
exercise_name: str,
|
||||||
max_total_score: int = -1,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
if not scoreboard_file_path.endswith(".csv"):
|
if not scoreboard_file_path.endswith(".csv"):
|
||||||
logger.error(
|
logger.error(
|
||||||
|
@ -73,8 +72,7 @@ def generate_scoreboard(
|
||||||
for stage in stages:
|
for stage in stages:
|
||||||
for result in stage["results"]:
|
for result in stage["results"]:
|
||||||
exercise_total_score += result["score"]
|
exercise_total_score += result["score"]
|
||||||
if max_total_score >= 0:
|
exercise_total_score = exercise_total_score
|
||||||
exercise_total_score = min(exercise_total_score, max_total_score)
|
|
||||||
submitter_row[columns.index(exercise_name)] = str(exercise_total_score)
|
submitter_row[columns.index(exercise_name)] = str(exercise_total_score)
|
||||||
|
|
||||||
total = 0
|
total = 0
|
||||||
|
@ -235,7 +233,6 @@ def generate_title_and_comment(
|
||||||
comment += "\n"
|
comment += "\n"
|
||||||
title = get_title_prefix(exercise_name, submitter, submitter_in_title)
|
title = get_title_prefix(exercise_name, submitter, submitter_in_title)
|
||||||
if max_total_score >= 0:
|
if max_total_score >= 0:
|
||||||
total_score = min(total_score, max_total_score)
|
|
||||||
title += f"{total_score} / {max_total_score}"
|
title += f"{total_score} / {max_total_score}"
|
||||||
else:
|
else:
|
||||||
title += f"{total_score}"
|
title += f"{total_score}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user