From 07061caf9178bbff7937f3ecdf93c187d5afa5d2 Mon Sep 17 00:00:00 2001 From: Robert Raposa Date: Thu, 5 Oct 2017 10:54:08 -0400 Subject: [PATCH] Revert remains of 'upgrade upsell to course info banner'. TNL-6381 added an upgrade upsell to course info. In PR #15265, this was partially removed/moved, but some clean-up work remained. LEARNER-2026 --- .../base/_variables.scss | 1 + lms/djangoapps/courseware/views/views.py | 4 --- .../js/courseware/course_home_events.js | 6 ---- .../courseware/course_home_events.html | 18 ------------ .../courseware/course_home_events_spec.js | 14 ---------- lms/static/sass/course/_info.scss | 28 ------------------- 6 files changed, 1 insertion(+), 70 deletions(-) diff --git a/common/static/sass/edx-pattern-library-shims/base/_variables.scss b/common/static/sass/edx-pattern-library-shims/base/_variables.scss index dba1a33ad5..fe86405bd8 100644 --- a/common/static/sass/edx-pattern-library-shims/base/_variables.scss +++ b/common/static/sass/edx-pattern-library-shims/base/_variables.scss @@ -203,6 +203,7 @@ $btn-border-radius: $component-border-radius !default; $btn-large-padding-vertical: spacing-vertical(small); $btn-large-padding-horizontal: spacing-horizontal(mid-large); + $btn-base-padding-vertical: spacing-vertical(x-small); $btn-base-padding-horizontal: spacing-horizontal(base); $btn-base-font-size: font-size(base); diff --git a/lms/djangoapps/courseware/views/views.py b/lms/djangoapps/courseware/views/views.py index a07ebac5ce..8266ec65a0 100644 --- a/lms/djangoapps/courseware/views/views.py +++ b/lms/djangoapps/courseware/views/views.py @@ -30,7 +30,6 @@ from courseware.courses import ( sort_by_announcement, sort_by_start_date ) -from courseware.date_summary import VerifiedUpgradeDeadlineDate from courseware.masquerade import setup_masquerade from courseware.model_data import FieldDataCache from courseware.models import BaseStudentModuleHistory, StudentModule @@ -404,9 +403,6 @@ def course_info(request, course_id): return render_to_response('courseware/info.html', context) -UPGRADE_COOKIE_NAME = 'show_upgrade_notification' - - class StaticCourseTabView(EdxFragmentView): """ View that displays a static course tab with a given name. diff --git a/lms/static/js/courseware/course_home_events.js b/lms/static/js/courseware/course_home_events.js index 2902292de7..2485e393a1 100644 --- a/lms/static/js/courseware/course_home_events.js +++ b/lms/static/js/courseware/course_home_events.js @@ -11,12 +11,6 @@ $('.date-summary-verified-upgrade-deadline .date-summary-link').on('click', function() { Logger.log('edx.course.enrollment.upgrade.clicked', {location: 'sidebar'}); }); - $('.upgrade-banner-button').on('click', function() { - Logger.log('edx.course.enrollment.upgrade.clicked', {location: 'notification'}); - }); - $('.view-verified-info').on('click', function() { - Logger.log('edx.course.home.learn_about_verified.clicked', {location: 'notification'}); - }); }; }); }).call(this, define || RequireJS.define); diff --git a/lms/static/js/fixtures/courseware/course_home_events.html b/lms/static/js/fixtures/courseware/course_home_events.html index a86ab48b53..e115db5f41 100644 --- a/lms/static/js/fixtures/courseware/course_home_events.html +++ b/lms/static/js/fixtures/courseware/course_home_events.html @@ -1,21 +1,3 @@ -
-
-
-
- -
-
-

Give yourself an additional incentive to complete

-

Earn a verified certificate - Learn More -

-
- -
-
-

Verification Upgrade Deadline

diff --git a/lms/static/js/spec/courseware/course_home_events_spec.js b/lms/static/js/spec/courseware/course_home_events_spec.js index 935da03bfd..07ec6784fd 100644 --- a/lms/static/js/spec/courseware/course_home_events_spec.js +++ b/lms/static/js/spec/courseware/course_home_events_spec.js @@ -21,19 +21,5 @@ define(['jquery', 'logger', 'js/courseware/course_home_events'], function($, Log $('.date-summary-link').click(); expect(Logger.log).toHaveBeenCalledWith('edx.course.enrollment.upgrade.clicked', {location: 'sidebar'}); }); - - it('sends an event when "Upgrade Now" is clicked from the upsell notification', function() { - $('.upgrade-banner-button').click(); - expect(Logger.log).toHaveBeenCalledWith( - 'edx.course.enrollment.upgrade.clicked', {location: 'notification'} - ); - }); - - it('sends an event when "Learn More" is clicked from the upsell notification', function() { - $('.view-verified-info').click(); - expect(Logger.log).toHaveBeenCalledWith( - 'edx.course.home.learn_about_verified.clicked', {location: 'notification'} - ); - }); }); }); diff --git a/lms/static/sass/course/_info.scss b/lms/static/sass/course/_info.scss index d127a9584e..dc9a436fc7 100644 --- a/lms/static/sass/course/_info.scss +++ b/lms/static/sass/course/_info.scss @@ -104,34 +104,6 @@ div.info-wrapper { min-width: 80px; } } - - .upgrade-msg { - flex: 5 1 60%; //This percentage was required to get the text - // in the message to wrap when collapsed. - flex-direction: column; - margin: 0; - padding: $baseline/2 0; - .msg-title { - font-weight: font-weight(semi-bold); - font-size: font-size(large); - line-height: $base-line-height; - margin: 0; - } - .view-verified-info { - margin-top: $baseline/4; - font-weight: font-weight(normal); - font-size: font-size(base); - } - - a:link, a:hover, a:visited, a:active { - text-decoration: underline !important; - } - } - - .upgrade-banner-button { - @include margin(0, 0, 0, auto); - padding: $baseline/2 $baseline; - } } }