diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/question.html | 19 |
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> {% else %} - <button class="btn btn-primary" type="submit" name="check" id="check" onClick="submitCode();">Check Answer <span class="glyphicon glyphicon-cog"></span></button> + {% 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> + {% 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> |