Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Divya Bansal -
Number of replies: 12

One of our clients was using moodle version 1.3.3 installed on WINDOWS SERVER 2003 R2, php version 4.4.7 and MYSql verion 4.1.22. I upgraded the version 1.3.3 to 1.9 last week going through all the versions in between except 1.7 as suggested by the experts on these forums. And it is working like charm except few things. One of them is -

In the old version i.e., 1.3.3 the 'Download Certificate' link used to show on each and every course automatically as soon as the student had finished a quiz or posttest or any kind of test for that course if he has got grade/score >= 70%. But now there is no link to download certificates.

As per the documentation for version 1.9, we need to install the certificate module (It was not showing up in the moodle/mod folder as per documentation). But I don't understand if this functionality already existed in the old site, why we will have to download the module and not see the existing certificates.

The students do want to be able to download there old certificates.

Also, how can I change the wording of the certificate? The old certificate used to display -

"The items that change with each course are the title for the program (should be populated from the course settings), date completed (should be populated from the date the student completed the exam), student name, number of contact hours (provided by administrator previously in the course set up description box in the old moodle), and the KBN number (provided by administrator previously in the course set up description box in the old moodle)."

Now I don't see the place to enter Contact Hours and KBN while creating the course?

I know, so many questions :P I will really appreciate your help as soon as possible. Thank you very much in advance smile

Divya

Average of ratings: -
In reply to Divya Bansal

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Divya Bansal -

Can anyone help me with this please....

In reply to Divya Bansal

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Raymond Fürst -

I am not familiar with Moodle version 1.3, the first version of Moodle I encountered was 1.6 so my thoughts might be wrong.

It seems to me that Moodle 1.3 had a fixed certificate feature built in that flew out of the core of Moodle during the version history. Maybe in the past Moodle was much less modular than it is today, and many features that are separate modules today may have been fixed parts of the course functionality then. Your post mentions certificate related options to be entered in the course settings, so the certificate was an integral part of the course. I can imagine that in the past every course had one quiz/exam and one corresponding certificate page of the course. Later the quiz functionality became a core module, enabling teachers to put separate quiz activities in one course. The certificate was sacrificed to this flexibility, and returned as an optional module to be installed separately.

As the old certificate is no part of the course any more, I am afraid it will be either impossible or too difficult to migrate the old certificate data into the new version. The current/new certificate module will add its own tables to the Moodle database to store certificate information in it. In theory, it might be possible to add entries to the mdl_certificate-tables that look like they have been created through the certificate module.

If the old quiz results of the students is still available in the new moodle version, then I suggest this solution: add a new certificate and make the quiz a required activity to unlock the certificate. Then the students can open the new certificate (if they passed the quiz). It may contain the date of today instead of the past, but it might work.

In reply to Raymond Fürst

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Divya Bansal -

Thank you very much Raymond. I appreciate your help.

So, if I add the certificate to the quizes, the certificate will be able to get the old Pass/Fail or grade information for the quiz taken by the student before moodle upgrade and students will be able to download all the old certificates? If yes, that will be great.

Also, does the new version of moodle has KBN Contact Hours and ANCC Contact Hours? If yes, where do we enter these values? Or if the name is changed, can you tell me the field name and database. Client wants to show these fields in the certificates, they have been showing it always.

I need to change the text of the certificate including adding some other values to display. Which file in the module should I edit?

In reply to Divya Bansal

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Raymond Fürst -

In certificate for Moodle 1.9 you can have one or more quizzes as locking activity. That means, the student must pass all those quizzes before he can open the certificate.

In certificate for Moodle 1.9 you can have either the result of one quiz (or lesson) or a course grade to be displayed on the certificate itself.

Locking options are independent to displaying options. In theory, you can make a certificate that forces students to pass quiz A, but if he opens it, it displays the grade of quiz B.

I do not know what KBN Contact Hours and ANCC Contact Hours mean. The certificate module has a field for "credit hours" and a "custom text" field. Those might be used do store and display Contact Hours. However, those are static fields for each certificate instance, that means all students that open the certificate in a certain course will have the same "credit hours" value displayed.

I wonder why your Moodle still has such an old version number. Could KBN Contact Hours an ANCC Contact Hours be customized functions specifically designed for your school?

You can customize the certificate by creating a new certificate type. Start by copying one of the standard types (the one that looks closest to what you have in mind) and change the underlying php-code. All type files are called certificate.php and reside in a folder named %yourmoodledir%/mod/certificate/type/%typename%/

Average of ratings: Useful (1)
In reply to Divya Bansal

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Chris Collman -
Picture of Documentation writers

Hi,

First read about customizing certificate in Moodle Docs.

Raymond did not give you the bad news about the old certificates.   We ran into that problem when we upgraded from 1.5.3 to 1.9.9.  My boss said not to worry about it, our students had 4 months notices to download a copy of their certificates for their employer AND we still kept the old 1.5.3 site where we could reach it.

You are going to earn your money to bring the old certificates along from the 1.3 to the 1.9.  I don't think there will be any problem in issuing a new certificate in an old updated course.  I think you might consider "re-issuing" the old certificate.   In other words, if a student wants a copy of their certificate, they have already met the criterion, so they can  go to the certificate and the new certificate module will create one for them.

There could be date issues, where the date on the certificate is the current date, and your client wants a different date.  That is where you will earn your money with making a custom certificate.

I would not know how best to do a MySQL query to populated the new certificate tables with the old certificate data.   That might help with the date. It also might provide a solution to having the old  pdf certificate (I assume the 1.3 certificate generated then stored the pdf).

It is not clear to Raymond and myself if the KBN and ANCC hours both need to appear on 1 certificate or if they are different certificates.  If bot KBN and ANCC need to appear on a certificate, Raymond's suggestion will work.  Or you can add another field(s) to the mySQL certificate table to store different hours that you will have to add to the certificate settings form and to your custom certificate.  Whew!

Good luck!  Moodle 1.3...wow and I thought we were slow to upgrade from 1.5.3 smile   Chris

Average of ratings: Useful (1)
In reply to Chris Collman

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Divya Bansal -

Thank you very much Raymond and Chris. That is a big help in understanding how it works. Actually I am not the person who initially set up the site for the client and neither was I much familiar with moodle and php until last 2 month. Just got the charge of this project, so please pardon my ignorance smile

I talked to the client to figure out what those contact hours are, how and where they used to add it and came to the conclusion that KBN and ANCC credit hours are something specific to this client. Client used to see a textbox while setting up the course (in course setting page) where they used to add these two values separated by comma. So, this is something required by client and needs to be on every certificate, though contact hours change based on the course taken. So, I will try to figure out how can  it be done. Suggestions and advice are always welcome.

Chris, as long as the students can see the link to download the certificate if they have passed that course in past, we are good. The old 1.3 version was using pdf creator.

I was looking at the code Raymond, that you have mentioned. I need to make changes to the watermark, which in my case is a blank page with the company logo at the top. I was trying to change orientation as the logo is not appearing at the very top and span from left to right, even though the picture does not have any white space at top and right left. Otherwise is there any other way to include the logo. ? I am using landscape type.

I want to reduce the size of seal.

If I need to add more variables like the Contact Hours which other files need to be changed as there is another folder in root moodle/certificates. Not sure what doe that do. And there are some php files in moodle\mod\certificate folder too?

In addition I want to add the Course completion date instead of the date certificate was created/issued.

I was trying to figure out where these values are coming from so that I can change the default values:

cert_printtext(170, 125, 'C', 'Helvetica', 'B', 30, utf8_decode(get_string('titlelandscape', 'certificate')));

cert_printtext(170, 180, 'C', 'Times', 'B', 20, utf8_decode(get_string('introlandscape', 'certificate')));

cert_printtext(170, 280, 'C', 'Helvetica', '', 20, utf8_decode(get_string('statementlandscape', 'certificate')));

Please advise.

In reply to Divya Bansal

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Divya Bansal -

Please help sad

In reply to Divya Bansal

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Divya Bansal -

Chris, I got a lot of answers to my orientation and variables location related questions from the link you provided. Will work on it and update the forum with the results. Thanks again.

In reply to Divya Bansal

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Raymond Fürst -

titlelandscape, introlandscape etc. are defined in the language files. You can either change the standard english language file stored in %yourmoodledir%/mod/certificate/lang/en_utf8 or use the moodle interface to create/change a local language file. I think its siteadmin->language->change menu texts, then choose certificate from the dropdown-box.

The certificate module uses several graphics from subfolders in mod/certificate/pix. The standard certificate types offer watermarks, borders and seals/signatures that can be chosen by the course editor. If this is too much flexibility, then you can modify a custom type so that it does not use choosable graphics but hard-coded ones in the type-file. One idea is that you create a fixed background picture containing all visual elements (border, logos, signatures, background imagery),  put it into the pix-folder and add a line to the typefile that prints it out.

I use the following line to put my company logo on every landscape certificate:

$pdf->Image("$CFG->dirroot/mod/certificate/pix/companylogo.png", 590, 425, 120, 50);

If your certificate should only consist of the logo, use the above line and delete/comment out all border/watermark/signature/seal-related php-code

I made some modifications to my certificate module, including adding extra fields. If I recall correctly, then new fields must be added in three places:

  1. an extra field/column must be added to the certificate table in the database. This can be done using a database administration tool like phpmyadmin (quick and dirty), or by making a new "fake" version of the module with a modified mod/certificate/db/upgrade.php-file
  2. an extra field must be added to the user form to be displayed to the course creator (mod_form.php)
  3. in your custom type you need code that displays the field data

It seems to me that the existing "credit hours" field can be used for KBN and that for ANCC a copy of the "credit hours" field must be created.

Average of ratings: Useful (1)
In reply to Raymond Fürst

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Divya Bansal -

Thank you very much Raymond! These are exactly the answers I have been looking for. I also figured out the Credit hours and everything over weekend. 99% done with my certificate in terms of looks and values to display.

Hopefully business logic will be in place too, in terms of who should see what certificate and what values. Testing it right now. It is a big learning curve for me. Thanks again!

In reply to Divya Bansal

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Joe Ravgiala -

Is there a way to change the border image dynamically based on a user profile field? Some of our users need to see a colored certificate, while others need a black and white version. Not sure how to accomplish this using the existing functions.

In reply to Joe Ravgiala

Re: Certification functionality setup after moodle upgrade from 1.3.3 to 1.9

by Raymond Fürst -

I think this would be difficult to achieve in the certificate module alone. Several ideas for a workaround I have in mind though:

  1. Make a coloured certificate for everyone and give access to the colour printer only to the users that need a coloured certificate. All others must print their coloured certificate on a b/w-printer.
  2. Make two different certificates, a coloured one and a bw-one. Then use groups or groupings to limit access to the certificates to the matching groups only. This might work only in moodle 2.0 or later, because of the changes of concept in activity locking and access.