Certificate Module Problem

Certificate Module Problem

by wyman Griffin -
Number of replies: 17

I have installed the Certificate Module for 1.8. The system notified me that the install was good. I also copied the certificate.php file in the lang/en-uft8

When I edit the last topic of the course I created I want to add a certificate. I can see the Certificate in the Activity List. But when I click on the Certificate button,  all that happens is a new page appears and it is all white. Nothing else. No menu, nada. What else do I need to do to get the certificate to work. Or am I using the module incorrectly.

Average of ratings: -
In reply to wyman Griffin

Re: Certificate Module Problem

by Chardelle Busch -
Picture of Core developers
What is the certificate version # and your moodle version #.

As for your question in another forum about using--see the Moodle docs for info about installing mods, and the certificate itself has help files for setting it up.
In reply to wyman Griffin

Re: Certificate Module Problem

by Walter Hardy -
Some of our students are reporting this same issue with the certificate producing a blank page. But I can't reproduce it. Has anyone else seen this issue? Is this an issue with Acrobat reader trying to update itself and causing a blank screen in the process? We're on Moodle 1.9 beta 2 and certificate 3.1.8 22070613. Thanks.

In reply to Walter Hardy

Re: Certificate Module Problem

by Chardelle Busch -
Picture of Core developers
Hi Walter,

The 1.8 version of the certificate is not compatible with Moodle 1.9, and, the latest version of the certificate, is not compatible with beta 2. You need the latest 1.9 and latest cert (I just uploaded it today, so it won't be available until tomorrow).
In reply to Chardelle Busch

Re: Certificate Module Problem

by Brian Schmidt -
Hi Chardelle,

I just downloaded the one from the Moodle server (http://download.moodle.org/plugins19/mod/certificate.zip) as well as the one from your server (http://promoodle.com/index.php?option=com_docman&task=doc_download&gid=8&Itemid=60) and noticed they are different sizes. It looks like the smaller of the two, which I found on your server, might be the newer version. Is that correct?

Thanks!
In reply to Brian Schmidt

Re: Certificate Module Problem

by Chardelle Busch -
Picture of Core developers
Thanks for the report Brian. I'll go ahead and change my download to get it from the plugins page now that the cvs is fixed.

They are both identical -- the cvs version includes some lang folders other than en.
In reply to Chardelle Busch

Re: Certificate Module Problem

by Brian Schmidt -
Hi Chardelle,

I finally got the chance to do some testing with this today and upgraded my Moodle 1.9 beta 4 to the latest nightly build (2007101508.07) and then went to download the newest Certificate module from the plug-ins page. However, when I tried to add a certificate to my test class, I received this error:

Fatal error: Call to undefined function: grade_get_grade_items_for_activity() in /home/httpd/httpdocs/moodle-test/mod/certificate/lib.php on line 744

I'll head to the Tracker to file a report.

Thanks again for all of your work!
In reply to Brian Schmidt

Re: Certificate Module Problem

by Chardelle Busch -
Picture of Core developers
That's odd Brian. I just updated to the latest moodle (which now is .08) and that function is still there (it resides in grade/querylib.php, so maybe you can check this file). It's possible that the .07 version had a hiccup. Could you try upgrading your moodle again?
In reply to Chardelle Busch

Re: Certificate Module Problem

by Brian Schmidt -
Now I'm a little confused. I just downloaded the latest nightly build, but when I go to the admin section, it's still showing .07 as the version...? mixed

However, I did a search for that function both before and after the "upgrade" to the latest nightly build and found it in both copies of grade/querylib.php. Right now, I see it plain as day on line 224.

So, I tried again to create a Certificate activity and got the same error message. Ah! Just as I'm typing this, I went back to certificate/lib.php and saw that it does not reference grade/querylib.php. Is that the issue? I added require_once($CFG->dirroot.'/grade/querylib.php'); at the top and got past that initial error.

However, now I'm encountering 2 additional errors, which may be a result of adding that line:
  1. It doesn't seem to lock the certificate based on the grade of the assignment I have it attached to. I selected for it to require a 100% grade, issued a 90% grade, but was still allowed to click on the button to receive the certificate anyway.
  2. After clicking on the button to receive the certificate, I now receive this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Student',code = 'X5axFeeHfp',classname = 'Test: O'Class',

UPDATE tmdl_certificate_issues SET certificateid = '1',userid = '3',timecreated = '1204307249',studentname = 'Test O'Student',code = 'X5axFeeHfp',classname = 'Test: O'Class',certdate = '1182834000',reportgrade = NULL,mailed = '0' WHERE id = 1
  • line 1682 of lib/dmllib.php: call to debugging()
  • line 569 of mod/certificate/lib.php: call to update_record()
  • line 112 of mod/certificate/view.php: call to certificate_issue()

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/httpdocs/moodle-test/lib/weblib.php:6141) in /home/httpd/httpdocs/moodle-test/lib/fpdf/fpdf.php on line 1035
FPDF error: Some data has already been output to browser, can't send PDF file
In reply to Brian Schmidt

Re: Certificate Module Problem

by Brian Schmidt -
Further testing...

Problem #1 is still an issue for me.

I've found the reason for problem #2:
Since we have classes and students that have apostrophes in their names, and we've run into issues with that before, I put an apostrophe in both the class name and student name in order to test this. And that appears to be the problem. If I remove the apostrophe from the class name and student name, then the certificate proceeds and generates the correct PDF.

I will also update the Tracker submission with this info.
In reply to Brian Schmidt

Re: Certificate Module Problem

by Chardelle Busch -
Picture of Core developers
Thanks Brian,
Apparently update_record now requires addslashes_object, so the apostrophe problem has been fixed.

As for the locking problem--I just tested this and it worked for me locking an assignment. One thing to check is your permissions--is it possible that the user you tested for has the role--obviously the certificate does not lock for teachers. Also, could you take a look at your certificate locking table and see if there's a problem there?
In reply to Chardelle Busch

Re: Certificate Module Problem

by Brian Schmidt -
Hi Chardelle,

I think I'm almost there...

As of the latest copies of 1.9 (official) and Certificate I downloaded today, the locking appears to be working correctly for me now.

I've not been able to test the changes made for addslashes_object just yet, as I'm getting a new error when I click on the button to receive the certificate. I've filed this in the Tracker under CONTRIB-317.
In reply to Chardelle Busch

Re: Certificate Module Problem

by Walter Hardy -
Thank you Chardelle! We'll install the latest code and plug-in. By the way, we modified the plug-in slightly to reduce font size of the course name, as it was running off the screen (we've got a long name).

Walter
In reply to Walter Hardy

Re: Certificate Module Problem

by Dixie Harrison -

Precisely the same problem Mr. Hardy has with students reporting that they get a blank screen instead of the certificate but using Moodle 1.8.4 and certificate version 3.1.8 20070613.  I also note that it happens with Internet Explorer version 7 but not Firefox 2.  I'm still hunting for someone with IE 6 so I can try it there.

Thanx!

In reply to Dixie Harrison

Re: Certificate Module Problem

by Chardelle Busch -
Picture of Core developers
Hi Dixie,

The blank page means that the certificate is throwing up an error so it can't be displayed. To see the error message you need to go to the admin block, server, debugging, and turn debugging on.
In reply to Chardelle Busch

Re: Certificate Module Problem

by Dixie Harrison -

Thank you!

I did as you suggested and changed the debug from minimal to normal then went back to the page.  The message it displayed was:

Notice: Undefined property: customtext in (path)/mod/certificate/type/landscape/certificate.php on line 123

I checked to see if there was any custom text defined in the certificate setup screen but the box where it should go was empty.

Please let me know what to do next.

Thank you!
Dixie

In reply to Dixie Harrison

Re: Certificate Module Problem

by Chardelle Busch -
Picture of Core developers
Hi Dixie,

It's difficult for me to test things when I can't get the error. Could you please replace the above file with the one attached and let me know if that fixes it?
In reply to Chardelle Busch

Re: Certificate Module Problem

by Dixie Harrison -

We've got a new error message:

Notice: Undefined property: customtext in /(path)/mod/certificate/type/landscape/certificate.php on line 123

Notice: Undefined variable: customtext in /(path)/mod/certificate/type/landscape/certificate.php on line 132

And it won't show the certificate in Firefox at all now.

Would it be helpful if I created an account that you could use to poke about a bit?

Dixie