From 2aa220094c31f964ea99d3fa7c6f54514296c188 Mon Sep 17 00:00:00 2001 From: Adeel Ehsan Date: Thu, 28 Oct 2021 15:50:47 +0500 Subject: [PATCH] feat: Remove el option from education levels (#29150) If COPPA flag is set to true then remove el options from education levels VAN-760 --- openedx/core/djangoapps/user_authn/views/registration_form.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openedx/core/djangoapps/user_authn/views/registration_form.py b/openedx/core/djangoapps/user_authn/views/registration_form.py index 8306942026..9ab83e1547 100644 --- a/openedx/core/djangoapps/user_authn/views/registration_form.py +++ b/openedx/core/djangoapps/user_authn/views/registration_form.py @@ -595,7 +595,10 @@ class RegistrationFormFactory: # The labels are marked for translation in UserProfile model definition. # pylint: disable=translation-of-non-string + options = [(name, _(label)) for name, label in UserProfile.LEVEL_OF_EDUCATION_CHOICES] + if settings.ENABLE_COPPA_COMPLIANCE: + options = filter(lambda op: op[0] != 'el', options) form_desc.add_field( "level_of_education", label=education_level_label,