diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/manage.html | 8 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 84 | ||||
-rw-r--r-- | yaksh/templates/yaksh/grade_user.html | 106 | ||||
-rw-r--r-- | yaksh/templates/yaksh/monitor.html | 20 | ||||
-rw-r--r-- | yaksh/templates/yaksh/question.html | 44 | ||||
-rw-r--r-- | yaksh/templates/yaksh/user_data.html | 87 | ||||
-rw-r--r-- | yaksh/templates/yaksh/view_answerpaper.html | 69 |
7 files changed, 286 insertions, 132 deletions
diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index 2fd0f7a..b628a44 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -78,15 +78,15 @@ <h5>Click on the button given below to add a new course.</h5> <button class="btn" type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/add_course");'>Add New Course</button> </center> - {% if trial_quiz %} + {% if trial_paper %} <h5/> You have trial papers. <table class="bordered-table zebra-striped"> <form action="" method="post"> {% csrf_token %} - {% for quiz in trial_quiz %} + {% for paper in trial_paper %} <tr> - <td> <input type = "checkbox" name="delete_quiz" value = {{quiz.id}}></input></td> - <td> <a href="{{URL_ROOT}}/exam/manage/gradeuser/{{quiz.id}}">{{quiz.description}}</td> + <td> <input type = "checkbox" name="delete_paper" value = {{paper.id}}></input></td> + <td> <a href="{{URL_ROOT}}/exam/manage/gradeuser/{{paper.question_paper.quiz.id}}">{{paper.question_paper.quiz.description}}</td> </tr> {% endfor %} </table> diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index df46ba6..fe15342 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -15,25 +15,10 @@ {% else %} <center><h3> Course(s) Created</h3></center> {% for course in courses %} - {% if user != course.creator and course.name != "Yaksh_Demo_course"%} + {% if user != course.creator %} <h4> {{course.creator.get_full_name}} added you to this course</h4> {% endif %} - {% if course.name == "Yaksh_Demo_course" %} - <h5> This is a Demo Course - <a href="" onclick="$('#help').show(); return false;">Help - </a></h5> - <div style="display: none;" id="help"> - <ol> - <li> This is a Demo Course - <ul> - <li><i>You will not be able to edit Demo course and Demo Quiz.</li> - <li>You can only take Demo Quiz by User Mode or God Mode.</li> - <li>This is for you to get familiar with the interface.</i></li> - </ul> - </p> - <a href="" onclick="$('#help').hide(); return false"> Close </a> - </div> - {% endif %} + <div class="row show-grid"> <div class="span14"> <div class="row"> @@ -84,13 +69,17 @@ <p><b><u>Quiz(zes)</u></b></p> {% if course.get_quizzes %} {% for quiz in course.get_quizzes %} - <a href="{{URL_ROOT}}/exam/manage/addquiz/{{quiz.id}}/">{{ quiz.description }}</a><br> + <a href="{{URL_ROOT}}/exam/manage/addquiz/{{course.id}}/{{quiz.id}}/">{{ quiz.description }}</a><br> + {% endfor %} {% else %} <p><b>No quiz </b></p> {% endif %} </div> </div> + <br/> + <button class="btn primary"type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/addquiz/{{course.id}}/");'>Add New Quiz</button> + </div> </div> <br><br> @@ -99,7 +88,6 @@ <hr/> {% if allotted_courses %} <center><h3> Course(s) Allotted </h3></center> - {% for course in allotted_courses %} <div class="row show-grid"> <div class="span14"> @@ -149,23 +137,69 @@ <p><b><u>Quiz(zes)</u></b></p> {% if course.get_quizzes %} {% for quiz in course.get_quizzes %} - <a href="{{URL_ROOT}}/exam/manage/addquiz/{{quiz.id}}/">{{ quiz.description }}</a><br> + <a href="{{URL_ROOT}}/exam/manage/addquiz/{{course.id}}/{{quiz.id}}/">{{ quiz.description }}</a><br> {% endfor %} {% else %} <p><b>No quiz </b></p> {% endif %} </div> </div> + <button class="btn primary"type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/addquiz/{{course.id}}/");'>Add New Quiz</button> </div> </div> <br><br> {% endfor %} {% else %} - <center><h4> No new Courses allotted </h4></center> + <center><h4> No new Courses allotted</h4></center> + <br><br> +{% endif %} +<hr/> +{% if demo_course %} +{% with demo_course as course %} + <h5> This is a Demo Course + <a href="" onclick="$('#help').show(); return false;">Help + </a></h5> + <div style="display: none;" id="help"> + <ol> + <li> This is a Demo Course + <ul> + <li><i>You will not be able to edit Demo course and Demo Quiz.</li> + <li>You can only take Demo Quiz by User Mode or God Mode.</li> + <li>This is for you to get familiar with the interface.</i></li> + </ul> + </p> + <a href="" onclick="$('#help').hide(); return false"> Close </a> + </div> + <div class="row show-grid"> + <div class="span14"> + <div class="row"> + <div class="span6"> + <p> + <b><u>Course</u></b> + {% if course.active %} + <span class="label success">Active</span> + {% else %} + <span class="label important">Closed</span> + {% endif %} + </p> + <h5>{{ course.name }}<h5/> + </br></br> + </div> + <div class="span6"> + <p><b><u>Quiz(zes)</u></b></p> + {% if course.get_quizzes %} + {% for quiz in course.get_quizzes %} + <a href="{{URL_ROOT}}/exam/manage/addquiz/{{course.id}}/{{quiz.id}}/">{{ quiz.description }}</a><br> + {% endfor %} + {% else %} + <p><b>No quiz </b></p> + {% endif %} + </div> + </div> + </div> + </div> +{% endwith %} {% endif %} <hr/> -<button class="btn primary" type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/add_course");'>Add New Course</button> - {% if courses or allotted_courses %} - <button class="btn primary" type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/addquiz");'>Add New Quiz</button> -{% endif %} +<center><button class="btn primary" type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/add_course");'>Add New Course</button></center> {% endblock %} diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 2c5403c..0e29512 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -5,11 +5,9 @@ {% block subtitle %} Grade User {% endblock %} {% block css %} - <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/gradeuser.css" type="text/css" /> -{% endblock %} - -{% block script %} - <script src= "{{ URL_ROOT }}/static/yaksh/js/edit_question.js"></script> + <link rel="stylesheet" + href="{{ URL_ROOT }}/static/yaksh/css/view_answerpaper.css" + type="text/css" /> {% endblock %} {% block manage %} @@ -28,8 +26,9 @@ {% if course.get_quizzes %} <td> {% for quiz in course.get_quizzes %} - <li><a href = "{{URL_ROOT}}/exam/manage/gradeuser/{{quiz.id}}">{{quiz.description}}</a></li> - + <li><a href = "{{URL_ROOT}}/exam/manage/gradeuser/{{quiz.id}}"> + {{quiz.description}} + </a></li> {% endfor %} </td> {% else %} @@ -44,7 +43,8 @@ {%if users %} <div id = "student" class="span2"> {% for user in users %} - <p><a href = "{{URL_ROOT}}/exam/manage/gradeuser/{{quiz_id}}/{{user.user__id}}">{{user.user__first_name}} {{user.user__last_name}}</a></p> + <p><a href = "{{URL_ROOT}}/exam/manage/gradeuser/{{quiz_id}}/{{user.user__id}}"> + {{user.user__first_name}} {{user.user__last_name}}</a></p> {% endfor %} </div> {% endif %} @@ -88,6 +88,7 @@ Attempt Number: <b>{{paper.attempt_number}} </b> Total attempts at questions: {{ paper.answers.count }} <br/> Marks obtained: {{ paper.marks_obtained }} <br/> Start time: {{ paper.start_time }} <br/> +End time: {{ paper.end_time }} <br/> {%if paper.percent%} Percentage obtained: {{paper.percent}}% <br/> {% endif %} @@ -125,42 +126,63 @@ Status : <b style="color: green;"> Passed </b><br/> method="post"> {% csrf_token %} {% for question, answers in paper.get_question_answers.items %} - -<div class="for-question"> -<p><strong> - Question: {{ question.id }}. {{ question.summary }} (Points: {{ question.points }}) -</strong> -<strong><a href="" onClick="grade_data('myContent{{question.id}}'); return false;" style="cursor:pointer;" />Details</strong></p></a> -<div id="contentDiv"> - <div id="myContent{{question.id}}" style="padding:5px; display:none;"> - <p> Description : {{ question.description }} </p> - <p> Test : {{ question.test }} </p> - </div> -</div> -<div class="question-form"> - -{% if question.type == "mcq" %} -<br> -<p> Choices: -{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %} -</p> -<p>Student answer: {{ answers.0 }}</p> -{% else %}{# non-mcq questions #} -<pre> -{% for answer in answers %}################################################################################ -{{ answer.answer.strip }} -# Autocheck: {{ answer.error }} -{% endfor %}</pre> -{% endif %} {# if question.type #} -{% with answers|last as answer %} -Marks: <input id="q{{ question.id }}" type="text" +<div class="panel panel-info"> + <div class="panel-heading"> + <strong> Details: {{forloop.counter}}. {{ question.summary }} + <span class="marks"> Mark(s): {{ question.points }} </span> + </strong> + </div> + <div class="panel-body"> + <h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong> + {% if question.type == "mcq" or question.type == "mcc" %} + <h5> <u>Choices:</u></h5> + {% for testcase in question.get_test_cases %} + <br/><strong>{{ forloop.counter }}. {{ testcase.options }}</strong> + {% endfor %} + {% else %} + <h5> <u>Test cases: </u></h5> + {% for testcase in question.get_test_cases %} + <br/><strong>{{ forloop.counter }}. {{ testcase.test_case }}</strong> + {% endfor %} + {%endif%} + </div> + </div> + {% if question.type == "mcq" or question.type == "mcc" %} + {% if "Correct answer" in answers.0.error %} + <div class="panel panel-success"> + {% else %} + <div class="panel panel-danger"> + {% endif %} + <div class="panel-heading"> + Autocheck: {{ answers.0.error }} + </div> + <div class="panel-body"> + <h5><u>Student answer:</u></h5> + <pre><code>{{forloop.counter}}. {{ answers.0 }}</code></pre> + </div> + </div> + {% else %} + <h5>Student answer: </h5> + {% for answer in answers %} + {% if not answer.skipped %} + {% if "Correct answer" in answer.error %} + <div class="panel panel-success"> + {% else %} + <div class="panel panel-danger"> + {% endif %} + <div class="panel-heading">Autocheck: {{ answer.error }}</div> + <div class="panel-body"><pre><code>{{ answer.answer.strip }}</code></pre></div> + </div> + {% endif %} + {% endfor %} + {% endif %} + {% with answers|last as answer %} + Marks: <input id="q{{ question.id }}" type="text" name="q{{ question.id }}_marks" size="4" value="{{ answer.marks }}"><br><br> -{% endwith %} -</div> -</div> -{% endfor %} {# for question, answers ... #} - + {% endwith %} + <hr/> + {% endfor %} {# for question, answers ... #} <h3>Teacher comments: </h3> <textarea id="comments_{{paper.question_paper.id}}" rows="10" cols="80" diff --git a/yaksh/templates/yaksh/monitor.html b/yaksh/templates/yaksh/monitor.html index 80ad06c..9554737 100644 --- a/yaksh/templates/yaksh/monitor.html +++ b/yaksh/templates/yaksh/monitor.html @@ -7,6 +7,20 @@ {% block css %} <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/question_quiz.css" type="text/css" /> {% endblock %} + +{% block script %} +<script src="{{ URL_ROOT }}/static/yaksh/js/jquery-1.9.1.min.js" type="text/javascript"></script> +<script src="{{ URL_ROOT }}/static/yaksh/js/jquery.tablesorter.min.js"></script> +<script type="text/javascript"> +$(document).ready(function() + { + $("#result-table").tablesorter(); + } +); +</script> +{% endblock %} + + {% block subtitle %} {% if not quizzes and not quiz %} Quiz Results @@ -41,7 +55,8 @@ <p>Number of papers: {{ papers|length }} </p> <p><a href="{{URL_ROOT}}/exam/manage/statistics/question/{{papers.0.question_paper.id}}">Question Statisitics</a></p> <p><a href="{{URL_ROOT}}/exam/manage/monitor/download_csv/{{papers.0.question_paper.id}}">Download CSV</a></p> -<table border="1" cellpadding="3"> +<table border="1" cellpadding="3" id="result-table" class="tablesorter"> + <thead> <tr> <th> Name </th> <th> Username </th> @@ -52,6 +67,8 @@ <th> Attempts </th> <th> Status </th> </tr> + </thead> + <tbody> {% for paper in latest_attempts %} <tr> <td> <a href="{{URL_ROOT}}/exam/manage/user_data/{{paper.user.id}}/{{paper.question_paper.id}}">{{ paper.user.get_full_name.title }}</a> </td> @@ -64,6 +81,7 @@ <td> {{ paper.status }} </td> </tr> {% endfor %} + </tbody> </table> {% else %} <p> No answer papers so far. </p> 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> @@ -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 diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index 1060e2d..4d12e99 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -5,6 +5,15 @@ {% block manage %} {% block subtitle %}Data for user {{ data.user.get_full_name.title }}{% endblock %} + +{% block css %} + <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/view_answerpaper.css" type="text/css" /> +{% endblock %} + +{% block script %} + <script src= "{{ URL_ROOT }}/static/yaksh/js/edit_question.js"></script> +{% endblock %} + <form action="" method="post"> <p> Name: {{ data.user.get_full_name.title }} <br/> @@ -49,28 +58,62 @@ User IP address: {{ paper.user_ip }} {% if paper.answers.count %} <h3> Answers </h3> {% for question, answers in paper.get_question_answers.items %} -<p><strong> Question: {{ question.id }}. {{ question.summary }} (Points: {{ question.points }})</strong> </p> -{% if question.type == "mcq" or question.type == "mcc" %} -<p> Choices: -{% for testcase in question.get_test_cases %} <br>{{ testcase.options }} {% endfor %} -</p> -<p>Student answer: {{ answers.0 }}</p> -Autocheck: {{ answers.0.error }} -{% else %}{# non-mcq questions #} -{% for answer in answers %} -{% if not answer.skipped %} -<pre> -############################################################################### -{{ answer.answer.strip }} -# Autocheck: {{ answer.error }} -</pre> -{% endif %} -{% endfor %} -{% endif %} -{% with answers|last as answer %} -<p><em>Marks: {{answer.marks}} </em> </p> -{% endwith %} -{% endfor %} {# for question, answers ... #} +<div class="panel panel-info"> + <div class="panel-heading"> + + <strong> Details: {{forloop.counter}}. {{ question.summary }} + <a href="" onClick="grade_data('show_question{{question.id}}'); return false;"> Show Question </a> + <span class="marks"> Mark(s): {{ question.points }} </span> + </strong> + </div> + <div class="panel-body" id="show_question{{question.id}}" style="display: none;"> + + <h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong> + {% if question.type == "mcq" or question.type == "mcc" %} + <h5> <u>Choices:</u></h5> + {% for testcase in question.get_test_cases %} + <br/><strong>{{ forloop.counter }}. {{ testcase.options }}</strong> + {% endfor %} + {% else %} + <h5> <u>Test cases: </u></h5> + {% for testcase in question.get_test_cases %} + <br/><strong>{{ forloop.counter }}. {{ testcase.test_case }}</strong> + {% endfor %} + {%endif%} + </div> + </div> + {% if question.type == "mcq" or question.type == "mcc" %} + {% if "Correct answer" in answers.0.error %} + <div class="panel panel-success"> + {% else %} + <div class="panel panel-danger"> + {% endif %} + <div class="panel-heading"> + Autocheck: {{ answers.0.error }} + </div> + <div class="panel-body"> + <h5><u>Student answer:</u></h5> + <pre><code>{{forloop.counter}}. {{ answers.0 }}</code></pre> + </div> + </div> + {% else %} + <h5>Student answer: </h5> + {% for answer in answers %} + {% if not answer.skipped %} + {% if "Correct answer" in answer.error %} + <div class="panel panel-success"> + {% else %} + <div class="panel panel-danger"> + {% endif %} + <div class="panel-heading">Autocheck: {{ answer.error }}</div> + <div class="panel-body"><pre><code>{{ answer.answer.strip }}</code></pre></div> + </div> + {% endif %} + {% endfor %} + {% endif %} + <hr> + {% endfor %} {# for question, answers ... #} + <h3>Teacher comments: </h3> {{ paper.comments|default:"None" }} {% endif %} {# if paper.answers.count #} diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index ae70e69..9227561 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -1,4 +1,7 @@ {% extends "user.html" %} +{% block css %} +<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/view_answerpaper.css" /> +{% endblock %} {% block title %} Answer Paper for {{ quiz.description }}{% endblock title %} @@ -6,7 +9,6 @@ {% block subtitle %} Answer Paper for {{ quiz.description }}{% endblock %} - {% if not data.papers %} <p><b> You have not attempted the quiz {{ quiz.description }} </b></p> {% else %} @@ -21,32 +23,67 @@ Questions correctly answered: {{ paper.get_answered_str }} <br/> Marks obtained: {{ paper.marks_obtained }} <br/> Start time: {{ paper.start_time }} <br/> + End time : {{ paper.end_time }} <br/> + Percentage obtained: {{ paper.percent }}% <br/> + {% if paper.passed == 0 %} + Status : <b style="color: red;"> Failed </b><br/> + {% else %} + Status : <b style="color: green;"> Passed </b><br/> + {% endif %} </p> {% if paper.answers.count %} - <h3> Answers </h3> + <h3> Answerpaper: </h3> {% for question, answers in paper.get_question_answers.items %} - <p><strong> Question: {{ question.id }}. {{ question.summary }} (Mark(s): {{ question.points }})</strong> </p> + + <div class="panel panel-info"> + <div class="panel-heading"> + <strong> Details: {{forloop.counter}}. {{ question.summary }} + <span class="marks"> Mark(s): {{ question.points }} </span> + </strong> + </div> + <div class="panel-body"> + <h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong> + {% if question.type == "mcq" or question.type == "mcc" %} + <h5> <u>Choices:</u></h5> + {% for testcase in question.get_test_cases %} + <br/><strong>{{ forloop.counter }}. {{ testcase.options }}</strong> + {% endfor %} + {%endif%} + + </div> + </div> {% if question.type == "mcq" or question.type == "mcc" %} - <p> Choices: - {% for testcase in question.get_test_cases %} <br>{{ testcase.options }} {% endfor %} - </p> - <p>Student answer: {{ answers.0 }}</p> - Autocheck: {{ answers.0.error }} - {% else %}{# non-mcq questions #} - <p>Student answer: </p> + {% if "Correct answer" in answers.0.error %} + <div class="panel panel-success"> + {% else %} + <div class="panel panel-danger"> + {% endif %} + <div class="panel-heading"> + Autocheck: {{ answers.0.error }} + </div> + <div class="panel-body"> + <h5><u>Student answer:</u></h5> + <pre><code>{{forloop.counter}}. {{ answers.0 }}</code></pre> + </div> + </div> + {% else %} + <h5>Student answer: </h5> {% for answer in answers %} {% if not answer.skipped %} - <pre> - ############################################################################### - {{ answer.answer.strip }} - # Autocheck: {{ answer.error }} - </pre> + {% if "Correct answer" in answer.error %} + <div class="panel panel-success"> + {% else %} + <div class="panel panel-danger"> + {% endif %} + <div class="panel-heading">Autocheck: {{ answer.error }}</div> + <div class="panel-body"><pre><code>{{ answer.answer.strip }}</code></pre></div> + </div> {% endif %} {% endfor %} {% endif %} {% with answers|last as answer %} - <p><em>Obtained Marks: {{answer.marks}} </em> </p> + <p><em><mark>Obtained Marks: {{answer.marks}}</mark></em> </p> {% endwith %} <hr> {% endfor %} {# for question, answers ... #} |