diff options
author | CruiseDevice | 2020-08-08 00:56:26 +0530 |
---|---|---|
committer | CruiseDevice | 2020-08-08 00:56:26 +0530 |
commit | e1e334964aaaed89e7e6d85094048518cb7ad88c (patch) | |
tree | f85b2332f5cbd4751cf9e7b0bc4c3495dde8ad1f /yaksh/views.py | |
parent | 3999e744fe1a3a4c4fcb7d2763b36def9d7bb213 (diff) | |
download | online_test-e1e334964aaaed89e7e6d85094048518cb7ad88c.tar.gz online_test-e1e334964aaaed89e7e6d85094048518cb7ad88c.tar.bz2 online_test-e1e334964aaaed89e7e6d85094048518cb7ad88c.zip |
Add select all checkbox in design qp for fixed questions.
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 3adb536..a1d4e05 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -1444,6 +1444,13 @@ def design_questionpaper(request, course_id, quiz_id, questionpaper_id=None): question_paper.save() question_paper.fixed_questions.add(*questions) messages.success(request, "Questions added successfully") + return redirect( + 'yaksh:designquestionpaper', + course_id=course_id, + quiz_id=quiz_id, + questionpaper_id=questionpaper_id + ) + else: messages.warning(request, "Please select atleast one question") @@ -1462,6 +1469,12 @@ def design_questionpaper(request, course_id, quiz_id, questionpaper_id=None): question_paper.save() question_paper.fixed_questions.remove(*question_ids) messages.success(request, "Questions removed successfully") + return redirect( + 'yaksh:designquestionpaper', + course_id=course_id, + quiz_id=quiz_id, + questionpaper_id=questionpaper_id + ) else: messages.warning(request, "Please select atleast one question") |