Skip to content

Commit

Permalink
SAK-42469 - check for existing grade comment and bring it along for t…
Browse files Browse the repository at this point in the history
…he ride, otherwise it gets wiped out. (sakaiproject#7380)
  • Loading branch information
maurercw authored and ern committed Oct 1, 2019
1 parent def5da3 commit 867a463
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1943,6 +1943,12 @@ public void saveGradeAndExcuseForStudent(final String gradebookUid, final Long g
gradeDef.setGrade(grade);
gradeDef.setExcused(excuse);

// Lookup any existing comments and set the text so that they don't get wiped out on a save
CommentDefinition gradeComment = getAssignmentScoreComment(gradebookUid, gradableObjectId, studentUid);
if (gradeComment != null) {
gradeDef.setGradeComment(gradeComment.getCommentText());
}

final List<GradeDefinition> gradeDefList = new ArrayList<>();
gradeDefList.add(gradeDef);

Expand Down

0 comments on commit 867a463

Please sign in to comment.