Commit fbd1095a by Xavier Antoviaque

Add "Unsure" option to rating, renammed as 'rating-unsure'

parent ff6a1b2e
...@@ -76,7 +76,7 @@ class QuizzBlock(XBlock): ...@@ -76,7 +76,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'): if self.type not in ('yes-no-unsure', 'rating-unsure'):
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)
......
...@@ -3,20 +3,23 @@ ...@@ -3,20 +3,23 @@
<div class="choices"> <div class="choices">
<span class="low">{{ self.low }}</span> <span class="low">{{ self.low }}</span>
<span class="choice"> <span class="choice">
<label><input type="radio" name="{{ self.name }}" value="1"{% if self.student_choice == '1' %} checked{% endif %}></label> <label><input type="radio" name="{{ self.name }}" value="1"{% if self.student_choice == '1' %} checked{% endif %}>1</label>
</span> </span>
<span class="choice"> <span class="choice">
<label><input type="radio" name="{{ self.name }}" value="2"{% if self.student_choice == '2' %} checked{% endif %}></label> <label><input type="radio" name="{{ self.name }}" value="2"{% if self.student_choice == '2' %} checked{% endif %}>2</label>
</span> </span>
<span class="choice"> <span class="choice">
<label><input type="radio" name="{{ self.name }}" value="3"{% if self.student_choice == '3' %} checked{% endif %}></label> <label><input type="radio" name="{{ self.name }}" value="3"{% if self.student_choice == '3' %} checked{% endif %}>3</label>
</span> </span>
<span class="choice"> <span class="choice">
<label><input type="radio" name="{{ self.name }}" value="4"{% if self.student_choice == '4' %} checked{% endif %}></label> <label><input type="radio" name="{{ self.name }}" value="4"{% if self.student_choice == '4' %} checked{% endif %}>4</label>
</span> </span>
<span class="choice"> <span class="choice">
<label><input type="radio" name="{{ self.name }}" value="5"{% if self.student_choice == '5' %} checked{% endif %}></label> <label><input type="radio" name="{{ self.name }}" value="5"{% if self.student_choice == '5' %} checked{% endif %}>5</label>
</span> </span>
<span class="low">{{ self.high }}</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>
</span>
</div> </div>
</fieldset> </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