Commit 4dc0859f by Vik Paruchuri

Finish refactor of rubric templates, redo some margins

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