Commit bb6ee4ce by Xavier Antoviaque

Add 'quizz-maybenot-understand' type

parent 077e0c5a
...@@ -69,7 +69,7 @@ class QuizzBlock(XBlock): ...@@ -69,7 +69,7 @@ class QuizzBlock(XBlock):
return Fragment(u"<p>I can only appear inside mentoring blocks.</p>") return Fragment(u"<p>I can only appear inside mentoring blocks.</p>")
def mentoring_view(self, context=None): def mentoring_view(self, context=None):
if self.type not in ('yes-no-unsure', 'rating-understand'): if self.type not in ('yes-maybenot-understand', 'rating-understand'):
raise ValueError, u'Invalid value for QuizzBlock.type: `{}`'.format(self.type) raise ValueError, u'Invalid value for QuizzBlock.type: `{}`'.format(self.type)
template_path = 'templates/html/quizz_{}.html'.format(self.type) template_path = 'templates/html/quizz_{}.html'.format(self.type)
...@@ -152,8 +152,8 @@ class QuizzTipBlock(XBlock): ...@@ -152,8 +152,8 @@ class QuizzTipBlock(XBlock):
log.debug(reject) log.debug(reject)
if reject is None: if reject is None:
quizz = self.runtime.get_block(self.parent) quizz = self.runtime.get_block(self.parent)
if quizz.type == 'yes-no-unsure': if quizz.type == 'yes-maybenot-understand':
return ['no', 'unsure'] return ['maybenot', 'understand']
elif quizz.type == 'rating-understand': elif quizz.type == 'rating-understand':
return ['1', '2', '3', 'understand'] return ['1', '2', '3', 'understand']
else: else:
......
<fieldset class="rating-unsure"> <fieldset class="rating-understand">
<legend>{{ self.question }}</legend> <legend>{{ self.question }}</legend>
<div class="choices"> <div class="choices">
<span class="low">{{ self.low }}</span> <span class="low">{{ self.low }}</span>
......
<fieldset class="yes-maybenot-understand">
<legend>{{ self.question }}</legend>
<div class="choices">
<span class="choice">
<label><input type="radio" name="{{ self.name }}" value="yes"{% if self.student_choice == 'yes' %} checked{% endif %}> Yes</label>
</span>
<span class="choice">
<label><input type="radio" name="{{ self.name }}" value="maybenot"{% if self.student_choice == 'maybenot' %} checked{% endif %}> Maybe not</label>
</span>
<span class="choice">
<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