Difference between revisions of "Certificate module"

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.3. Up-to-date documentation for the latest stable version is available here: Certificate module.

(See also: update for 2.0)
({{Certificate}})
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Update}}
+
{{Update}}{{Certificate}}
 
The '''Certificate module''' creates PDF certificates/diplomas for students of the course and is completely customizable. You can add borders, watermarks, seals and even show grade information.  
 
The '''Certificate module''' creates PDF certificates/diplomas for students of the course and is completely customizable. You can add borders, watermarks, seals and even show grade information.  
 +
 +
Certificate 2.x should be tested on your site or a place that will be similar to your production site.  The PukunuiAustralia version is the best one to download for 2.x production servers.  See bugs comments below.
  
 
==Certificate examples==
 
==Certificate examples==
 +
Here are 3 examples.  A certificate that uses the standard features found in the install package.  Then 2 others with slightly more customization.
 
<gallery caption="Certificate examples - click on any to enlarge" widths="200px" heights="100px" perrow="6">
 
<gallery caption="Certificate examples - click on any to enlarge" widths="200px" heights="100px" perrow="6">
Image:Certificate 1.gif|Fancy border, signature line, seal, code
+
Image:Certificate 1.gif|Standard features showing: Fancy border, signature line, seal, code
Image:Certificate199 example lines.png|Lines, signature, seal, watermark, code, grade, outcomes, custom text
+
Image:Certificate199 example lines.png|Standard lines, signature, seal, watermark, code, grade, outcomes, with custom text
Image:Certificate199 example creative.png|New border, new signature, new seal, new watermark, code, outcome
+
Image:Certificate199 example creative.png|Custom border, custom signature, custom seal, custom watermark, code, outcome
 
</gallery>
 
</gallery>
 
  
 
==Installing==
 
==Installing==
 
#Download and Unpack the Certificate zip file in a temporary area,
 
#Download and Unpack the Certificate zip file in a temporary area,
 
#Copy the "certificate" folder to your moodle mod folder located for example at yourhost\moodle\mod . This will include folders backup, db, lang, pix (including subfolders for  borders, seals, signatures and watermarks),  and type (with sub folders for each of 4 default types).
 
#Copy the "certificate" folder to your moodle mod folder located for example at yourhost\moodle\mod . This will include folders backup, db, lang, pix (including subfolders for  borders, seals, signatures and watermarks),  and type (with sub folders for each of 4 default types).
#Note:  It is not necessary to move the lang file into the Moodle lang folder, the certificate lang folder can stay in the mod/certificate folder.
 
 
#Go to your Moodle, and click on the Notifications link in the Site administration. Moodle knows something has been added and it will proceed to install the certificate module.
 
#Go to your Moodle, and click on the Notifications link in the Site administration. Moodle knows something has been added and it will proceed to install the certificate module.
 
+
:Note:  It is not necessary to move the lang file into the Moodle lang folder, the certificate lang folder can stay in the mod/certificate folder.
 +
:Note:  If the download zip/tar file does not create a certificate folder, rename the top folder certificate. There needs to be a folder in /mod called certificate.
 
See also: [[Installing_contributed_modules_or_plugins]] in MoodleDocs.
 
See also: [[Installing_contributed_modules_or_plugins]] in MoodleDocs.
  
 
==Settings==
 
==Settings==
These instructions are for a certificate that works with Moodle 1.9.x .  Earlier versions of Certificate will have similar instructionsThis is a short version which is repeated in [[mod/certificate/mod]] that is availabe as a help button at the bottom of the certificate settings page.
+
This is a short list of settings listed by their groupPlease see [[Add/edit_certificate_module]] for more detailed information.
  
===General===
+
*General - Certificate name and introductionThe certificate will use the course name, this is the link name.
Put in your certificate name.  This will appear on the certificateAdd an introduction for students which will appear above the "Get your certificate" button.
+
*Issue options -Here you can set email options, determine if you want to save and or reissue certificates.
 +
*Print text options - determine date, security code, grade outcomes, credit hours, teachers names, custom text.
 +
*Design (and image) options - select Type, then determine orientation, and select images for border, lines, watermark, signature, seal or say no to any or all of them.
 +
*Common module settings -These are standard Moodle module settings.  See [[Common module settings]]
 +
*Locking options - if conditional dependencies has been turned on by the site administrator,  teacher can set standards that must be met before certificate can be issued.
  
===Issue options===
+
==Customizing certificate==
 +
There are several ways to create a custom certificate.  Please see [[Certificate customizing]] for many examples and code hints.  A few quick examples from easiest to more skilled required:
 +
*Add your images to the appropriate /mod/certificate/pix folder.  This will make them available under settings. 
 +
**Add your logo to the "seals" folder, or a new background image, or different signature to the appropriate folder. 
 +
*Edit the text strings in the /mod/certificate/lang folder files, or though the customize language tool available to site administrators.
 +
*Create a copy of a folder under type, then reposition and format text and images in that folder's code.
 +
**You may create as many "types" of certificates as you wish. This is more complicated and requires some knowledge of PHP and TCPDF (which is the open source software used by Moodle to generate the Certificate files.
  
*'''Email Teachers''' - Yes or No.
+
==Certificate companions==
*'''Email Others''' - add email addresses, separated by a comma.
+
{{Update}}
*'''Delivery''' - should students open in a new window, force them to download, or be emailed certificate
+
Not all these may work with Moodle 2.x.   
*'''Save Certificates''' - No or Yes.  If emailed you must save.  "Yes" also allows reprinting of a certificate. "No" will force the certificate to be re-created every time it is viewed.
 
 
 
===Locking options===
 
Before a student can receive a certificate, what must they do?  These are similar to Conditional Activities which are in Moodle 2.0.  Be careful with these settings. 
 
*'''Required course grade''' - No or pick an over all course grade from 100% to 1%
 
*'''Minimum required minutes in course''' - Type in the minutes, a 0 means this is not a requirement.
 
*'''Dependent activities''' -  Certificate also has a built in conditional activity setting.
 
**'''Linked Activity''' -  Select the dependent activity from the pull down list.  For example you may have a Quiz that is used as a final.         
 
**'''Required Grade''' -  No or pick an activity grade from 100% to 1%
 
**'''Add another linked activity option''' - A button which will add another potential linked activity option.
 
 
 
===Text options===
 
Certificate can place saved information in the certificate.  These appear as text.  Remember, you can come back to certificate settings and change them until you get the printed certificate look that you want.
 
 
 
*'''Print Date''' - Yes or No
 
*'''Date Format''' - If yes, select the format from a pulldown list.
 
*'''Print Code''' - This is a unique code that is stored and can be used to verify a printed copy of the certificate against the electronic record.
 
*'''Print Grade''' - No or Print Course Grade
 
*'''Grade Format''' -  If printing grade Percentage, Points  or Letter
 
*'''Print Outcome''' - If outcome, select it.
 
*'''Print Credit Hours''' - Put the number of credit hours here (if any)
 
*'''Print Teacher Name(s)'''  - No or Yes
 
*'''Custom Text''' -  This is a text box which will appear under the signature area.
 
 
 
===Design options===
 
These settings control images that are can be part of your certificate.  It is possible to change or add to the available images.  This is done by adding the image to the correct folder in ../mod/certificate/pix.  For example you can add more signatures, watermarks and seals which will automatically appear on a list for you to select.
 
 
 
*'''Certificate Type''' - The are 3 portrait or 3 landscape types to select.  It is possible to make your own "type".
 
*'''Border Image''' - no or 2 different styles of Blue, Black, Brown, Green borders
 
*'''Border Lines''' - no or a simple line in Blue, Black, Brown,  or Green
 
*'''Watermark Image''' - no or 2 standard images that appear behind the text and other images
 
*'''Signature Image''' - no, or a straight line (to hand sign) or an image of a signature. The signature block apears on the lower left.
 
*'''Seal or Logo Image''' - no or a choice of 5 stock seals that appear on the lower right
 
 
 
===Common module settings===
 
These are standard Moodle module settings.  See [[Common module settings]]
 
 
 
==Tips & Tricks==
 
===Certificate icon location===
 
If you are using your own theme you have to put the icon.gif inside a folder called certificate and put in your mod folder image.  For example, if your theme uses custom icons, you must put a certificate folder with the certificate icon.gif in it under your theme/pix/mod folder.
 
 
 
 
 
==Customizing==
 
The certificate code is located in the /mod/certificate folder.  In 1.9 there are sub-folders for db, lang (holds language sub-folders), pix (holds sub-folders for borders, seals, signatures and watermarks) and type (holds 6 standard certificate types, each in their own sub-folder). 
 
 
 
===Adding images===
 
[[Image:Certificate199 example creative.png|thumb|Creative example]] The easiest way to customize your certificate is to add your own JPG or PNG images. Place these in the appropriate mod/certificate/pix folder on your site.  The added JPG or PNG image will appear in the dropdown list by its file name.
 
 
 
Make sure your new files are the same size as the standard images. For example, the standard signature file is 150x31 pixels. If the signature file is a different size, you may need to modify the code line.  The same will be true for seals, borders and watermarks.
 
 
 
In the creative example, a custom border, watermark, signature and seal were added to the right folders.  All were sized and in the same file format as the one supplied with the initial certificate install.
 
 
 
===Customize format===
 
It is a good idea to create your own custom certificate type, that will appear on a list along with the standard certificates types.  You will know which is your custom certificate type and it will survive when you upgrade.  Here is how:
 
 
 
1.  Choose the certificate/type folder with the size/orientation you desire, copy and paste it in the certificate/type folder  and give the copied folder a new name.  For example copy the /type/letter_landscape folder and rename it 'mycertificate'.
 
 
 
2. Open the certificate/lang/en_utf8/certificate.php file and add the name of your new folder type.  Following the above example, you would add:
 
 
 
:$string['typemycertificate'] = 'My New Certificate';
 
 
Now, when you add a certificate to a course, your new type should appear on the drop down list as "My New Certificate".
 
 
 
 
 
====Modifing image position code example====
 
Lets look at the signature code that is found in the letter_landscape type.
 
 
 
:print_signature($certificate->printsignature, $orientation, 110, 450, '', '');
 
 
 
Change it to:
 
:print_signature($certificate->printsignature, $orientation, 100, 435, 150, 75);
 
 
 
What happens?
 
 
 
*We moved the image top left corner from the 110 margin position to the left and the 100 position.
 
 
 
*We raised the image from the 450 line on the page up to the 435 line. 
 
 
 
*We set the width and height of the image to 150 by 75 pixels.
 
 
 
 
 
The default seal code for letter_landscape is belowWe could alter it's position.
 
 
 
:print_seal($certificate->printseal, $orientation, 590, 425, '', '');
 
 
 
===Changing Printed Text===
 
 
 
There are different lang strings in the certificate/lang/en_utf8/certificate.php file for each certificate type, so be sure to change the correct one for the type you are using (or create your own custom type--see above).  For example, if you want to customize the text for the landscape type, you can change these lines in the above mentioned lang file:
 
  
Default:
 
 
:<nowiki>$string['titlelandscape'] = 'CERTIFICATE OF ACHIEVEMENT';</nowiki><br>     
 
:<nowiki>$string['introlandscape'] = 'This is to certify that';</nowiki><br> 
 
:<nowiki>$string['statementlandscape'] = 'has successfully completed the course';</nowiki>
 
 
Customized:
 
 
:$string['statementlandscape'] = 'has successfully passed the final exam';
 
 
===Adding a New Line of Text===
 
 
1. Open the certificate/lang/en_utf8/certificate.php file and add your new lang string giving it a unique name, e.g.:
 
:$string['mynewtext'] = 'This is what I want to print on the certificate';
 
 
2. Open the file for your certificate type, e.g. certificate/type/mycertificate/certificate.php.  At the bottom of the page below '// Add Text' is the code that prints--you guessed it--text on the certificate.  Find the current line below which you would like your new text to be printed.  For example, if you want your text to print below the course name, find the line:
 
 
:<nowiki>cert_printtext(170, 330, 'C', 'Helvetica', '', 20, utf8_decode($classname));</nowiki>
 
 
3. Add a new line below that to print your new text using the name you gave your new lang string like this:
 
 
:<nowiki>cert_printtext(170, 350, 'C', 'Helvetica', '', 20, utf8_decode(get_string('mynewtext', 'certificate')));</nowiki>
 
::note: Make sure you a string to the language file called mynewtext. The above line of code gets that string. 
 
 
4.  You can adjust the placement over from the left by increasing or decreasing the '170' number.
 
You can adjust the placement down on the page by increasing or decreasing the '350' number.
 
Changing 'C' to 'L' or 'R' will print on the left or right side. 
 
For different fonts, see the moodle/lib/fpdf font folder for non-unicode types, and the moodle/lib/tcpdf/fonts folder for unicode types, for available fonts.  (NOTE: for unicode certificates, using more than one font is NOT recommended since the entire font gets embedded in the certificate--increasing the certificate file size.)
 
In the '' after the font name, you can add 'B' for bold, 'I' for italic, or 'U' for underline.
 
Changing the '10' number will change the font size.
 
 
:cert_printtext(170, 350, 'C', 'Times', '', 10, utf8_decode($USER->idnumber));
 
 
5. You can add a hard coded line of text. For example, a signature title block line:
 
:cert_printtext(150, 490, 'L', 'Times', '', 10, utf8_decode('Martin Dougiamas, Lead Developer'));
 
 
===Add your string to the pdf image===
 
You can add your own custom string to the pdf print section.  We wanted to add "These Continuing Credits are from Our University" below the title of the course. We used the landscape certificate type.
 
 
We added the string to the language file. 
 
:<nowiki>$string(ceusfromus) = 'These Continuing Credits are from Our University';</nowiki>
 
 
In the type folder's certificate.php file, in the PDF area near the end of the file, we put the following line:
 
 
:<nowiki>cert_printtext(170, 380, 'C', 'Helvetica', '', 16, utf8_decode
 
      (get_string('ceusfromus', 'certificate')));</nowiki>
 
 
==History of certificate module==
 
The certificate module was originally created by Hugo Salgado, July, 2004, updated by David T. Cannon, July, 2005 and [http://moodle.org/user/view.php?id=3239&course=5 Chardelle Busch] made extensive updates for
 
versions 1.6 through 1.9 based upon community input. 
 
 
==Certificate companions==
 
 
===Certificate Site-wide Report===
 
===Certificate Site-wide Report===
 
As of February 2008, there is a '''Certificate Site-wide Report''' which can be added in Moodle 1.9, as a supplement. This is an add-on to the certificate module--if installed, you will have an option when creating a certificate to send that certificate's info to the report. An optional  block is included that provides a link to the report. Students will see a list of all received certificates. Administrators (or those who have the capability of viewing site reports) will see a link on the Certificate Report page to view/download a report of all students' received certificates.  To install: Place the certificates folder in your root (main) moodle folder and upload to your server.  Place the my_certificates block folder under your moodle/blocks folder, upload to your server and click on the Administration>>Notifications link to install.
 
As of February 2008, there is a '''Certificate Site-wide Report''' which can be added in Moodle 1.9, as a supplement. This is an add-on to the certificate module--if installed, you will have an option when creating a certificate to send that certificate's info to the report. An optional  block is included that provides a link to the report. Students will see a list of all received certificates. Administrators (or those who have the capability of viewing site reports) will see a link on the Certificate Report page to view/download a report of all students' received certificates.  To install: Place the certificates folder in your root (main) moodle folder and upload to your server.  Place the my_certificates block folder under your moodle/blocks folder, upload to your server and click on the Administration>>Notifications link to install.
  
===Certificate Verification Block===
+
===Certificate Verification Block===  
A companion to the Certificate module for Moodle 1.9.  This is a block with a form for entering a given certificate code for verification. The verification page shows the student name, course name, date received and grade (if a grade is printed on the certificate).  The certificate code can be printed on a certificate.
+
A companion to the Certificate module for Moodle 1.9.  This is a block with a form for entering a given certificate code for verification. The verification page shows the student name, course name, date received and grade (if a grade is printed on the certificate).  The certificate code can be printed on a certificate.  
 
+
 
This feature is useful when a Registrar, supervisor or administrator wishes to verify that the printed certificate is valid for that student.  To install: Place the verify_certificate block folder under your moodle/blocks folder, upload to your server and click on the Administration>>Notifications link to install.
 
This feature is useful when a Registrar, supervisor or administrator wishes to verify that the printed certificate is valid for that student.  To install: Place the verify_certificate block folder under your moodle/blocks folder, upload to your server and click on the Administration>>Notifications link to install.
  
==Tips and Tricks==
+
In Certificate for 2.x, the view certificates will show the student name, date received, grade and code.  These are downloadable via several file types.
 
 
*Start with one of the existing certificate types, copy it and modify it.  
 
*Try your customized code on a non production site, such as a local host.
 
*In Administration>>Server set debugging to maximum (to show any coding error messages).
 
*While you can leave a php file open in edit mode, you must save the file before your changes become active.
 
*Make code changes one at a time, test and then backup after each successful change. For example,after adding a new string to the certificate lang file), go to your course page and click on a certificate to see if it appears on the list.
 
*If you broke the code you may get a blank screen for a certificate.   
 
**So it might be a good idea to make a backup of each successful change before starting the next change.  For example, after the 3rd code change, save certificate.php as certificate3.txt.
 
  
 
==See also==
 
==See also==
* [[mod/certificate/mod|Add/Edit Certificate]]
+
* [[Add/edit certificate module]]
 
* [[mod/certificate/view|Viewing a Certificate]]
 
* [[mod/certificate/view|Viewing a Certificate]]
 +
* [[Certificate customizing]] - many tips and how tos
  
  
 
The links below will lead to the current download areas
 
The links below will lead to the current download areas
{{Update]]
+
{{Update}}
  
*[https://github.com/PukunuiAustralia/moodle-mod_certificate PukunuiAustralia / moodle-mod_certificate] Version 2.0  
+
*[https://github.com/PukunuiAustralia/moodle-mod_certificate PukunuiAustralia / moodle-mod_certificate] Version 2.0 but will work with 2.1 as well.
 
   
 
   
* Moodle.org link [http://promoodle.com Certificate Sitewide Reports]
+
* Moodle.org link? Certificate Sitewide Reports plugin
* Moodle.org link [http://promoodle.com Certificate Validation Block]
+
* Moodle.org link? Certificate Validation Block plugin
  
  

Latest revision as of 12:31, 12 November 2011

This page requires updating for Moodle 2.3. Please do so and remove this template when finished.

The Certificate module creates PDF certificates/diplomas for students of the course and is completely customizable. You can add borders, watermarks, seals and even show grade information.

Certificate 2.x should be tested on your site or a place that will be similar to your production site. The PukunuiAustralia version is the best one to download for 2.x production servers. See bugs comments below.

Certificate examples

Here are 3 examples. A certificate that uses the standard features found in the install package. Then 2 others with slightly more customization.

Installing

  1. Download and Unpack the Certificate zip file in a temporary area,
  2. Copy the "certificate" folder to your moodle mod folder located for example at yourhost\moodle\mod . This will include folders backup, db, lang, pix (including subfolders for borders, seals, signatures and watermarks), and type (with sub folders for each of 4 default types).
  3. Go to your Moodle, and click on the Notifications link in the Site administration. Moodle knows something has been added and it will proceed to install the certificate module.
Note: It is not necessary to move the lang file into the Moodle lang folder, the certificate lang folder can stay in the mod/certificate folder.
Note: If the download zip/tar file does not create a certificate folder, rename the top folder certificate. There needs to be a folder in /mod called certificate.

See also: Installing_contributed_modules_or_plugins in MoodleDocs.

Settings

This is a short list of settings listed by their group. Please see Add/edit_certificate_module for more detailed information.

  • General - Certificate name and introduction. The certificate will use the course name, this is the link name.
  • Issue options -Here you can set email options, determine if you want to save and or reissue certificates.
  • Print text options - determine date, security code, grade outcomes, credit hours, teachers names, custom text.
  • Design (and image) options - select Type, then determine orientation, and select images for border, lines, watermark, signature, seal or say no to any or all of them.
  • Common module settings -These are standard Moodle module settings. See Common module settings
  • Locking options - if conditional dependencies has been turned on by the site administrator, teacher can set standards that must be met before certificate can be issued.

Customizing certificate

There are several ways to create a custom certificate. Please see Certificate customizing for many examples and code hints. A few quick examples from easiest to more skilled required:

  • Add your images to the appropriate /mod/certificate/pix folder. This will make them available under settings.
    • Add your logo to the "seals" folder, or a new background image, or different signature to the appropriate folder.
  • Edit the text strings in the /mod/certificate/lang folder files, or though the customize language tool available to site administrators.
  • Create a copy of a folder under type, then reposition and format text and images in that folder's code.
    • You may create as many "types" of certificates as you wish. This is more complicated and requires some knowledge of PHP and TCPDF (which is the open source software used by Moodle to generate the Certificate files.

Certificate companions

This page requires updating for Moodle 2.3. Please do so and remove this template when finished.


Not all these may work with Moodle 2.x.

Certificate Site-wide Report

As of February 2008, there is a Certificate Site-wide Report which can be added in Moodle 1.9, as a supplement. This is an add-on to the certificate module--if installed, you will have an option when creating a certificate to send that certificate's info to the report. An optional block is included that provides a link to the report. Students will see a list of all received certificates. Administrators (or those who have the capability of viewing site reports) will see a link on the Certificate Report page to view/download a report of all students' received certificates. To install: Place the certificates folder in your root (main) moodle folder and upload to your server. Place the my_certificates block folder under your moodle/blocks folder, upload to your server and click on the Administration>>Notifications link to install.

Certificate Verification Block

A companion to the Certificate module for Moodle 1.9. This is a block with a form for entering a given certificate code for verification. The verification page shows the student name, course name, date received and grade (if a grade is printed on the certificate). The certificate code can be printed on a certificate.

This feature is useful when a Registrar, supervisor or administrator wishes to verify that the printed certificate is valid for that student. To install: Place the verify_certificate block folder under your moodle/blocks folder, upload to your server and click on the Administration>>Notifications link to install.

In Certificate for 2.x, the view certificates will show the student name, date received, grade and code. These are downloadable via several file types.

See also


The links below will lead to the current download areas

This page requires updating for Moodle 2.3. Please do so and remove this template when finished.


  • Moodle.org link? Certificate Sitewide Reports plugin
  • Moodle.org link? Certificate Validation Block plugin