diff options
author | Prabhu Ramachandran | 2017-10-17 22:50:36 +0530 |
---|---|---|
committer | GitHub | 2017-10-17 22:50:36 +0530 |
commit | 4e7d09eae252c6d89d2fecfe18ffce46e4421eb0 (patch) | |
tree | 13586b1dfd8003cef645c99e2cb3801835496674 /yaksh/templates | |
parent | 2ab25fcf914215e00fcfd6196576444c1a75c808 (diff) | |
parent | 1ad1ef1c69cb8208e4d330a9695442b4d78134ac (diff) | |
download | online_test-4e7d09eae252c6d89d2fecfe18ffce46e4421eb0.tar.gz online_test-4e7d09eae252c6d89d2fecfe18ffce46e4421eb0.tar.bz2 online_test-4e7d09eae252c6d89d2fecfe18ffce46e4421eb0.zip |
Merge pull request #351 from maheshgudi/yaml_fixes
Yaml fixes
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/question.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/showquestions.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 14 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 12 |
4 files changed, 19 insertions, 13 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/showquestions.html b/yaksh/templates/yaksh/showquestions.html index a8983bd..4240b2e 100644 --- a/yaksh/templates/yaksh/showquestions.html +++ b/yaksh/templates/yaksh/showquestions.html @@ -18,7 +18,7 @@ <li><a href="#updown" data-toggle="pill" > Upload and Download Questions</a></li> </ul> </div> -<div class="tab-content"> +<div class="tab-content col-md-9 col-md-offset-2 main"> <!-- Upload Questions --> <div id="updown" class="tab-pane fade"> <a class="btn btn-primary" href="{{URL_ROOT}}/exam/manage/courses/download_yaml_template/"> Download Template</a> diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index 31a023d..6dfaac3 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -78,7 +78,8 @@ User IP address: {{ paper.user_ip }} {% endif %} {% endfor %} - {% elif question.type == "integer" or "string" or "float" %} + {% elif question.type == "integer" or question.type == "string" + or question.type == "float" %} <h5> <u>Correct Answer:</u></h5> {% for testcase in question.get_test_cases %} <strong>{{ testcase.correct|safe }}</strong> @@ -96,15 +97,14 @@ User IP address: {{ paper.user_ip }} {% if question.type != "code" %} {% if "Correct answer" in answers.0.error_list %} <div class="panel panel-success"> + <div class="panel-heading"><strong>Correct</strong></div> {% else %} <div class="panel panel-danger"> + <div class="panel-heading"><strong> Incorrect</strong></div> {% endif %} - <div class="panel-heading"> - Autocheck: {{ answers.0.error_list.0 }} - </div> <div class="panel-body"> <h5><u>Student answer:</u></h5> - {% if question.type == "mcc"%} + {% if question.type == "mcc"%} <div class="well well-sm"> {% for testcases in question.get_test_cases %} {%if testcases.id|stringformat:"i" in answers.0.answer|safe %} @@ -124,9 +124,9 @@ User IP address: {{ paper.user_ip }} <div class="well well-sm"> {{ answers.0.answer|safe }} </div> - </div> - </div> {% endif %} + </div> + </div> {% else %} <h5>Student answer: </h5> {% for answer in answers %} 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 %} |