Skip to content

Adjust scoreboard columns #299

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

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions scoreboard/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

print(directories)

columns = ''.join(['<th colspan=4 style="text-align: center;">' + task_type + '</th>' for task_type in task_types])
columns = ''.join(['<th colspan=5 style="text-align: center;">' + task_type + '</th>' for task_type in task_types])
html_content = f"""
<!DOCTYPE html>
<html>
Expand All @@ -29,22 +29,30 @@
</head>
<body>
<h1>Scoreboard</h1>
<p>S - Solution, P - Performance, O - Overdue, C - Cheating</p>
<p>
<b>(S)olution</b> - The correctness and completeness of the implemented solution.<br/>
<b>(A)cceleration</b> - The process of speeding up software to improve performance.
Speedup = T(seq) / T(parallel)<br/>
<b>(E)fficiency</b> - Optimizing software speed-up by improving CPU utilization and resource management.
Efficiency = Speedup / NumProcs * 100%<br/>
<b>(D)eadline</b> - The timeliness of the submission in relation to the given deadline.<br/>
<b>(P)lagiarism</b> - The originality of the work, ensuring no copied content from external sources.<br/>
</p>
<table>
<tr>
<th colspan=4>Tasks</th>
<th colspan=5>Tasks</th>
{columns}
<th>Total</th>
</tr>
<tr>
<th colspan=4></th>
{''.join(['<th>S</th><th>P</th><th>O</th><th>C</th>' for _ in range(len(task_types))])}
<th colspan=5></th>
{''.join(['<th>S</th><th>A</th><th>E</th><th>D</th><th>P</th>' for _ in range(len(task_types))])}
<th></th>
</tr>
"""

for dir in directories:
html_content += f"<tr><td colspan=4>{dir}</td>"
html_content += f"<tr><td colspan=5>{dir}</td>"
total_count = 0
for task_type in task_types:
if directories[dir].get(task_type) == "done":
Expand All @@ -54,7 +62,8 @@
html_content += '<td style="text-align: center;background-color: lightblue;">1</td>'
total_count += 1
else:
html_content += "<td>0</td>"
html_content += '<td style="text-align: center;">0</td>'
html_content += '<td style="text-align: center;">0</td>'
html_content += '<td style="text-align: center;">0</td>'
html_content += '<td style="text-align: center;">0</td>'
html_content += '<td style="text-align: center;">0</td>'
Expand Down
Loading