diff options
author | adityacp | 2017-04-10 16:15:59 +0530 |
---|---|---|
committer | adityacp | 2017-04-10 17:14:40 +0530 |
commit | 5623c1225f66831d5e5db2089218b7904c3124b6 (patch) | |
tree | de595d7b16794670075bac3564e5f3e3c89830bb /yaksh/models.py | |
parent | 32911e9a094e7f91ca132f98927d110049c99401 (diff) | |
download | online_test-5623c1225f66831d5e5db2089218b7904c3124b6.tar.gz online_test-5623c1225f66831d5e5db2089218b7904c3124b6.tar.bz2 online_test-5623c1225f66831d5e5db2089218b7904c3124b6.zip |
Change download assignemnts to get files using quiz
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 2d3aadb..5ec3062 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1313,17 +1313,17 @@ class AssignmentUpload(models.Model): assignmentFile = models.FileField(upload_to=get_assignment_dir) question_paper = models.ForeignKey(QuestionPaper, blank=True, null=True) - def get_assignments(self, qp_id, que_id=None, user_id=None): + def get_assignments(self, qp, que_id=None, user_id=None): if que_id and user_id: assignment_files = AssignmentUpload.objects.filter( assignmentQuestion_id=que_id, user_id=user_id, - question_paper_id=qp_id + question_paper=qp ) user_name = User.objects.get(id=user_id) - file_name = user_name.get_full_name().replace(" ", "_") + file_name = user_name.get_full_name() else: assignment_files = AssignmentUpload.objects.filter( - question_paper_id=qp_id + question_paper=qp ) file_name = "%s_Assignment_files" %( |