diff options
author | prathamesh | 2015-01-20 17:05:41 +0530 |
---|---|---|
committer | prathamesh | 2015-01-20 17:05:41 +0530 |
commit | f2e09edeb2e5b884f0e75ad3747b51e7603d70e1 (patch) | |
tree | fac9c70feeff6e1c470097623fd54a6244f786c0 /testapp/exam/templates | |
parent | cbdeb90a756832c71c80bac4dbe9ba1a3aceacb2 (diff) | |
download | online_test-f2e09edeb2e5b884f0e75ad3747b51e7603d70e1.tar.gz online_test-f2e09edeb2e5b884f0e75ad3747b51e7603d70e1.tar.bz2 online_test-f2e09edeb2e5b884f0e75ad3747b51e7603d70e1.zip |
Assignment upload interface implementation
Diffstat (limited to 'testapp/exam/templates')
-rw-r--r-- | testapp/exam/templates/exam/question.html | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/testapp/exam/templates/exam/question.html b/testapp/exam/templates/exam/question.html index f8888b1..03284ce 100644 --- a/testapp/exam/templates/exam/question.html +++ b/testapp/exam/templates/exam/question.html @@ -96,23 +96,18 @@ function setSnippetHeight() <p id="status"></p> - {% if question.type == "bash assignment" %} - <form action="{{URL_ROOT}}/exam/submit-assignment/{{ question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post"> - <p>Upload assignment file for the said question<p> - <input type=file id=assignment name=assignment> - <hr> - <br><button class="btn" type="submit" name="submitassign" id="submitassign">Upload</button> - <button class="btn" type="submit" name="skip" id="skip">Skip</button> - </form> - {% endif %} - - <form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post"> + <form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post" enctype="multipart/form-data"> {% csrf_token %} {% if question.type == "mcq" %} {% for option in question.options.strip.splitlines %} <input name="answer" type="radio" value="{{option}}" />{{option}} <br/> {% endfor %} {% endif %} + {% if question.type == "basgn" %} + <p>Upload assignment file for the said question<p> + <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 }} @@ -134,6 +129,8 @@ function setSnippetHeight() {% if question.type == "mcq" or question.type == "mcc "%} <br><button class="btn" type="submit" name="check" id="check">Submit Answer</button> + {% elif question.type == "basgn" %} + <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> {% endif %} |