Skip to content

Commit

Permalink
refactor: Remove unused code for merchandising 2U LOBs (#34230)
Browse files Browse the repository at this point in the history
  • Loading branch information
attiyaIshaque authored Feb 20, 2024
1 parent 9fd5157 commit 3a05fd2
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 244 deletions.
16 changes: 0 additions & 16 deletions common/djangoapps/student/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,6 @@
# Namespace for student waffle flags.
WAFFLE_FLAG_NAMESPACE = 'student'

# Waffle flag to enable 2U Recommendations
# .. toggle_name: student.enable_2u_recommendations
# .. toggle_implementation: WaffleFlag
# .. toggle_default: False
# .. toggle_description: Supports rollout of a POC for 2U recommendations.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2022-09-20
# .. toggle_target_removal_date: None
# .. toggle_warning: None
# .. toggle_tickets: VAN-1094
ENABLE_2U_RECOMMENDATIONS_ON_DASHBOARD = WaffleFlag(f'{WAFFLE_FLAG_NAMESPACE}.enable_2u_recommendations', __name__)


def should_show_2u_recommendations():
return ENABLE_2U_RECOMMENDATIONS_ON_DASHBOARD.is_enabled()


# Waffle flag to enable course enrollment confirmation email.
# .. toggle_name: student.enable_enrollment_confirmation_email
Expand Down
7 changes: 1 addition & 6 deletions common/djangoapps/student/views/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from edx_django_utils import monitoring as monitoring_utils
from edx_django_utils.plugins import get_plugins_view_context
from edx_toggles.toggles import WaffleFlag
from ipware.ip import get_client_ip
from opaque_keys.edx.keys import CourseKey
from openedx_filters.learning.filters import DashboardRenderStarted
from pytz import UTC
Expand Down Expand Up @@ -53,7 +52,7 @@
get_enterprise_learner_portal_context,
)
from openedx.features.enterprise_support.utils import is_enterprise_learner
from openedx.core.djangoapps.geoinfo.api import country_code_from_ip

from common.djangoapps.student.api import COURSE_DASHBOARD_PLUGIN_VIEW_NAME
from common.djangoapps.student.helpers import cert_info, check_verify_status_by_course, get_resume_urls_for_enrollments
from common.djangoapps.student.models import (
Expand Down Expand Up @@ -787,9 +786,6 @@ def student_dashboard(request): # lint-amnesty, pylint: disable=too-many-statem
if fbe_is_on:
enrollments_fbe_is_on.append(course_key)

ip_address = get_client_ip(request)[0]
country_code = country_code_from_ip(ip_address).upper()

context = {
'urls': urls,
'programs_data': programs_data,
Expand Down Expand Up @@ -844,7 +840,6 @@ def student_dashboard(request): # lint-amnesty, pylint: disable=too-many-statem
'course_info': get_dashboard_course_info(user, course_enrollments),
# TODO START: clean up as part of REVEM-199 (END)
'disable_unenrollment': disable_unenrollment,
'country_code': country_code,
# TODO: clean when experiment(Merchandise 2U LOBs - Dashboard) would be stop. [VAN-1097]
'is_enterprise_user': is_enterprise_learner(user),
}
Expand Down
7 changes: 0 additions & 7 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5353,13 +5353,6 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
######################## Settings for cancel retirement in Support Tools ########################
COOL_OFF_DAYS = 14

URLS_2U_LOBS = {
'executive_education': 'https://www.edx.org/executive-education',
'masters_degree': 'https://www.edx.org/masters',
'bachelors_degree': 'https://www.edx.org/bachelors',
'boot_camps': 'https://www.edx.org/boot-camps',
}

############ Settings for externally hosted executive education courses ############
EXEC_ED_LANDING_PAGE = "https://www.getsmarter.com/account"

Expand Down
214 changes: 0 additions & 214 deletions lms/static/js/learner_dashboard/Static2UCallouts.jsx

This file was deleted.

1 change: 0 additions & 1 deletion webpack.common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ module.exports = Merge.smart({
DemographicsCollectionModal: './lms/static/js/demographics_collection/DemographicsCollectionModal.jsx',
AxiosJwtTokenService: './lms/static/js/jwt_auth/AxiosJwtTokenService.js',
EnterpriseLearnerPortalModal: './lms/static/js/learner_dashboard/EnterpriseLearnerPortalModal.jsx',
Static2UCallouts: './lms/static/js/learner_dashboard/Static2UCallouts.jsx',

// Learner Dashboard
EntitlementFactory: './lms/static/js/learner_dashboard/course_entitlement_factory.js',
Expand Down

0 comments on commit 3a05fd2

Please sign in to comment.