Commit 2aafff35 by Ehtesham

more fixes

parent ff999d76
<form class="choicegroup capa_inputtype" id="inputtype_${id}">
<fieldset>
% if response_data['label']:
% if response_data and response_data['label']:
<legend id="${id}-legend" class="response-fieldset-legend field-group-hd">${response_data['label']}</legend>
% else:
<legend>Question</legend>
......@@ -24,7 +24,7 @@
correctness = None
%>
% if correctness and not show_correctness == 'never':
<% label_class += ' choicegroup_${correctness}' %>
<% label_class += ' choicegroup_' + correctness %>
% endif
% endif
class="${label_class}"
......
......@@ -231,7 +231,7 @@ class ChoiceGroupTemplateTest(TemplateTestCase):
for test_conditions in conditions:
self.context.update(test_conditions)
xml = self.render_to_xml(self.context)
xpath = "//label[@class='choicegroup_correct']"
xpath = "//label[contains(@class, 'choicegroup_correct')]"
self.assert_has_xpath(xml, xpath, self.context)
# Should NOT mark the whole problem
......@@ -252,7 +252,7 @@ class ChoiceGroupTemplateTest(TemplateTestCase):
for test_conditions in conditions:
self.context.update(test_conditions)
xml = self.render_to_xml(self.context)
xpath = "//label[@class='choicegroup_incorrect']"
xpath = "//label[contains(@class, 'choicegroup_incorrect')]"
self.assert_has_xpath(xml, xpath, self.context)
# Should NOT mark the whole problem
......
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