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
18f6ad5e
Commit
18f6ad5e
authored
Sep 22, 2020
by
Laury Bueno
Browse files
[Certification] Add course_load to the certificate interpolation
parent
2581dc61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
courses/certification/views.py
courses/certification/views.py
+2
-0
No files found.
courses/certification/views.py
View file @
18f6ad5e
...
...
@@ -192,6 +192,7 @@ class CourseCertificationDetailView(DetailView):
# {MODULO} : certificate.course.name)
# {CONTRATO} : context['cert_template'].workspace.name)
# {NUM_UNIDADES} : str(certificate.course_total_units))
# {HORAS} : str(certificate.course.course_load)
# {TURMA} : certificate.course_student.get_current_class().name)
if
'{MODULO}'
in
context
[
'cert_template'
].
text
:
...
...
@@ -210,6 +211,7 @@ class CourseCertificationDetailView(DetailView):
.
replace
(
'{NOME}'
,
certificate
.
student
.
get_full_name
())
\
.
replace
(
'{CONTRATO}'
,
context
[
'cert_template'
].
workspace
.
name
)
\
.
replace
(
'{NUM_UNIDADES}'
,
str
(
certificate
.
course_total_units
))
\
.
replace
(
'{HORAS}'
,
str
(
certificate
.
course
.
course_load
))
\
.
replace
(
'{TURMA}'
,
certificate
.
course_student
.
get_current_class
().
name
)
\
url_name
=
resolve
(
self
.
request
.
path_info
).
url_name
...
...
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