diff options
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index c4e5a50..1d6bb89 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -758,6 +758,7 @@ class Course(models.Model): teachers = models.ManyToManyField(User, related_name='teachers') is_trial = models.BooleanField(default=False) instructions = models.TextField(default=None, null=True, blank=True) + view_grade = models.BooleanField(default=False) learning_module = models.ManyToManyField(LearningModule, related_name='learning_module') @@ -1408,6 +1409,9 @@ class FileUpload(models.Model): self.hide = True self.save() + def get_filename(self): + return os.path.basename(self.file.name) + ############################################################################### class Answer(models.Model): |