sakai icon indicating copy to clipboard operation
sakai copied to clipboard

SAK-49894 WC SakaiGrader distorts group assignment scores with overrides

Open hornersa opened this issue 10 months ago • 0 comments

Jira: https://sakaiproject.atlassian.net/browse/SAK-49894

The intent of this PR is to share how to fix the specific bug described in the test plan of SAK-49894, the core problem being in AssignmentEntityProvider. The approach I took was to add a new parameter “mergeOverride” that the Grader code could explicitly invoke to solve this issue without breaking some other scenario (which I don’t know if such exists, but erring on the side of caution I thought it might).

Furthermore, the introduction of ‘mergeOverride’ exposed another bug where the “grade” value that would be returned is not formatted for displaying to users. I remove this logic (lines 682-685), given that it seems redundant based on the if-else conditional immediately preceding it (unless there’s something subtle here that I’m missing).

Given my aforementioned caution regarding scenarios to preserve (i.e., where ‘mergeOverride’ should indeed remain ‘true’), I assume that adding a unit test regarding this and other cases would be warranted. I did not attempt that here but others are more than welcome to push a commit here that would take care of that.

Finally, I made two fixes here to Grader’s text field. The “id” attribution should be conditional, displaying only for the Grade field, and not also for the grade override fields. Also, I repaired the “class” attribute such that the value of “points-input” will actually render in the DOM for the Grade field. This is important for decreasing that field’s width; otherwise, for peer evaluations, the info popover icon is forced to a new line/row.

hornersa avatar Mar 26 '24 22:03 hornersa