diff options
author | Palaparthy Adityachandra | 2020-08-28 10:50:19 +0530 |
---|---|---|
committer | GitHub | 2020-08-28 10:50:19 +0530 |
commit | 574e92a8586d4fc900be2c0d8f5114c93e826358 (patch) | |
tree | ce4d8da123166ff3f4d6c1b889921ddfcf9a8d29 /yaksh/views.py | |
parent | 28ae003e080dcc81f1547cc7bb581293edef9da8 (diff) | |
parent | e1e334964aaaed89e7e6d85094048518cb7ad88c (diff) | |
download | online_test-574e92a8586d4fc900be2c0d8f5114c93e826358.tar.gz online_test-574e92a8586d4fc900be2c0d8f5114c93e826358.tar.bz2 online_test-574e92a8586d4fc900be2c0d8f5114c93e826358.zip |
Merge pull request #736 from CruiseDevice/question_paper_creation
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 c0db7a4..53981b5 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -1446,6 +1446,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") @@ -1464,6 +1471,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") |