All Velocity tools using PagedResourceActionII which have a table of data, a paginator component and one or more filter components (search, group/section filter, etc.) are susceptible to generating IndexOutOfBoundsExceptions. The logic to validate page number and page size is slightly flawed.
An example can be seen in Assignments:
- Ensure you have 6 or more students/access users in your site
- Create a group with only 1 student/access user
- In Assignments, ensure there is at least 1 assignment created (bare bones assignment is fine)
- Go to 'Grade Report'
- Use the paginator to move to any page other than the first (change page size if necessary)
- Use the filter drop down to select the group you created in step 2
- Notice bug report is shown in the UI, and a stacktrace is thrown in the logs for an IndexOutOfBoundsException:
This bug has been long standing, and is reproducible as far back as 2.9.1 (probably earlier). If the requested (current) page number is out of range of the list size due to a filter being applied, the validation logic should reset to the first page in the list.