Commit 1903a66b by Victor Shnayder

Style cleanup in gradebook

* don't display thousands of '%' characters
* s/percentage/fraction/, since that's what it is
parent 15a4db17
......@@ -42,19 +42,19 @@
<th>Total</th>
</tr>
<%def name="percent_data(percentage)">
<%def name="percent_data(fraction)">
<%
letter_grade = 'None'
if percentage > 0:
if fraction > 0:
letter_grade = 'F'
for grade in ['A', 'B', 'C']:
if percentage >= course.grade_cutoffs[grade]:
if fraction >= course.grade_cutoffs[grade]:
letter_grade = grade
break
data_class = "grade_" + letter_grade
%>
<td class="${data_class}" data-percent="${percentage}">${ "{0:.0%}".format( percentage ) }</td>
<td class="${data_class}" data-percent="${fraction}">${ "{0:.0f}".format( 100 * fraction ) }</td>
</%def>
%for student in students:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment