Folder grading: selection of pass-n submissions not always yielding highest grade
When assignments within a pass-n-of-m folder have different weights (not really common), WebLab tries to select the set of submissions that yield the highest end grade at the folder level. When there are n submissions that pass, WebLab just selects the submissions with the highest grades, which is correct.
Submitted by Elmer van Chastelet on 21 February 2022 at 09:05
However, when there are 1 or more submissions that fail as part of the n submissions, WebLab tries to pick the submissions that have the least negative impact on the folder grade. The formula it uses for this selection does not consider the weight of the passing submissions. In some cases, this resulted in a sub-optimal selection of n submissions.
Change this to consider the total passing weight, and add tests.