The more students who have received a certificate, the more time it takes to review a certificate.
5 seconds 1 completed user
17 seconds 17 completed users
26 seconds 380 completed users
I have ,looked around, not been able to find a similar problem
BTW
Moodle 1.8
The problem is with the certificate_get_course_grade function from certificate/lib.php. This function gets all the grades for all the users of a course. When a user visits the certificate page, view.php, this function is called. This is why it was taking so long.
The solution will not be ideal if a future course requires a grade on the certificate, and theres over a hundred students. If this happens, modifications to the certificate_get_course_grade function will be needed.
The modification:
Page: mod/certificate/type/landscape/certificate.php
Line: 32
Added:
if($certificate->requiredgrade)
{
grade code...
}
Hi Jason,
that function has been removed from the 1.9 version of the certificate module, and some scalability work has been done to improve it.... when you upgrade to Moodle 1.9 - make sure you get the updated Certificate Module as well!
that function has been removed from the 1.9 version of the certificate module, and some scalability work has been done to improve it.... when you upgrade to Moodle 1.9 - make sure you get the updated Certificate Module as well!