summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorankitjavalkar2017-03-03 19:16:46 +0530
committerankitjavalkar2017-03-06 17:35:17 +0530
commitc118c7eff7abaeba18f7c375828d2e022d21cb9f (patch)
tree1fcfb472fc0b5f811733f7b010176003858676cc /yaksh/templates
parentd0d4c9ab3a409c68766bc044825bf22b0519f6a3 (diff)
downloadonline_test-c118c7eff7abaeba18f7c375828d2e022d21cb9f.tar.gz
online_test-c118c7eff7abaeba18f7c375828d2e022d21cb9f.tar.bz2
online_test-c118c7eff7abaeba18f7c375828d2e022d21cb9f.zip
Modify UI for notifications in submitted code questions
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/question.html19
1 files changed, 15 insertions, 4 deletions
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index f94298e..5b5326d 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -137,9 +137,15 @@ function call_skip(url)
{% block main %}
<p id="status"></p>
{% if notification %}
- <div class="alert alert-warning" role="alert">
- <strong>Note:</strong> {{ notification }}
- </div>
+ {% if question.type == "code" %}
+ <div class="alert alert-success" role="alert">
+ <strong>Note:</strong> {{ notification }}
+ </div>
+ {% else %}
+ <div class="alert alert-warning" role="alert">
+ <strong>Note:</strong> {{ notification }}
+ </div>
+ {% endif %}
{% endif %}
<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 %}
@@ -204,10 +210,15 @@ function call_skip(url)
{% elif question.type == "upload" %}
<br><button class="btn btn-primary" type="submit" name="check" id="check" onClick="return validate();">Upload</button>&nbsp;&nbsp;
{% else %}
- <button class="btn btn-primary" type="submit" name="check" id="check" onClick="submitCode();">Check Answer <span class="glyphicon glyphicon-cog"></span></button>&nbsp;&nbsp;
+ {% if notification == None %}
+ <button class="btn btn-primary" type="submit" name="check" id="check" onClick="submitCode();">Check Answer <span class="glyphicon glyphicon-cog"></span></button>&nbsp;&nbsp;
+ {% endif %}
{% endif %}
+
{% if paper.question_paper.quiz.allow_skip and not paper.get_questions_unanswered|length_is:"1" %}
+ {% if notification == None %}
<button class="btn btn-primary" onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/')" name="skip" id="skip">Attempt Later <span class="glyphicon glyphicon-arrow-right"></span></button>
+ {% endif %}
</div>
</div>
</div>