Gradebook
%if len(students) > 0:
<%
templateSummary = students[0]['grade_info']['grade_summary']
%>
Student |
%for section in templateSummary['section_breakdown']:
${section['label']} |
%endfor
Total |
<%def name="percent_data(percentage)">
<%
data_class = "grade_none"
if percentage > .87:
data_class = "grade_a"
elif percentage > .70:
data_class = "grade_b"
elif percentage > .6:
data_class = "grade_c"
elif percentage > 0:
data_class = "grade_f"
%>
${ "{0:.0%}".format( percentage ) } |
%def>
%for student in students:
${student['username']} |
%for section in student['grade_info']['grade_summary']['section_breakdown']:
${percent_data( section['percent'] )}
%endfor
${percent_data( student['grade_info']['grade_summary']['percent'])} |
%endfor
%endif