feat: activate optimizely experiment (#31035)
activate optimizely experiment manually for only B2C users. VAN-1097
This commit is contained in:
@@ -51,6 +51,7 @@ from openedx.features.enterprise_support.api import (
|
||||
get_dashboard_consent_notification,
|
||||
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
|
||||
@@ -838,6 +839,8 @@ def student_dashboard(request): # lint-amnesty, pylint: disable=too-many-statem
|
||||
# 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),
|
||||
}
|
||||
|
||||
# Include enterprise learner portal metadata and messaging
|
||||
|
||||
@@ -2,6 +2,17 @@
|
||||
import React from 'react';
|
||||
|
||||
class Static2UCallouts extends React.Component {
|
||||
|
||||
componentDidMount() {
|
||||
if (!this.props.isEnterpriseUser){
|
||||
window['optimizely'] = window['optimizely'] || [];
|
||||
window['optimizely'].push({
|
||||
type: "page",
|
||||
pageName: "merchandise_2u_lobs"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="static-callouts-main">
|
||||
|
||||
Reference in New Issue
Block a user