diff options
author | adityacp | 2020-08-28 11:26:51 +0530 |
---|---|---|
committer | adityacp | 2020-08-28 11:26:51 +0530 |
commit | e3c3a0d9f7819f851890ea2611ba12b4f6255f06 (patch) | |
tree | a5a6bfd8bbdbdb358c8a8912261ab4e7407606c0 /yaksh/views.py | |
parent | 620df8d25a82ceb99eb7cd17535c20998e212191 (diff) | |
download | online_test-e3c3a0d9f7819f851890ea2611ba12b4f6255f06.tar.gz online_test-e3c3a0d9f7819f851890ea2611ba12b4f6255f06.tar.bz2 online_test-e3c3a0d9f7819f851890ea2611ba12b4f6255f06.zip |
fix design question paper views and tests
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index afa673f..2fe93ea 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -1491,6 +1491,12 @@ def design_questionpaper(request, course_id, quiz_id, questionpaper_id=None): random_set.questions.add(*random_ques) question_paper.random_questions.add(random_set) 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") @@ -1499,6 +1505,12 @@ def design_questionpaper(request, course_id, quiz_id, questionpaper_id=None): if random_set_ids: question_paper.random_questions.remove(*random_set_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 question set") |