Skip to content

Commit

Permalink
clear admin todo ignores after resubmission
Browse files Browse the repository at this point in the history
even if the workflow state didn't change

test plan:
* create an assignment
* submit to the assignment as a student
* as a teacher, clear the needs grading todo list item
 (but don't grade the submission)
* re-submit to the assignment as the same student
* the todo list item should reappear

closes #LS-1489

Change-Id: Ic9dc014cf2edc4a513c511a2ef1d57e3918416c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248185
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
  • Loading branch information
maneframe committed Sep 23, 2020
1 parent 272fd27 commit 0f00d75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ def infer_values
self.quiz_submission ||= Quizzes::QuizSubmission.where(submission_id: self).first
self.quiz_submission ||= Quizzes::QuizSubmission.where(user_id: self.user_id, quiz_id: self.assignment.quiz).first rescue nil
end
@just_submitted = (self.submitted? || self.pending_review?) && self.submission_type && (self.new_record? || self.workflow_state_changed?)
@just_submitted = (self.submitted? || self.pending_review?) && self.submission_type && (self.new_record? || self.workflow_state_changed? || self.attempt_changed?)
if score_changed? || grade_changed?
self.grade = assignment ?
assignment.score_to_grade(score, grade) :
Expand Down

0 comments on commit 0f00d75

Please sign in to comment.