Commit 91bf5239 by Robert Raposa Committed by GitHub

Merge pull request #16175 from edx/robrap/LEARNER-2026-clean-up

LEARNER-2026: Revert remains of 'upgrade upsell to course info banner'.
parents b96f646d e8945ebd
...@@ -203,6 +203,7 @@ $btn-border-radius: $component-border-radius !default; ...@@ -203,6 +203,7 @@ $btn-border-radius: $component-border-radius !default;
$btn-large-padding-vertical: spacing-vertical(small); $btn-large-padding-vertical: spacing-vertical(small);
$btn-large-padding-horizontal: spacing-horizontal(mid-large); $btn-large-padding-horizontal: spacing-horizontal(mid-large);
$btn-base-padding-vertical: spacing-vertical(x-small); $btn-base-padding-vertical: spacing-vertical(x-small);
$btn-base-padding-horizontal: spacing-horizontal(base); $btn-base-padding-horizontal: spacing-horizontal(base);
$btn-base-font-size: font-size(base); $btn-base-font-size: font-size(base);
......
...@@ -30,7 +30,6 @@ from courseware.courses import ( ...@@ -30,7 +30,6 @@ from courseware.courses import (
sort_by_announcement, sort_by_announcement,
sort_by_start_date sort_by_start_date
) )
from courseware.date_summary import VerifiedUpgradeDeadlineDate
from courseware.masquerade import setup_masquerade from courseware.masquerade import setup_masquerade
from courseware.model_data import FieldDataCache from courseware.model_data import FieldDataCache
from courseware.models import BaseStudentModuleHistory, StudentModule from courseware.models import BaseStudentModuleHistory, StudentModule
...@@ -404,9 +403,6 @@ def course_info(request, course_id): ...@@ -404,9 +403,6 @@ def course_info(request, course_id):
return render_to_response('courseware/info.html', context) return render_to_response('courseware/info.html', context)
UPGRADE_COOKIE_NAME = 'show_upgrade_notification'
class StaticCourseTabView(EdxFragmentView): class StaticCourseTabView(EdxFragmentView):
""" """
View that displays a static course tab with a given name. View that displays a static course tab with a given name.
......
...@@ -9,13 +9,7 @@ ...@@ -9,13 +9,7 @@
}); });
}); });
$('.date-summary-verified-upgrade-deadline .date-summary-link').on('click', function() { $('.date-summary-verified-upgrade-deadline .date-summary-link').on('click', function() {
Logger.log('edx.course.enrollment.upgrade.clicked', {location: 'sidebar'}); Logger.log('edx.course.enrollment.upgrade.clicked', {location: 'date-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'});
}); });
}; };
}); });
......
<div class="upgrade-banner">
<div class="notification-color-border"></div>
<div class="notification-content">
<div class="upgrade-icon">
<img src="${STATIC_URL}images/edx-verified-mini-cert.png">
</div>
<div class="upgrade-msg">
<h4 class="upgrade-msg">Give yourself an additional incentive to complete</h4>
<p class="view-verified-info">Earn a verified certificate
<a href="https://www.edx.org/verified-certificate" target="_blank">Learn More</a>
</p>
</div>
<div class="upgrade-banner-button">
<a href="/verify_student/upgrade/course-v1:Test+TestX+2015" class="btn-upgrade">Upgrade Now</a>
</div>
</div>
</div>
<div class="date-summary-container"> <div class="date-summary-container">
<div class="date-summary date-summary-verified-upgrade-deadline"> <div class="date-summary date-summary-verified-upgrade-deadline">
<h3 class="heading">Verification Upgrade Deadline</h3> <h3 class="heading">Verification Upgrade Deadline</h3>
......
...@@ -17,22 +17,10 @@ define(['jquery', 'logger', 'js/courseware/course_home_events'], function($, Log ...@@ -17,22 +17,10 @@ define(['jquery', 'logger', 'js/courseware/course_home_events'], function($, Log
}); });
}); });
it('sends an event when "Upgrade to Verified" is clicked from the sidebar', function() { it('sends an event when "Upgrade to Verified" is clicked from the date sidebar', function() {
$('.date-summary-link').click(); $('.date-summary-link').click();
expect(Logger.log).toHaveBeenCalledWith('edx.course.enrollment.upgrade.clicked', {location: 'sidebar'}); expect(Logger.log).toHaveBeenCalledWith('edx.course.enrollment.upgrade.clicked',
}); {location: 'date-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'}
); );
}); });
}); });
......
...@@ -104,34 +104,6 @@ div.info-wrapper { ...@@ -104,34 +104,6 @@ div.info-wrapper {
min-width: 80px; 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;
}
} }
} }
......
...@@ -96,7 +96,7 @@ export class CourseHome { // eslint-disable-line import/prefer-default-export ...@@ -96,7 +96,7 @@ export class CourseHome { // eslint-disable-line import/prefer-default-export
const $vcDismissToggle = $('.vc-toggle', $vcMessage); const $vcDismissToggle = $('.vc-toggle', $vcMessage);
const logEventProperties = { courseRunKey: this.courseRunKey }; const logEventProperties = { courseRunKey: this.courseRunKey };
Logger.log('edx.course.upgrade.hero.displayed', logEventProperties); Logger.log('edx.bi.course.upgrade.hero.displayed', logEventProperties);
// Get height of container and button // Get height of container and button
let vcHeight = $vcMessage.outerHeight(); let vcHeight = $vcMessage.outerHeight();
...@@ -125,7 +125,7 @@ export class CourseHome { // eslint-disable-line import/prefer-default-export ...@@ -125,7 +125,7 @@ export class CourseHome { // eslint-disable-line import/prefer-default-export
$vcDismissToggle.click(() => { $vcDismissToggle.click(() => {
if ($vcMessage.hasClass('polite')) { if ($vcMessage.hasClass('polite')) {
// Expand message // Expand message
Logger.log('edx.course.upgrade.hero.expanded', logEventProperties); Logger.log('edx.bi.course.upgrade.hero.expanded', logEventProperties);
this.persistUpgradeMessageState(false); this.persistUpgradeMessageState(false);
$('.vc-fade').fadeOut(400); $('.vc-fade').fadeOut(400);
...@@ -136,14 +136,15 @@ export class CourseHome { // eslint-disable-line import/prefer-default-export ...@@ -136,14 +136,15 @@ export class CourseHome { // eslint-disable-line import/prefer-default-export
}); });
} else { } else {
// Collapse message // Collapse message
Logger.log('edx.course.upgrade.hero.collapsed', logEventProperties); Logger.log('edx.bi.course.upgrade.hero.collapsed', logEventProperties);
this.persistUpgradeMessageState(true); this.persistUpgradeMessageState(true);
collapseMessage(); collapseMessage();
} }
}); });
$('.btn-upgrade', $vcMessage).click(() => { $('.btn-upgrade', $vcMessage).click(() => {
Logger.log('edx.course.upgrade.hero.clicked', logEventProperties); Logger.log('edx.bi.course.upgrade.hero.clicked', logEventProperties);
Logger.log('edx.course.enrollment.upgrade.clicked', { location: 'hero' });
}); });
} }
} }
...@@ -57,13 +57,14 @@ describe('Course Home factory', () => { ...@@ -57,13 +57,14 @@ describe('Course Home factory', () => {
it('should send events to Segment and edX on initial load', () => { it('should send events to Segment and edX on initial load', () => {
expect(window.analytics.track).toHaveBeenCalledWith('Promotion Viewed', segmentEventProperties); expect(window.analytics.track).toHaveBeenCalledWith('Promotion Viewed', segmentEventProperties);
expect(Logger.log).toHaveBeenCalledWith('edx.course.upgrade.hero.displayed', { courseRunKey: runKey }); expect(Logger.log).toHaveBeenCalledWith('edx.bi.course.upgrade.hero.displayed', { courseRunKey: runKey });
}); });
it('should send events to Segment and edX after clicking the upgrade button ', () => { it('should send events to Segment and edX after clicking the upgrade button ', () => {
$('.vc-message .btn-upgrade').click(); $('.vc-message .btn-upgrade').click();
expect(window.analytics.track).toHaveBeenCalledWith('Promotion Viewed', segmentEventProperties); expect(window.analytics.track).toHaveBeenCalledWith('Promotion Viewed', segmentEventProperties);
expect(Logger.log).toHaveBeenCalledWith('edx.course.upgrade.hero.clicked', { courseRunKey: runKey }); expect(Logger.log).toHaveBeenCalledWith('edx.bi.course.upgrade.hero.clicked', { courseRunKey: runKey });
expect(Logger.log).toHaveBeenCalledWith('edx.course.enrollment.upgrade.clicked', { location: 'hero' });
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment