summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authormaheshgudi2017-01-03 15:10:05 +0530
committermaheshgudi2017-01-03 15:10:05 +0530
commitd3d114f01adff6176460ba073d7dd44f5217ee00 (patch)
tree38dff0a3d40330f18f3f45a9e72c607e7836a518 /yaksh/models.py
parent011ca73b4c1042ceb208974e57c11474ecea65f2 (diff)
downloadonline_test-d3d114f01adff6176460ba073d7dd44f5217ee00.tar.gz
online_test-d3d114f01adff6176460ba073d7dd44f5217ee00.tar.bz2
online_test-d3d114f01adff6176460ba073d7dd44f5217ee00.zip
modified editing instructions. Instructions are now initialized in forms and not fetched from a file
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 2bf4a85..04bdd24 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -81,10 +81,6 @@ def has_profile(user):
def get_upload_dir(instance, filename):
return "question_%s/%s" % (instance.question.id, filename)
-def get_quiz_instructions_info():
- file_path = os.path.join(os.getcwd(), "Quiz_instructions.txt")
- with open(file_path, 'r') as file:
- return file.read()
###############################################################################
class CourseManager(models.Manager):
@@ -550,7 +546,7 @@ class Quiz(models.Model):
is_trial = models.BooleanField(default=False)
instructions = models.TextField('Instructions for Students',
- default=get_quiz_instructions_info)
+ default=None, blank=True, null=True)
view_answerpaper = models.BooleanField('Allow student to view their answer\
paper', default=False)