From edba0978cfa302833ae75786dcb53453e3aee5ee Mon Sep 17 00:00:00 2001 From: Julian Arni Date: Mon, 25 Feb 2013 18:18:46 -0500 Subject: [PATCH] Included styling and template --- .../xmodule/css/foldit/leaderboard.scss | 20 +++++++++++++ common/lib/xmodule/xmodule/foldit_module.py | 2 +- lms/templates/folditbasic.html | 29 +++++++++++++++++++ lms/templates/folditchallenge.html | 16 ++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 common/lib/xmodule/xmodule/css/foldit/leaderboard.scss create mode 100644 lms/templates/folditbasic.html create mode 100644 lms/templates/folditchallenge.html diff --git a/common/lib/xmodule/xmodule/css/foldit/leaderboard.scss b/common/lib/xmodule/xmodule/css/foldit/leaderboard.scss new file mode 100644 index 0000000000..5342c985c2 --- /dev/null +++ b/common/lib/xmodule/xmodule/css/foldit/leaderboard.scss @@ -0,0 +1,20 @@ +$leaderboard: #F4F4F4; + +section.foldit { + div.folditchallenge { + table { + border: 1px solid lighten($leaderboard, 10%); + border-collapse: collapse; + margin-top: 20px; + } + th { + background: $leaderboard; + color: darken($leaderboard, 25%); + } + td { + background: lighten($leaderboard, 3%); + border-bottom: 1px solid #fff; + padding: 8px; + } + } +} diff --git a/common/lib/xmodule/xmodule/foldit_module.py b/common/lib/xmodule/xmodule/foldit_module.py index 6cbf22980b..7f46a34b0f 100644 --- a/common/lib/xmodule/xmodule/foldit_module.py +++ b/common/lib/xmodule/xmodule/foldit_module.py @@ -12,7 +12,7 @@ log = logging.getLogger(__name__) class FolditModule(XModule): - css = {'scss': [resource_string(__name__, 'css/foldit/leadeboard.scss')]} + css = {'scss': [resource_string(__name__, 'css/foldit/leaderboard.scss')]} def __init__(self, system, location, definition, descriptor, instance_state=None, shared_state=None, **kwargs): diff --git a/lms/templates/folditbasic.html b/lms/templates/folditbasic.html new file mode 100644 index 0000000000..0c79a53703 --- /dev/null +++ b/lms/templates/folditbasic.html @@ -0,0 +1,29 @@ +
+

Due: ${due} + +

+ Status: + % if success: + You have successfully gotten to level ${goal_level}. + % else: + You have not yet gotten to level ${goal_level}. + % endif +

+ +

Completed puzzles

+ + + + + + + % for puzzle in completed: + + + + + % endfor +
LevelSubmitted
${'{0}-{1}'.format(puzzle['set'], puzzle['subset'])}${puzzle['created'].strftime('%Y-%m-%d %H:%M')}
+ +
+
diff --git a/lms/templates/folditchallenge.html b/lms/templates/folditchallenge.html new file mode 100644 index 0000000000..677bc286c8 --- /dev/null +++ b/lms/templates/folditchallenge.html @@ -0,0 +1,16 @@ +
+

Puzzle Leaderboard

+ + + + + + + % for pair in top_scores: + + + + + % endfor +
UserScore
${pair[0]}${pair[1]}
+