diff options
author | maheshgudi | 2016-09-08 08:05:06 +0530 |
---|---|---|
committer | maheshgudi | 2016-09-08 08:05:06 +0530 |
commit | e423320c4682718cd39d2cfec4e5da59a86c68c0 (patch) | |
tree | d3bf4168f8acbc8c36c4bf255c75a5dfad9515ec | |
parent | ccea043bde737883063adfaf28eb16c95218d58b (diff) | |
download | online_test-e423320c4682718cd39d2cfec4e5da59a86c68c0.tar.gz online_test-e423320c4682718cd39d2cfec4e5da59a86c68c0.tar.bz2 online_test-e423320c4682718cd39d2cfec4e5da59a86c68c0.zip |
changed input name in html from delete_quiz to delete_paper
-rw-r--r-- | yaksh/templates/manage.html | 2 | ||||
-rw-r--r-- | yaksh/views.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index 9934f41..b628a44 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -85,7 +85,7 @@ {% csrf_token %} {% for paper in trial_paper %} <tr> - <td> <input type = "checkbox" name="delete_quiz" value = {{paper.id}}></input></td> + <td> <input type = "checkbox" name="delete_paper" value = {{paper.id}}></input></td> <td> <a href="{{URL_ROOT}}/exam/manage/gradeuser/{{paper.question_paper.quiz.id}}">{{paper.question_paper.quiz.description}}</td> </tr> {% endfor %} diff --git a/yaksh/views.py b/yaksh/views.py index 7c4e9af..08320be 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -317,15 +317,15 @@ rights/permissions and log in.""" question_paper__quiz__is_trial=True ) if request.method == "POST": - delete_quiz = request.POST.getlist('delete_quiz') - for answerpaper_id in delete_quiz: + delete_quiz = request.POST.getlist('delete_paper') + for answerpaper_id in delete_paper: answerpaper = AnswerPaper.objects.get(id=answerpaper_id) if answerpaper.question_paper.quiz.course.is_trial == True: answerpaper.question_paper.quiz.course.delete() else: qpaper = answerpaper.question_paper if qpaper.answerpaper_set.count() == 1: - answerpaper.question_paper.quiz.delete() + qpaper.quiz.delete() else: answerpaper.delete() users_per_paper = [] |