From 9b8b99b69066f6a627a2a660d6ad2e63e31f446a Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 4 Apr 2017 16:24:52 +0530 Subject: Change in templates - Display course name and quiz name in Grade user page and monitor page - Give html title to all templates - Display alloted course's quizzes in moderator dashboard --- yaksh/templates/yaksh/course_detail.html | 4 +- yaksh/templates/yaksh/courses.html | 2 +- yaksh/templates/yaksh/grade_user.html | 18 ++++--- yaksh/templates/yaksh/moderator_dashboard.html | 4 ++ yaksh/templates/yaksh/monitor.html | 67 +++++++++++++++----------- yaksh/templates/yaksh/showquestions.html | 1 + 6 files changed, 59 insertions(+), 37 deletions(-) diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index 4b7efaf..81569fa 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -1,8 +1,8 @@ {% extends "manage.html" %} -{% block title %} Course {% endblock title %} +{% block title %} Course Details {% endblock title %} -{% block subtitle %} {{ course.name }} {% endblock %} +{% block pagetitle %} Course Details for {{ course.name|title }} {% endblock %} {% block script %} diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 970d488..766b444 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -1,5 +1,5 @@ {% extends "manage.html" %} - +{% block title %} Courses {% endblock %} {% block pagetitle %} Courses {% endblock pagetitle %} {% block content %} {% if not courses %} diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 1cb1f99..67f25a4 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -1,5 +1,7 @@ {% extends "manage.html" %} +{% block title %} Grade User {% endblock %} + {% block pagetitle %} Grade User {% endblock pagetitle %} {% block content %} @@ -8,11 +10,10 @@ {% endblock script %} - {% if course_details %} - + @@ -37,23 +38,25 @@ {% endif %}
-{%if users %} +{% if not course_details %} +{% if users %}
{% for user in users %}

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

{% endfor %}
+{% else %} +

No Users Found for {{ quiz.description }}

+{% endif %} {% endif %} - -
{% if data %}

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

-

Name:{{ data.user.get_full_name.title }} +

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

Roll number: {{ data.profile.roll_number }} @@ -68,7 +71,8 @@


{{ paper.total_marks }} -

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

+

Course: {{ paper.question_paper.quiz.course.name }}

+

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

Attempt Number: {{paper.attempt_number}} diff --git a/yaksh/templates/yaksh/moderator_dashboard.html b/yaksh/templates/yaksh/moderator_dashboard.html index 0468ed9..faccffe 100644 --- a/yaksh/templates/yaksh/moderator_dashboard.html +++ b/yaksh/templates/yaksh/moderator_dashboard.html @@ -9,12 +9,16 @@

List of quizzes! Click on the given links to have a look at answer papers for a quiz.

CoursesCourses Quizzes
+ {% for paper, answer_papers, users_passed, users_failed in users_per_paper %} + diff --git a/yaksh/templates/yaksh/monitor.html b/yaksh/templates/yaksh/monitor.html index d2c89ce..9ce0dc4 100644 --- a/yaksh/templates/yaksh/monitor.html +++ b/yaksh/templates/yaksh/monitor.html @@ -1,15 +1,16 @@ {% extends "manage.html" %} {% load custom_filters %} - -{% block pagetitle %} Quiz results {% endblock pagetitle %} +{% block title %} Monitor {% endblock %} +{% block pagetitle %} {{ msg }} {% endblock pagetitle %} {% block meta %} {% endblock meta %} {% block script %} +{% if papers %} - +{% endif %} {% endblock %} - -{% block subtitle %} - {% if not quizzes and not quiz %} - Quiz Results - {% endif %} - {% if quizzes %} - Available Quizzes - {% endif %} - {% if quiz %} - {{ quiz.description }} Results - {% endif %} -{% endblock %} {% block content %} - {% if not quizzes and not quiz %} -
No quizzes available.
- {% endif %} {# ############################################################### #} {# This is rendered when we are just viewing exam/monitor #} -{% if quizzes %} - + +{% if course_details %} +
Course Quiz Taken By No. of users Passed No. of users Failed
+ {{ paper.quiz.course.name }} + {{ paper.quiz.description }}
+ + + + + + {% 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 %} {# ############################################################### #} {# This is rendered when we are just viewing exam/monitor/quiz_num #} +{% if msg != "Monitor" %} {% if quiz %} - {% if papers %} +

    Course Name: {{ quiz.course.name }}

    +

    Quiz Name: {{ quiz.description }}

    Number of papers: {{ papers|length }}

    {% completed papers as completed_papers %} {# template tag used to get the count of completed papers #} @@ -80,6 +88,7 @@ $(document).ready(function() Marks obtained Attempts Time Remaining + Status @@ -93,13 +102,17 @@ $(document).ready(function() {{ paper.marks_obtained }} {{ paper.answers.count }} {{ paper.time_left }} + {{ paper.status }} {% endfor %} {% else %} -

    No answer papers so far.

    +

    No answer papers found for {{ quiz.description }}

    {% endif %} {# if papers #} +{% else %} +

    No Quiz Found

    +{% endif %} {% endif %} {% endblock %} diff --git a/yaksh/templates/yaksh/showquestions.html b/yaksh/templates/yaksh/showquestions.html index 157b378..a136ddf 100644 --- a/yaksh/templates/yaksh/showquestions.html +++ b/yaksh/templates/yaksh/showquestions.html @@ -1,5 +1,6 @@ {% extends "manage.html" %} +{% block title %} Questions {% endblock %} {% block pagetitle %} List of Questions {% endblock pagetitle %} -- cgit