From 03a6572bbe4e4772d1828167c93342802f4b76e2 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 7 Feb 2013 09:49:56 -0500 Subject: [PATCH] Restyle status, get rubric to work properly --- .../xmodule/css/combinedopenended/display.scss | 15 ++++++--------- .../js/src/combinedopenended/display.coffee | 11 +++++------ lms/templates/combined_open_ended_status.html | 5 +---- lms/templates/open_ended_rubric.html | 2 +- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss index 9d4cbc6647..3ffe62213e 100644 --- a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss +++ b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss @@ -24,14 +24,11 @@ section.combined-open-ended { @include clearfix; .status-container { - float:right; - width:40%; + padding-bottom: 5px; } .item-container { - float:left; - width: 53%; - padding-bottom: 50px; + padding-bottom: 10px; } .result-container @@ -49,11 +46,11 @@ section.combined-open-ended { section.combined-open-ended-status { .statusitem { - background-color: #FAFAFA; color: #2C2C2C; - font-family: monospace; - font-size: 1em; - padding: 10px; + font-size: .8em; + padding: 0px; + display: block; + width: 55%; .show-results { margin-top: .3em; text-align:right; diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index ae63171ed4..42f1378dd8 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -4,11 +4,11 @@ class @Rubric # finds the scores for each rubric category @get_score_list: () => # find the number of categories: - num_categories = $('table.rubric tr').length + num_categories = $('b.rubric-category').length score_lst = [] # get the score for each one - for i in [0..(num_categories-2)] + for i in [0..(num_categories-1)] score = $("input[name='score-selection-#{i}']:checked").val() score_lst.push(score) @@ -23,9 +23,8 @@ class @Rubric @check_complete: () -> # check to see whether or not any categories have not been scored - num_categories = $('table.rubric tr').length - # -2 because we want to skip the header - for i in [0..(num_categories-2)] + num_categories = $('b.rubric-category').length + for i in [0..(num_categories-1)] score = $("input[name='score-selection-#{i}']:checked").val() if score == undefined return false @@ -102,7 +101,7 @@ class @CombinedOpenEnded Collapsible.setCollapsibles(@results_container) show_results: (event) => - status_item = $(event.target).parent().parent() + status_item = $(event.target).parent() status_number = status_item.data('status-number') data = {'task_number' : status_number} $.postWithPrefix "#{@ajax_url}/get_results", data, (response) => diff --git a/lms/templates/combined_open_ended_status.html b/lms/templates/combined_open_ended_status.html index 1640ae3311..0ed1609b9f 100644 --- a/lms/templates/combined_open_ended_status.html +++ b/lms/templates/combined_open_ended_status.html @@ -22,10 +22,7 @@ % endif %if status['type']=="openended" and status['state'] in ['done', 'post_assessment']: -
- Show results from Step ${status['task_number']} - -
+ Show results %endif %endfor diff --git a/lms/templates/open_ended_rubric.html b/lms/templates/open_ended_rubric.html index 8d7f6be544..36c6638323 100644 --- a/lms/templates/open_ended_rubric.html +++ b/lms/templates/open_ended_rubric.html @@ -10,7 +10,7 @@
% for i in range(len(categories)): <% category = categories[i] %> - ${category['description']}
+ ${category['description']}