Describe the bug
There appears to be an exception thrown if the user selects " Remove all students from rotating sections " followed by a "Remove unregistered students (registration section=NULL) from rotating sections and put newly registered students into rotating section with fewest members "
Expected behavior
No exception should be thrown, if the user is trying to do something invalid or wrong an error message should be shown instead
To Reproduce
Steps to reproduce the behavior:
Go to the manage sections page in a course
Scroll down to the Manage Rotating Sections part of the page
Select the radio button " Remove all students from rotating sections " and hit submit
Then select the radio button "Remove unregistered students (registration section=NULL) from rotating sections and put newly registered students into rotating section with fewest members " and hit submit
See error
Additional context
The operation does appear to do something, the sections are distributed back after the first removal so not sure if this is completely failing or what the expected behavior is
This appears to only happen when there's more than 2 rotating sections
To be more specific, the issue is when there is no one in the rotating sections the curr_section_sizes would contain NULL elements, which would break the array_map, since its subtracting using a NULL element
Describe the bug There appears to be an exception thrown if the user selects " Remove all students from rotating sections " followed by a "Remove unregistered students (registration section=NULL) from rotating sections and put newly registered students into rotating section with fewest members "
Expected behavior No exception should be thrown, if the user is trying to do something invalid or wrong an error message should be shown instead
To Reproduce Steps to reproduce the behavior:
Additional context The operation does appear to do something, the sections are distributed back after the first removal so not sure if this is completely failing or what the expected behavior is
This appears to only happen when there's more than 2 rotating sections