Commit 4dc0859f by Vik Paruchuri

Finish refactor of rubric templates, redo some margins

parent efe5e491
...@@ -48,26 +48,26 @@ class CombinedOpenEndedRubric(object): ...@@ -48,26 +48,26 @@ class CombinedOpenEndedRubric(object):
html: the html that corresponds to the xml given html: the html that corresponds to the xml given
''' '''
success = False success = False
try: #try:
rubric_categories = self.extract_categories(rubric_xml) rubric_categories = self.extract_categories(rubric_xml)
rubric_scores = [cat['score'] for cat in rubric_categories] rubric_scores = [cat['score'] for cat in rubric_categories]
max_scores = map((lambda cat: cat['options'][-1]['points']), rubric_categories) max_scores = map((lambda cat: cat['options'][-1]['points']), rubric_categories)
max_score = max(max_scores) max_score = max(max_scores)
rubric_template = 'open_ended_rubric.html' rubric_template = 'open_ended_rubric.html'
if self.view_only: if self.view_only:
rubric_template = 'open_ended_view_only_rubric.html' rubric_template = 'open_ended_view_only_rubric.html'
html = self.system.render_template(rubric_template, html = self.system.render_template(rubric_template,
{'categories': rubric_categories, {'categories': rubric_categories,
'has_score': self.has_score, 'has_score': self.has_score,
'view_only': self.view_only, 'view_only': self.view_only,
'max_score': max_score, 'max_score': max_score,
'combined_rubric' : False 'combined_rubric' : False
}) })
success = True success = True
except: #except:
error_message = "[render_rubric] Could not parse the rubric with xml: {0}".format(rubric_xml) # error_message = "[render_rubric] Could not parse the rubric with xml: {0}".format(rubric_xml)
log.error(error_message) # log.error(error_message)
raise RubricParsingError(error_message) # raise RubricParsingError(error_message)
return {'success' : success, 'html' : html, 'rubric_scores' : rubric_scores} return {'success' : success, 'html' : html, 'rubric_scores' : rubric_scores}
def check_if_rubric_is_parseable(self, rubric_string, location, max_score_allowed, max_score): def check_if_rubric_is_parseable(self, rubric_string, location, max_score_allowed, max_score):
......
...@@ -51,6 +51,7 @@ section.legend-container { ...@@ -51,6 +51,7 @@ section.legend-container {
display: inline; display: inline;
width: 20%; width: 20%;
} }
margin-bottom: 5px;
} }
section.combined-open-ended-status { section.combined-open-ended-status {
...@@ -106,6 +107,20 @@ section.combined-open-ended-status { ...@@ -106,6 +107,20 @@ section.combined-open-ended-status {
} }
} }
div.combined-rubric-container {
ul.rubric-list{
list-style-type: none;
padding:0;
margin:0;
li {
&.rubric-list-item{
margin-bottom: 2px;
padding: 0px;
}
}
}
}
div.result-container { div.result-container {
.evaluation { .evaluation {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<% option = category['options'][j] %> <% option = category['options'][j] %>
% if option['selected']: % if option['selected']:
${category['description']} : ${option['points']} points ${category['description']} : ${option['points']} points
% endif
% endfor % endfor
% endfor % endfor
</div> </div>
......
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