summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index e161543..072c1b5 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -648,6 +648,9 @@ class LearningUnit(models.Model):
order=self.order, type="lesson", lesson=new_lesson)
return new_unit
+ def __str__(self):
+ return self.lesson.name if self.lesson else self.quiz.description
+
###############################################################################
class LearningModule(models.Model):