Commit 2aafff35 by Ehtesham

more fixes

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