Possible Bug: Required Grades

Possible Bug: Required Grades

by Jonathan Schmidt -
Number of replies: 2
I have a topics-based course with 3 topics, each a SCORM/AICC activity. Each of these is worth 100 points. The certificate is set to require a course grade of 70%. So a total of 300 points for the course and a minimum of 210 points earned to receive a certificate.

But when a student has more than 70 points in any of the activities, say 100 points, they are allowed to receive a certificate. Below 70 points the error message displayed is something like "Your current course grade (60.00%) is below the grade required (100%) to receive your certificate." Raw points are displayed as a percentage here, rather than a percentage of the total course points.

If a student has 100 points in one activity the gradebook's aggregated course total is 33%, which is correct. So it would seem the certificate module is calculating the score incorrectly somewhere.

I can set the Dependent Activities to include each of the activities and requires those scores be 70%, but I really don't want to have to link each and every activity in each course on the site, especially since this worked in Moodle 1.8.2.

Is this a bug? Am I missing something in the configuration? Does this work for others, in which case I could reinstall Moodle and maybe fix the problem?

  • Moodle 1.9.2
  • Certificate module for 1.9
Average of ratings: -
In reply to Jonathan Schmidt

Re: Possible Bug: Required Grades

by Jonathan Schmidt -
Definitely a bug. See bug CONTRIB-777 in Moodle Tracker. It's easily fixed by changing lib.php and lang/***/certificate.php:

lib.php: change $coursegrade->points to $coursegrade->percentage on lines 1385-5.

certificate.php: change $a->current%% to $a->current on line 101 ("%" is already part of string)
In reply to Jonathan Schmidt

Re: Possible Bug: Required Grades

by Jonathan Schmidt -
Duh, it makes more sense to use abs():
1385:
if ($certificate->requiredgrade > abs($coursegrade->percentage)) {

1386: $a->current = abs($coursegrade->percentage);

and lang/.../certificate.php needn't be changed at all.