From 3be5423b07a1e7ea63c2e048a468a53a3e635f1b Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Mon, 12 Mar 2012 18:10:37 -0400 Subject: [PATCH] Small refactor on the grades. Also made the gradebook render a graph for each student --HG-- branch : bridger-grades --- gradebook.html | 53 +++++++++++++++++++++++++++++++++-------------- profile.html | 5 +++-- profile_graphs.js | 21 ++++++++++--------- 3 files changed, 52 insertions(+), 27 deletions(-) diff --git a/gradebook.html b/gradebook.html index e237fbe16a..7dc9c3181e 100644 --- a/gradebook.html +++ b/gradebook.html @@ -1,15 +1,38 @@ - -% for s in students: -

${s['username']}

-% for c in s['grade_info']['grade_summary']: -

${c['category']}

-

-% if 'subscores' in c: - % for ss in c['subscores']: -
${ss['summary']} - % endfor -% endif -

-% endfor -% endfor -
+<%namespace name="profile_graphs" file="profile_graphs.js"/> + + + + + + + + + + + % for s in students: + + %endfor + + + % for s in students: +

${s['username']}

+ +
+ + + % endfor + + diff --git a/profile.html b/profile.html index 5a753b914f..4d7915ae58 100644 --- a/profile.html +++ b/profile.html @@ -1,4 +1,5 @@ <%inherit file="main.html" /> +<%namespace name="profile_graphs" file="profile_graphs.js"/> <%! from django.core.urlresolvers import reverse @@ -9,7 +10,7 @@