instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.42k stars 2.42k forks source link

Revert "worflow_state" when grade is removed from assignment #2244

Open muscle-hamster opened 10 months ago

muscle-hamster commented 10 months ago

Summary:

When a teacher incorrectly enters a grade for an assignment and then reverts the status to "Ungraded" in the gradebook the submissions API still shows that assignment as graded even though it's not. Although there is no score, the expected behavior would be for the workflow_state to revert as well.

Steps to reproduce:

  1. Enter a grade for an assignment
  2. Change that assignment back to "Ungraded"
  3. Query the submissions API /api/v1/courses/:course_id/students/submissions

Expected behavior:

Assignment that was changed back to "Ungraded" also reverts from having a workflow_state of graded to whatever the previous state was, either submitted, unsubmitted or pending_review

Actual behavior:

Assignment stays in the graded state

Additional notes: