summaryrefslogtreecommitdiff
path: root/testapp/exam/models.py
diff options
context:
space:
mode:
authorprathamesh2015-01-20 17:05:41 +0530
committerprathamesh2015-01-20 17:05:41 +0530
commitf2e09edeb2e5b884f0e75ad3747b51e7603d70e1 (patch)
treefac9c70feeff6e1c470097623fd54a6244f786c0 /testapp/exam/models.py
parentcbdeb90a756832c71c80bac4dbe9ba1a3aceacb2 (diff)
downloadonline_test-f2e09edeb2e5b884f0e75ad3747b51e7603d70e1.tar.gz
online_test-f2e09edeb2e5b884f0e75ad3747b51e7603d70e1.tar.bz2
online_test-f2e09edeb2e5b884f0e75ad3747b51e7603d70e1.zip
Assignment upload interface implementation
Diffstat (limited to 'testapp/exam/models.py')
-rw-r--r--testapp/exam/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/testapp/exam/models.py b/testapp/exam/models.py
index 1cafa89..88ba9ef 100644
--- a/testapp/exam/models.py
+++ b/testapp/exam/models.py
@@ -30,6 +30,7 @@ question_types = (
("mcq", "Multiple Choice"),
("mcc", "Multiple Correct Choices"),
("code", "Code"),
+ ("basgn", "Bash Assignment"),
)
attempts = [(i, i) for i in range(1, 6)]
attempts.append((-1, 'Infinite'))
@@ -42,7 +43,7 @@ test_status = (
)
def get_assignment_dir(instance, filename):
- return '%s/%s/' % (instance.user.roll_number, instance.assignment.description)
+ return '%s/%s' % (instance.user.roll_number, instance.assignmentQuestion.id)
###############################################################################
class Question(models.Model):