Commit 18f6ad5e authored by Laury Bueno's avatar Laury Bueno
Browse files

[Certification] Add course_load to the certificate interpolation

parent 2581dc61
...@@ -192,6 +192,7 @@ class CourseCertificationDetailView(DetailView): ...@@ -192,6 +192,7 @@ class CourseCertificationDetailView(DetailView):
# {MODULO} : certificate.course.name) # {MODULO} : certificate.course.name)
# {CONTRATO} : context['cert_template'].workspace.name) # {CONTRATO} : context['cert_template'].workspace.name)
# {NUM_UNIDADES} : str(certificate.course_total_units)) # {NUM_UNIDADES} : str(certificate.course_total_units))
# {HORAS} : str(certificate.course.course_load)
# {TURMA} : certificate.course_student.get_current_class().name) # {TURMA} : certificate.course_student.get_current_class().name)
if '{MODULO}' in context['cert_template'].text: if '{MODULO}' in context['cert_template'].text:
...@@ -210,6 +211,7 @@ class CourseCertificationDetailView(DetailView): ...@@ -210,6 +211,7 @@ class CourseCertificationDetailView(DetailView):
.replace('{NOME}', certificate.student.get_full_name())\ .replace('{NOME}', certificate.student.get_full_name())\
.replace('{CONTRATO}', context['cert_template'].workspace.name)\ .replace('{CONTRATO}', context['cert_template'].workspace.name)\
.replace('{NUM_UNIDADES}', str(certificate.course_total_units))\ .replace('{NUM_UNIDADES}', str(certificate.course_total_units))\
.replace('{HORAS}', str(certificate.course.course_load))\
.replace('{TURMA}', certificate.course_student.get_current_class().name)\ .replace('{TURMA}', certificate.course_student.get_current_class().name)\
url_name = resolve(self.request.path_info).url_name url_name = resolve(self.request.path_info).url_name
......
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