diff options
author | maheshgudi | 2017-10-06 17:53:40 +0530 |
---|---|---|
committer | maheshgudi | 2017-10-06 17:53:40 +0530 |
commit | 7189c53882cbb50337c82d943ff428c892b88a85 (patch) | |
tree | 49f2bd8b2fcc9324a4b85b0a884312b06892f804 | |
parent | c1a7ca90505031f119d54a91a287f435accc177b (diff) | |
download | online_test-7189c53882cbb50337c82d943ff428c892b88a85.tar.gz online_test-7189c53882cbb50337c82d943ff428c892b88a85.tar.bz2 online_test-7189c53882cbb50337c82d943ff428c892b88a85.zip |
Fix UI related changes in questions.html and view_answerpaper.html
-rw-r--r-- | yaksh/templates/yaksh/question.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 1e1f38f..fa69b76 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -184,11 +184,11 @@ lang = "{{ question.language }}" {% if question.type == "mcc" %} {% for test_case in test_cases %} {% if last_attempt and test_case.id|safe in last_attempt|safe %} - <input name="answer" type="checkbox" value="{{ test_case.id }}" checked/> {{ test_case.options }} + <input name="answer" type="checkbox" value="{{ test_case.id }}" checked/> {{ test_case.options| safe }} <br> {% else %} <input name="answer" type="checkbox" value="{{ test_case.id }}"> - {{ test_case.options}} + {{ test_case.options| safe }} <br/> {% endif %} {% endfor %} diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index 850d789..79987b1 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -79,7 +79,7 @@ <div class="panel panel-danger"> {% endif %} <div class="panel-heading"> - Autocheck: {{ answers.0.error_list.0 }} + <strong>{{ answers.0.error_list.0 }}</strong> </div> <div class="panel-body"> {% if question.type == "mcc"%} @@ -117,12 +117,18 @@ <h5>Student answer: </h5> {% for answer in answers %} {% if not answer.skipped %} - {% if "Correct answer" in answer.error %} + {% if answer.answer.correct %} <div class="panel panel-success"> + <div class="panel-heading"> + <strong>Correct Answer</strong> + </div> {% else %} <div class="panel panel-danger"> + <div class="panel-heading"> + <strong>Incorrect Answer</strong> + </div> {% endif %} - <div class="panel-heading">Error:</div> + {% with answer.error_list as err %} {% for error in err %} {% if not error.expected_output %} |