We are using Moodle 2.1.2 and Moodle Certificate 2012040201
We updated to Moodle Certificate 2012040201 yesterday.
Initially after the upgrade the Certificate threw to a white blank screen. We corrected this by updating the code in the lib.php file.
This morning we have found when a user selects the certificate for the first time the following message appears:
"Coding error detected, it must be fixed by a programmer: Invalid context specified"
"More information about this error"
We switched on the debugging page to reveal:
Error: could not insert new context level "70", instance "87". cm with id 87 does not exist
• line 1882 of /lib/accesslib.php: call to debugging()
• line 2218 of /lib/accesslib.php: call to create_context()
• line 334 of /mod/certificate/lib.php: call to get_context_instance()
• line 394 of /mod/certificate/lib.php: call to certificate_get_teachers()
• line 878 of /mod/certificate/lib.php: call to certificate_email_teachers()
• line 121 of /mod/certificate/view.php: call to certificate_issue()
The crazy thing is the message is intermitant. Should the user ignore the error and cleck the certificate for a second time the Certificate will display and all is well.
What we have noted is if the date is visable on screen (see attached image) the certificate will appear. If the date is not present then 100% of the time the error will show.
Any assistance would be greatly appreciated
Nicole and Richard C.