I Don't Think My Certificate Module Installed Properly

I Don't Think My Certificate Module Installed Properly

by Jared Wolthuis -
Number of replies: 13
I just installed the latest version of the 1.9 certificate module on my portal that's running 1.9.9 and a number of options aren't showing up correctly.

For example, when I set what grade is required to get the certificate the field is simply labeled: [ [requiredgrade] ] (without the spaces in the brackets)

There are a number of fields that follow this [ [string] ] format instead of showing the text value they should have.

What did I do wrong and how can I resolve it?
Average of ratings: -
In reply to Jared Wolthuis

Re: I Don't Think My Certificate Module Installed Properly

by Jared Wolthuis -
I just took a further look at it and for example I see in mod_form.php it calls for the string: printcode but if you look in the en_utf8 certificate folder there is no string for printcode, there is a string for printnumber. I made the adjusment in mod_form.php and now it displays the proper string without the brackets.

I did not upgrade this module, this is a clean install on a clean portal.

I can go through and fix these broken strings now but it would be nice to know if this was just a bad copy I downloaded or what..
In reply to Jared Wolthuis

Re: I Don't Think My Certificate Module Installed Properly

by Raymond Fürst -
It seems that your package is broken, and the strings [requiredgrade] and [printcode] should remain/be restored in mod_form.php.

In my installation (1.9.9 moodle, 1.9 cert) the english language file resides in /mod/certificate/lang/en_utf8/certificate.php. Maybe you have found a local language file from a prevous installation where some strings are missing and that prevents the complete language file from loading. You should check if /mod/certificate/lang/en_utf8/certificate.php exists; if so, remove/rename any english certificate.php-files from all locations where moodle expexts english laguage files.

The certificate module is somewhat peculiar in customizing. Adding or modifying certificate types require coding for the type itself, modifying graphics on the file system and adding new strings to the english and local language file.
In reply to Raymond Fürst

Re: I Don't Think My Certificate Module Installed Properly

by Jared Wolthuis -
I just downloaded a fresh copy from this link: http://download.moodle.org/plugins19/mod/certificate.zip

If you open up that zip and look in mod_form.php there is a link to a string called "deliver"

If you then look in the en_utf8/certificate.php that came from the same zip you'll find there is no such string as "deliver", only delivery. I promise I'm not crazy, I genuinely think that the uploaded version is somehow incorrect.
In reply to Jared Wolthuis

Re: I Don't Think My Certificate Module Installed Properly

by Raymond Fürst -
My language file contains in line 24:

$string['deliver'] = 'Delivery';

Seems all normal on that.
In reply to Jared Wolthuis

Re: I Don't Think My Certificate Module Installed Properly

by Chardelle Busch -
Picture of Core developers

Corrupt is not the correct term, somehow the wrong lang file got into the 1.9 cvs folder.  It should be fixed now.

In reply to Chardelle Busch

Re: I Don't Think My Certificate Module Installed Properly

by Chris Collman -
Picture of Documentation writers

"Corrupt is not the correct term".  smile "Ooops" ?

Very familiar with square brackets and missing strings. I have added strings to the language file because I need to have words in front  and after the printed credits on a certificate.   However, I am now getting better at understanding the various places language strings are stored in Moodle.  That educational process took hours on a local host smile

Chris

In reply to Jared Wolthuis

Re: I Don't Think My Certificate Module Installed Properly

by Chris Collman -
Picture of Documentation writers
Hi Jared,
I think Raymond is correct. I installed the 1.9 certificate on several 1.9.9 servers several times in the last month. A test on a new localhost moodle with just the certificate add in and then a localhost that was close to identical to our production server at the time of the install. And then onto our new production server. I did not see any issues with the missing strings. That is strange on a clean install.

The only time I run into those problems is when I try to tweak the certificate code. I do use a en_us language, which defaults in most things to the en version. smile

Chris
In reply to Chris Collman

Re: I Don't Think My Certificate Module Installed Properly

by Karen Williams -

Hello

Well I'm experiencing the same problems as Jared. I downloaded the latest version last Thursday on 23 September and get the following when I test the certificate.

certificate error

I'd be really grateful for some guidance on this, I'm not great with PHP. Also, in the module itself there are fields with these double square brackets:

module error

For example, look at dateformat and the certificate type bering typelandscape. What do I need to do, to get this working?

Many thanks

Karen Williams

In reply to Karen Williams

Re: I Don't Think My Certificate Module Installed Properly

by Raymond Fürst -
You are right, the language file in the current downloadable version is corrupt!

Chardelle, please check the current package!

The current package contains an english language file beginning with the following line:
<?PHP // $Id: certificate.php,v 2.0 2010/09/20

There is also the last line missing with ?>

The package I am currently using identifies as follows:
<?PHP // $Id: certificate.php,v 3.1.9 2008/01/20

It seems as if someone used an outdated language file, made some changes and contributed it into the package. Note that Version number and Date mismatch.

I have added my file to this post. It might not be the freshest, but it works for me. Replace your %moodledir%/mod/certificate/lang/en_utf8/certificate.php with the included version if you like.
Average of ratings: Useful (1)
In reply to Raymond Fürst

Re: I Don't Think My Certificate Module Installed Properly

by Karen Williams -

Fab, thanks, I'll install tomorrow and let you know how I get on.

Thanks again smile

Karen

In reply to Karen Williams

Re: I Don't Think My Certificate Module Installed Properly

by Karen Williams -

Thanks so much! Replacing the certificate.php file worked a treat smile

Just need to put my logo in now and the job's a good 'un

Thanks again

Karen

In reply to Raymond Fürst

Re: I Don't Think My Certificate Module Installed Properly

by Harvey Arkawy -

I downloaded your version of the php file and compared it to the file on our server.  The two files match.  It seems that someone made the correction to the zip file.  With that said...

Our site is relatively new on our new server.  It started at V 1.9.9 and was just updated to V 1.9.10.  Neither version had the Certificate module which I just installed per the experts instructions.  After logging on to the site as an administrator, I clicked on Site Administration/Notifications and received the following message: Version mismatch: certificate can't downgrade 2009080901 -> 2009080900 !

It appears that the installation functioned because I can create a certificate, but the error message has me concerned.  How do I find the most current version of the certificate?

 

Thank you in advance...

Harvey

In reply to Harvey Arkawy

Re: I Don't Think My Certificate Module Installed Properly

by Harvey Arkawy -

I modified the version.php file to show the correct version and the error message went away.