diff options
author | adityacp | 2018-07-20 11:57:54 +0530 |
---|---|---|
committer | adityacp | 2018-07-20 11:57:54 +0530 |
commit | 477ff979058b6f64dd6af05122914a900e9e6810 (patch) | |
tree | 2c7df945395bb463b920dd3d2466099ae0860927 /yaksh | |
parent | 1e0a72f95af77614dc226af8d4010499723faab1 (diff) | |
download | online_test-477ff979058b6f64dd6af05122914a900e9e6810.tar.gz online_test-477ff979058b6f64dd6af05122914a900e9e6810.tar.bz2 online_test-477ff979058b6f64dd6af05122914a900e9e6810.zip |
Make course_id compulsory argument in download_assignment_file view function and format error message
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 521096e..444b324 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -2098,14 +2098,14 @@ def update_email(request): @login_required @email_verified -def download_assignment_file(request, quiz_id, course_id=None, +def download_assignment_file(request, quiz_id, course_id, question_id=None, user_id=None): user = request.user course = Course.objects.get(id=course_id) if (not course.is_creator(user) and not course.is_teacher(user) and not course.is_student(user)): - raise Http404("You are not allowed to download {}".format( - course.name.replace(" ", "_")) + raise Http404("You are not allowed to download files for {0}".format( + course.name) ) qp = QuestionPaper.objects.get(quiz_id=quiz_id) assignment_files, file_name = AssignmentUpload.objects.get_assignments( |