grade for checklist

Re: grade for checklist

by Shufeng Bai -
Number of replies: 2
Looking at the code. It appears that only when max is changed or the completion is changed or the completion type is changed the grade got updated. I am not sure what is completion type is here but when I changed on an item from not required to required, this update was not triggered.  I can confirm that when I change the max grade, it did get updated.

In reply to Shufeng Bai

Re: grade for checklist

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The completion type is whether the activity is marked as complete manually (by the student ticking the standard manual completion box) or via completion rules (such as the student ticking off x% of the items in the checklist).

However, neither of these are directly relevant, as it's not the editing of the checklist settings which is the issue, but the editing of the items within the checklist.

I've pushed an update into github which should fix the issue whereby switching an item between optional and required (or adding / deleting an item) did not update the student grades for the checklist (even though this action does affect the calculated percentage and, hence, the grade).

I didn't want the grade recalculation to run for every change to the checklist items (on a course with a lot of students, this could noticeably slow the process down), so, instead, I'm queuing up a background cron task to do the recalculation (triggered by a relevant change to the checklist items - I don't trigger it if the checklist has just been rearranged, without adding/removing items).

Are you able to test the code published at https://github.com/davosmith/moodle-checklist to see if it solves your problem?

(This update will be published to the plugins directory in time for the Moodle 4.0 release - I'm not going to do an extra release, with that being so close at hand).
In reply to Davo Smith

Re: grade for checklist

by Shufeng Bai -
Davo,
Thank you very much for the quick fix. The code looks good to me. However, we are currently running on MoodleCloud, so I can't upload your latest code to test. I have to wait.

Recently, I noticed a strange behavior. In a student's grade report, I noticed two checklist grade is "-" (empty). For most cases, if a student has completed any activity, the grade should be 0 instead of empty. Do know what might cause these empty grades? Thanks a lot.