summaryrefslogtreecommitdiff
path: root/testapp/templates/exam/question.html
diff options
context:
space:
mode:
Diffstat (limited to 'testapp/templates/exam/question.html')
-rw-r--r--testapp/templates/exam/question.html11
1 files changed, 9 insertions, 2 deletions
diff --git a/testapp/templates/exam/question.html b/testapp/templates/exam/question.html
index c8454ff..a3e8629 100644
--- a/testapp/templates/exam/question.html
+++ b/testapp/templates/exam/question.html
@@ -106,7 +106,14 @@ function setSnippetHeight()
{% for option in question.options.strip.splitlines %}
<input name="answer" type="radio" value="{{option}}" />{{option}} <br/>
{% endfor %}
- {% else %}
+ {% 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" %}
<textarea rows="1" style="padding:0;height:auto;width:750px;overflow:hidden;background-color:white;border: 0 none white;" 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>
@@ -119,7 +126,7 @@ function setSnippetHeight()
<script>addLineNumbers('snippet');</script>
{% endif %}
- {% if question.type == "mcq" %}
+ {% if question.type == "mcq" or question.type == "mcc "%}
<br><button class="btn" type="submit" name="check" id="check">Submit Answer</button>&nbsp;&nbsp;
{% else %}
<button class="btn" type="submit" name="check" id="check" onClick="submitCode();">Check Answer</button>&nbsp;&nbsp;