Permalink
Browse files

Merge branch 'master' of github.com:thedjpetersen/reggit

  • Loading branch information...
2 parents cf91a89 + 0e147fe commit a3b2c183cd8adb3aa7dcbed046dfd596b859983e @bramwelt bramwelt committed Jun 15, 2011
Showing with 70 additions and 4 deletions.
  1. +40 −0 site_media/stylesheets/report_card.css
  2. +28 −2 transcript/templates/transcript/report_card.html
  3. +2 −2 transcript/views.py
View
40 site_media/stylesheets/report_card.css
@@ -0,0 +1,40 @@
+.group{
+ margin-bottom:30px;
+}
+
+.report-class{
+ margin:10px;
+}
+
+.report-class span{
+ font-size:1.3em;
+}
+
+.cn{
+ font-size:1.3em;
+}
+
+.grade{
+ font-size:1.5em;
+ font-weight:bold;
+}
+
+.grade-A{
+ color:#008500;
+}
+
+.grade-B{
+ color:#006363;
+}
+
+.grade-C{
+ color:#A66F00;
+}
+
+.grade-D{
+ color:#A64B00;
+}
+
+.grade-F{
+ color:#A60000;
+}
View
30 transcript/templates/transcript/report_card.html
@@ -1,10 +1,36 @@
{% extends "application.html" %}
+{% block header %}
+ <link rel="stylesheet" type="text/css" href="/site_media/stylesheets/report_card.css" />
+{% endblock %}
+
{% block content %}
<div class="span-24 last">
<h1>Report Card</h1>
+ <h2>Report Card By term</h2>
+ {% for term in term_groups %}
+ {% for term_name, group in term.items %}
+ <h3>{{term_name}}</h3>
+ <div class="group span-24 last">
+ {% for class in group %}
+ <div class="span-24 last report-class">
+ <div class="span-4 cn">
+ <span>{{class.department}} {{class.number}}</span>
+ </div>
+ <div class="span-8">
+ <span>{{class.title}}</span>
+ </div>
+ <div class="span-6">
+ <span>{{class.credits}}</span>
+ </div>
+ <div class="span-6 last grade grade-{{class.grade|first}}">
+ <span>{{class.grade}}</span>
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ {% endfor%}
<h2>Grade Distribution</h2>
- {{ term_groups }}
- {{ grade_distribution }}
</div>
{% endblock %}
View
4 transcript/views.py
@@ -12,7 +12,7 @@ def index(request):
def report_card(request):
regclass = request.session['regclass']
- transcript = regclass.transcript.sort_by_term()
- grade_distribution = tr.grade_distribution()
+ transcript = regclass.transcript
+ grade_distribution = transcript.grade_distribution()
term_groups = transcript.group_by_term()
return render_to_response('transcript/report_card.html' ,{'grade_distribution':grade_distribution, 'term_groups':term_groups})

0 comments on commit a3b2c18

Please sign in to comment.