MDL-42494 Fix workshop coding exception if all assessments have zero weight
authorDavid Mudrák <david@moodle.com>
Wed, 23 Oct 2013 09:45:18 +0000 (11:45 +0200)
committerDavid Mudrák <david@moodle.com>
Wed, 23 Oct 2013 09:45:18 +0000 (11:45 +0200)
commite01d4a22360f0876659ecdf53a68511aaefe9c0b
tree3d20d07ae0640cf69ba9e3084635fa99fbdd155c
parent34fb3545eae9315324351ee1076cd2f7ac67339c
MDL-42494 Fix workshop coding exception if all assessments have zero weight

If all assessments for the given submission have zero weight, the grading
evaluation plugin "Comparison with the best assessment" is unable to decide on
the average assessment as it ignores those with zero weight. In such rare case,
it makes sense to set the grading grade to null and prevent the coding
exception.
mod/workshop/eval/best/lib.php