diff --git a/common/djangoapps/student/toggles.py b/common/djangoapps/student/toggles.py index 507f323a2a..37558a3be5 100644 --- a/common/djangoapps/student/toggles.py +++ b/common/djangoapps/student/toggles.py @@ -6,41 +6,6 @@ from edx_toggles.toggles import WaffleFlag, WaffleSwitch # Namespace for student waffle flags. WAFFLE_FLAG_NAMESPACE = 'student' -# Waffle flag to enable amplitude recommendations -# .. toggle_name: student.enable_amplitude_recommendations -# .. toggle_implementation: WaffleFlag -# .. toggle_default: False -# .. toggle_description: Supports rollout of a POC for amplitude recommendations. -# .. toggle_use_cases: temporary -# .. toggle_creation_date: 2022-06-24 -# .. toggle_target_removal_date: None -# .. toggle_warning: None -# .. toggle_tickets: VAN-984 -ENABLE_AMPLITUDE_RECOMMENDATIONS = WaffleFlag(f'{WAFFLE_FLAG_NAMESPACE}.enable_amplitude_recommendations', __name__) - - -def should_show_amplitude_recommendations(): - return ENABLE_AMPLITUDE_RECOMMENDATIONS.is_enabled() - - -# Waffle flag to enable fallback recommendations. -# .. toggle_name: student.enable_fallback_recommendations -# .. toggle_implementation: WaffleFlag -# .. toggle_default: False -# .. toggle_description: Supports showing fallback recommendation in case of error on amplitude side. -# Currently, fallback recommendations are picked from settings.GENERAL_RECOMMENDATIONS. -# .. toggle_use_cases: opt_in -# .. toggle_creation_date: 2023-01-16 -# .. toggle_target_removal_date: None -# .. toggle_warning: None -# .. toggle_tickets: VAN-1239 -ENABLE_FALLBACK_RECOMMENDATIONS = WaffleFlag(f'{WAFFLE_FLAG_NAMESPACE}.enable_fallback_recommendations', __name__) - - -def show_fallback_recommendations(): - return ENABLE_FALLBACK_RECOMMENDATIONS.is_enabled() - - # Waffle flag to enable 2U Recommendations # .. toggle_name: student.enable_2u_recommendations # .. toggle_implementation: WaffleFlag diff --git a/lms/envs/common.py b/lms/envs/common.py index 58eeac2d60..94d298cddb 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1618,7 +1618,6 @@ HOTJAR_SITE_ID = 00000 ######################## ALGOLIA SEARCH ########################### ALGOLIA_APP_ID = None ALGOLIA_SEARCH_API_KEY = None -ALGOLIA_COURSES_RECOMMENDATION_INDEX_NAME = '' ######################## subdomain specific settings ########################### COURSE_LISTINGS = {} @@ -4833,19 +4832,9 @@ EDX_BRAZE_API_KEY = None EDX_BRAZE_API_SERVER = None BRAZE_COURSE_ENROLLMENT_CANVAS_ID = '' -### SETTINGS FOR AMPLITUDE #### -AMPLITUDE_URL = '' -AMPLITUDE_API_KEY = '' -DASHBOARD_AMPLITUDE_RECOMMENDATION_ID = '' -COURSE_ABOUT_PAGE_AMPLITUDE_RECOMMENDATION_ID = '' # Keeping this for back compatibility with learner dashboard api GENERAL_RECOMMENDATION = {} -GENERAL_RECOMMENDATIONS = [] - -### DEFAULT KEY DICTIONARY FOR CROSS_PRODUCT_RECOMMENDATIONS ### -CROSS_PRODUCT_RECOMMENDATIONS_KEYS = {} - ############### Settings for Retirement ##################### # .. setting_name: RETIRED_USERNAME_PREFIX # .. setting_default: retired__user_ diff --git a/lms/static/js/learner_dashboard/RecommendationsPanel.jsx b/lms/static/js/learner_dashboard/RecommendationsPanel.jsx deleted file mode 100644 index 737dfa52a5..0000000000 --- a/lms/static/js/learner_dashboard/RecommendationsPanel.jsx +++ /dev/null @@ -1,107 +0,0 @@ -/* global gettext */ -import React from 'react'; -import Cookies from 'js-cookie'; - -class RecommendationsPanel extends React.Component { - constructor(props) { - super(props); - this.domainInfo = { domain: props.sharedCookieDomain, expires: 365, path: '/' }; - this.onCourseSelect = this.onCourseSelect.bind(this); - this.getCourseList = this.getCourseList.bind(this); - this.state = { - isLoading: true, - isControl: null, - coursesList: [], - }; - } - - onCourseSelect(courseKey, marketingUrl) { - window.analytics.track('edx.bi.user.recommended.course.click', { - course_key: courseKey, - is_control: this.state.isControl, - page: 'dashboard', - }); - - window.location.href = marketingUrl; - }; - - getCourseList = async () => { - const coursesRecommendationData = await fetch(`${this.props.lmsRootUrl}/api/edx_recommendations/learner_dashboard/amplitude/`) - .then(response => response.json()) - .catch(() => ({ - courses: this.props.generalRecommendations, - })); - - this.setState({ - coursesList: coursesRecommendationData.courses, - isLoading: false, - isControl: coursesRecommendationData.is_control === undefined ? null : coursesRecommendationData.is_control, - }); - }; - - componentDidMount() { - this.getCourseList(); - }; - - render() { - return ( -