Commit 03a6572b by Vik Paruchuri

Restyle status, get rubric to work properly

parent 9a5a9881
...@@ -24,14 +24,11 @@ section.combined-open-ended { ...@@ -24,14 +24,11 @@ section.combined-open-ended {
@include clearfix; @include clearfix;
.status-container .status-container
{ {
float:right; padding-bottom: 5px;
width:40%;
} }
.item-container .item-container
{ {
float:left; padding-bottom: 10px;
width: 53%;
padding-bottom: 50px;
} }
.result-container .result-container
...@@ -49,11 +46,11 @@ section.combined-open-ended { ...@@ -49,11 +46,11 @@ section.combined-open-ended {
section.combined-open-ended-status { section.combined-open-ended-status {
.statusitem { .statusitem {
background-color: #FAFAFA;
color: #2C2C2C; color: #2C2C2C;
font-family: monospace; font-size: .8em;
font-size: 1em; padding: 0px;
padding: 10px; display: block;
width: 55%;
.show-results { .show-results {
margin-top: .3em; margin-top: .3em;
text-align:right; text-align:right;
......
...@@ -4,11 +4,11 @@ class @Rubric ...@@ -4,11 +4,11 @@ class @Rubric
# finds the scores for each rubric category # finds the scores for each rubric category
@get_score_list: () => @get_score_list: () =>
# find the number of categories: # find the number of categories:
num_categories = $('table.rubric tr').length num_categories = $('b.rubric-category').length
score_lst = [] score_lst = []
# get the score for each one # 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 = $("input[name='score-selection-#{i}']:checked").val()
score_lst.push(score) score_lst.push(score)
...@@ -23,9 +23,8 @@ class @Rubric ...@@ -23,9 +23,8 @@ class @Rubric
@check_complete: () -> @check_complete: () ->
# check to see whether or not any categories have not been scored # check to see whether or not any categories have not been scored
num_categories = $('table.rubric tr').length num_categories = $('b.rubric-category').length
# -2 because we want to skip the header for i in [0..(num_categories-1)]
for i in [0..(num_categories-2)]
score = $("input[name='score-selection-#{i}']:checked").val() score = $("input[name='score-selection-#{i}']:checked").val()
if score == undefined if score == undefined
return false return false
...@@ -102,7 +101,7 @@ class @CombinedOpenEnded ...@@ -102,7 +101,7 @@ class @CombinedOpenEnded
Collapsible.setCollapsibles(@results_container) Collapsible.setCollapsibles(@results_container)
show_results: (event) => show_results: (event) =>
status_item = $(event.target).parent().parent() status_item = $(event.target).parent()
status_number = status_item.data('status-number') status_number = status_item.data('status-number')
data = {'task_number' : status_number} data = {'task_number' : status_number}
$.postWithPrefix "#{@ajax_url}/get_results", data, (response) => $.postWithPrefix "#{@ajax_url}/get_results", data, (response) =>
......
...@@ -22,10 +22,7 @@ ...@@ -22,10 +22,7 @@
% endif % endif
%if status['type']=="openended" and status['state'] in ['done', 'post_assessment']: %if status['type']=="openended" and status['state'] in ['done', 'post_assessment']:
<div class="show-results"> <a href="#results" class="show-results-button">Show results</a>
<a href="#results" class="show-results-button">Show results from Step ${status['task_number']}</a>
</div>
%endif %endif
</div> </div>
%endfor %endfor
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="rubric"> <div class="rubric">
% for i in range(len(categories)): % for i in range(len(categories)):
<% category = categories[i] %> <% category = categories[i] %>
<b>${category['description']}</b><br/> <b class="rubric-category">${category['description']}</b><br/>
<ul class="rubric-list"> <ul class="rubric-list">
% for j in range(len(category['options'])): % for j in range(len(category['options'])):
<% option = category['options'][j] %> <% option = category['options'][j] %>
......
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