Commit 83c9d566 by David Ormsbee

Merge pull request #7 from MITx/bridger-grades

Bridger grades
parents c4cf7686 7f86e500
import courseware.content_parser as content_parser
import courseware.modules
import logging import logging
import random
import urllib import urllib
from lxml import etree
import courseware.content_parser as content_parser from collections import namedtuple
from models import StudentModule
from django.conf import settings from django.conf import settings
import courseware.modules from lxml import etree
from models import StudentModule
from student.models import UserProfile from student.models import UserProfile
log = logging.getLogger("mitx.courseware") log = logging.getLogger("mitx.courseware")
Score = namedtuple("Score", "earned possible graded section")
def get_grade(user, problem, cache): def get_grade(user, problem, cache):
## HACK: assumes max score is fixed per problem ## HACK: assumes max score is fixed per problem
id = problem.get('id') id = problem.get('id')
correct = 0 correct = 0
# If the ID is not in the cache, add the item # If the ID is not in the cache, add the item
if id not in cache: if id not in cache:
module = StudentModule(module_type = 'problem', # TODO: Move into StudentModule.__init__? module = StudentModule(module_type = 'problem', # TODO: Move into StudentModule.__init__?
module_id = id, module_id = id,
student = user, student = user,
...@@ -44,6 +47,17 @@ def get_grade(user, problem, cache): ...@@ -44,6 +47,17 @@ def get_grade(user, problem, cache):
return (correct, total) return (correct, total)
def grade_sheet(student): def grade_sheet(student):
"""
This pulls a summary of all problems in the course. It returns a dictionary with two datastructures:
- courseware_summary is a summary of all sections with problems in the course. It is organized as an array of chapters,
each containing an array of sections, each containing an array of scores. This contains information for graded and ungraded
problems, and is good for displaying a course summary with due dates, etc.
- grade_summary is a summary of how the final grade breaks down. It is an array of "sections". Each section can either be
a conglomerate of scores (like labs or homeworks) which has subscores and a totalscore, or a section can be all from one assignment
(such as a midterm or final) and only has a totalscore. Each section has a weight that shows how it contributes to the total grade.
"""
dom=content_parser.course_file(student) dom=content_parser.course_file(student)
course = dom.xpath('//course/@name')[0] course = dom.xpath('//course/@name')[0]
xmlChapters = dom.xpath('//course[@name=$course]/chapter', course=course) xmlChapters = dom.xpath('//course[@name=$course]/chapter', course=course)
...@@ -54,11 +68,14 @@ def grade_sheet(student): ...@@ -54,11 +68,14 @@ def grade_sheet(student):
response_by_id[response.module_id] = response response_by_id[response.module_id] = response
total_scores = {}
totaled_scores = {}
chapters=[] chapters=[]
for c in xmlChapters: for c in xmlChapters:
sections = [] sections = []
chname=c.get('name') chname=c.get('name')
for s in dom.xpath('//course[@name=$course]/chapter[@name=$chname]/section', for s in dom.xpath('//course[@name=$course]/chapter[@name=$chname]/section',
course=course, chname=chname): course=course, chname=chname):
problems=dom.xpath('//course[@name=$course]/chapter[@name=$chname]/section[@name=$section]//problem', problems=dom.xpath('//course[@name=$course]/chapter[@name=$chname]/section[@name=$section]//problem',
...@@ -84,22 +101,26 @@ def grade_sheet(student): ...@@ -84,22 +101,26 @@ def grade_sheet(student):
else: else:
correct = total correct = total
scores.append((int(correct),total, graded )) scores.append( Score(int(correct),total, graded, s.get("name")) )
section_total = Score(sum([score.earned for score in scores]),
sum([score.possible for score in scores]),
False,
p.get("id"))
section_total = (sum([score[0] for score in scores]), graded_total = Score(sum([score.earned for score in scores if score.graded]),
sum([score[1] for score in scores])) sum([score.possible for score in scores if score.graded]),
True,
graded_total = (sum([score[0] for score in scores if score[2]]), p.get("id"))
sum([score[1] for score in scores if score[2]]))
#Add the graded total to total_scores #Add the graded total to totaled_scores
format = s.get('format') if s.get('format') else "" format = s.get('format') if s.get('format') else ""
subtitle = s.get('subtitle') if s.get('subtitle') else format subtitle = s.get('subtitle') if s.get('subtitle') else format
if format and graded_total[1] > 0: if format and graded_total[1] > 0:
format_scores = total_scores[ format ] if format in total_scores else [] format_scores = totaled_scores.get(format, [])
format_scores.append( graded_total + (s.get("name"),) ) format_scores.append( graded_total )
total_scores[ format ] = format_scores totaled_scores[ format ] = format_scores
score={'section':s.get("name"), score={'section':s.get("name"),
'scores':scores, 'scores':scores,
...@@ -114,7 +135,20 @@ def grade_sheet(student): ...@@ -114,7 +135,20 @@ def grade_sheet(student):
chapters.append({'course':course, chapters.append({'course':course,
'chapter' : c.get("name"), 'chapter' : c.get("name"),
'sections' : sections,}) 'sections' : sections,})
grade_summary = grade_summary_6002x(totaled_scores)
return {'courseware_summary' : chapters,
'grade_summary' : grade_summary}
def grade_summary_6002x(totaled_scores):
"""
This function takes the a dictionary of (graded) section scores, and applies the course grading rules to create
the grade_summary. For 6.002x this means homeworks and labs all have equal weight, with the lowest 2 of each
being dropped. There is one midterm and one final.
"""
def totalWithDrops(scores, drop_count): def totalWithDrops(scores, drop_count):
#Note that this key will sort the list descending #Note that this key will sort the list descending
...@@ -131,12 +165,12 @@ def grade_sheet(student): ...@@ -131,12 +165,12 @@ def grade_sheet(student):
return aggregate_score, dropped_indices return aggregate_score, dropped_indices
#Figure the homework scores #Figure the homework scores
homework_scores = total_scores['Homework'] if 'Homework' in total_scores else [] homework_scores = totaled_scores['Homework'] if 'Homework' in totaled_scores else []
homework_percentages = [] homework_percentages = []
for i in range(12): for i in range(12):
if i < len(homework_scores): if i < len(homework_scores):
percentage = homework_scores[i][0] / float(homework_scores[i][1]) percentage = homework_scores[1].earned / float(homework_scores[i].possible)
summary = "Homework {0} - {1} - {2:.0%} ({3:g}/{4:g})".format( i + 1, homework_scores[i][2] , percentage, homework_scores[i][0], homework_scores[i][1] ) summary = "Homework {0} - {1} - {2:.0%} ({3:g}/{4:g})".format( i + 1, homework_scores[i].section , percentage, homework_scores[i].earned, homework_scores[i].possible )
else: else:
percentage = 0 percentage = 0
summary = "Unreleased Homework {0} - 0% (?/?)".format(i + 1) summary = "Unreleased Homework {0} - 0% (?/?)".format(i + 1)
...@@ -153,13 +187,12 @@ def grade_sheet(student): ...@@ -153,13 +187,12 @@ def grade_sheet(student):
homework_total, homework_dropped_indices = totalWithDrops(homework_percentages, 2) homework_total, homework_dropped_indices = totalWithDrops(homework_percentages, 2)
#Figure the lab scores #Figure the lab scores
lab_scores = total_scores['Lab'] if 'Lab' in total_scores else [] lab_scores = totaled_scores['Lab'] if 'Lab' in totaled_scores else []
lab_percentages = [] lab_percentages = []
log.debug("lab_scores: {0}".format(lab_scores))
for i in range(12): for i in range(12):
if i < len(lab_scores): if i < len(lab_scores):
percentage = lab_scores[i][0] / float(lab_scores[i][1]) percentage = lab_scores[i].earned / float(lab_scores[i].possible)
summary = "Lab {0} - {1} - {2:.0%} ({3:g}/{4:g})".format( i + 1, lab_scores[i][2] , percentage, lab_scores[i][0], lab_scores[i][1] ) summary = "Lab {0} - {1} - {2:.0%} ({3:g}/{4:g})".format( i + 1, lab_scores[i].section , percentage, lab_scores[i].earned, lab_scores[i].possible )
else: else:
percentage = 0 percentage = 0
summary = "Unreleased Lab {0} - 0% (?/?)".format(i + 1) summary = "Unreleased Lab {0} - 0% (?/?)".format(i + 1)
...@@ -177,18 +210,18 @@ def grade_sheet(student): ...@@ -177,18 +210,18 @@ def grade_sheet(student):
#TODO: Pull this data about the midterm and final from the databse. It should be exactly similar to above, but we aren't sure how exams will be done yet. #TODO: Pull this data about the midterm and final from the databse. It should be exactly similar to above, but we aren't sure how exams will be done yet.
midterm_score = ('?', '?') midterm_score = Score('?', '?', True, "?")
midterm_percentage = 0 midterm_percentage = 0
final_score = ('?', '?') final_score = Score('?', '?', True, "?")
final_percentage = 0 final_percentage = 0
if settings.GENERATE_PROFILE_SCORES: if settings.GENERATE_PROFILE_SCORES:
midterm_score = (random.randrange(50, 150), 150) midterm_score = Score(random.randrange(50, 150), 150, True, "?")
midterm_percentage = midterm_score[0] / float(midterm_score[1]) midterm_percentage = midterm_score.earned / float(midterm_score.possible)
final_score = (random.randrange(100, 300), 300) final_score = Score(random.randrange(100, 300), 300, True, "?")
final_percentage = final_score[0] / float(final_score[1]) final_percentage = final_score.earned / float(final_score.possible)
grade_summary = [ grade_summary = [
...@@ -196,7 +229,8 @@ def grade_sheet(student): ...@@ -196,7 +229,8 @@ def grade_sheet(student):
'category': 'Homework', 'category': 'Homework',
'subscores' : homework_percentages, 'subscores' : homework_percentages,
'dropped_indices' : homework_dropped_indices, 'dropped_indices' : homework_dropped_indices,
'totalscore' : {'score' : homework_total, 'summary' : "Homework Average - {0:.0%}".format(homework_total)}, 'totalscore' : homework_total,
'totalscore_summary' : "Homework Average - {0:.0%}".format(homework_total),
'totallabel' : 'HW Avg', 'totallabel' : 'HW Avg',
'weight' : 0.15, 'weight' : 0.15,
}, },
...@@ -204,25 +238,25 @@ def grade_sheet(student): ...@@ -204,25 +238,25 @@ def grade_sheet(student):
'category': 'Labs', 'category': 'Labs',
'subscores' : lab_percentages, 'subscores' : lab_percentages,
'dropped_indices' : lab_dropped_indices, 'dropped_indices' : lab_dropped_indices,
'totalscore' : {'score' : lab_total, 'summary' : "Lab Average - {0:.0%}".format(lab_total)}, 'totalscore' : lab_total,
'totalscore_summary' : "Lab Average - {0:.0%}".format(lab_total),
'totallabel' : 'Lab Avg', 'totallabel' : 'Lab Avg',
'weight' : 0.15, 'weight' : 0.15,
}, },
{ {
'category': 'Midterm', 'category': 'Midterm',
'totalscore' : {'score' : midterm_percentage, 'summary' : "Midterm - {0:.0%} ({1}/{2})".format(midterm_percentage, midterm_score[0], midterm_score[1])}, 'totalscore' : midterm_percentage,
'totalscore_summary' : "Midterm - {0:.0%} ({1}/{2})".format(midterm_percentage, midterm_score.earned, midterm_score.possible),
'totallabel' : 'Midterm', 'totallabel' : 'Midterm',
'weight' : 0.30, 'weight' : 0.30,
}, },
{ {
'category': 'Final', 'category': 'Final',
'totalscore' : {'score' : final_percentage, 'summary' : "Final - {0:.0%} ({1}/{2})".format(final_percentage, final_score[0], final_score[1])}, 'totalscore' : final_percentage,
'totalscore_summary' : "Final - {0:.0%} ({1}/{2})".format(final_percentage, final_score.earned, final_score.possible),
'totallabel' : 'Final', 'totallabel' : 'Final',
'weight' : 0.40, 'weight' : 0.40,
} }
] ]
return {'grade_summary' : grade_summary, return grade_summary
'chapters':chapters}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5,7 +5,18 @@ Last Updated: 2010-09-17 ...@@ -5,7 +5,18 @@ Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com Author: Richard Clark - http://richclarkdesign.com
Twitter: @rich_clark Twitter: @rich_clark
*/ */
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
margin: 0; margin: 0;
padding: 0; padding: 0;
border: 0; border: 0;
...@@ -17,7 +28,8 @@ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pr ...@@ -17,7 +28,8 @@ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pr
body { body {
line-height: 1; } line-height: 1; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block; } display: block; }
nav ul { nav ul {
...@@ -26,7 +38,8 @@ nav ul { ...@@ -26,7 +38,8 @@ nav ul {
blockquote, q { blockquote, q {
quotes: none; } quotes: none; }
blockquote:before, blockquote:after, q:before, q:after { blockquote:before, blockquote:after,
q:before, q:after {
content: ''; content: '';
content: none; } content: none; }
...@@ -127,27 +140,27 @@ input, select { ...@@ -127,27 +140,27 @@ input, select {
.subpage > div, section.copyright > div, section.tos > div, section.privacy-policy > div, section.honor-code > div { .subpage > div, section.copyright > div, section.tos > div, section.privacy-policy > div, section.honor-code > div {
padding-left: 34.171%; } padding-left: 34.171%; }
@media screen and (max-width: 940px) { @media screen and (max-width: 940px) {
.subpage > div, section.copyright > div, section.tos > div, section.privacy-policy > div, section.honor-code > div { .subpage > div, section.copyright > div, section.tos > div, section.privacy-policy > div, section.honor-code > div {
padding-left: 0; } } padding-left: 0; } }
.subpage > div p, section.copyright > div p, section.tos > div p, section.privacy-policy > div p, section.honor-code > div p { .subpage > div p, section.copyright > div p, section.tos > div p, section.privacy-policy > div p, section.honor-code > div p {
margin-bottom: 25.888px; margin-bottom: 25.888px;
line-height: 25.888px; } line-height: 25.888px; }
.subpage > div h1, section.copyright > div h1, section.tos > div h1, section.privacy-policy > div h1, section.honor-code > div h1 { .subpage > div h1, section.copyright > div h1, section.tos > div h1, section.privacy-policy > div h1, section.honor-code > div h1 {
margin-bottom: 12.944px; } margin-bottom: 12.944px; }
.subpage > div h2, section.copyright > div h2, section.tos > div h2, section.privacy-policy > div h2, section.honor-code > div h2 { .subpage > div h2, section.copyright > div h2, section.tos > div h2, section.privacy-policy > div h2, section.honor-code > div h2 {
font: 18px "Open Sans", Helvetica, Arial, sans-serif; font: 18px "Open Sans", Helvetica, Arial, sans-serif;
color: #000; color: #000;
margin-bottom: 12.944px; } margin-bottom: 12.944px; }
.subpage > div ul, section.copyright > div ul, section.tos > div ul, section.privacy-policy > div ul, section.honor-code > div ul { .subpage > div ul, section.copyright > div ul, section.tos > div ul, section.privacy-policy > div ul, section.honor-code > div ul {
list-style: disc outside none; } list-style: disc outside none; }
.subpage > div ul li, section.copyright > div ul li, section.tos > div ul li, section.privacy-policy > div ul li, section.honor-code > div ul li { .subpage > div ul li, section.copyright > div ul li, section.tos > div ul li, section.privacy-policy > div ul li, section.honor-code > div ul li {
list-style: disc outside none; list-style: disc outside none;
line-height: 25.888px; } line-height: 25.888px; }
.subpage > div dl, section.copyright > div dl, section.tos > div dl, section.privacy-policy > div dl, section.honor-code > div dl { .subpage > div dl, section.copyright > div dl, section.tos > div dl, section.privacy-policy > div dl, section.honor-code > div dl {
margin-bottom: 25.888px; } margin-bottom: 25.888px; }
.subpage > div dl dd, section.copyright > div dl dd, section.tos > div dl dd, section.privacy-policy > div dl dd, section.honor-code > div dl dd { .subpage > div dl dd, section.copyright > div dl dd, section.tos > div dl dd, section.privacy-policy > div dl dd, section.honor-code > div dl dd {
margin-bottom: 12.944px; } margin-bottom: 12.944px; }
.clearfix:after, .subpage:after, section.copyright:after, section.tos:after, section.privacy-policy:after, section.honor-code:after, header.announcement div section:after, footer:after, section.index-content:after, section.index-content section:after, section.index-content section.about section:after, div.leanModal_box#enroll ol:after { .clearfix:after, .subpage:after, section.copyright:after, section.tos:after, section.privacy-policy:after, section.honor-code:after, header.announcement div section:after, footer:after, section.index-content:after, section.index-content section:after, section.index-content section.about section:after, div.leanModal_box#enroll ol:after {
content: "."; content: ".";
...@@ -200,12 +213,12 @@ input, select { ...@@ -200,12 +213,12 @@ input, select {
-moz-box-shadow: inset 0 1px 0 #b83d3d; -moz-box-shadow: inset 0 1px 0 #b83d3d;
box-shadow: inset 0 1px 0 #b83d3d; box-shadow: inset 0 1px 0 #b83d3d;
-webkit-font-smoothing: antialiased; } -webkit-font-smoothing: antialiased; }
.button:hover, header.announcement div section.course section a:hover, section.index-content section.course a:hover, section.index-content section.staff a:hover, section.index-content section.about-course section.cta a.enroll:hover { .button:hover, header.announcement div section.course section a:hover, section.index-content section.course a:hover, section.index-content section.staff a:hover, section.index-content section.about-course section.cta a.enroll:hover {
background-color: #732626; background-color: #732626;
border-color: #4d1919; } border-color: #4d1919; }
.button span, header.announcement div section.course section a span, section.index-content section.course a span, section.index-content section.staff a span, section.index-content section.about-course section.cta a.enroll span { .button span, header.announcement div section.course section a span, section.index-content section.course a span, section.index-content section.staff a span, section.index-content section.about-course section.cta a.enroll span {
font-family: Garamond, Baskerville, "Baskerville Old Face", "Hoefler Text", "Times New Roman", serif; font-family: Garamond, Baskerville, "Baskerville Old Face", "Hoefler Text", "Times New Roman", serif;
font-style: italic; } font-style: italic; }
p.ie-warning { p.ie-warning {
display: block !important; display: block !important;
...@@ -218,37 +231,37 @@ body { ...@@ -218,37 +231,37 @@ body {
background-color: #fff; background-color: #fff;
color: #444; color: #444;
font: 16px Georgia, serif; } font: 16px Georgia, serif; }
body :focus { body :focus {
outline-color: #ccc; } outline-color: #ccc; }
body h1 { body h1 {
font: 800 24px "Open Sans", Helvetica, Arial, sans-serif; } font: 800 24px "Open Sans", Helvetica, Arial, sans-serif; }
body li { body li {
margin-bottom: 25.888px; } margin-bottom: 25.888px; }
body em { body em {
font-style: italic; } font-style: italic; }
body a { body a {
color: #993333; color: #993333;
font-style: italic; font-style: italic;
text-decoration: none; } text-decoration: none; }
body a:hover, body a:focus { body a:hover, body a:focus {
color: #732626; } color: #732626; }
body input[type="email"], body input[type="number"], body input[type="password"], body input[type="search"], body input[type="tel"], body input[type="text"], body input[type="url"], body input[type="color"], body input[type="date"], body input[type="datetime"], body input[type="datetime-local"], body input[type="month"], body input[type="time"], body input[type="week"], body textarea { body input[type="email"], body input[type="number"], body input[type="password"], body input[type="search"], body input[type="tel"], body input[type="text"], body input[type="url"], body input[type="color"], body input[type="date"], body input[type="datetime"], body input[type="datetime-local"], body input[type="month"], body input[type="time"], body input[type="week"], body textarea {
-webkit-box-shadow: 0 -1px 0 white; -webkit-box-shadow: 0 -1px 0 white;
-moz-box-shadow: 0 -1px 0 white; -moz-box-shadow: 0 -1px 0 white;
box-shadow: 0 -1px 0 white; box-shadow: 0 -1px 0 white;
background-color: #eeeeee; background-color: #eeeeee;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, white)); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, white));
background-image: -webkit-linear-gradient(top, #eeeeee, white); background-image: -webkit-linear-gradient(top, #eeeeee, white);
background-image: -moz-linear-gradient(top, #eeeeee, white); background-image: -moz-linear-gradient(top, #eeeeee, white);
background-image: -ms-linear-gradient(top, #eeeeee, white); background-image: -ms-linear-gradient(top, #eeeeee, white);
background-image: -o-linear-gradient(top, #eeeeee, white); background-image: -o-linear-gradient(top, #eeeeee, white);
background-image: linear-gradient(top, #eeeeee, white); background-image: linear-gradient(top, #eeeeee, white);
border: 1px solid #999; border: 1px solid #999;
font: 16px Georgia, serif; font: 16px Georgia, serif;
padding: 4px; padding: 4px;
width: 100%; } width: 100%; }
body input[type="email"]:focus, body input[type="number"]:focus, body input[type="password"]:focus, body input[type="search"]:focus, body input[type="tel"]:focus, body input[type="text"]:focus, body input[type="url"]:focus, body input[type="color"]:focus, body input[type="date"]:focus, body input[type="datetime"]:focus, body input[type="datetime-local"]:focus, body input[type="month"]:focus, body input[type="time"]:focus, body input[type="week"]:focus, body textarea:focus { body input[type="email"]:focus, body input[type="number"]:focus, body input[type="password"]:focus, body input[type="search"]:focus, body input[type="tel"]:focus, body input[type="text"]:focus, body input[type="url"]:focus, body input[type="color"]:focus, body input[type="date"]:focus, body input[type="datetime"]:focus, body input[type="datetime-local"]:focus, body input[type="month"]:focus, body input[type="time"]:focus, body input[type="week"]:focus, body textarea:focus {
border-color: #993333; } border-color: #993333; }
header.announcement { header.announcement {
-webkit-background-size: cover; -webkit-background-size: cover;
...@@ -260,474 +273,474 @@ header.announcement { ...@@ -260,474 +273,474 @@ header.announcement {
border-bottom: 1px solid #000; border-bottom: 1px solid #000;
color: #fff; color: #fff;
-webkit-font-smoothing: antialiased; } -webkit-font-smoothing: antialiased; }
header.announcement.home {
background: #e3e3e3 url("/static/images/marketing/shot-5-medium.jpg"); }
@media screen and (min-width: 1200px) {
header.announcement.home { header.announcement.home {
background: #e3e3e3 url("/static/images/marketing/shot-5-large.jpg"); } } background: #e3e3e3 url("/static/images/marketing/shot-5-medium.jpg"); }
header.announcement.home div { @media screen and (min-width: 1200px) {
padding: 258.88px 25.888px 77.664px; } header.announcement.home {
@media screen and (max-width:780px) { background: #e3e3e3 url("/static/images/marketing/shot-5-large.jpg"); } }
header.announcement.home div { header.announcement.home div {
padding: 64.72px 25.888px 51.776px; } } padding: 258.88px 25.888px 77.664px; }
header.announcement.home div nav h1 { @media screen and (max-width:780px) {
margin-right: 0; } header.announcement.home div {
header.announcement.home div nav a.login { padding: 64.72px 25.888px 51.776px; } }
display: none; } header.announcement.home div nav h1 {
header.announcement.course { margin-right: 0; }
background: #e3e3e3 url("/static/images/marketing/course-bg-small.jpg"); } header.announcement.home div nav a.login {
@media screen and (min-width: 1200px) { display: none; }
header.announcement.course {
background: #e3e3e3 url("/static/images/marketing/course-bg-large.jpg"); } }
@media screen and (max-width: 1199px) and (min-width: 700px) {
header.announcement.course { header.announcement.course {
background: #e3e3e3 url("/static/images/marketing/course-bg-medium.jpg"); } } background: #e3e3e3 url("/static/images/marketing/course-bg-small.jpg"); }
header.announcement.course div { @media screen and (min-width: 1200px) {
padding: 103.552px 25.888px 51.776px; } header.announcement.course {
@media screen and (max-width:780px) { background: #e3e3e3 url("/static/images/marketing/course-bg-large.jpg"); } }
header.announcement.course div { @media screen and (max-width: 1199px) and (min-width: 700px) {
padding: 64.72px 25.888px 51.776px; } } header.announcement.course {
header.announcement div { background: #e3e3e3 url("/static/images/marketing/course-bg-medium.jpg"); } }
position: relative; } header.announcement.course div {
header.announcement div nav { padding: 103.552px 25.888px 51.776px; }
position: absolute; @media screen and (max-width:780px) {
top: 0; header.announcement.course div {
right: 25.888px; padding: 64.72px 25.888px 51.776px; } }
-webkit-border-radius: 0 0 3px 3px; header.announcement div {
-moz-border-radius: 0 0 3px 3px; position: relative; }
-ms-border-radius: 0 0 3px 3px; header.announcement div nav {
-o-border-radius: 0 0 3px 3px; position: absolute;
border-radius: 0 0 3px 3px; top: 0;
background: #333; right: 25.888px;
background: rgba(0, 0, 0, 0.7); -webkit-border-radius: 0 0 3px 3px;
padding: 12.944px 25.888px; } -moz-border-radius: 0 0 3px 3px;
header.announcement div nav h1 { -ms-border-radius: 0 0 3px 3px;
display: -moz-inline-box; -o-border-radius: 0 0 3px 3px;
-moz-box-orient: vertical; border-radius: 0 0 3px 3px;
display: inline-block; background: #333;
vertical-align: baseline; background: rgba(0, 0, 0, 0.7);
zoom: 1; padding: 12.944px 25.888px; }
*display: inline; header.announcement div nav h1 {
*vertical-align: auto; display: -moz-inline-box;
margin-right: 12.944px; } -moz-box-orient: vertical;
header.announcement div nav h1 a { display: inline-block;
font: italic 800 18px "Open Sans", Helvetica, Arial, sans-serif; vertical-align: baseline;
color: #fff; zoom: 1;
text-decoration: none; } *display: inline;
header.announcement div nav h1 a:hover, header.announcement div nav h1 a:focus { *vertical-align: auto;
color: #999; } margin-right: 12.944px; }
header.announcement div nav a.login { header.announcement div nav h1 a {
text-decoration: none; font: italic 800 18px "Open Sans", Helvetica, Arial, sans-serif;
color: #fff; color: #fff;
font-size: 12px; text-decoration: none; }
font-style: normal; header.announcement div nav h1 a:hover, header.announcement div nav h1 a:focus {
font-family: "Open Sans", Helvetica, Arial, sans-serif; } color: #999; }
header.announcement div nav a.login:hover, header.announcement div nav a.login:focus { header.announcement div nav a.login {
color: #999; } text-decoration: none;
header.announcement div section { color: #fff;
background: #993333; font-size: 12px;
display: -moz-inline-box; font-style: normal;
-moz-box-orient: vertical; font-family: "Open Sans", Helvetica, Arial, sans-serif; }
display: inline-block; header.announcement div nav a.login:hover, header.announcement div nav a.login:focus {
vertical-align: baseline; color: #999; }
zoom: 1; header.announcement div section {
*display: inline; background: #993333;
*vertical-align: auto; display: -moz-inline-box;
margin-left: 34.171%; -moz-box-orient: vertical;
padding: 25.888px 38.832px; } display: inline-block;
@media screen and (max-width: 780px) { vertical-align: baseline;
header.announcement div section { zoom: 1;
margin-left: 0; } } *display: inline;
header.announcement div section h1 { *vertical-align: auto;
font-family: "Open Sans"; margin-left: 34.171%;
font-size: 30px; padding: 25.888px 38.832px; }
font-weight: 800; @media screen and (max-width: 780px) {
display: -moz-inline-box; header.announcement div section {
-moz-box-orient: vertical; margin-left: 0; } }
display: inline-block; header.announcement div section h1 {
vertical-align: baseline; font-family: "Open Sans";
zoom: 1; font-size: 30px;
*display: inline; font-weight: 800;
*vertical-align: auto; display: -moz-inline-box;
line-height: 1.2em; -moz-box-orient: vertical;
margin: 0 25.888px 0 0; } display: inline-block;
header.announcement div section h2 { vertical-align: baseline;
font-family: "Open Sans"; zoom: 1;
font-size: 24px; *display: inline;
font-weight: 400; *vertical-align: auto;
display: -moz-inline-box; line-height: 1.2em;
-moz-box-orient: vertical; margin: 0 25.888px 0 0; }
display: inline-block; header.announcement div section h2 {
vertical-align: baseline; font-family: "Open Sans";
zoom: 1; font-size: 24px;
*display: inline; font-weight: 400;
*vertical-align: auto; display: -moz-inline-box;
line-height: 1.2em; } -moz-box-orient: vertical;
header.announcement div section.course section { display: inline-block;
float: left; vertical-align: baseline;
margin-left: 0; zoom: 1;
margin-right: 3.817%; *display: inline;
padding: 0; *vertical-align: auto;
width: 48.092%; } line-height: 1.2em; }
@media screen and (max-width: 780px) { header.announcement div section.course section {
header.announcement div section.course section { float: left;
float: none; margin-left: 0;
width: 100%; margin-right: 3.817%;
margin-right: 0; } } padding: 0;
header.announcement div section.course section a { width: 48.092%; }
background-color: #4d1919; @media screen and (max-width: 780px) {
border-color: #260d0d; header.announcement div section.course section {
-webkit-box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939; float: none;
-moz-box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939; width: 100%;
box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939; margin-right: 0; } }
display: block; header.announcement div section.course section a {
padding: 12.944px 25.888px; background-color: #4d1919;
text-align: center; } border-color: #260d0d;
header.announcement div section.course section a:hover { -webkit-box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939;
background-color: #732626; -moz-box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939;
border-color: #4d1919; } box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939;
header.announcement div section.course p { display: block;
width: 48.092%; padding: 12.944px 25.888px;
line-height: 25.888px; text-align: center; }
float: left; } header.announcement div section.course section a:hover {
@media screen and (max-width: 780px) { background-color: #732626;
header.announcement div section.course p { border-color: #4d1919; }
float: none; header.announcement div section.course p {
width: 100%; } } width: 48.092%;
line-height: 25.888px;
float: left; }
@media screen and (max-width: 780px) {
header.announcement div section.course p {
float: none;
width: 100%; } }
footer { footer {
padding-top: 0; } padding-top: 0; }
footer div.footer-wrapper {
border-top: 1px solid #e5e5e5;
padding: 25.888px 0;
background: url("/static/images/marketing/mit-logo.png") right center no-repeat; }
@media screen and (max-width: 780px) {
footer div.footer-wrapper { footer div.footer-wrapper {
background-position: left bottom; border-top: 1px solid #e5e5e5;
padding-bottom: 77.664px; } } padding: 25.888px 0;
footer div.footer-wrapper a { background: url("/static/images/marketing/mit-logo.png") right center no-repeat; }
color: #888; @media screen and (max-width: 780px) {
text-decoration: none; footer div.footer-wrapper {
-webkit-transition-property: all; background-position: left bottom;
-moz-transition-property: all; padding-bottom: 77.664px; } }
-ms-transition-property: all; footer div.footer-wrapper a {
-o-transition-property: all; color: #888;
transition-property: all; text-decoration: none;
-webkit-transition-duration: 0.15s; -webkit-transition-property: all;
-moz-transition-duration: 0.15s; -moz-transition-property: all;
-ms-transition-duration: 0.15s; -ms-transition-property: all;
-o-transition-duration: 0.15s; -o-transition-property: all;
transition-duration: 0.15s; transition-property: all;
-webkit-transition-timing-function: ease-out; -webkit-transition-duration: 0.15s;
-moz-transition-timing-function: ease-out; -moz-transition-duration: 0.15s;
-ms-transition-timing-function: ease-out; -ms-transition-duration: 0.15s;
-o-transition-timing-function: ease-out; -o-transition-duration: 0.15s;
transition-timing-function: ease-out; transition-duration: 0.15s;
-webkit-transition-delay: 0; -webkit-transition-timing-function: ease-out;
-moz-transition-delay: 0; -moz-transition-timing-function: ease-out;
-ms-transition-delay: 0; -ms-transition-timing-function: ease-out;
-o-transition-delay: 0; -o-transition-timing-function: ease-out;
transition-delay: 0; } transition-timing-function: ease-out;
footer div.footer-wrapper a:hover, footer div.footer-wrapper a:focus { -webkit-transition-delay: 0;
color: #666; } -moz-transition-delay: 0;
footer div.footer-wrapper p { -ms-transition-delay: 0;
display: -moz-inline-box; -o-transition-delay: 0;
-moz-box-orient: vertical; transition-delay: 0; }
display: inline-block; footer div.footer-wrapper a:hover, footer div.footer-wrapper a:focus {
vertical-align: baseline; color: #666; }
zoom: 1; footer div.footer-wrapper p {
*display: inline; display: -moz-inline-box;
*vertical-align: auto; -moz-box-orient: vertical;
margin-right: 25.888px; } display: inline-block;
footer div.footer-wrapper ul { vertical-align: baseline;
display: -moz-inline-box; zoom: 1;
-moz-box-orient: vertical; *display: inline;
display: inline-block; *vertical-align: auto;
vertical-align: baseline; margin-right: 25.888px; }
zoom: 1; footer div.footer-wrapper ul {
*display: inline; display: -moz-inline-box;
*vertical-align: auto; } -moz-box-orient: vertical;
@media screen and (max-width: 780px) { display: inline-block;
footer div.footer-wrapper ul { vertical-align: baseline;
margin-top: 25.888px; } } zoom: 1;
footer div.footer-wrapper ul li { *display: inline;
display: -moz-inline-box; *vertical-align: auto; }
-moz-box-orient: vertical; @media screen and (max-width: 780px) {
display: inline-block; footer div.footer-wrapper ul {
vertical-align: baseline; margin-top: 25.888px; } }
zoom: 1; footer div.footer-wrapper ul li {
*display: inline; display: -moz-inline-box;
*vertical-align: auto; -moz-box-orient: vertical;
margin-bottom: 0; } display: inline-block;
footer div.footer-wrapper ul li:after { vertical-align: baseline;
content: ' |'; zoom: 1;
display: inline; *display: inline;
color: #ccc; } *vertical-align: auto;
footer div.footer-wrapper ul li:last-child:after { margin-bottom: 0; }
content: none; } footer div.footer-wrapper ul li:after {
footer div.footer-wrapper ul.social { content: ' |';
float: right; display: inline;
margin-right: 60px; color: #ccc; }
position: relative; footer div.footer-wrapper ul li:last-child:after {
top: -5px; } content: none; }
@media screen and (max-width: 780px) { footer div.footer-wrapper ul.social {
footer div.footer-wrapper ul.social { float: right;
float: none; } } margin-right: 60px;
footer div.footer-wrapper ul.social li { position: relative;
float: left; top: -5px; }
margin-right: 12.944px; } @media screen and (max-width: 780px) {
footer div.footer-wrapper ul.social li:after { footer div.footer-wrapper ul.social {
content: none; float: none; } }
display: none; } footer div.footer-wrapper ul.social li {
footer div.footer-wrapper ul.social li a { float: left;
display: block; margin-right: 12.944px; }
height: 29px; footer div.footer-wrapper ul.social li:after {
width: 28px; content: none;
text-indent: -9999px; } display: none; }
footer div.footer-wrapper ul.social li a:hover { footer div.footer-wrapper ul.social li a {
opacity: .8; } display: block;
footer div.footer-wrapper ul.social li.twitter a { height: 29px;
background: url("/static/images/marketing/twitter.png") 0 0 no-repeat; } width: 28px;
footer div.footer-wrapper ul.social li.facebook a { text-indent: -9999px; }
background: url("/static/images/marketing/facebook.png") 0 0 no-repeat; } footer div.footer-wrapper ul.social li a:hover {
footer div.footer-wrapper ul.social li.linkedin a { opacity: .8; }
background: url("/static/images/marketing/linkedin.png") 0 0 no-repeat; } footer div.footer-wrapper ul.social li.twitter a {
background: url("/static/images/marketing/twitter.png") 0 0 no-repeat; }
footer div.footer-wrapper ul.social li.facebook a {
background: url("/static/images/marketing/facebook.png") 0 0 no-repeat; }
footer div.footer-wrapper ul.social li.linkedin a {
background: url("/static/images/marketing/linkedin.png") 0 0 no-repeat; }
section.index-content section { section.index-content section {
float: left; } float: left; }
@media screen and (max-width: 780px) { @media screen and (max-width: 780px) {
section.index-content section { section.index-content section {
float: none; float: none;
width: auto; width: auto;
margin-right: 0; } } margin-right: 0; } }
section.index-content section h1 { section.index-content section h1 {
font-size: 800 24px "Open Sans"; font-size: 800 24px "Open Sans";
margin-bottom: 25.888px; } margin-bottom: 25.888px; }
section.index-content section p { section.index-content section p {
line-height: 25.888px; line-height: 25.888px;
margin-bottom: 25.888px; } margin-bottom: 25.888px; }
section.index-content section ul { section.index-content section ul {
margin: 0; } margin: 0; }
section.index-content section.about {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-right: 1px solid #e5e5e5;
margin-right: 2.513%;
padding-right: 1.256%;
width: 65.829%; }
@media screen and (max-width: 780px) {
section.index-content section.about { section.index-content section.about {
width: 100%; -webkit-box-sizing: border-box;
border-right: 0; -moz-box-sizing: border-box;
margin-right: 0; box-sizing: border-box;
padding-right: 0; } } border-right: 1px solid #e5e5e5;
section.index-content section.about section { margin-right: 2.513%;
margin-bottom: 25.888px; } padding-right: 1.256%;
section.index-content section.about section p { width: 65.829%; }
width: 48.092%; @media screen and (max-width: 780px) {
float: left; } section.index-content section.about {
@media screen and (max-width: 780px) { width: 100%;
section.index-content section.about section p { border-right: 0;
float: none; margin-right: 0;
width: auto; } } padding-right: 0; } }
section.index-content section.about section p:nth-child(odd) { section.index-content section.about section {
margin-right: 3.817%; } margin-bottom: 25.888px; }
@media screen and (max-width: 780px) { section.index-content section.about section p {
section.index-content section.about section p:nth-child(odd) { width: 48.092%;
margin-right: 0; } } float: left; }
section.index-content section.about section.intro section { @media screen and (max-width: 780px) {
margin-bottom: 0; } section.index-content section.about section p {
section.index-content section.about section.intro section.intro-text { float: none;
margin-right: 3.817%; width: auto; } }
width: 48.092%; } section.index-content section.about section p:nth-child(odd) {
@media screen and (max-width: 780px) { margin-right: 3.817%; }
section.index-content section.about section.intro section.intro-text { @media screen and (max-width: 780px) {
margin-right: 0; section.index-content section.about section p:nth-child(odd) {
width: auto; } } margin-right: 0; } }
section.index-content section.about section.intro section.intro-text p { section.index-content section.about section.intro section {
margin-right: 0; margin-bottom: 0; }
width: auto; section.index-content section.about section.intro section.intro-text {
float: none; } margin-right: 3.817%;
section.index-content section.about section.intro section.intro-video { width: 48.092%; }
width: 48.092%; } @media screen and (max-width: 780px) {
@media screen and (max-width: 780px) { section.index-content section.about section.intro section.intro-text {
section.index-content section.about section.intro section.intro-video { margin-right: 0;
width: auto; } } width: auto; } }
section.index-content section.about section.intro section.intro-video a { section.index-content section.about section.intro section.intro-text p {
display: block; margin-right: 0;
width: 100%; } width: auto;
section.index-content section.about section.intro section.intro-video a img { float: none; }
width: 100%; } section.index-content section.about section.intro section.intro-video {
section.index-content section.about section.intro section.intro-video a span { width: 48.092%; }
display: none; } @media screen and (max-width: 780px) {
section.index-content section.about section.features { section.index-content section.about section.intro section.intro-video {
border-top: 1px solid #E5E5E5; width: auto; } }
padding-top: 25.888px; section.index-content section.about section.intro section.intro-video a {
margin-bottom: 0; } display: block;
section.index-content section.about section.features h2 { width: 100%; }
text-transform: uppercase; section.index-content section.about section.intro section.intro-video a img {
letter-spacing: 1px; width: 100%; }
color: #888; section.index-content section.about section.intro section.intro-video a span {
margin-bottom: 25.888px; display: none; }
font-weight: normal; section.index-content section.about section.features {
font-size: 14px; } border-top: 1px solid #E5E5E5;
section.index-content section.about section.features h2 span { padding-top: 25.888px;
text-transform: none; } margin-bottom: 0; }
section.index-content section.about section.features p { section.index-content section.about section.features h2 {
width: auto; text-transform: uppercase;
clear: both; } letter-spacing: 1px;
section.index-content section.about section.features p strong { color: #888;
font-family: "Open sans"; margin-bottom: 25.888px;
font-weight: 800; } font-weight: normal;
section.index-content section.about section.features p a { font-size: 14px; }
color: #993333; section.index-content section.about section.features h2 span {
text-decoration: none; text-transform: none; }
-webkit-transition-property: all; section.index-content section.about section.features p {
-moz-transition-property: all; width: auto;
-ms-transition-property: all; clear: both; }
-o-transition-property: all; section.index-content section.about section.features p strong {
transition-property: all; font-family: "Open sans";
-webkit-transition-duration: 0.15s; font-weight: 800; }
-moz-transition-duration: 0.15s; section.index-content section.about section.features p a {
-ms-transition-duration: 0.15s; color: #993333;
-o-transition-duration: 0.15s; text-decoration: none;
transition-duration: 0.15s; -webkit-transition-property: all;
-webkit-transition-timing-function: ease-out; -moz-transition-property: all;
-moz-transition-timing-function: ease-out; -ms-transition-property: all;
-ms-transition-timing-function: ease-out; -o-transition-property: all;
-o-transition-timing-function: ease-out; transition-property: all;
transition-timing-function: ease-out; -webkit-transition-duration: 0.15s;
-webkit-transition-delay: 0; -moz-transition-duration: 0.15s;
-moz-transition-delay: 0; -ms-transition-duration: 0.15s;
-ms-transition-delay: 0; -o-transition-duration: 0.15s;
-o-transition-delay: 0; transition-duration: 0.15s;
transition-delay: 0; } -webkit-transition-timing-function: ease-out;
section.index-content section.about section.features p a:hover, section.index-content section.about section.features p a:focus { -moz-transition-timing-function: ease-out;
color: #602020; } -ms-transition-timing-function: ease-out;
section.index-content section.about section.features ul { -o-transition-timing-function: ease-out;
margin-bottom: 0; } transition-timing-function: ease-out;
section.index-content section.about section.features ul li { -webkit-transition-delay: 0;
line-height: 25.888px; -moz-transition-delay: 0;
width: 48.092%; -ms-transition-delay: 0;
float: left; -o-transition-delay: 0;
margin-bottom: 12.944px; } transition-delay: 0; }
@media screen and (max-width: 780px) { section.index-content section.about section.features p a:hover, section.index-content section.about section.features p a:focus {
section.index-content section.about section.features ul li { color: #602020; }
width: auto; section.index-content section.about section.features ul {
float: none; } } margin-bottom: 0; }
section.index-content section.about section.features ul li:nth-child(odd) { section.index-content section.about section.features ul li {
margin-right: 3.817%; } line-height: 25.888px;
@media screen and (max-width: 780px) { width: 48.092%;
section.index-content section.about section.features ul li:nth-child(odd) { float: left;
margin-right: 0; } } margin-bottom: 12.944px; }
section.index-content section.course, section.index-content section.staff { @media screen and (max-width: 780px) {
width: 31.658%; } section.index-content section.about section.features ul li {
@media screen and (max-width: 780px) { width: auto;
float: none; } }
section.index-content section.about section.features ul li:nth-child(odd) {
margin-right: 3.817%; }
@media screen and (max-width: 780px) {
section.index-content section.about section.features ul li:nth-child(odd) {
margin-right: 0; } }
section.index-content section.course, section.index-content section.staff { section.index-content section.course, section.index-content section.staff {
width: auto; } } width: 31.658%; }
section.index-content section.course h1, section.index-content section.staff h1 { @media screen and (max-width: 780px) {
color: #888; section.index-content section.course, section.index-content section.staff {
font: normal 16px Georgia, serif; width: auto; } }
font-size: 14px; section.index-content section.course h1, section.index-content section.staff h1 {
letter-spacing: 1px; color: #888;
margin-bottom: 25.888px; font: normal 16px Georgia, serif;
text-transform: uppercase; } font-size: 14px;
section.index-content section.course h2, section.index-content section.staff h2 { letter-spacing: 1px;
font: 800 24px "Open Sans", Helvetica, Arial, sans-serif; } margin-bottom: 25.888px;
section.index-content section.course h3, section.index-content section.staff h3 { text-transform: uppercase; }
font: 400 18px "Open Sans", Helvetica, Arial, sans-serif; } section.index-content section.course h2, section.index-content section.staff h2 {
section.index-content section.course a span.arrow, section.index-content section.staff a span.arrow { font: 800 24px "Open Sans", Helvetica, Arial, sans-serif; }
color: rgba(255, 255, 255, 0.6); section.index-content section.course h3, section.index-content section.staff h3 {
font-style: normal; font: 400 18px "Open Sans", Helvetica, Arial, sans-serif; }
display: -moz-inline-box; section.index-content section.course a span.arrow, section.index-content section.staff a span.arrow {
-moz-box-orient: vertical; color: rgba(255, 255, 255, 0.6);
display: inline-block; font-style: normal;
vertical-align: baseline; display: -moz-inline-box;
zoom: 1; -moz-box-orient: vertical;
*display: inline; display: inline-block;
*vertical-align: auto; vertical-align: baseline;
padding-left: 10px; } zoom: 1;
section.index-content section.course ul, section.index-content section.staff ul { *display: inline;
list-style: none; } *vertical-align: auto;
section.index-content section.course ul li img, section.index-content section.staff ul li img { padding-left: 10px; }
float: left; section.index-content section.course ul, section.index-content section.staff ul {
margin-right: 12.944px; } list-style: none; }
section.index-content section.course h2 { section.index-content section.course ul li img, section.index-content section.staff ul li img {
padding-top: 129.44px; float: left;
background: url("/static/images/marketing/circuits-bg.jpg") 0 0 no-repeat; margin-right: 12.944px; }
-webkit-background-size: contain;
-moz-background-size: contain;
-ms-background-size: contain;
-o-background-size: contain;
background-size: contain; }
@media screen and (max-width: 998px) and (min-width: 781px) {
section.index-content section.course h2 {
background: url("/static/images/marketing/circuits-medium-bg.jpg") 0 0 no-repeat; } }
@media screen and (max-width: 780px) {
section.index-content section.course h2 { section.index-content section.course h2 {
padding-top: 129.44px; padding-top: 129.44px;
background: url("/static/images/marketing/circuits-bg.jpg") 0 0 no-repeat; } } background: url("/static/images/marketing/circuits-bg.jpg") 0 0 no-repeat;
@media screen and (min-width: 500px) and (max-width: 781px) { -webkit-background-size: contain;
section.index-content section.course h2 { -moz-background-size: contain;
padding-top: 207.104px; } } -ms-background-size: contain;
section.index-content section.about-course { -o-background-size: contain;
-webkit-box-sizing: border-box; background-size: contain; }
-moz-box-sizing: border-box; @media screen and (max-width: 998px) and (min-width: 781px) {
box-sizing: border-box; section.index-content section.course h2 {
border-right: 1px solid #e5e5e5; background: url("/static/images/marketing/circuits-medium-bg.jpg") 0 0 no-repeat; } }
margin-right: 2.513%; @media screen and (max-width: 780px) {
padding-right: 1.256%; section.index-content section.course h2 {
width: 65.829%; } padding-top: 129.44px;
@media screen and (max-width: 780px) { background: url("/static/images/marketing/circuits-bg.jpg") 0 0 no-repeat; } }
@media screen and (min-width: 500px) and (max-width: 781px) {
section.index-content section.course h2 {
padding-top: 207.104px; } }
section.index-content section.about-course { section.index-content section.about-course {
width: auto; -webkit-box-sizing: border-box;
border-right: 0; -moz-box-sizing: border-box;
margin-right: 0; box-sizing: border-box;
padding-right: 0; } } border-right: 1px solid #e5e5e5;
section.index-content section.about-course section { margin-right: 2.513%;
width: 48.092%; } padding-right: 1.256%;
@media screen and (max-width: 780px) { width: 65.829%; }
section.index-content section.about-course section { @media screen and (max-width: 780px) {
width: auto; } } section.index-content section.about-course {
section.index-content section.about-course section.about-info { width: auto;
margin-right: 3.817%; } border-right: 0;
@media screen and (max-width: 780px) { margin-right: 0;
section.index-content section.about-course section.about-info { padding-right: 0; } }
margin-right: 0; } } section.index-content section.about-course section {
section.index-content section.about-course section.requirements { width: 48.092%; }
clear: both; @media screen and (max-width: 780px) {
width: 100%; section.index-content section.about-course section {
border-top: 1px solid #E5E5E5; width: auto; } }
padding-top: 25.888px; section.index-content section.about-course section.about-info {
margin-bottom: 0; } margin-right: 3.817%; }
section.index-content section.about-course section.requirements p { @media screen and (max-width: 780px) {
float: left; section.index-content section.about-course section.about-info {
width: 48.092%; margin-right: 0; } }
margin-right: 3.817%; } section.index-content section.about-course section.requirements {
@media screen and (max-width: 780px) { clear: both;
section.index-content section.about-course section.requirements p { width: 100%;
margin-right: 0; border-top: 1px solid #E5E5E5;
float: none; padding-top: 25.888px;
width: auto; } } margin-bottom: 0; }
section.index-content section.about-course section.requirements p:nth-child(odd) { section.index-content section.about-course section.requirements p {
margin-right: 0; } float: left;
section.index-content section.about-course section.cta { width: 48.092%;
width: 100%; margin-right: 3.817%; }
text-align: center; } @media screen and (max-width: 780px) {
section.index-content section.about-course section.cta a.enroll { section.index-content section.about-course section.requirements p {
padding: 12.944px 51.776px; margin-right: 0;
display: -moz-inline-box; float: none;
-moz-box-orient: vertical; width: auto; } }
display: inline-block; section.index-content section.about-course section.requirements p:nth-child(odd) {
vertical-align: baseline; margin-right: 0; }
zoom: 1; section.index-content section.about-course section.cta {
*display: inline; width: 100%;
*vertical-align: auto; text-align: center; }
text-align: center; section.index-content section.about-course section.cta a.enroll {
font: 800 18px "Open Sans", Helvetica, Arial, sans-serif; } padding: 12.944px 51.776px;
section.index-content section.staff h1 { display: -moz-inline-box;
margin-top: 25.888px; } -moz-box-orient: vertical;
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto;
text-align: center;
font: 800 18px "Open Sans", Helvetica, Arial, sans-serif; }
section.index-content section.staff h1 {
margin-top: 25.888px; }
#lean_overlay { #lean_overlay {
position: fixed; position: fixed;
...@@ -755,159 +768,159 @@ div.leanModal_box { ...@@ -755,159 +768,159 @@ div.leanModal_box {
box-sizing: border-box; box-sizing: border-box;
display: none; display: none;
padding: 51.776px; } padding: 51.776px; }
div.leanModal_box a.modal_close { div.leanModal_box a.modal_close {
color: #aaa; color: #aaa;
display: block; display: block;
font-style: normal; font-style: normal;
height: 14px; height: 14px;
position: absolute; position: absolute;
right: 12px; right: 12px;
top: 12px; top: 12px;
width: 14px; width: 14px;
z-index: 2; } z-index: 2; }
div.leanModal_box a.modal_close:hover { div.leanModal_box a.modal_close:hover {
text-decoration: none; text-decoration: none;
color: #993333; } color: #993333; }
div.leanModal_box h1 { div.leanModal_box h1 {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
font-size: 24px; font-size: 24px;
margin-bottom: 25.888px; margin-bottom: 25.888px;
margin-top: 0; margin-top: 0;
padding-bottom: 25.888px; padding-bottom: 25.888px;
text-align: left; } text-align: left; }
div.leanModal_box#enroll { div.leanModal_box#enroll {
max-width: 600px; } max-width: 600px; }
div.leanModal_box#enroll ol { div.leanModal_box#enroll ol {
padding-top: 25.888px; } padding-top: 25.888px; }
div.leanModal_box#enroll ol li.terms, div.leanModal_box#enroll ol li.honor-code { div.leanModal_box#enroll ol li.terms, div.leanModal_box#enroll ol li.honor-code {
width: auto; width: auto;
float: none; } float: none; }
div.leanModal_box#enroll ol li div.tip { div.leanModal_box#enroll ol li div.tip {
display: none; } display: none; }
div.leanModal_box#enroll ol li:hover div.tip { div.leanModal_box#enroll ol li:hover div.tip {
background: #333; background: #333;
color: #fff; color: #fff;
display: block; display: block;
font-size: 16px; font-size: 16px;
line-height: 25.888px; line-height: 25.888px;
margin: 0 0 0 -10px; margin: 0 0 0 -10px;
padding: 10px; padding: 10px;
position: absolute; position: absolute;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
width: 500px; } width: 500px; }
div.leanModal_box form { div.leanModal_box form {
text-align: left; } text-align: left; }
div.leanModal_box form div#enroll_error, div.leanModal_box form div#login_error, div.leanModal_box form div#pwd_error { div.leanModal_box form div#enroll_error, div.leanModal_box form div#login_error, div.leanModal_box form div#pwd_error {
background-color: #333333; background-color: #333333;
border: black; border: black;
color: #fff; color: #fff;
font-family: "Open sans"; font-family: "Open sans";
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
margin: -25.888px -25.888px 25.888px; margin: -25.888px -25.888px 25.888px;
padding: 12.944px; padding: 12.944px;
text-shadow: 0 1px 0 #1a1a1a; text-shadow: 0 1px 0 #1a1a1a;
-webkit-font-smoothing: antialiased; } -webkit-font-smoothing: antialiased; }
div.leanModal_box form div#enroll_error:empty, div.leanModal_box form div#login_error:empty, div.leanModal_box form div#pwd_error:empty { div.leanModal_box form div#enroll_error:empty, div.leanModal_box form div#login_error:empty, div.leanModal_box form div#pwd_error:empty {
padding: 0; } padding: 0; }
div.leanModal_box form ol { div.leanModal_box form ol {
list-style: none; list-style: none;
margin-bottom: 25.888px; } margin-bottom: 25.888px; }
div.leanModal_box form ol li { div.leanModal_box form ol li {
margin-bottom: 12.944px; } margin-bottom: 12.944px; }
div.leanModal_box form ol li.terms, div.leanModal_box form ol li.remember { div.leanModal_box form ol li.terms, div.leanModal_box form ol li.remember {
border-top: 1px solid #eee; border-top: 1px solid #eee;
clear: both; clear: both;
float: none; float: none;
padding-top: 25.888px; padding-top: 25.888px;
width: auto; } width: auto; }
div.leanModal_box form ol li.honor-code { div.leanModal_box form ol li.honor-code {
width: auto; width: auto;
float: none; } float: none; }
div.leanModal_box form ol li label { div.leanModal_box form ol li label {
display: block; display: block;
font-weight: bold; } font-weight: bold; }
div.leanModal_box form ol li input[type="email"], div.leanModal_box form ol li input[type="number"], div.leanModal_box form ol li input[type="password"], div.leanModal_box form ol li input[type="search"], div.leanModal_box form ol li input[type="tel"], div.leanModal_box form ol li input[type="text"], div.leanModal_box form ol li input[type="url"], div.leanModal_box form ol li input[type="color"], div.leanModal_box form ol li input[type="date"], div.leanModal_box form ol li input[type="datetime"], div.leanModal_box form ol li input[type="datetime-local"], div.leanModal_box form ol li input[type="month"], div.leanModal_box form ol li input[type="time"], div.leanModal_box form ol li input[type="week"], div.leanModal_box form ol li textarea { div.leanModal_box form ol li input[type="email"], div.leanModal_box form ol li input[type="number"], div.leanModal_box form ol li input[type="password"], div.leanModal_box form ol li input[type="search"], div.leanModal_box form ol li input[type="tel"], div.leanModal_box form ol li input[type="text"], div.leanModal_box form ol li input[type="url"], div.leanModal_box form ol li input[type="color"], div.leanModal_box form ol li input[type="date"], div.leanModal_box form ol li input[type="datetime"], div.leanModal_box form ol li input[type="datetime-local"], div.leanModal_box form ol li input[type="month"], div.leanModal_box form ol li input[type="time"], div.leanModal_box form ol li input[type="week"], div.leanModal_box form ol li textarea {
width: 100%; width: 100%;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; } box-sizing: border-box; }
div.leanModal_box form ol li input[type="checkbox"] { div.leanModal_box form ol li input[type="checkbox"] {
margin-right: 10px; } margin-right: 10px; }
div.leanModal_box form ol li ul { div.leanModal_box form ol li ul {
list-style: disc outside none; list-style: disc outside none;
margin: 12.944px 0 25.888px 25.888px; } margin: 12.944px 0 25.888px 25.888px; }
div.leanModal_box form ol li ul li { div.leanModal_box form ol li ul li {
color: #666; color: #666;
float: none; float: none;
font-size: 14px; font-size: 14px;
list-style: disc outside none; list-style: disc outside none;
margin-bottom: 12.944px; } margin-bottom: 12.944px; }
div.leanModal_box form input[type="button"], div.leanModal_box form input[type="submit"] { div.leanModal_box form input[type="button"], div.leanModal_box form input[type="submit"] {
border: 1px solid #691b1b; border: 1px solid #691b1b;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
-moz-border-radius: 3px; -moz-border-radius: 3px;
-ms-border-radius: 3px; -ms-border-radius: 3px;
-o-border-radius: 3px; -o-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
-webkit-box-shadow: inset 0 1px 0 0 #bc5c5c; -webkit-box-shadow: inset 0 1px 0 0 #bc5c5c;
-moz-box-shadow: inset 0 1px 0 0 #bc5c5c; -moz-box-shadow: inset 0 1px 0 0 #bc5c5c;
box-shadow: inset 0 1px 0 0 #bc5c5c; box-shadow: inset 0 1px 0 0 #bc5c5c;
color: white; color: white;
display: inline; display: inline;
font-size: 11px; font-size: 11px;
font-weight: bold; font-weight: bold;
background-color: #993333; background-color: #993333;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #993333), color-stop(100%, #761e1e)); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #993333), color-stop(100%, #761e1e));
background-image: -webkit-linear-gradient(top, #993333, #761e1e); background-image: -webkit-linear-gradient(top, #993333, #761e1e);
background-image: -moz-linear-gradient(top, #993333, #761e1e); background-image: -moz-linear-gradient(top, #993333, #761e1e);
background-image: -ms-linear-gradient(top, #993333, #761e1e); background-image: -ms-linear-gradient(top, #993333, #761e1e);
background-image: -o-linear-gradient(top, #993333, #761e1e); background-image: -o-linear-gradient(top, #993333, #761e1e);
background-image: linear-gradient(top, #993333, #761e1e); background-image: linear-gradient(top, #993333, #761e1e);
padding: 6px 18px 7px; padding: 6px 18px 7px;
text-shadow: 0 1px 0 #5d1414; text-shadow: 0 1px 0 #5d1414;
-webkit-background-clip: padding-box; -webkit-background-clip: padding-box;
font-size: 18px; font-size: 18px;
padding: 12.944px; } padding: 12.944px; }
div.leanModal_box form input[type="button"]:hover, div.leanModal_box form input[type="submit"]:hover { div.leanModal_box form input[type="button"]:hover, div.leanModal_box form input[type="submit"]:hover {
-webkit-box-shadow: inset 0 1px 0 0 #a44141; -webkit-box-shadow: inset 0 1px 0 0 #a44141;
-moz-box-shadow: inset 0 1px 0 0 #a44141; -moz-box-shadow: inset 0 1px 0 0 #a44141;
box-shadow: inset 0 1px 0 0 #a44141; box-shadow: inset 0 1px 0 0 #a44141;
cursor: pointer; cursor: pointer;
background-color: #823030; background-color: #823030;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #823030), color-stop(100%, #691c1c)); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #823030), color-stop(100%, #691c1c));
background-image: -webkit-linear-gradient(top, #823030, #691c1c); background-image: -webkit-linear-gradient(top, #823030, #691c1c);
background-image: -moz-linear-gradient(top, #823030, #691c1c); background-image: -moz-linear-gradient(top, #823030, #691c1c);
background-image: -ms-linear-gradient(top, #823030, #691c1c); background-image: -ms-linear-gradient(top, #823030, #691c1c);
background-image: -o-linear-gradient(top, #823030, #691c1c); background-image: -o-linear-gradient(top, #823030, #691c1c);
background-image: linear-gradient(top, #823030, #691c1c); } background-image: linear-gradient(top, #823030, #691c1c); }
div.leanModal_box form input[type="button"]:active, div.leanModal_box form input[type="submit"]:active { div.leanModal_box form input[type="button"]:active, div.leanModal_box form input[type="submit"]:active {
border: 1px solid #691b1b; border: 1px solid #691b1b;
-webkit-box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee; -webkit-box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee;
-moz-box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee; -moz-box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee;
box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee; } box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee; }
div#login { div#login {
min-width: 400px; } min-width: 400px; }
div#login header { div#login header {
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
margin-bottom: 25.888px; margin-bottom: 25.888px;
padding-bottom: 25.888px; } padding-bottom: 25.888px; }
div#login header h1 { div#login header h1 {
border-bottom: 0; border-bottom: 0;
padding-bottom: 0; padding-bottom: 0;
margin-bottom: 6.472px; } margin-bottom: 6.472px; }
div#login ol li { div#login ol li {
width: auto; width: auto;
float: none; } float: none; }
div.lost-password { div.lost-password {
text-align: left; text-align: left;
margin-top: 25.888px; } margin-top: 25.888px; }
div.lost-password a { div.lost-password a {
color: #999; } color: #999; }
div.lost-password a:hover { div.lost-password a:hover {
color: #444; } color: #444; }
div#pwd_reset p { div#pwd_reset p {
margin-bottom: 25.888px; } margin-bottom: 25.888px; }
...@@ -917,5 +930,5 @@ div#pwd_reset input[type="email"] { ...@@ -917,5 +930,5 @@ div#pwd_reset input[type="email"] {
div#feedback_div form ol li { div#feedback_div form ol li {
float: none; float: none;
width: 100%; } width: 100%; }
div#feedback_div form ol li textarea#feedback_message { div#feedback_div form ol li textarea#feedback_message {
height: 100px; } height: 100px; }
<%inherit file="main.html" /> <%inherit file="main.html" />
<%block name="headextra">
<script type="text/javascript" src="/static/js/flot/jquery.flot.js"></script>
<script type="text/javascript" src="/static/js/flot/jquery.flot.stack.js"></script>
<script type="text/javascript" src="/static/js/flot/jquery.flot.symbol.js"></script>
<style type="text/css">
.grade_a {color:green;}
.grade_b {color:Chocolate;}
.grade_c {color:DimGray;}
.grade_none {color:LightGray;}
</style>
</%block>
<%include file="navigation.html" args="active_page=''" /> <%include file="navigation.html" args="active_page=''" />
<section class="main-content"> <section class="main-content">
<div class="gradebook-wrapper"> <div class="gradebook-wrapper">
<section class="gradebook-content"> <section class="gradebook-content">
<h1>Gradebook</h1> <h1>Gradebook</h1>
% for s in students:
<h2><a href=/profile/${s['id']}>${s['username']}</a></h2> %if len(students) > 0:
% for c in s['grade_info']['grade_summary']: <table>
<h3>${c['category']} </h3> <%
<p> templateSummary = students[0]['grade_info']['grade_summary']
% if 'subscores' in c: %>
% for ss in c['subscores']:
<br>${ss['summary']}
% endfor <tr> <!-- Header Row -->
% endif <th>Student</th>
</p> %for section in templateSummary:
% endfor %if 'subscores' in section:
% endfor %for subsection in section['subscores']:
<th>${subsection['label']}</th>
%endfor
<th>${section['totallabel']}</th>
%else:
<th>${section['category']}</th>
%endif
%endfor
</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"
%>
<td class="${data_class}">${ "{0:.0%}".format( percentage ) }</td>
</%def>
%for student in students:
<tr>
<td><a href="/discussion/users/${student['id']}/${student['username']}/">${student['username']}</a></td>
%for section in student['grade_info']['grade_summary']:
%if 'subscores' in section:
%for subsection in section['subscores']:
${percent_data( subsection['percentage'] )}
%endfor
${percent_data( section['totalscore'] )}
%else:
${percent_data( section['totalscore'] )}
%endif
%endfor
</tr>
%endfor
</table>
%endif
</section> </section>
</div> </div>
</section> </section>
\ No newline at end of file
<%inherit file="main.html" />
<%namespace name="profile_graphs" file="profile_graphs.js"/>
<%block name="headextra">
<script type="text/javascript" src="/static/js/flot/jquery.flot.js"></script>
<script type="text/javascript" src="/static/js/flot/jquery.flot.stack.js"></script>
<script type="text/javascript" src="/static/js/flot/jquery.flot.symbol.js"></script>
% for s in students:
<script>
${profile_graphs.body(s['grade_info']['grade_summary'], "grade-detail-graph-" + str(s['id']))}
</script>
%endfor
</%block>
<%include file="navigation.html" args="active_page=''" />
<section class="main-content">
<div class="gradebook-wrapper">
<section class="gradebook-content">
<h1>Gradebook</h1>
<ol>
% for s in students:
<li>
<h2><a href=/profile/${s['id']}>${s['username']}</a></h2>
<div id="grade-detail-graph-${s['id']}" style="width:1000px;height:300px;"></div>
</li>
% endfor
</ol>
</section>
</div>
</section>
<%inherit file="main.html" /> <%inherit file="main.html" />
<%namespace name="profile_graphs" file="profile_graphs.js"/>
<%block name="title"><title>Profile - MITx 6.002x</title></%block> <%block name="title"><title>Profile - MITx 6.002x</title></%block>
<%! <%!
...@@ -10,7 +12,7 @@ ...@@ -10,7 +12,7 @@
<script type="text/javascript" src="/static/js/flot/jquery.flot.stack.js"></script> <script type="text/javascript" src="/static/js/flot/jquery.flot.stack.js"></script>
<script type="text/javascript" src="/static/js/flot/jquery.flot.symbol.js"></script> <script type="text/javascript" src="/static/js/flot/jquery.flot.symbol.js"></script>
<script> <script>
<%include file="profile_graphs.js"/> ${profile_graphs.body(grade_summary, "grade-detail-graph")}
</script> </script>
<script> <script>
...@@ -94,7 +96,7 @@ $(function() { ...@@ -94,7 +96,7 @@ $(function() {
<div id="grade-detail-graph"></div> <div id="grade-detail-graph"></div>
<ol class="chapters"> <ol class="chapters">
%for chapter in chapters: %for chapter in courseware_summary:
%if not chapter['chapter'] == "hidden": %if not chapter['chapter'] == "hidden":
<li> <li>
<h2><a href="${reverse('courseware_chapter', args=format_url_params([chapter['course'], chapter['chapter']])) }"> <h2><a href="${reverse('courseware_chapter', args=format_url_params([chapter['course'], chapter['chapter']])) }">
...@@ -104,8 +106,8 @@ $(function() { ...@@ -104,8 +106,8 @@ $(function() {
%for section in chapter['sections']: %for section in chapter['sections']:
<li> <li>
<% <%
earned = section['section_total'][0] earned = section['section_total'].earned
total = section['section_total'][1] total = section['section_total'].possible
percentageString = "{0:.0%}".format( float(earned)/total) if earned > 0 else "" percentageString = "{0:.0%}".format( float(earned)/total) if earned > 0 else ""
%> %>
...@@ -120,7 +122,7 @@ $(function() { ...@@ -120,7 +122,7 @@ $(function() {
<ol class="scores"> <ol class="scores">
${ "Problem Scores: " if section['graded'] else "Practice Scores: "} ${ "Problem Scores: " if section['graded'] else "Practice Scores: "}
%for score in section['scores']: %for score in section['scores']:
<li class="score">${"{0:g}/{1:g}".format(score[0],score[1])}</li> <li class="score">${"{0:g}/{1:g}".format(score.earned,score.possible)}</li>
%endfor %endfor
</ol> </ol>
%endif %endif
......
<%page args="grade_summary, graph_div_id, **kwargs"/>
<%! <%!
import json import json
%> %>
...@@ -57,21 +58,21 @@ $(function () { ...@@ -57,21 +58,21 @@ $(function () {
category_total_label = section['category'] + " Total" category_total_label = section['category'] + " Total"
series.append({ series.append({
'label' : category_total_label, 'label' : category_total_label,
'data' : [ [tickIndex, section['totalscore']['score']] ], 'data' : [ [tickIndex, section['totalscore']] ],
'color' : colors[sectionIndex] 'color' : colors[sectionIndex]
}) })
ticks.append( [tickIndex, section['totallabel']] ) ticks.append( [tickIndex, section['totallabel']] )
detail_tooltips[category_total_label] = [section['totalscore']['summary']] detail_tooltips[category_total_label] = [section['totalscore_summary']]
else: else:
series.append({ series.append({
'label' : section['category'], 'label' : section['category'],
'data' : [ [tickIndex, section['totalscore']['score']] ], 'data' : [ [tickIndex, section['totalscore']] ],
'color' : colors[sectionIndex] 'color' : colors[sectionIndex]
}) })
ticks.append( [tickIndex, section['totallabel']] ) ticks.append( [tickIndex, section['totallabel']] )
detail_tooltips[section['category']] = [section['totalscore']['summary']] detail_tooltips[section['category']] = [section['totalscore_summary']]
tickIndex += 1 + sectionSpacer tickIndex += 1 + sectionSpacer
sectionIndex += 1 sectionIndex += 1
...@@ -86,12 +87,12 @@ $(function () { ...@@ -86,12 +87,12 @@ $(function () {
overviewBarX = tickIndex overviewBarX = tickIndex
for section in grade_summary: for section in grade_summary:
weighted_score = section['totalscore']['score'] * section['weight'] weighted_score = section['totalscore'] * section['weight']
summary_text = "{0} - {1:.1%} of a possible {2:.0%}".format(section['category'], weighted_score, section['weight']) summary_text = "{0} - {1:.1%} of a possible {2:.0%}".format(section['category'], weighted_score, section['weight'])
weighted_category_label = section['category'] + " - Weighted" weighted_category_label = section['category'] + " - Weighted"
if section['totalscore']['score'] > 0: if section['totalscore'] > 0:
series.append({ series.append({
'label' : weighted_category_label, 'label' : weighted_category_label,
'data' : [ [overviewBarX, weighted_score] ], 'data' : [ [overviewBarX, weighted_score] ],
...@@ -101,7 +102,7 @@ $(function () { ...@@ -101,7 +102,7 @@ $(function () {
detail_tooltips[weighted_category_label] = [ summary_text ] detail_tooltips[weighted_category_label] = [ summary_text ]
sectionIndex += 1 sectionIndex += 1
totalWeight += section['weight'] totalWeight += section['weight']
totalScore += section['totalscore']['score'] * section['weight'] totalScore += section['totalscore'] * section['weight']
ticks += [ [overviewBarX, "Total"] ] ticks += [ [overviewBarX, "Total"] ]
tickIndex += 1 + sectionSpacer tickIndex += 1 + sectionSpacer
...@@ -128,7 +129,7 @@ $(function () { ...@@ -128,7 +129,7 @@ $(function () {
legend: {show: false}, legend: {show: false},
}; };
var $grade_detail_graph = $("#grade-detail-graph"); var $grade_detail_graph = $("#${graph_div_id}");
if ($grade_detail_graph.length > 0) { if ($grade_detail_graph.length > 0) {
var plot = $.plot($grade_detail_graph, series, options); var plot = $.plot($grade_detail_graph, series, options);
...@@ -137,7 +138,7 @@ $(function () { ...@@ -137,7 +138,7 @@ $(function () {
} }
var previousPoint = null; var previousPoint = null;
$("#grade-detail-graph").bind("plothover", function (event, pos, item) { $grade_detail_graph.bind("plothover", function (event, pos, item) {
$("#x").text(pos.x.toFixed(2)); $("#x").text(pos.x.toFixed(2));
$("#y").text(pos.y.toFixed(2)); $("#y").text(pos.y.toFixed(2));
if (item) { if (item) {
......
...@@ -8,4 +8,4 @@ div.gradebook-wrapper { ...@@ -8,4 +8,4 @@ div.gradebook-wrapper {
@extend .top-header; @extend .top-header;
} }
} }
} }
\ No newline at end of file
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