From c57a1f81ca6fef8368bf2e4ebb74d3422c6a1024 Mon Sep 17 00:00:00 2001
From: ankitjavalkar
Date: Thu, 27 Jul 2017 16:04:57 +0530
Subject: Fix bug: Prevent students from attempting pre-enrolled deactivated
courses
---
yaksh/templates/yaksh/quizzes_user.html | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
(limited to 'yaksh/templates')
diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html
index 90d7f8e..b90db18 100644
--- a/yaksh/templates/yaksh/quizzes_user.html
+++ b/yaksh/templates/yaksh/quizzes_user.html
@@ -28,8 +28,9 @@ No Courses to display
{{ course.name }} by {{ course.creator.get_full_name }}
-
- {% if course.hidden %}
Open Course
+
+ {% if not course.active %}
+ Closed
{% endif %}
{% if user in course.requests.all %} Request Pending
{% elif user in course.rejected.all %}Request Rejected
@@ -45,8 +46,8 @@ No Courses to display
Enrollment Closed
{% endif %}
{% endif %}
-
-
+
+
{% if user in course.students.all %}
@@ -57,7 +58,7 @@ No Courses to display
{% for quiz in course.get_quizzes %}
{% if quiz.active and quiz.course_id == course.id %}
- {% if not quiz.is_expired %}
+ {% if not quiz.is_expired and course.active %}
{{ quiz.description }}
|
--
cgit