Files
edx-platform/templates/gradebook.html
Calen Pennington bc823d3bfe Merge branch 'master' into asset-pipeline
Conflicts:
	djangoapps/multicourse/__init__.py
	requirements.txt
	sass/_info.scss
	sass/_textbook.scss
	sass/courseware/_sequence-nav.scss
	sass/courseware/_video.scss
	sass/index/_base.scss
	sass/index/_extends.scss
	sass/index/_footer.scss
	sass/index/_header.scss
	sass/index/_index.scss
	sass/index/_variables.scss
	sass/layout/_calculator.scss
	sass/print.scss
	static/css
	static/css/application.css
	static/css/marketing.css
	templates/main.html
	templates/marketing.html
	templates/sass/index/_base.scss
	templates/sass/index/_extends.scss
	templates/sass/index/_footer.scss
	templates/sass/index/_header.scss
	templates/sass/index/_index.scss
	templates/sass/index/_variables.scss
	templates/sass/marketing/_base.scss
	templates/sass/marketing/_extends.scss
	templates/sass/marketing/_footer.scss
	templates/sass/marketing/_header.scss
	templates/sass/marketing/_index.scss
	templates/sass/marketing/_variables.scss
2012-05-17 16:32:39 -04:00

69 lines
2.0 KiB
HTML

<%inherit file="main.html" />
<%namespace name='static' file='static_content.html'/>
<%block name="headextra">
<script type="text/javascript" src="${static.url('js/flot/jquery.flot.js')}"></script>
<script type="text/javascript" src="${static.url('js/flot/jquery.flot.stack.js')}"></script>
<script type="text/javascript" src="${static.url('js/flot/jquery.flot.symbol.js')}"></script>
<style type="text/css">
.grade_a {color:green;}
.grade_b {color:Chocolate;}
.grade_c {color:DarkSlateGray;}
.grade_f {color:DimGray;}
.grade_none {color:LightGray;}
</style>
</%block>
<%include file="navigation.html" args="active_page=''" />
<section class="main-content">
<div class="gradebook-wrapper">
<section class="gradebook-content">
<h1>Gradebook</h1>
%if len(students) > 0:
<table>
<%
templateSummary = students[0]['grade_info']['grade_summary']
%>
<tr> <!-- Header Row -->
<th>Student</th>
%for section in templateSummary['section_breakdown']:
<th>${section['label']}</th>
%endfor
<th>Total</th>
</tr>
<%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"
%>
<td class="${data_class}">${ "{0:.0%}".format( percentage ) }</td>
</%def>
%for student in students:
<tr>
<td><a href="/profile/${student['id']}/">${student['username']}</a></td>
%for section in student['grade_info']['grade_summary']['section_breakdown']:
${percent_data( section['percent'] )}
%endfor
<th>${percent_data( student['grade_info']['grade_summary']['percent'])}</th>
</tr>
%endfor
</table>
%endif
</section>
</div>
</section>