module certificate for moodle 2.0

Re: module certificate for moodle 2.0

by Chris Collman -
Number of replies: 0
Picture of Documentation writers

Hi David, First which Moodle version are you using. Did you read Certificate customizing
That would tell you to go to a different certificate.php file.   Please uncomment thoselines and then copy a certificate type folder, then look for the certificate.php in the type folder. 

 

The way I would do it is to learn about creating your own unique certificate and leave the defaults types alone.  Thus I would copy one of the existing certificate type folders and rename it David01.   Now look at the certificate.php code.   Since you know the string names you want to commeent out, look for those in the lines of code and comment them out in that file.

This is also the file for adjusting the random code position when the PDF is created.   I am not sure I would put it in the footer, but at the botom of the page.  You are not programming HTML here but a PDF file.  Remember there is both a Portrait and Landscape postion.   The code position variable is $codey in both Landscape and Portrait.  Thnen you are looking for  //add test and something like:

cert_printtext($x, $codey, 'C', 'Times', '', 10, $code);
    $i = 0 ;

This will center the code text on what every line you put for the $codey under landscape or portrait.

The //add text areas is where to comment out stuff ith the //. You sound like the brave sort, so have at it with this file.    Make a backup of the file so you know where you started form.   I may have 5 or 6 type folders, until I get things just right.  

However, if you really want to show a blank, where the words should go, here is how to do it from the interface withouth having to use FTP or some backdoor method.

Go to administration, language, edit the language pack.  Find the certificate .php file.   Change "Certificate of ACheivement" to a blank field, either a space or &NBSP in it. This will create a special file in moodledata/lang/en_local.  If you want to edit the created php file there have at it smile  Next time certificate upgrades, it will not wipe out your edits. This is a best practice. Never edit a language file directly, always edit (or even add an edited language php file) to the new folder you created there with your first edit.

Back to my own homework. It is a Holday today in the USA.

Hope this helps.  Read that MoodleDocpage  .  

 

Chris