Skip to content

Commit

Permalink
SAK-49894 SakaiGrader distorts group assignment scores with overrides (
Browse files Browse the repository at this point in the history
  • Loading branch information
hornersa authored Aug 16, 2024
1 parent a874497 commit e4d1d6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,6 @@ private Map<String, Object> submissionToMap(Set<String> activeSubmitters, Assign
submission.put("grade", assignmentService.getGradeDisplay(as.getGrade(), assignment.getTypeOfGrade(), assignment.getScaleFactor()));
}

if (StringUtils.isNotBlank(as.getGrade())) {
submission.put("grade", as.getGrade());
}

boolean draft = assignmentToolUtils.isDraftSubmission(as);
if (draft) {
submission.put("draft", draft);
Expand Down Expand Up @@ -932,9 +928,6 @@ private Map<String, Object> submissionToMap(Set<String> activeSubmitters, Assign

if (!feedbackAttachments.isEmpty()) submission.put("feedbackAttachments", feedbackAttachments);

String grade = assignmentService.getGradeForSubmitter(as, as.getSubmitters().isEmpty() ? null : as.getSubmitters().stream().findAny().get().getSubmitter());
if (StringUtils.isNotBlank(grade)) submission.put("grade", grade);

String status = assignmentService.getSubmissionStatus(as.getId(), true);
if (StringUtils.isNotBlank(status)) submission.put("status", status);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,12 @@ export const graderRenderingMixin = Base => class extends Base {
${this._renderFailed()}
` : nothing }
${this.gradeScale === SCORE_GRADE_TYPE ? html`
<input id="score-grade-input" aria-label="${this.i18n.number_grade_label}"
<input id=${ifDefined(submitter ? undefined : "score-grade-input")} aria-label="${this.i18n.number_grade_label}"
@keydown=${this._validateGradeInput}
@keyup=${submitter ? undefined : this._gradeSelected}
data-user-id="${ifDefined(submitter ? submitter.id : undefined)}"
type="text"
class="points-input ${ifDefined(submitter ? "grader-grade-override" : undefined)}"
class="points-input ${ifDefined(submitter ? "grader-grade-override" : "")}"
.value=${submitter ? submitter.overridden ? submitter.grade : "" : this._submission.grade} />
${this._renderSaved()}
${this._renderFailed()}
Expand Down

0 comments on commit e4d1d6e

Please sign in to comment.