summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authorankitjavalkar2017-07-27 16:04:57 +0530
committerankitjavalkar2017-08-28 16:15:30 +0530
commitc57a1f81ca6fef8368bf2e4ebb74d3422c6a1024 (patch)
treefa255440904d510d1be555d1136b92f6d2a1a25d /yaksh/views.py
parent9e0f737c25a5156aa884d27357af0aef1145c4b7 (diff)
downloadonline_test-c57a1f81ca6fef8368bf2e4ebb74d3422c6a1024.tar.gz
online_test-c57a1f81ca6fef8368bf2e4ebb74d3422c6a1024.tar.bz2
online_test-c57a1f81ca6fef8368bf2e4ebb74d3422c6a1024.zip
Fix bug: Prevent students from attempting pre-enrolled deactivated courses
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 3c7df4d..9f53548 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -375,7 +375,7 @@ def start(request, questionpaper_id=None, attempt_num=None):
if not quest_paper.quiz.course.is_enrolled(user):
raise Http404('You are not allowed to view this page!')
# prerequisite check and passing criteria
- if quest_paper.quiz.is_expired():
+ if quest_paper.quiz.is_expired() and not quest_paper.quiz.course.active:
if is_moderator(user):
return redirect("/exam/manage")
return redirect("/exam/quizzes")