{% extends "manage.html" %} {% block pagetitle %} Grade User {% endblock pagetitle %} {% block content %} {% block script %} {% endblock script %} {% if course_details %} {% for course in course_details %} {% if course.get_quizzes %} {% else %} {% endif %} {% endfor %}
Courses Quizzes
    {{course.name}}
{% for quiz in course.get_quizzes %}
  • {{quiz.description}}
  • {% endfor %}
    No quiz
    {% endif %}
    {%if users %}
    {% for user in users %}

    {{user.user__first_name}} {{user.user__last_name}}

    {% endfor %}
    {% endif %}
    {% if data %}

    Showing paper for {{data.user.get_full_name.title}}

    Name:{{ data.user.get_full_name.title }} {% if data.profile %}

    Roll number: {{ data.profile.roll_number }}

    Position: {{ data.profile.position }}

    Department: {{ data.profile.department }}

    Institute: {{ data.profile.institute }} {% endif %} {% if data.papers %} {% for paper in data.papers %}


    {{ paper.total_marks }}

    Quiz: {{ paper.question_paper.quiz.description }}

    Attempt Number: {{paper.attempt_number}}
    Questions correctly answered: {{ paper.get_answered_str }}
    Total attempts at questions: {{ paper.answers.count }}
    Marks obtained: {{ paper.marks_obtained }}
    Start time: {{ paper.start_time }}
    End time: {{ paper.end_time }}
    {%if paper.percent%} Percentage obtained: {{paper.percent}}%
    {% endif %} {% if paper.passed == 0 %} Status : Failed
    {% else %} Status : Passed
    {% endif %}

    {% if paper.answers.count %}

    Report


    {% for question, answers in paper.get_question_answers.items %} {% with answers|last as answer %} {% endwith %} {% endfor %}
    Questions Marks Obtained
    {{ question.id }} {{ answer.answer.marks }}

    Answers


    {% csrf_token %} {% for question, answers in paper.get_question_answers.items %}
    Details: {{forloop.counter}}. {{ question.summary }} Mark(s): {{ question.points }}
    Question:
    {{ question.description|safe }} {% if question.type == "mcq" or question.type == "mcc" %}
    Choices:
    {% for testcase in question.get_test_cases %} {% if testcase.correct %}
    {{ forloop.counter }}. {{ testcase.options|safe }} Correct {% else %}
    {{ forloop.counter }}. {{ testcase.options|safe }} {% endif %} {% endfor %} {% elif question.type == "integer" or "string" or "float" %}
    Correct Answer:
    {% for testcase in question.get_test_cases %} {{ testcase.correct|safe }} {% if testcase.error_margin %} {{ testcase.error_margin|safe }} {% endif %} {% endfor %} {% else %}
    Test cases:
    {% for testcase in question.get_test_cases %}
    {{ forloop.counter }}. {{ testcase }} {% endfor %} {%endif%}
    Student answer:
    {% for ans in answers %} {% if ans.answer.correct %}
    Correct answer: {% else %}
    Error: {% endif %} {% for err in ans.error_list %}
    {{ err }}
    {% endfor %}
    {% if question.type != "code" %}
    {{ ans.answer.answer.strip|safe }}
    {% else %}
    {{ ans.answer.answer.strip|safe }}
    {% endif %}
    {% endfor %} {% with answers|last as answer %} Marks:

    {% endwith %}
    {% endfor %} {# for question, answers ... #}

    Teacher comments:


    {% endif %} {# if paper.answers.count #} {% endfor %} {# for paper in data.papers #} {% endif %} {# if data.papers #} {% else %}
    {% endif %} {#if data#}
    {% endblock%}