kolibri
kolibri copied to clipboard
Select all users - Incorrect value for the number of selected users
Observed behavior
Selecting and deselecting the 'Select all' button after selecting or deselecting a specific user results in incorrect number of users displayed as selected. This is valid for both Facility > Class > Enroll learners and Facility > Class > Assign coaches This results in minor confusion.
Steps to reproduce the issue
- Install the latest 0.16 develop build
- Go to Facility > Class > Enroll learners or Facility > Class > Assign coaches
- Select the 'Select all' checkbox and observe the number of the selected users
- Deselect some of the users and after that select again the 'Select all' checkbox - note that the number of selected users is no longer correct
Video
https://user-images.githubusercontent.com/79847249/185088853-011d8b9f-0f61-4709-911d-1e16f3ca7256.mp4
Usage Details
Windows 10 and Ubuntu 20 - Chrome, Firefox, Edge
@radinamatic
Hi @pcenov! Can I take up this issue 😃
This issue is also extant on 0.15.x so should be fixed there.
@camperjett if you would like to take this issue on, you are welcome to. The relevant code is found in the facility plugin in the UserTable component: https://github.com/learningequality/kolibri/blob/release-v0.15.x/kolibri/plugins/facility/assets/src/views/UserTable.vue#L208
The issue seems to be caused by not ensuring that the selected users are unique by their id!
@pcenov can i work on this issue ?