Closed tonyjbutler closed 9 years ago
Hi Tony, thanks for the fix. We no longer need it though as the internal release we were waiting on went out this week so you can now give a grade 0 in the DV and it'll return that value and not NULL to Moodle.
When you say 'internal release' are you referring to a new release of the API? Has this behaviour been changed?
Yes, the API was returning NULL, it now returns 0.
Oh, good. So when did/does the new API go live?
It's gone live this week. There's no need for a plugin upgrade though.
OK, thanks. I've asked Caroline Westgarth for access to an API development roadmap so we can avoid working needlessly on issues like this one in the future.
If a teacher awards a grade of zero in GradeMark, the grade returned to the Moodle PP is an empty value, which is the same as if the submission is ungraded, even though the grade field in GradeMark will correctly display either '0' or '--' depending on the actual state.
Sometimes our teachers need to award a zero grade (e.g. for an excessively late submission) and it is important that this is reflected as a zero grade (as opposed to 'ungraded') in the Moodle gradebook, as this is then synced back to our student information system. I've created a patch that will successfully sync back a zero grade if the teacher has previously awarded a non-zero grade (https://github.com/jmcgettrick/MoodleDirectV2/pull/482), but without the ability to distinguish between a zero grade and 'ungraded' I don't think it is possible to do this for currently ungraded submissions, otherwise all ungraded submissions would receive a zero grade the first time they were reviewed by a teacher in GradeMark, which would cause a lot of confusion and distress.