summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorPrabhu Ramachandran2016-09-08 16:25:41 +0530
committerGitHub2016-09-08 16:25:41 +0530
commitbcf46d1462c35e9c8df2509a31ac3200383976fc (patch)
tree10426f74b6c578e53e5002f0314bb484a04b41c4 /yaksh/templates
parentdc4437c52ee1266af9a69d091952d9f6b19ca584 (diff)
parent06daf67b7a579c113d17eacd4bfb0651ab169be4 (diff)
downloadonline_test-bcf46d1462c35e9c8df2509a31ac3200383976fc.tar.gz
online_test-bcf46d1462c35e9c8df2509a31ac3200383976fc.tar.bz2
online_test-bcf46d1462c35e9c8df2509a31ac3200383976fc.zip
Merge pull request #131 from adityacp/fix_quiz_UI
Fix quiz templates
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/question.html44
1 files changed, 22 insertions, 22 deletions
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 9a0f899..9e1f734 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -102,6 +102,10 @@ function call_skip(url)
</div>
</div>
</div>
+<form id="logout" action="{{URL_ROOT}}/exam/quit/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post" class="pull-right">
+ {% csrf_token %}
+ <button class="btn" type="submit" name="quit">Quit Exam</button>
+</form>
<div class = "container">
<div class="sidebar">
<p>Question Navigator </p>
@@ -124,27 +128,18 @@ function call_skip(url)
</div>
</div>
<div class="span13">
- <h4><u> {{ question.summary }} </u><font class=pull-right>(Marks : {{ question.points }}) </font></h4><br>
+ <h4><u> {{ question.summary }} </u><font class=pull-right>(Marks : {{ question.points }}) </font>
+ </h4>
+ <h4><font size=3 face=arial> {{ question.language|title }} {{ question.type|title }} Question</font></h4><br>
<font size=3 face=arial> {{ question.description|safe }} </font>
- <br><font size=3 face=arial> Language: {{ question.language }} </font><br>
{% if files %}
<h4>Files to download for this question</h4>
- {% for file in files %}
- {% if file.question_id == question.id %}
- <h5><a href="{{file.file.url}}">{{file.file.name}}</a></h5>
+ {% for f_name in files %}
+ {% if f_name.question_id == question.id %}
+ <h5><a href="{{f_name.file.url}}">{{f_name.file.name}}</a></h5>
{% endif %}
{% endfor %}
{% endif %}
- {% if question.type == "code" %}
- <br><h4>Output:</h4></br>
- {% if error_message %}
- <div class="alert alert-error">
- <textarea class="error" readonly="yes">{{ error_message }}</textarea>
- {% else %}
- <textarea class="error_msg" readonly="yes" placeholder="Please submit your answer below"></textarea>
- {% endif %}
- </div>
- {% endif %}
<br>
<p id="status"></p>
<form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post" enctype="multipart/form-data">
@@ -176,10 +171,20 @@ function call_skip(url)
{% if question.type == "code" %}
<h4>Program:</h4>
- <textarea name="answer" id="answer"></textarea>
-<br>
+ <textarea name="answer" id="answer"></textarea>
+ <br>
{% endif %}
+ {% if question.type == "code" %}
+ <br><h4>Output:</h4><br>
+ {% if error_message %}
+ <div class="alert alert-error">
+ <textarea class="error" readonly="yes">{{ error_message }}</textarea>
+ {% else %}
+ <textarea class="error_msg" readonly="yes"></textarea>
+ {% endif %}
+ </div>
+ {% endif %}
{% if question.type == "mcq" or question.type == "mcc"%}
<br><button class="btn" type="submit" name="check" id="check">Submit Answer</button>&nbsp;&nbsp;
@@ -195,7 +200,6 @@ function call_skip(url)
{% endif %}
</form>
</div>
-
<!-- Modal -->
<div class="modal fade " id="upload_alert" >
<div class="modal-dialog">
@@ -212,10 +216,6 @@ function call_skip(url)
</div>
</div>
</div>
- <form id="logout" action="{{URL_ROOT}}/exam/quit/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post" class="pull-right">
- {% csrf_token %}
- <button class="btn" type="submit" name="quit">Quit Exam</button>
- </form>
<script>
// Codemirror object, language modes and initial content