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
7a31e4c9
Commit
7a31e4c9
authored
Sep 15, 2020
by
Laury Bueno
Browse files
[Certification] Add a compatibility property to CourseCertification
parent
c8854013
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
courses/certification/models.py
courses/certification/models.py
+5
-0
No files found.
courses/certification/models.py
View file @
7a31e4c9
...
...
@@ -70,6 +70,11 @@ class CourseCertification(models.Model):
def
get_absolute_url
(
self
):
return
reverse_lazy
(
'courses_legacy:certificate'
,
args
=
[
self
.
link_hash
])
# FIXME: this is a compatibility patch and must be removed in the future
@
property
def
document_type
(
self
):
return
self
.
type
def
save
(
self
,
*
args
,
**
kwargs
):
self
.
course_workload
=
self
.
course_student
.
course
.
workload
self
.
course_total_units
=
self
.
course_student
.
units_done
.
count
()
...
...
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