From 8c1c1f6c8b1de16fba5f93e58a0cd3cb751e02d7 Mon Sep 17 00:00:00 2001
From: adityacp
Date: Wed, 10 Feb 2021 19:02:29 +0530
Subject: Change in templates, views
- Revamp UI in course page
- Fix a bug where a trial module is created without setting is_trial in
models
- Fix a bug in question statistics where only completed answerpaper data
is needed
---
yaksh/models.py | 2 +-
yaksh/static/yaksh/css/custom.css | 2 +
yaksh/templates/yaksh/courses.html | 227 ++++++++++------------
yaksh/templates/yaksh/micromonitor.html | 6 +-
yaksh/templates/yaksh/monitor.html | 333 ++++++++++++++++----------------
yaksh/views.py | 12 +-
6 files changed, 284 insertions(+), 298 deletions(-)
diff --git a/yaksh/models.py b/yaksh/models.py
index b4d0f76..5934ae2 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -2027,7 +2027,7 @@ class AnswerPaperManager(models.Manager):
que_ids = [que.id for que in all_questions]
papers = self.filter(
question_paper_id=questionpaper_id, course_id=course_id,
- attempt_number=attempt_number
+ attempt_number=attempt_number, status=status
).values_list("id", flat=True)
answers = Answer.objects.filter(
answerpaper__id__in=papers, question_id__in=que_ids
diff --git a/yaksh/static/yaksh/css/custom.css b/yaksh/static/yaksh/css/custom.css
index 78eaba4..c722197 100644
--- a/yaksh/static/yaksh/css/custom.css
+++ b/yaksh/static/yaksh/css/custom.css
@@ -211,3 +211,5 @@ iframe {
width: 100%;
text-align: center;
}
+
+.dropdown:hover .dropdown-menu {display: block;}
\ No newline at end of file
diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html
index 02cbad9..b9e48d6 100644
--- a/yaksh/templates/yaksh/courses.html
+++ b/yaksh/templates/yaksh/courses.html
@@ -101,9 +101,14 @@
{% for course in courses %}
Course Name:  | @@ -63,186 +64,180 @@ $(document).ready(function()Quiz Name:  | {{quiz.description}} |
Number of papers:   | {{total_papers}} | -
Papers Completed:   | -- {{completed_papers}} - | -
Papers in progress:   | -- {{ inprogress_papers }} - | -
+
+ - Download the CSV file from the button above
+ - Edit and upload the same
+
+
-
- - Download the CSV file from the button above
- - Edit and upload the same
-
-
Sr No. | +Name | +Roll No | +Marks | +Questions Attempted | +Time Left | +Status | +Time Extension | +Special Attempt | +
---|---|---|---|---|---|---|---|---|
{{forloop.counter}} | + {% with paper.user as student %} ++ + + {{ student.get_full_name.title }} + + | +{{ student.profile.roll_number }} | + {% endwith %} +{{ paper.marks_obtained }} | ++ {% get_dict_value questions_attempted paper.id as que_attempt %} + {{que_attempt}} out of {{questions_count}} + | +{{ paper.time_left }} | +{% if paper.is_attempt_inprogress %} + Inprogress + {% else %} + Completed + {% endif %} + | ++ + | +{% specail_attempt_monitor paper.user.id course.id quiz.id %} | +