diff --git a/common/static/common/js/components/ExperimentalCarousel.jsx b/common/static/common/js/components/ExperimentalCarousel.jsx
new file mode 100644
index 0000000000..93d1181d6c
--- /dev/null
+++ b/common/static/common/js/components/ExperimentalCarousel.jsx
@@ -0,0 +1,123 @@
+import React from 'react';
+import Slider from 'react-slick';
+import classNames from 'classnames';
+import PropTypes from 'prop-types';
+
+/** Experimental Carousel as part of https://openedx.atlassian.net/browse/LEARNER-3583 **/
+
+function NextArrow(props) {
+ const {currentSlide, slideCount, onClick, displayedSlides} = props;
+ const showArrow = slideCount - currentSlide > displayedSlides;
+ const opts = {
+ className: classNames('js-carousel-nav', 'carousel-arrow', 'next', 'btn btn-secondary', {'active': showArrow}),
+ onClick
+ };
+
+ if (!showArrow) {
+ opts.disabled = 'disabled';
+ }
+
+ return (
+
+ Next
+
+ { 'Scroll carousel forwards' }
+
+ );
+}
+
+function PrevArrow(props) {
+ const {currentSlide, onClick} = props;
+ const showArrow = currentSlide > 0;
+ const opts = {
+ className: classNames('js-carousel-nav', 'carousel-arrow', 'prev', 'btn btn-secondary', {'active': showArrow}),
+ onClick
+ };
+
+ if (!showArrow) {
+ opts.disabled = 'disabled';
+ }
+
+ return (
+
+
+ Prev
+ { 'Scroll carousel backwards' }
+
+ );
+}
+
+export default class ExperimentalCarousel extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ // Default to undefined to not focus on page load
+ activeIndex: undefined,
+ };
+
+ this.carousels = [];
+
+ this.afterChange = this.afterChange.bind(this);
+ this.getCarouselContent = this.getCarouselContent.bind(this);
+ }
+
+ afterChange(activeIndex) {
+ this.setState({ activeIndex });
+ }
+
+ componentDidUpdate() {
+ const { activeIndex } = this.state;
+
+ if (!isNaN(activeIndex)) {
+ this.carousels[activeIndex].focus();
+ }
+ }
+
+ getCarouselContent() {
+ return this.props.slides.map((slide, i) => {
+ const firstIndex = this.state.activeIndex || 0;
+ const lastIndex = firstIndex + this.props.slides.length;
+ const tabIndex = (firstIndex <= i && i < lastIndex) ? undefined : '-1';
+ const carouselLinkProps = {
+ ref: (item) => {
+ this.carousels[i] = item;
+ },
+ tabIndex: tabIndex,
+ className: 'carousel-item'
+ }
+
+ return (
+
+ { slide }
+
+ );
+ });
+ }
+
+ render() {
+ const carouselSettings = {
+ accessibility: true,
+ dots: true,
+ infinite: false,
+ speed: 500,
+ className: 'carousel-wrapper',
+ nextArrow: ,
+ prevArrow: ,
+ afterChange: this.afterChange,
+ slidesToShow: 1,
+ slidesToScroll: 1,
+ initialSlide: 0,
+ };
+
+ return (
+
+ {this.getCarouselContent()}
+
+ );
+ }
+}
+
+ExperimentalCarousel.propTypes = {
+ slides: PropTypes.array.isRequired
+};
\ No newline at end of file
diff --git a/common/static/common/js/components/UpsellExperimentModal.jsx b/common/static/common/js/components/UpsellExperimentModal.jsx
new file mode 100644
index 0000000000..57f01a4338
--- /dev/null
+++ b/common/static/common/js/components/UpsellExperimentModal.jsx
@@ -0,0 +1,76 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Modal, Button } from '@edx/paragon/static';
+
+import ExperimentalCarousel from './ExperimentalCarousel.jsx';
+
+// https://openedx.atlassian.net/browse/LEARNER-3583
+
+export class UpsellExperimentModal extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ isOpen: true,
+ }
+ }
+
+ render() {
+ const slides = [
+ (
+
My Stats introduces new personalized views that help you track your progress towards completing your course!
+
With My Stats you will see your:
+
+ Course Activity Streak (log in every week to keep your streak alive)
+ Grade Progress (see how you're tracking towards a passing grade)
+ Discussion Forum Engagements (top learners use the forums - how do you measure up?)
+
+
),
+ (
+
Course Activity Streak
+
Did you know the learners most likely to complete a course log in every week? Let us help you track your weekly streak - log in every week and learn something new! You can also see how many of the other learners in your course logged in this week.
+
),
+ (
+
Grade Progress
+
Wonder how you're doing in the course so far? We can not only show you all your grades, and how much each assignment is worth, but also upcoming graded assignments. This is a great way to track what you might need to work on for a final exam.
+
),
+ (
+
Discussion engagements
+
A large percentage of successful learners are engaged on the discussion forums. Compare your forum stats to previous graduates!
+
),
+ ];
+ const body = (
+
+
+
+
+ );
+ const { buttonDestinationURL } = this.props;
+ return (
+ {}}
+ body={body}
+ buttons={[
+ ( window.location = buttonDestinationURL}
+ />),
+ ]}
+ />
+ );
+ }
+}
+
+UpsellExperimentModal.propTypes = {
+ buttonDestinationURL: PropTypes.string.isRequired,
+};
\ No newline at end of file
diff --git a/lms/envs/common.py b/lms/envs/common.py
index 74ee56fd24..f3451bdc50 100644
--- a/lms/envs/common.py
+++ b/lms/envs/common.py
@@ -955,6 +955,7 @@ STATIC_ROOT = ENV_ROOT / "staticfiles"
STATICFILES_DIRS = [
COMMON_ROOT / "static",
PROJECT_ROOT / "static",
+ NODE_MODULES_ROOT / "@edx",
]
FAVICON_PATH = 'images/favicon.ico'
diff --git a/lms/static/sass/_experiments.scss b/lms/static/sass/_experiments.scss
index 22127b3f9c..bb1c4ed4ee 100644
--- a/lms/static/sass/_experiments.scss
+++ b/lms/static/sass/_experiments.scss
@@ -39,3 +39,439 @@
max-width: 420px;
margin: 0 0 10px 0;
}
+
+/* Part of LEARNER-3583 experiment (https://openedx.atlassian.net/browse/LEARNER-3583) */
+
+/* modal-specific */
+
+#upsell-modal {
+ display: none;
+
+ /* slick modal from https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css */
+
+ .slick-list,
+ .slick-slider,
+ .slick-track {
+ position: relative;
+ display: block;
+ }
+
+ .slick-loading {
+ .slick-slide,
+ .slick-track {
+ visibility: hidden;
+ }
+ }
+
+ .slick-slider {
+ box-sizing: border-box;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ -webkit-touch-callout: none;
+ -khtml-user-select: none;
+ -ms-touch-action: pan-y;
+ touch-action: pan-y;
+ -webkit-tap-highlight-color: transparent;
+ }
+
+ .slick-list {
+ overflow: hidden;
+ margin: 0;
+ padding: 0;
+
+ &:focus {
+ outline: 0;
+ }
+
+ &.dragging {
+ cursor: pointer;
+ cursor: hand;
+ }
+ }
+
+ .slick-slider {
+ .slick-list,
+ .slick-track {
+ -webkit-transform: translate3d(0, 0, 0);
+ -moz-transform: translate3d(0, 0, 0);
+ -ms-transform: translate3d(0, 0, 0);
+ -o-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+ }
+ }
+
+ .slick-track {
+ top: 0;
+ left: 0;
+
+ &::after,
+ &::before {
+ display: table;
+ content: '';
+ }
+
+ &::after {
+ clear: both;
+ }
+ }
+
+ .slick-slide {
+ display: none;
+ float: left;
+ height: 100%;
+ min-height: 1px;
+ }
+
+ [dir=rtl] .slick-slide {
+ float: right;
+ }
+
+ .slick-slide {
+ img {
+ display: block;
+ }
+
+ &.slick-loading img {
+ display: none;
+ }
+
+ &.dragging img {
+ pointer-events: none;
+ }
+ }
+
+ .slick-initialized .slick-slide {
+ display: block;
+ }
+
+ .slick-vertical .slick-slide {
+ display: block;
+ height: auto;
+ border: 1px solid transparent;
+ }
+
+ .slick-arrow.slick-hidden {
+ display: none;
+ }
+
+ /* slick theme from https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css */
+
+ .slick-dots,
+ .slick-next,
+ .slick-prev {
+ position: absolute;
+ display: block;
+ padding: 0;
+ }
+
+ .slick-dots li button::before,
+ .slick-next::before,
+ .slick-prev::before {
+ font-family: slick;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
+
+
+ .slick-next,
+ .slick-prev {
+ font-size: 0;
+ line-height: 0;
+ top: 50%;
+ width: 20px;
+ height: 20px;
+ -webkit-transform: translate(0, -50%);
+ -ms-transform: translate(0, -50%);
+ transform: translate(0, -50%);
+ cursor: pointer;
+ color: transparent;
+ border: none;
+ outline: 0;
+ background: 0 0;
+ }
+
+ .slick-next {
+ &:focus,
+ &:hover {
+ color: transparent;
+ outline: 0;
+ background: 0 0;
+ }
+ }
+
+ .slick-prev {
+ &:focus,
+ &:hover {
+ color: transparent;
+ outline: 0;
+ background: 0 0;
+ }
+ }
+
+ .slick-next {
+ &:focus::before,
+ &:hover::before {
+ opacity: 1;
+ }
+ }
+
+ .slick-prev {
+ &:focus::before,
+ &:hover::before {
+ opacity: 1;
+ }
+ }
+
+ .slick-next.slick-disabled::before,
+ .slick-prev.slick-disabled::before {
+ opacity: 0.25;
+ }
+
+ .slick-next::before {
+ font-size: 20px;
+ line-height: 1;
+ opacity: 0.75;
+ color: #fff;
+ }
+
+ .slick-prev {
+ &::before {
+ font-size: 20px;
+ line-height: 1;
+ opacity: 0.75;
+ color: #fff;
+ }
+
+ left: -25px;
+ }
+
+ [dir=rtl] .slick-prev {
+ right: -25px;
+ left: auto;
+ }
+
+ .slick-prev::before {
+ content: '• ';
+ }
+
+ .slick-next::before,
+ [dir=rtl] .slick-prev::before {
+ content: '•’';
+ }
+
+ .slick-next {
+ right: -25px;
+ }
+
+ [dir=rtl] .slick-next {
+ right: auto;
+ left: -25px;
+
+ &::before {
+ content: '•';
+ }
+ }
+
+ .slick-dotted.slick-slider {
+ margin-bottom: 30px;
+ }
+
+ .slick-dots {
+ bottom: -25px;
+ width: 100%;
+ margin: 0;
+ list-style: none;
+ text-align: center;
+
+ li {
+ position: relative;
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ margin: 0 5px;
+ padding: 0;
+ cursor: pointer;
+
+ button {
+ font-size: 0;
+ line-height: 0;
+ display: block;
+ width: 20px;
+ height: 20px;
+ padding: 5px;
+ cursor: pointer;
+ color: transparent;
+ border: 0;
+ outline: 0;
+ background: 0 0;
+
+ &:focus,
+ &:hover {
+ outline: 0;
+ }
+
+ &:focus::before,
+ &:hover::before {
+ opacity: 1;
+ }
+
+ &::before {
+ font-size: 6px;
+ line-height: 20px;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 20px;
+ height: 20px;
+ content: '•';
+ text-align: center;
+ opacity: 0.25;
+ color: #000;
+ }
+ }
+
+ &.slick-active button::before {
+ opacity: 0.75;
+ color: #000;
+ }
+ }
+ }
+
+ .paragon__btn.paragon__btn-secondary {
+ display: none;
+ }
+
+ .paragon__btn.paragon__btn-success {
+ font-size: initial;
+ float: left;
+ background: green;
+ }
+
+ .paragon__btn.paragon__btn-light {
+ line-height: 0.25;
+ font-weight: 600;
+ background: white;
+ }
+
+ .paragon__modal-title {
+ font-weight: 600;
+ color: black;
+ }
+
+ .paragon__modal-title::before {
+ content: "NEW";
+ font-size: small;
+ background-color: #ccdde6;
+ color: #00507e;
+ margin-right: 8px;
+ box-shadow: 0 0 0 4px #ccdde6;
+ font-weight: 500;
+ border-radius: 3px;
+ }
+
+ .paragon__modal-footer {
+ display: inline-block;
+ }
+
+ .carousel-arrow {
+ background: white;
+ }
+
+ .carousel-arrow.prev {
+ position: absolute;
+ bottom: 0;
+ right: 80%;
+ box-shadow: initial;
+ font-size: small;
+ color: black;
+ background-color: white;
+ }
+
+ .carousel-arrow.next {
+ position: absolute;
+ bottom: 0;
+ left: 80%;
+ box-shadow: initial;
+ font-size: small;
+ color: black;
+ background-color: white;
+ }
+
+ .carousel-wrapper {
+ display: flex;
+
+ .slick-dots {
+ margin-bottom: 6%;
+ margin-left: 33%;
+ width: 33%;
+ display: block;
+
+ li > button::before {
+ font-size: 15px;
+ }
+ }
+
+ .slick-list {
+ margin-bottom: 10%;
+ }
+ }
+
+ .slick-slide.carousel-item {
+ padding: 0 10px;
+ min-width: 400px;
+ }
+
+ .upsell-certificate {
+ height: 43px;
+ position: absolute;
+ left: 40%;
+ margin-top: 29px;
+ }
+
+ .upsell-modal-checkmark-group {
+ list-style: none;
+ margin-left: 0;
+ }
+
+ .upsell-modal-checkmark::before {
+ content: '✔️\00a0\00a0\00a0\00a0';
+ }
+
+ .js-carousel-nav {
+ border: 1px solid #b9bcbc;
+ }
+
+ .icon.fa {
+ font-size: 10px;
+ margin: 5px;
+ }
+
+ .upsell-certificate {
+ margin-top: 30px;
+ margin-left: 20px;
+ }
+
+ .paragon__btn.paragon__btn-success {
+ font-weight: 600;
+ padding: 9px 20px;
+ }
+
+ .slick-slide.carousel-item {
+ color: grey;
+ }
+
+ .slide-header {
+ padding-bottom: 10px;
+ color: black;
+ }
+
+ .my-stats-introduction {
+ padding-bottom: 10px;
+ }
+
+ .my-stats-slide-header {
+ padding-bottom: 10px;
+ }
+}
diff --git a/lms/static/sass/bootstrap/lms-main.scss b/lms/static/sass/bootstrap/lms-main.scss
index b913349416..99b9b7b314 100644
--- a/lms/static/sass/bootstrap/lms-main.scss
+++ b/lms/static/sass/bootstrap/lms-main.scss
@@ -33,3 +33,6 @@ $static-path: '../..';
// Extra theme-specific rules
@import 'lms/theme/extras';
+
+// Experiments
+@import 'experiments';
\ No newline at end of file
diff --git a/openedx/features/course_experience/templates/course_experience/course-home-fragment.html b/openedx/features/course_experience/templates/course_experience/course-home-fragment.html
index 2da4fd2a4b..528259ac3e 100644
--- a/openedx/features/course_experience/templates/course_experience/course-home-fragment.html
+++ b/openedx/features/course_experience/templates/course_experience/course-home-fragment.html
@@ -15,10 +15,24 @@ from django_comment_client.permissions import has_permission
from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string
from openedx.core.djangolib.markup import HTML
from openedx.features.course_experience import UNIFIED_COURSE_TAB_FLAG, SHOW_REVIEWS_TOOL_FLAG
+from openedx.features.learner_analytics import ENABLE_DASHBOARD_TAB
%>
+<%block name="header_extras">
+
+%block>
+
<%block name="content">
+
+ % if ENABLE_DASHBOARD_TAB.is_enabled(course_key):
+ ${static.renderReact(
+ component="UpsellExperimentModal",
+ id="upsell-modal",
+ props={},
+ )}
+ % endif
+