Commit 077e0c5a by Xavier Antoviaque

Rename "unsure" into "I don't understand" for quizz rating type

parent 34cc759c
......@@ -29,7 +29,8 @@ class AnswerBlock(XBlock):
"""
student_input = Any(help="Last input submitted by the student", default="", scope=Scope.user_state)
read_only = Boolean(help="Display as a read-only field", default=False, scope=Scope.content)
default_from = String(help="If specified, the name of the answer to get the default value from", default=None, scope=Scope.content)
default_from = String(help="If specified, the name of the answer to get the default value from",
default=None, scope=Scope.content)
def __init__(self, *args, **kwargs):
super(AnswerBlock, self).__init__(*args, **kwargs)
......
......@@ -69,7 +69,7 @@ class QuizzBlock(XBlock):
return Fragment(u"<p>I can only appear inside mentoring blocks.</p>")
def mentoring_view(self, context=None):
if self.type not in ('yes-no-unsure', 'rating-unsure'):
if self.type not in ('yes-no-unsure', 'rating-understand'):
raise ValueError, u'Invalid value for QuizzBlock.type: `{}`'.format(self.type)
template_path = 'templates/html/quizz_{}.html'.format(self.type)
......@@ -130,6 +130,7 @@ class QuizzTipBlock(XBlock):
content = String(help="Text of the tip to provide if needed", scope=Scope.content, default="")
display = String(help="List of choices to display the tip for", scope=Scope.content, default=None)
reject = String(help="List of choices to reject", scope=Scope.content, default=None)
has_children = True
def render(self, submission):
"""
......@@ -153,8 +154,8 @@ class QuizzTipBlock(XBlock):
quizz = self.runtime.get_block(self.parent)
if quizz.type == 'yes-no-unsure':
return ['no', 'unsure']
elif quizz.type == 'rating-unsure':
return ['1', '2', '3', 'unsure']
elif quizz.type == 'rating-understand':
return ['1', '2', '3', 'understand']
else:
return reject
......
......@@ -19,7 +19,7 @@
</span>
<span class="low">{{ self.high }}</span>
<span class="choice">
<label><input type="radio" name="{{ self.name }}" value="unsure"{% if self.student_choice == 'unsure' %} checked{% endif %}>Unsure</label>
<label><input type="radio" name="{{ self.name }}" value="understand"{% if self.student_choice == 'understand' %} checked{% endif %}>I don't understand</label>
</span>
</div>
</fieldset>
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