diff options
author | Prabhu Ramachandran | 2014-06-27 22:36:02 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2014-06-27 22:36:02 +0530 |
commit | 3c1880ffc5edc2d58f890cc32d36f1717082395a (patch) | |
tree | 15ad3a81f86e5c362262b0744e70ae7a6d4d058b /testapp/templates | |
parent | 6f27cd40d63300e3294e170daee8c058788c5fa0 (diff) | |
parent | c7a2f3c83f0d53741e53e0e21276aefaea8a5c28 (diff) | |
download | online_test-3c1880ffc5edc2d58f890cc32d36f1717082395a.tar.gz online_test-3c1880ffc5edc2d58f890cc32d36f1717082395a.tar.bz2 online_test-3c1880ffc5edc2d58f890cc32d36f1717082395a.zip |
Merge pull request #28 from prathamesh920/multiple_correct_type
Multiple correct type
Diffstat (limited to 'testapp/templates')
-rw-r--r-- | testapp/templates/exam/question.html | 11 |
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 {{ 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> {% else %} <button class="btn" type="submit" name="check" id="check" onClick="submitCode();">Check Answer</button> |