Skip to content
Snippets Groups Projects
Commit 24209b7f authored by Florian Bruhin's avatar Florian Bruhin
Browse files

gui: Show approx grade

parent ecc08279
Branches
No related tags found
No related merge requests found
......@@ -517,6 +517,10 @@ class OutcomeSummary(QLabel):
for outcome, count in sorted(summary.items(), key=lambda item: order.index(item[0])):
color = OUTCOME_COLORS[outcome]
parts.append(f"<font color='{color.name()}'>{count} {outcome}</font>")
grade = 5 * summary['passed'] / sum(summary.values()) + 1
parts.append(f'{round(grade, 2)}')
self.setText('<br>'.join(parts))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment