summaryrefslogtreecommitdiff
path: root/testapp/templates/exam
diff options
context:
space:
mode:
authorprathamesh2014-06-27 17:20:02 +0530
committerprathamesh2014-06-27 17:20:02 +0530
commitfaacb5ba720abc9660e1afa12c9a3c4d0761254f (patch)
treee4ebc764981e3e223242b9e60611f03c3de51a3f /testapp/templates/exam
parentb61c62291424089478064af1fceb81c1ed4e5c54 (diff)
downloadonline_test-faacb5ba720abc9660e1afa12c9a3c4d0761254f.tar.gz
online_test-faacb5ba720abc9660e1afa12c9a3c4d0761254f.tar.bz2
online_test-faacb5ba720abc9660e1afa12c9a3c4d0761254f.zip
Mutiple correct choices question type added.
Diffstat (limited to 'testapp/templates/exam')
-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;