choltha
(CT)
1
I want to add fields with authn MFE
I Create plugins
from tutor import hooks
hooks.Filters.ENV_PATCHES.add_item(
(
"openedx-lms-common-settings",
"FEATURES['ENABLE_DYNAMIC_REGISTRATION_FIELDS'] = True"
)
and activate
If I want add fields gender ,year_of_birth, level_of_education to register page
current register page
I don’t understand what to do next to make it work.
harout7
(Harout Mardirossian)
2
Hi @choltha
If you want to add fields from the available extra fields you can add them to a plguin like
REGISTRATION_EXTRA_FIELDS["gender"] = "required"
you can also check this reply
choltha
(CT)
3
Thank you for answering @harout7
I clone GitHub - pomegranited/tutor-contrib-enable-feature-flag: Demonstrates how to add a feature flag to Tutor and add code
tutor-contrib-enable-feature-flag/tutorenable_feature_flag/plugin.py at main · pomegranited/tutor-contrib-enable-feature-flag · GitHub
hooks.Filters.ENV_PATCHES.add_item(
(
"openedx-lms-common-settings",
"FEATURES['ENABLE_DYNAMIC_REGISTRATION_FIELDS'] = True"
"REGISTRATION_EXTRA_FIELDS['gender'] = required"
)
save file and install plugin enable-feature-flag Am I correct?
choltha
(CT)
4
I add REGISTRATION_EXTRA_FIELDS[“gender”] = “required” to plugin but not working
harout7
(Harout Mardirossian)
5
Hi @choltha
I have used YAML plugin to add additional fields in olive release (tutor, version 15.3.9) and it worked.
name: additionalfields
version: 0.1.0
patches:
openedx-lms-common-settings: |
REGISTRATION_EXTRA_FIELDS["gender"] = "required"
choltha
(CT)
6
Thank your @harout7
I use plugin additionalfields.yml and enable
name: additionalfields
version: 0.1.0
patches:
openedx-lms-common-settings: |
REGISTRATION_EXTRA_FIELDS["gender"] = "required"
not working
show config
launch or tutor images build openedx?
I user plugin
hooks.Filters.ENV_PATCHES.add_item(
(
"mfe-lms-production-settings",
"""
MFE_CONFIG["ENABLE_DYNAMIC_REGISTRATION_FIELDS"] = "true"
"""
)
)
result register page from
To default fields (name, email, username, password).
I can add Fields to this code?
hooks.Filters.ENV_PATCHES.add_item(
(
"mfe-lms-production-settings",
"""
MFE_CONFIG["ENABLE_DYNAMIC_REGISTRATION_FIELDS"] = "true"
"""
)
)
after edit it working
hooks.Filters.ENV_PATCHES.add_item(
(
"mfe-lms-production-settings",
"""
ENABLE_DYNAMIC_REGISTRATION_FIELDS = "true"
MFE_CONFIG["ENABLE_DYNAMIC_REGISTRATION_FIELDS"] = "true"
REGISTRATION_EXTRA_FIELDS["gender"] = "required"
REGISTRATION_EXTRA_FIELDS["year_of_birth"] = "required"
EGISTRATION_EXTRA_FIELDS["city"] = "required"
EGISTRATION_EXTRA_FIELDS["state"] = "required"
REGISTRATION_EXTRA_FIELDS["country"] = "required"
REGISTRATION_EXTRA_FIELDS["title"] = "required"
REGISTRATION_EXTRA_FIELDS["terms_of_service"] = "required"
REGISTRATION_EXTRA_FIELDS["level_of_education"] = "required"
REGISTRATION_EXTRA_FIELDS["mailing_address"] = "required"
REGISTRATION_EXTRA_FIELDS["specialty"] = "required"
"""
)
)
But I selected the country field but it didn’t work.