diff options
Diffstat (limited to 'testapp/templates/exam/grade_user.html')
-rw-r--r-- | testapp/templates/exam/grade_user.html | 53 |
1 files changed, 20 insertions, 33 deletions
diff --git a/testapp/templates/exam/grade_user.html b/testapp/templates/exam/grade_user.html index c6f6343..5ffb199 100644 --- a/testapp/templates/exam/grade_user.html +++ b/testapp/templates/exam/grade_user.html @@ -10,20 +10,17 @@ {% block script %} <script type='text/javascript'> -function data(showContent,showHideDiv) +function data(showHideDiv) { - var con = document.getElementById(showContent); - var ele=document.getElementById(showHideDiv); - if (ele.style.display=="block") - { - con.style.display = "none" - ele.style.display = "none"; - } - else - { - con.style.display = "block"; - ele.style.display = "block"; - } + var ele=document.getElementById(showHideDiv); + if (ele.style.display=="block") + { + ele.style.display = "none"; + } + else + { + ele.style.display = "block"; + } } </script> {% endblock %} @@ -58,23 +55,21 @@ Start time: {{ paper.start_time }} <br/> action="{{URL_ROOT}}/exam/manage/gradeuser/{{data.user.username}}/" method="post"> {% csrf_token %} {% for question, answers in paper.get_question_answers.items %} +<div class="for-question"> <p><strong> - Question: {{ question.id }}. {{ question.summary }} <font color='red'><img style="cursor: pointer" alt='...' onClick="data('contentDiv{{question.id}}','myContent{{question.id}}');"></font> - (Points: {{ question.points }})</strong> </p> -<div id="contentDiv{{question.id}}" style="display:none;"> - <div id="myContent{{question.id}}" style="display: none;"> + Question: {{ question.id }}. {{ question.summary }} (Points: {{ question.points }}) +</strong> +<strong><a href="" onClick="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> Points : {{ question.points }} </p> <p> Test : {{ question.test }} </p> - <p> Options : {{ question.options }} </p> - <p> Type : {{ question.type }} </p> - </div> </div> - - +<div class="question-form"> {% if question.type == "mcq" %} +<br> <p> Choices: {% for option in question.options.strip.splitlines %} {{option}}, {% endfor %} </p> @@ -91,6 +86,8 @@ 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 ... #} @@ -107,14 +104,4 @@ Marks: <input id="q{{ question.id }}" type="text" {% endif %} {# if data.papers #} -{% if data.papers.count > 1 %} -<a href="{{URL_ROOT}}/exam/manage/monitor/">Monitor quiz</a> -{% else %} -{% with data.papers.0 as paper %} -<a href="{{URL_ROOT}}/exam/manage/monitor/{{paper.quiz.id}}/"> - Monitor quiz</a> -{% endwith %} -{% endif %} -<br /> -<a href="{{URL_ROOT}}/admin/">Admin</a> {% endblock%} |