diff options
author | Prabhu Ramachandran | 2017-09-01 17:18:55 +0530 |
---|---|---|
committer | GitHub | 2017-09-01 17:18:55 +0530 |
commit | 97a96d1678cb55b95ed14eb9a2b2790415d30abc (patch) | |
tree | d1ab74acc5cfdb40d3788aaeb79ff2b61a5e66bf /yaksh/templates | |
parent | acb0cf85839eb090041a2606dddc3b1e29e25d16 (diff) | |
parent | 8c5b57100f46a1c76fd4ca6b10457bb1cd849e7b (diff) | |
download | online_test-97a96d1678cb55b95ed14eb9a2b2790415d30abc.tar.gz online_test-97a96d1678cb55b95ed14eb9a2b2790415d30abc.tar.bz2 online_test-97a96d1678cb55b95ed14eb9a2b2790415d30abc.zip |
Merge pull request #309 from ankitjavalkar/fix-closed-course
Fix bug to prevent students from attempting pre-enrolled deactivated course
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/quizzes_user.html | 11 |
1 files changed, 6 insertions, 5 deletions
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 <div class="col-md-4"> <h4><b><u> {{ course.name }} by {{ course.creator.get_full_name }}</u></b></h4> </div> - <div class="col-md-4"> - {% if course.hidden %}<span class="label label-info">Open Course</span> + <div class="col-md-4"> + {% if not course.active %} + <span class="label label-danger">Closed</span> {% endif %} {% if user in course.requests.all %} <span class="label label-warning">Request Pending </span> {% elif user in course.rejected.all %}<span class="label label-danger">Request Rejected</span> @@ -45,8 +46,8 @@ No Courses to display <span class="label label-danger">Enrollment Closed</span> {% endif %} {% endif %} - </div> - </div> + </div> + </div> <div class="row"> {% 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 %} <tr> - {% if not quiz.is_expired %} + {% if not quiz.is_expired and course.active %} <td> <a href="{{ URL_ROOT }}/exam/start/{{quiz.questionpaper_set.get.id}}">{{ quiz.description }}</a><br> </td> |