-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The FacilityDataset preset
field is not used to reset facility defaults on UI
#7334
Comments
Currently, the way we handle the "reset" logic is by calling this Vuex action from the page kolibri/kolibri/plugins/facility/assets/src/views/FacilityConfigPage/index.vue Lines 233 to 237 in 3a290e3
This works by updating the settings on the client using this hardcoded map, then sending that map back to the frontend. kolibri/kolibri/plugins/facility/assets/src/modules/facilityConfig/actions.js Lines 38 to 49 in 3a290e3
However, this might be better handled on the backend by either introducing a new ViewSet or extending the current Currently, the kolibri/kolibri/core/auth/api.py Lines 136 to 166 in 3a290e3
|
Observed behavior
Screenshot from https://kolibri-beta.learningequality.org/en/facility/#/a3f606630690237bbe94fe2a1a850af4/settings
Clicking "Reset to defaults" will always update the checkboxes to the default settings for "nonformal" facilities.
This will happen even if the
FacilityDataset.preset
field is notnonformal
. This happens because we have hardcoded the defaults in this JS file:https://github.com/learningequality/kolibri/blob/release-v0.14.x/kolibri/plugins/facility/assets/src/modules/facilityConfig/actions.js#L47-L59
Expected behavior
When a user clicks "reset to defaults", the defaults used are based on the
FacilityDataset.preset
field. And the end result are that the settings match what is this file. For example, if a facility was set up as an informal/personal device, then "Allow learner to edit username" will be checked, and so on, because the default value oflearner_can_edit_username
istrue
.https://github.com/learningequality/kolibri/blob/release-v0.14.x/kolibri/core/auth/constants/facility_configuration_presets.json
User-facing consequences
Admins might not realize that a "preset" is actually chosen during the Setup Wizard and that these settings are related to that preset. Correcting the defaults after a reset would require knowing of the existence of the JSON file linked above and manually correct them.
Errors and logs
…
Steps to reproduce
preset
, but will be for the nonformal preset.Context
The text was updated successfully, but these errors were encountered: