customize_Certificate_using_pdf_V1

Customizing Certificate Using PDF

While you can create a custom certificate using the scripting example mentioned here, it may be difficult for many users who are not developers. This article describes another way to add custom certificate in your site.

Video

 

 

Step1: Create a certificate design including background, static text, any logo etc in Powerpoint (you can use MS word also)

Step2: Open Adove Acrobat Professional, and select Create PDF, then select the PPT you have created in the previous step. Note that you can use any other editor to insert Form Fields in the PDF. There are many online tools available which let you upload a file and insert fields in it.

 

Step3: Click on Create Form in the Designer tool, and follow couple of dialogs to load the form editor

 

Step4: Add text fields using the Form editor, at appropriate positions in the template. Name these fields using the supported field names (mentioned at the end of this page). Some common fields used in this example are courseSession.name, student.fullName, grade.points, grade.awardDate

 

Step5: Save the PDF template

Step6: Open the microsite, and go to CMS. Click on create new certificate template

Step7: Enter name for the template, and end it with .pdf, for example myTemplate.pdf. This will be just a wrapper for the PDF we just created before. Add some comment in the content (content is mandatory) using double forward slashes // and Save Draft

Step8: Drag and drop the PDF right next to the textarea for content entry (as you drag the file, the color of droppable region will change to indicate whether it is the right place to drop the file or not. Once you drop, the file upload will begin right away. Use Firefox or Chrome for this step as Internet Explorer doesn't yet support file drag drop.

 

 

Step9: Publish the template, and Open the template again from CMS browser to make sure you can see uploaded PDF as an attachment

Step10: Edit any course and link this template

 

 Predefined Field Names for course session certificate

Student's attributes

Field Name Description
student.firstName First name, e.g. John
student.lastName Last name, e.g. Doe
student.userName login id, e.g. jdoe
student.fullName First Name Last Name joined, e.g. John Doe

 

Course Attributes

Field Name Description
course.name name of the course
course.code code of the course
course.author Presentor/Author of the course
course.description course description
courseSession.name name of course session
courseSession.code code of course session
courseSession.description description of course session
courseSession.startDate start date of course session
courseSession.endDate end date of course session
instructor.fullName course Presentor/Author name

Grade attributes

Field Name Description
grade.points points obtained, for percent grading schemes, this will be percent value, for point schemes this will be absolute points
grade.grade grade label, for grading scheme with Label display type (e.g. A, A+ B ...)
grade.credits If the course session is used in program then this will contain credit for the course in the program which student earned when they completed the course
grade.awardDate Date when course session was completed successfully by the student

 

 Predefined Field Names for program certificate

 

Student's attributes

Same as previous section for course session specific field names

Program attributes

Field Name Description
program.name Name of the program
program.code Code of the program
program.description Description of the program
program.totalCredits Total credits available in the program

 

Program Member's attributes

Field Name Description
member.startDate Student's joining date in the program
member.completionDate Student's completion date
member.credits Credits earned by the students

 

Custom Variables

For advanced calculation of field variables (override the default) or to create custom variables, you can use Velocity Scripting inside the certificate template code. This can be used for example to change formatting of fields like Dates, or convert default value like converting student's name to uppercase, or add a new field name which can be used in the PDF 

Examples:

//Convert course session name to uppercase

$OUT.put("courseSession.name", $courseSession.getName().toUpperCase());

//Convert award date format to print only month and year
$OUT.put("grade.awardDate", $DateFormatter.getFormattedDate($grade.getAwardDate(), "MMM yyyy"));

//Convert award date format to print mm/dd/yyyy format

$OUT.put("grade.awardDate", $DateFormatter.getFormattedDate($grade.getAwardDate(), "MM/dd/yyyy"));

//Print first and last name (if at site level, you have configured lastName, firstName ordering and want to reverse it in certificate)

$OUT.put("student.fullName", $OUT.get('student.firstName').concat(" ").concat($OUT.get('student.lastName')))
 

//Convert points to always display 2 decimal digits (e.g. 73.00 instead of 73)
$OUT.put("grade.points", $Utility.format($grade.getPoints(),2,2).concat("%"));

//Add a new variable, to print name of the group where course session belongs

$OUT.put("myInstitute", $courseSession.getGroup().getName());


Rating: