Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses
Commits
a8bc5442
Commit
a8bc5442
authored
Oct 25, 2019
by
Bruno Martin
Browse files
remove course certification creation, moved to course_certification signal
parent
e62501c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
+0
-14
courses/models.py
courses/models.py
+0
-14
No files found.
courses/models.py
View file @
a8bc5442
...
...
@@ -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
)
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment