First...thanks for this module. It's exactly what I need.
Unfortunately, after installing, I receiving the following error when attempting to create a certificate:
Fatal error: Call to undefined method stdClass::scoreChanged() in C:\xampp\htdocs\tlcia\sites\all\modules\certify\certify.module on line 681
The certificate is referencing a Book and 5 Quizzes (which all happen to also be in the book).
When I go to another page on the site, I get "Course Certificate has been created" followed by:
user warning: Table 'tlcia.certify_book_viewlog' doesn't exist query: SELECT nid FROM certify_book_viewlog WHERE uid = 1 AND bid = 1 in C:\xampp\htdocs\tlcia\sites\all\modules\certify\certify_book\certify_book.classes.inc on line 105.
user warning: Table 'tlcia.certify_book_viewlog' doesn't exist query: INSERT IGNORE INTO certify_book_viewlog (bid, nid, uid) VALUES (1, 23, 1) in C:\xampp\htdocs\tlcia\sites\all\modules\certify\certify_book\certify_book.module on line 61.
This is on Drupal 6.25
Comments
Comment #1
mjgruta commentedI have the same problem. I think this is a PHP compatibility issue, its not compatible with PHP 5.3.x
I have tried using PHP 5.2.x and it works. Are you using PHP 5.3.x?
Comment #2
fuzzy76 commentedThank you both for reporting this! jhayzhon, it sort of works anyway since the "score changed" notifications aren't really used for anything yet. They're just plumbing for the upcoming certifcate progress cache. I think the difference in behaviour you see is due to different error logging settings in php.ini.
I actually can't believe this blatant error slipped through to release. :( If you want to fix it, you need to change line 681 in certify.module from
$cert->scoreChanged();to:
$cert->certificate->scoreChanged();The fix will be part of the next release. It does not break any functionality, so if you have error display off on your production site (as you should), it is harmless.
Comment #3
fuzzy76 commentedmrmelson, when it comes to your other bug, have you updated certify to 2.0 without visiting /update.php? :)
Comment #4
mrmelson commentedThe root cause of my errors was stale data in the system table from previous modules that I had tried & removed (eg Certificate).
I manually removed the old rows that were still there from any other modules that I no longer am using and reinstalled Certify. Worked fine.
Prior to cleaning up the system table, installing this module's certify_book module would not create the certify_book_viewlog table. This caused the above SQL errors.
Comment #5
mrmelson commentedI'm using PHP Version 5.2.9
Comment #7
fuzzy76 commentedThis was probably partially caused by #1593900: dr_certify_book_viewlog' doesn't exist