summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/question.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index e542fe9..8a67818 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -165,8 +165,14 @@ function call_skip(url)
<input type=hidden name="question_id" id="question_id" value={{ question.id }}></input>
{% if question.type == "mcq" %}
- {% for option in question.options.strip.splitlines %}
- <input name="answer" type="radio" value="{{option}}" />{{option}} <br/>
+ {% for test_case in test_cases %}
+ <input name="answer" type="radio" value="{{ test_case.options }}" />{{ test_case.options }} <br/>
+ {% endfor %}
+ {% endif %}
+ {% if question.type == "mcc" %}
+ {% for test_case in test_cases %}
+ <input name="answer" type="checkbox" value="{{ test_case.options }}"> {{ test_case.options }}
+ <br>
{% endfor %}
{% endif %}
{% if question.type == "upload" %}
@@ -174,12 +180,6 @@ function call_skip(url)
<input type=file id="assignment" name="assignment">
<hr>
{% endif %}
- {% if question.type == "mcc" %}
- {% for option in question.options.strip.splitlines %}
- <input name="answer" type="checkbox" value="{{ option }}"> {{ option }}
- <br>
- {% endfor %}
- {% endif %}
{% if question.type == "code" %}
<h3>Program:</h3>
<textarea rows="1" class="bash" readonly="yes" name="snippet" id="snippet" wrap="off" >{% if last_attempt %}{{ question.snippet }}{% else %}{% if question.type == "bash" %} #!/bin/bash&#13;&#10;{{ question.snippet }}{% else %}{{ question.snippet }}{% endif %}{% endif %}</textarea>
@@ -204,7 +204,7 @@ function call_skip(url)
{% endif %}
</form>
</div>
-
+
<!-- Modal -->
<div class="modal fade " id="upload_alert" >
<div class="modal-dialog">