-
Notifications
You must be signed in to change notification settings - Fork 121
[MBL-19657][T] SpeedGrader - Fix non-updating late seconds field #3871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MBL-19657][T] SpeedGrader - Fix non-updating late seconds field #3871
Conversation
refs: MBL-19657 affects: Teacher builds: Teacher release note: Fixed issue where modified late seconds not being saved successfully on SpeedGrader when submitted.
BuildsCommit: Unit tests (8b5f3e7) |
…eSeconds-When-Submitted
| self.posted_grade = posted_grade | ||
| self.seconds_late_override = seconds_late_override | ||
|
|
||
| if let seconds = seconds_late_override, seconds >= 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seconds >= 0 to match the same behavior found on Web (it accepts 0 for late days field without changing the late status).
vargaat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA+1
rh12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code + 1
refs: MBL-19657
affects: Teacher
builds: Teacher
release note: Fixed issue where modified late seconds not being saved successfully on SpeedGrader when submitted.
This is to fix non-updating late seconds override for a submission issue. The change was framed in this minimal way after investigating the logic on the code responsible for dealing with this request here:
https://github.com/instructure/canvas-lms/blob/a5efca0d369decb17e8be8f495f4c2cb7425b056/app/controllers/submissions_api_controller.rb#L985
Clearly it requires that we include
late_policy_statusvalue to belatein order to update the value ofseconds_late_overrideon submissions. And this also been expressed in multiple tests like those:https://github.com/instructure/canvas-lms/blob/a5efca0d369decb17e8be8f495f4c2cb7425b056/spec/apis/v1/submissions_api_spec.rb#L4569
https://github.com/instructure/canvas-lms/blob/a5efca0d369decb17e8be8f495f4c2cb7425b056/spec/apis/v1/submissions_api_spec.rb#L4546
Test Plan
1- Open a late submission in SpeedGrader
2- Try editing late days on UI.
3- Upon request is done (load indicator disappearing), the field must show the edited value.
4- Try switching back and forth between statuses
No grade, excused, { .. custom statuses}then set it tolateand try edit late days again.5- All functions should work as expected upon step 4.
Checklist