Difference between revisions of "Certificate module"

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.7. Up-to-date documentation for the latest stable version of Moodle may be available here: Certificate module.

(Customizing)
m (Certificate examples)
 
(74 intermediate revisions by 9 users not shown)
Line 1: Line 1:
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. A contributed module, it was originally created by Hugo Salgado, July, 2004, updated by David T. Cannon, July, 2005 to use FPDF and include printing grades, updated and currently maintained by [http://moodle.org/user/view.php?id=3239&course=5 Chardelle Busch] to include backup/restore, types, reporting, emailing, unicode support, etc.  
+
{{Certificate}}
 +
{{Infobox plugin
 +
|type = Activity
 +
|entry = https://moodle.org/plugins/view.php?plugin=mod_certificate
 +
|tracker = http://tracker.moodle.org/browse/CONTRIB-2006
 +
|discussion = https://moodle.org/mod/forum/view.php?id=7163
 +
|maintainer = [[User:Mark Nelson|Mark Nelson]]
 +
|float = right
 +
}}
 +
The '''Certificate module''' creates PDF certificates/diplomas for students in a course and can be customized by the certificate settings menu. You can add borders, watermarks, seals, signatures, outcomes, grades and even add custom text.  
  
There are different certificate modules for 1.6 and 1.7.  They are not compatible.  These instructions were written for 1.6.  Chardelle Busch has made sure Certificate is updated for
+
Certificate should be downloaded from the download Plugins at Moodle.org (see the info box on the page for a link).  You should select the certificate download that matches your Moodle version.
every version through 1.9.  The 1.9 version has a few more printing features and has expanded the number of activities upon which the teacher can set conditions for issuing a certificate to a student.
 
  
 +
==Certificate examples==
 +
Here are 3 examples. Click on one to enlarge it.  A certificate that uses the standard features found in the install package.  Then 2 others show different possible ways to customize a certificate.
 +
<gallery caption="Certificate examples - click on any to enlarge" widths="200px" heights="100px" perrow="6">
 +
Image:Certificate 27 plain.png|Shows no options selected, standard title, course name, user name and words.
 +
Image:Certificate 27 manyoptions.png|Shows many text and images selected, signature, seal, watermark, code, grade, teachers name, custom text and border.
 +
Image:Certificate199 example creative.png|Custom border, custom signature, custom seal, custom watermark, code, outcome
 +
Image:Certificate 27 customcode.png |Custom everything, new certificate type, with new text strings, new text and image positions, plus uploadd watermark, seal, signature and border. 
 +
</gallery>
  
 +
==Installing==
 +
#Download and Unpack the Certificate zip file (for example mod_certificate_moodle27_2014041800) for the Moodle version your are using in a temporary area,
 +
#Copy the "certificate" folder to your Moodle mod folder located for example at yourhost\moodle\mod . The certificate folder 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).
 +
#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.
  
==Certificate companions==
+
''Note:'' It is not necessary to move the lang file into the Moodle lang folder, the certificate lang folder(s) can stay in the mod/certificate folder.
===Certificate Site-wide Report===
+
''Note:'' Advance users upgrading from 1.9.9 or installing Certificate for the first time, might consider editing the files in the pix folder before installing via the notification link. These will be used as the default file.  Site administrators [[Certificate customizing|can upload more images via the interface]] after installing the module.
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.
 
 
 
==Installing==
 
#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 db, lang and all the subfolders located under pics.
 
#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 administation block. Moodle knows something has been added and it will proceed to install the certificate module.
 
  
 
See also: [[Installing_contributed_modules_or_plugins]] in MoodleDocs.
 
See also: [[Installing_contributed_modules_or_plugins]] in MoodleDocs.
  
 
==Settings==
 
==Settings==
Help buttons give more information about each setting.
+
This is a short list of settings listed by their group.  Please see [[Add/edit_certificate_module]] for more detailed information.
  
==Tips & Tricks==
+
*General - Certificate name and introduction.  The certificate will use the course name, this is the link name.
===Certificate icon location===
+
*Issue options -Here you can set email options, determine if you want to save and how user views the certificate. You can set minimium time the user must be in the course before issuing the certificate.
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.
+
*Text options - determine date,  security code, grade outcomes, credit hours, teachers names, custom text.
 +
*Design (and image) options - select  certificate type/print orientation, select images for border, lines, watermark, signature, seal or say no to any or all of these options.
 +
*Common module settings -These are standard Moodle module settingsSee [[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.
  
===Lesson dependency trick 1===
+
==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 own images via the site administration>Plugins>Activities>Certificate in the appropriate type.  Types are boarders, seals, signatures and watermarks.
 +
*Add your images to the appropriate /mod/certificate/pix folder.  This will also make them available under settings. 
 +
*Edit the text strings in the /mod/certificate/lang folder files, or though the customize language tool available to site administrators.
 +
*You may create as many "types" of certificates as you wish. This is more complicated and requires some knowledge of PHP and of course access to the moodle/mod/certificate folder.
  
The best trick to enable a conditional certificate is to upgrade to Moodle 1.9 and use the new Certificate versionThe 1.9 Certificate allows the teacher to set a dependency on different activities.
+
==Certificate companions==
 +
{{Update}}
 +
Not all these may work with Moodle 2.x.   
  
Many Moodlers issue a certificate upon successful completion of a course.   For those who use Questions in a Lesson to determine if a student can receive a certificate, here is one way to hide the certificate until the student passesAt the end of a lesson we will provide the student an option to select a link that will print a hidden certificate activityThe only non standard Moodle feature this uses is the Certificate module itself[[Adding/editing_a_lesson#Dependent_on |Lesson dependency]] is available from 1.6 onward.
+
===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 certificatesTo install: Place the certificates folder in your root (main) moodle folder and upload to your serverPlace the my_certificates block folder under your moodle/blocks folder, upload to your server and click on the Administration>>Notifications link to install.
  
*Create a Certificate activity.  Hide it.
+
===Certificate Verification Block===
*Create a lesson. We will call it "Certificate Qualification".  This is the lesson that needs to be passed to get a certificate. We might add questions to this lesson as a means to automatically determine that student qualifies for 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.  
*Create another lesson.  We will call it "Certificate Gateway".  In lesson settings make it [[Adding/editing_a_lesson#Dependent_on |dependent]] upon the "Certificate Qualification". For example we might say a student must answer 80% of the questions correctly. Still in lesson setting go to the [[Adding/editing_a_lesson#Link_to_activity |link to activity setting]] and link it to Certificate.
+
 
+
This feature is useful when a Registrar, supervisor or administrator wishes to verify that the printed certificate is valid for that studentTo 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.
Student view of the above example. The student will see a course with 2 lessons.  If they try to enter the Certificate Gateway Lesson, first, they will be told that they must pass the Certificate Qualification Lesson with a score of 80% or higher.  When the student takes the Certificate Qualification Lesson and only scores 70%, they will not be able to take the Certificate Gateway Lesson.  The only way they can get to the certificate is to qualify to take the Certificate Gateway Lesson.
 
 
 
'''Important Note''': For this trick to work you must have Show Grades set to Yes in the Course settings page or this trick won't work (and you'll get very frustrated wondering why :) )
 
 
 
==Customizing==
 
 
 
NOTE: Before doing any changes to code:
 
 
 
# Try it on a local testing install first, if possible.
 
# In Administration>>Server set debugging to maximum (to show any coding error messages).
 
# After each change to the code (for example, after adding a new string to the certificate lang file), go to your course page and click on a certificate to test.
 
 
 
'''A Custom Type:'''
 
 
 
You can create your own custom certificate type to choose when adding a certificate to a course.  This is a good idea so you won't lose your changes when upgrading.
 
 
 
1Choose the certificate/type folder with the size/orientation you desire, copy and paste it  and give it a new name, e.g. 'mycertificate'.
 
 
 
2.  Open the certificate/lang/en_utf8/certificate.php file and add the name of your new type, e.g.:
 
 
 
$string['typemycertificate'] = 'My Certificate';
 
 
Now, when you add a certificate to a course, you can choose your new type.
 
 
 
'''Adding Images:'''
 
  
To add your own image, place it in the appropriate mod/certificate/pix folder and upload it to your site.  NOTE: Images must be in either jpeg or PNG 8 formats only!  Your image will now appear in the dropdown corresponding to its folder.
+
In Certificate for 2.x, the view certificates will show the student name, date received, grade and codeThese are downloadable via several file types.
 
 
'''Getting Print Quality Images and/or to modify the location:'''
 
If you place images of the same size and resolution as those in the certificate/pix/seals or certificate/pix/signatures folders they should fit in the existing places on the model certificates. This is an easy way to add your custom logo or signature files.  However if you use a print quality (e.g. 300 dpi) image for either, it will show up as an enormous image on your certificate. You can move the location of the image by changing the numbers in the two lines of code shown below (the first for "seals" or logos; the second for the "signature" image). The first number in each line dictates the X (left/right) position on the page. The second number dictates the Y (up/down) position on the page. The numbers determine the upper left portion of the image; a larger number moves the image right or down.  If you add a second set of numbers to each line (fill in where the paired apostrophes are after 425 or 440) you can control the size of the image. So the 3rd number in the set of four indicates the horizontal size while the 4th number in the set determines the vertical size. You will need to add the second set of numbers if you want to use print quality images.
 
 
 
In the certificate/type/’type your are using’/certificate.php file look for the following lines:
 
 
 
<code php>print_seal($certificate->printseal, $orientation, 590, 425, '', '');
 
 
 
print_signature($certificate->printsignature, $orientation, 130, 440, '', '');</code>
 
 
 
 
 
'''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:
 
 
 
$string['titlelandscape'] = 'CERTIFICATE of ACHIEVEMENT';<br>     
 
$string['introlandscape'] = 'This is to certify that';<br> 
 
$string['statementlandscape'] = 'has completed the course';
 
 
 
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/landscape/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:
 
 
 
cert_printtext(170, 330, 'C', 'Helvetica', '', 20, utf8_decode($classname));
 
 
 
3. Add a new line below that to print your new text using the name you gave your new lang string like this:
 
 
 
cert_printtext(170, 350, 'C', 'Helvetica', '', 20, utf8_decode(get_string('mynewtext', 'certificate')));
 
 
 
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. 
 
 
 
'''Printing Info from a Profile Field:'''
 
 
 
You can easily add additional personal student information to print on a certificate.
 
 
 
1.  Choose one of the user profile fields for your info, good choices are: ID Number, Institution or Department. 
 
 
 
2.  Same as step 2 from 'Adding a New Line of Text' above.
 
 
 
3.  Add a new line below that to print your info like this:
 
 
 
cert_printtext(170, 350, 'C', 'Times', '', 10, utf8_decode($USER->idnumber));
 
 
 
Or, change idnumber to institution, or department.
 
 
 
4.  Same as step 4 from 'Adding a New Line of Text' above.
 
  
 
==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 to make changes to code to customize certificates even more.
 
 
The links below will lead to the current download areas
 
 
 
* Moodle.org link [http://moodle.org/mod/data/view.php?d=13&rid=683 Certificate at Modules and plugins]
 
* Moodle.org link [http://promoodle.com/index.php?option=com_docman&task=cat_view&gid=16&Itemid=67 Certificate Sitewide Reports at Modules and plugins]
 
* Moodle.org link [http://promoodle.com/index.php?option=com_docman&task=cat_view&gid=16&Itemid=67 Certificate Validation Block at Modules and plugins]
 
 
 
  
 
* Using Moodle [http://moodle.org/mod/forum/view.php?id=7163 Certificate module] forum
 
* Using Moodle [http://moodle.org/mod/forum/view.php?id=7163 Certificate module] forum
* [[Activity_Locking]] - a conditional dependency add-in
+
* [[Conditional activities]] - When this site feature is turned on, teachers can set conditions based upon other activities in the course before a certificate will be issued.
 
* [[Development:Certificate Module|Development of the certificate module]]
 
* [[Development:Certificate Module|Development of the certificate module]]
 
* [http://tracker.moodle.org/browse/CONTRIB-334 Patch to enable linking] to [[Face-to-face module|Face-to-Face]] contributed module.
 
* [http://tracker.moodle.org/browse/CONTRIB-334 Patch to enable linking] to [[Face-to-face module|Face-to-Face]] contributed module.
  
 +
 +
[[Category:Certificate]]
 
[[Category:Contributed code]]
 
[[Category:Contributed code]]
  
[[es:Certificate]]
+
[[es:Módulo certificado]]

Latest revision as of 15:00, 21 June 2014

The Certificate module creates PDF certificates/diplomas for students in a course and can be customized by the certificate settings menu. You can add borders, watermarks, seals, signatures, outcomes, grades and even add custom text.

Certificate should be downloaded from the download Plugins at Moodle.org (see the info box on the page for a link). You should select the certificate download that matches your Moodle version.

Certificate examples

Here are 3 examples. Click on one to enlarge it. A certificate that uses the standard features found in the install package. Then 2 others show different possible ways to customize a certificate.

Installing

  1. Download and Unpack the Certificate zip file (for example mod_certificate_moodle27_2014041800) for the Moodle version your are using in a temporary area,
  2. Copy the "certificate" folder to your Moodle mod folder located for example at yourhost\moodle\mod . The certificate folder 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(s) can stay in the mod/certificate folder. Note: Advance users upgrading from 1.9.9 or installing Certificate for the first time, might consider editing the files in the pix folder before installing via the notification link. These will be used as the default file. Site administrators can upload more images via the interface after installing the module.

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 how user views the certificate. You can set minimium time the user must be in the course before issuing the certificate.
  • Text options - determine date, security code, grade outcomes, credit hours, teachers names, custom text.
  • Design (and image) options - select certificate type/print orientation, select images for border, lines, watermark, signature, seal or say no to any or all of these options.
  • 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 own images via the site administration>Plugins>Activities>Certificate in the appropriate type. Types are boarders, seals, signatures and watermarks.
  • Add your images to the appropriate /mod/certificate/pix folder. This will also make them available under settings.
  • Edit the text strings in the /mod/certificate/lang folder files, or though the customize language tool available to site administrators.
  • You may create as many "types" of certificates as you wish. This is more complicated and requires some knowledge of PHP and of course access to the moodle/mod/certificate folder.

Certificate companions

This page requires updating. 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