From 623cb0d6aea6126060e54e77e8f6b1ad6b7a14b7 Mon Sep 17 00:00:00 2001 From: Cole Rogers Date: Thu, 31 May 2018 11:12:33 -0400 Subject: [PATCH] Removed GDPR flag and its functionality --- .../pages/lms/login_and_register.py | 10 ++----- common/test/acceptance/tests/lms/test_lms.py | 12 +++------ .../lms/test_lms_instructor_dashboard.py | 1 - .../views/account_settings_factory.js | 5 ++-- lms/templates/header/header.html | 4 +-- .../student_account/account_settings.html | 18 +++++-------- openedx/core/djangoapps/user_api/api.py | 6 ++--- .../djangoapps/user_api/tests/test_views.py | 26 ++++++++++++++----- .../features/course_experience/__init__.py | 4 --- 9 files changed, 37 insertions(+), 49 deletions(-) diff --git a/common/test/acceptance/pages/lms/login_and_register.py b/common/test/acceptance/pages/lms/login_and_register.py index a3f342219f..c23fe7210d 100644 --- a/common/test/acceptance/pages/lms/login_and_register.py +++ b/common/test/acceptance/pages/lms/login_and_register.py @@ -188,8 +188,7 @@ class CombinedLoginAndRegisterPage(PageObject): ).fulfill() def register( - self, email="", password="", username="", full_name="", country="", favorite_movie="", - terms_of_service=False + self, email="", password="", username="", full_name="", country="", favorite_movie="" ): """Fills in and submits the registration form. @@ -204,11 +203,10 @@ class CombinedLoginAndRegisterPage(PageObject): username (unicode): The user's username. full_name (unicode): The user's full name. country (unicode): Two-character country code. - terms_of_service (boolean): If True, agree to the terms of service and honor code. """ # Fill in the form - self.wait_for_element_visibility('#register-honor_code', 'Honor code field is shown') + self.wait_for_element_visibility('#toggle_optional_fields', 'Support education research field is shown') if email: self.q(css="#register-email").fill(email) if full_name: @@ -221,10 +219,6 @@ class CombinedLoginAndRegisterPage(PageObject): self.q(css="#register-country").results[0].send_keys(country) if favorite_movie: self.q(css="#register-favorite_movie").fill(favorite_movie) - if terms_of_service: - self.q(css="label[for='register-honor_code']").click() - self.q(css="#register-honor_code").click() - EmptyPromise(lambda: self.q(css='#register-honor_code:checked'), 'Honor code field is checked').fulfill() # Submit it self.q(css=".register-button").click() diff --git a/common/test/acceptance/tests/lms/test_lms.py b/common/test/acceptance/tests/lms/test_lms.py index fa52881e46..fb943f7466 100644 --- a/common/test/acceptance/tests/lms/test_lms.py +++ b/common/test/acceptance/tests/lms/test_lms.py @@ -310,8 +310,7 @@ class RegisterFromCombinedPageTest(UniqueCourseTest): username=username, full_name="Test User", country="US", - favorite_movie="Mad Max: Fury Road", - terms_of_service=True + favorite_movie="Mad Max: Fury Road" ) # Expect that we reach the dashboard and we're auto-enrolled in the course @@ -332,14 +331,11 @@ class RegisterFromCombinedPageTest(UniqueCourseTest): email=email, password="password", username="", - full_name="Test User", - terms_of_service=False + full_name="Test User" ) # Verify that the expected errors are displayed. errors = self.register_page.wait_for_errors() self.assertIn(u'Please enter your Public Username.', errors) - self.assertIn(u'You must agree to the édX Terms of Service and Honor Code', - errors) self.assertIn(u'Select your country or region of residence.', errors) self.assertIn(u'Please tell us your favorite movie.', errors) @@ -372,8 +368,8 @@ class RegisterFromCombinedPageTest(UniqueCourseTest): self.assertEqual(self.register_page.full_name_value, "William Adama") self.assertIn("Galactica1", self.register_page.username_value) - # Set country, accept the terms, and submit the form: - self.register_page.register(country="US", favorite_movie="Battlestar Galactica", terms_of_service=True) + # Set country and submit the form: + self.register_page.register(country="US", favorite_movie="Battlestar Galactica") # Expect that we reach the dashboard and we're auto-enrolled in the course course_names = self.dashboard_page.wait_for_page().available_courses diff --git a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py index 0f31e77014..d810bdb271 100644 --- a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py @@ -162,7 +162,6 @@ class AutoEnrollmentWithCSVTest(BaseInstructorDashboardTest): password="123456", username=username, full_name="Test User", - terms_of_service=True, country="US", favorite_movie="Harry Potter", ) diff --git a/lms/static/js/student_account/views/account_settings_factory.js b/lms/static/js/student_account/views/account_settings_factory.js index 28bb0b8e14..b2d7ea6310 100644 --- a/lms/static/js/student_account/views/account_settings_factory.js +++ b/lms/static/js/student_account/views/account_settings_factory.js @@ -27,8 +27,7 @@ enterpriseReadonlyAccountFields, edxSupportUrl, extendedProfileFields, - displayAccountDeletion, - enableGDPRFlag + displayAccountDeletion ) { var $accountSettingsElement, userAccountModel, userPreferencesModel, aboutSectionsData, accountsSectionData, ordersSectionData, accountSettingsView, showAccountSettingsPage, @@ -303,8 +302,8 @@ aboutSectionsData.push(accountDeletionFields); } - // set TimeZoneField to listen to CountryField + getUserField = function(list, search) { return _.find(list, function(field) { return field.view.options.valueAttribute === search; diff --git a/lms/templates/header/header.html b/lms/templates/header/header.html index 5c634219e5..94cbcb1ca4 100644 --- a/lms/templates/header/header.html +++ b/lms/templates/header/header.html @@ -15,8 +15,6 @@ from openedx.core.djangolib.markup import HTML, Text from branding import api as branding_api from openedx.core.djangoapps.lang_pref.api import header_language_selector_is_enabled, released_languages -# GDPR Flag -from openedx.features.course_experience import ENABLE_GDPR_COMPAT_FLAG %> ## Provide a hook for themes to inject branding on top. @@ -32,7 +30,7 @@ from openedx.features.course_experience import ENABLE_GDPR_COMPAT_FLAG % endif