Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions events/certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ def get_participation_certificate_title(academic_code,normal_title_y,wgf_title_y
Returns participation certificate title and title position.
"""
if academic_code in WGF_INSTITUTIONS:
certificate_title = "Certificate of Participation"
certificate_title = "Participation Certificate"
title_y = wgf_title_y
else:
certificate_title = "Participation Certificate"
certificate_title = "Certificate of Participation"

title_y = normal_title_y

return certificate_title, title_y
Expand Down Expand Up @@ -160,7 +161,9 @@ def get_test_cert_text(test, mdluser, credits=''):
academic = test.academic
academic_code = academic.academic_code
institution = test.academic.institution_name
organization = get_organization(test.training.training_start_date)
# organization = get_organization(test.training.training_start_date)
org_course_material = "EduPyramids, SINE, IIT Bombay"
org_training = "This training is offered through SWAYAM Plus by EduPyramids, SINE, IIT Bombay"
organizer = f"{test.organiser.user.first_name} {test.organiser.user.last_name}"
invigilator = f"{test.invigilator.user.first_name} {test.invigilator.user.last_name}"
text_end = f"{org_training}"
Expand All @@ -184,9 +187,9 @@ def get_test_cert_text(test, mdluser, credits=''):

#paragraphe
if test.training.department.id == FDP:
text = f"This is to certify that <b>{name}</b> has successfully completed <b>{foss}</b> test on <b>{test_date}</b> organized at <b>{institution}</b> by <b>{organizer}</b> with course material provided by {organization}. Passing an online exam, conducted remotely from IIT Bombay, is a pre-requisite for completing this Faculty Development Programme.<br/><br/><b>{invigilator}</b> at <b>{institution}</b> invigilated this examination. {text_end}.</p><br /><br />{credits}"
elif test.academic.institution_type_id == CSC: # CHECK #TODO
text = f"This is to certify that <b>{name}</b> has successfully completed <b>{foss}</b> test organized at {institution} by <u>{organizer}</u> with course material provided by {organization}. Passing an online exam, conducted remotely from IIT Bombay, is a pre-requisite for completing this training. <u>{invigilator}</u> at {institution} invigilated this examination.<br/>This training is offered by the Spoken Tutorial Project, IIT Bombay, funded by National Mission on Education through ICT, Ministry of Education, Govt., of India."
text = f"This is to certify that <b>{name}</b> has successfully completed <b>{foss}</b> test on <b>{test_date}</b> organized at <b>{institution}</b> by <b>{organizer}</b> with course material provided by {org_course_material}. Passing an online exam, conducted remotely from IIT Bombay, is a pre-requisite for completing this Faculty Development Programme.<br/><br/><b>{invigilator}</b> at <b>{institution}</b> invigilated this examination. {text_end}.</p><br /><br />{credits}"
elif test.academic.institution_type_id == CSC: # CHECK
text = f"This is to certify that <b>{name}</b> has successfully completed <b>{foss}</b> test organized at {institution} by <u>{organizer}</u> with course material provided by {org_course_material}. Passing an online exam, conducted remotely from IIT Bombay, is a pre-requisite for completing this training. <u>{invigilator}</u> at {institution} invigilated this examination.<br/>This training is offered by the Spoken Tutorial Project, IIT Bombay, funded by National Mission on Education through ICT, Ministry of Education, Govt., of India."
else:
text = f"This is to certify that <b>{name}</b> has successfully completed <b>{foss}</b> test organized at <b>{institution}</b> by <b>{organizer}</b> with course material provided by {organization}. Passing an online exam, conducted remotely from IIT Bombay, is a pre-requisite for completing this training. <br /><p><b>{invigilator}</b> from <b>{institution}</b> invigilated this examination. {text_end}.</p><br /><br />{credits}"
text = f"This is to certify that <b>{name}</b> has successfully completed <b>{foss}</b> test organized at <b>{institution}</b> by <b>{organizer}</b> with course material provided by {org_course_material}. Passing an online exam, conducted remotely from IIT Bombay, is a pre-requisite for completing this training. <br /><p><b>{invigilator}</b> from <b>{institution}</b> invigilated this examination. {text_end}.</p><br /><br />{credits}"
return text