summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradityacp2017-05-19 16:01:40 +0530
committeradityacp2017-05-19 16:01:40 +0530
commit23a264ad695a80dd273a20c34b5e52060461eb93 (patch)
tree1a785dc377bf83734e334a6502f9c36ee4752889
parent7baaa70c0e7f660ad7482c3c3950eab171b27cd3 (diff)
downloadonline_test-23a264ad695a80dd273a20c34b5e52060461eb93.tar.gz
online_test-23a264ad695a80dd273a20c34b5e52060461eb93.tar.bz2
online_test-23a264ad695a80dd273a20c34b5e52060461eb93.zip
Modify folder name for assignment uploads
-rw-r--r--yaksh/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 565bb23..610e341 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -78,9 +78,10 @@ test_status = (
def get_assignment_dir(instance, filename):
+ upload_dir = instance.question_paper.quiz.description.replace(" ", "_")
return os.sep.join((
- instance.question_paper.quiz.description, instance.user.username,
- str(instance.assignmentQuestion.id), filename
+ upload_dir, instance.user.username, str(instance.assignmentQuestion.id),
+ filename
))