Commit a8bc5442 authored by Bruno Martin's avatar Bruno Martin
Browse files

remove course certification creation, moved to course_certification signal

parent e62501c9
......@@ -318,20 +318,6 @@ class CourseStudent(models.Model):
def save(self, *args, **kwargs):
super(CourseStudent, self).save(*args, **kwargs)
# TODO Move this to Course Certification app, couse this app must not depend on Course Certification.
# try:
# receipt = CourseCertification.objects.get(course_student=self)
# except CourseCertification.DoesNotExist:
# from base64 import urlsafe_b64encode as ub64
# from hashlib import sha1
# from time import time
# h = ub64(sha1(str(time()) + self.user.last_name.encode('utf-8')).digest()[0:6])
# receipt = CourseCertification(course_student=self,
# course=self.course,
# type=CourseCertification.TYPES[0][0],
# is_valid=True, link_hash=h)
# receipt.save()
@property
def units_done(self):
return StudentProgress.objects.exclude(complete=None) \
......
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