X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/d2e2fc529f15b60a8fa6a1da0e45b70003011fb5..334d0b5148de69b0509e001631154aa3ec788d36:/wtem/models.py diff --git a/wtem/models.py b/wtem/models.py index 390687f..ccbf67f 100644 --- a/wtem/models.py +++ b/wtem/models.py @@ -79,6 +79,7 @@ class Submission(models.Model): email = models.EmailField(max_length=100, unique=True) answers = models.CharField(max_length=65536, null=True, blank=True) key_sent = models.BooleanField(default=False) + opened_link = models.BooleanField(default=False) marks = JSONField(default={}) examiners = models.ManyToManyField(User, null=True, blank=True) end_time = models.CharField(max_length=5, null=True, blank=True) @@ -278,6 +279,9 @@ class Confirmation(models.Model): def readable_contact(self): return '%s <%s>' % (self.contact.body.get('przewodniczacy'), self.contact.contact) + def school_phone(self): + return '%s, tel. %s' % (self.contact.body.get('school'), self.contact.body.get('school_phone')) + def age(self): return timezone.now() - self.contact.created_at