Commit 5d564267 by John Jarvis

Add new field to disable certificate download

parent 163400e2
......@@ -90,6 +90,7 @@ class UserProfile(models.Model):
)
mailing_address = models.TextField(blank=True, null=True)
goals = models.TextField(blank=True, null=True)
allow_certificate = models.BooleanField(default=1)
def get_meta(self):
js_str = self.meta
......@@ -402,11 +403,11 @@ class TestCenterRegistration(models.Model):
def exam_authorization_count(self):
# TODO: figure out if this should really go in the database (with a default value).
return 1
@property
def needs_uploading(self):
return self.uploaded_at is None or self.uploaded_at < self.user_updated_at
@classmethod
def create(cls, testcenter_user, exam, accommodation_request):
registration = cls(testcenter_user = testcenter_user)
......@@ -532,7 +533,7 @@ def get_testcenter_registration(user, course_id, exam_series_code):
# nosetests thinks that anything with _test_ in the name is a test.
# Correct this (https://nose.readthedocs.org/en/latest/finding_tests.html)
get_testcenter_registration.__test__ = False
def unique_id_for_user(user):
"""
Return a unique id for a user, suitable for inserting into
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment