When new gradebook is enabled and the user restricts the display to a
specific section, have the selected section carry over to SpeedGrader,
and similarly in the other direction. (If a section is changed in
SpeedGrader, the change will propagate to both old and new gradebooks;
if different selections are selected in OG and NG, SpeedGrader itself
will choose depending on whether new gradebook is enabled.)
fixes GRADE-989
Test plan:
- Have a course with multiple sections and new gradebook enabled
- At least one section should be empty (i.e., contain no students)
- Test the following:
- When you change the selected section in new gradebook and then
open SpeedGrader, the new section should be shown
- Similarly, section changes in SG should be persisted in NG
- Selecting the empty section in SG (or selecting it in NG and then
opening SG) should display an alert indicating no students could be
found, and reload showing all students
- Revert to old Gradebook and check that syncing sections still works
between SG and OG
(Note that selecting a section in new gradebook will *not* directly
update the selected section in old gradebook, and vice versa. Changing
sections in SpeedGrader, however, will update both gradebooks.)
Change-Id: I42b4558f40f3208a93bd00fd6a2224d0f954c96e
Reviewed-on: https://gerrit.instructure.com/159356
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Tested-by: Jenkins
Product-Review: Sidharth Oberoi <soberoi@instructure.com>