Skip to content

Conversation

@RiedleroD
Copy link
Contributor

preliminary work for EDUPL-15

@MasterMarcoHD @mcquenji this new user setting lets the app save what capability to act as per default. There are currently 4 valid states:

  • 0: no preference set, app decides heuristically
  • 4: act as teacher per default
  • 8: act as student per default
  • 16: act as slotmaster per default

The numers are just the usual capability flags - see CAPABILITY_FLAG.php and CAPABILITY_FLAG_ORNONE.php.

As usual, this new user setting is optional when calling update_user, meaning the frontend can implement this whenever you feel like it.

Note that we don't perform any checks on whether a user actually has the preferred capability - I suggest simply not showing invalid configurations in the app (you would have to do that anyway) - and that this setting has no effect on other plugin operations. Also note that this currently only has use for the slot view, but I made it more generalized with potential future features in mind.

If there are any changes I should make, please press "request changes" and we can discuss in a meeting. If not, please approve. Thanks!

@RiedleroD RiedleroD self-assigned this Nov 21, 2025
@RiedleroD RiedleroD merged commit 024f75e into main Nov 27, 2025
3 checks passed
@RiedleroD RiedleroD deleted the EDUPL-22-default-slot-view branch November 27, 2025 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants