Skip to content

Commit e2cfe7e

Browse files
Comments
1 parent 226674f commit e2cfe7e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Teacher/Teacher/SpeedGrader/Grading/Points/ViewModel/SpeedGraderSubmissionGradesViewModel.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,15 @@ class SpeedGraderSubmissionGradesViewModel: ObservableObject {
151151

152152
var isGradeChanged: Bool {
153153
guard let initialGrade else {
154+
// Checking if last submission is reflected on lately generated
155+
// grade state of stored objects of concern (Assignment & Submission).
156+
// Which implies it submitted for first time at this session.
154157
return lastSubmittedGrade != nil
155158
&& lastSubmittedGrade == gradeState.originalGrade
156159
}
160+
161+
// Check if the grade of lately generated state is different from the one
162+
// we started this session with.
157163
return gradeState.originalGrade != initialGrade
158164
}
159165

0 commit comments

Comments
 (0)