Skip to content

multiple selections for userlist

elizabeth xiao requested to merge localsystem/plom:ui_multiple_select into main

This update allows the possibility of selecting multiple users in the userlist, in order to perform actions on several users at once. The functionality of "Toggle enable/disable" has been split into two buttons, "Enable user(s)" and "Disable user(s)". Useful for mass-disabling marker accounts after the marking period, when you presumably no longer want TAs poking around the server.

There are some hacks included to prevent the user from disabling the manager and HAL. Note that attempting to disable HAL even in the current main branch leads to this error:

  File "/Users/elizabeth/program/plom/plom/manager/manager.py", line 1899, in toggleEnableDisable
    self.msgr.setUserEnable(user, False)
  File "/Users/elizabeth/program/plom/plom/managerMessenger.py", line 1228, in setUserEnable
    raise PlomSeriousException(f"Some other sort of error {e}") from None
plom.plom_exceptions.PlomSeriousException: Some other sort of error 400 Client Error: Bad Request for url: https://127.0.0.1:41984/enableDisable/HAL

likely because HAL is not actually a user on the userlist. This error terminates the manager.

Notes:

  • routes need to be updated to account for the splitting of functionality, which has not been done yet
  • is there a way to examine selected rows instead of entries? Currently I'm using extended list slicing to get every 7th selected item (which corresponds to the first element in each row) because there are 7 columns.
Edited by elizabeth xiao

Merge request reports