summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authoradityacp2016-04-28 12:22:30 +0530
committeradityacp2016-04-28 12:22:30 +0530
commit3438ca95172897b594c216967d51cf5771d75f73 (patch)
tree29567883d637b65deabcfb3a858730d8d1c97f99 /yaksh/models.py
parent6b09383890b8367628124a854810326d7bbac7c4 (diff)
downloadonline_test-3438ca95172897b594c216967d51cf5771d75f73.tar.gz
online_test-3438ca95172897b594c216967d51cf5771d75f73.tar.bz2
online_test-3438ca95172897b594c216967d51cf5771d75f73.zip
further commented changes
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 bb85085..cb9582f 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -112,6 +112,9 @@ class Course(models.Model):
def is_creator(self, user):
return self.creator == user
+ def is_teacher(self, user):
+ return True if user in self.teachers.all() else False
+
def is_self_enroll(self):
return True if self.enrollment == enrollment_methods[1][0] else False