Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
c32d8a62
Commit
c32d8a62
authored
Aug 25, 2017
by
Robert Raposa
Committed by
GitHub
Aug 25, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15866 from edx/diana/update-events
LEARNER-2025: Update event naming for course sock.
parents
100b5aa5
086e15c9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
11 deletions
+16
-11
lms/static/js/courseware/course_home_events.js
+2
-2
lms/static/js/dashboard/legacy.js
+1
-1
lms/static/js/spec/courseware/course_home_events_spec.js
+2
-2
openedx/features/course_experience/static/course_experience/js/CourseSock.js
+5
-5
openedx/features/course_experience/views/course_sock.py
+6
-1
No files found.
lms/static/js/courseware/course_home_events.js
View file @
c32d8a62
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
});
});
});
});
$
(
'.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.
home.upgrade_verified
.clicked'
,
{
location
:
'sidebar'
});
Logger
.
log
(
'edx.course.
enrollment.upgrade
.clicked'
,
{
location
:
'sidebar'
});
});
});
$
(
'.upgrade-banner-button'
).
on
(
'click'
,
function
()
{
$
(
'.upgrade-banner-button'
).
on
(
'click'
,
function
()
{
Logger
.
log
(
'edx.course.
home.upgrade_verified
.clicked'
,
{
location
:
'notification'
});
Logger
.
log
(
'edx.course.
enrollment.upgrade
.clicked'
,
{
location
:
'notification'
});
});
});
$
(
'.view-verified-info'
).
on
(
'click'
,
function
()
{
$
(
'.view-verified-info'
).
on
(
'click'
,
function
()
{
Logger
.
log
(
'edx.course.home.learn_about_verified.clicked'
,
{
location
:
'notification'
});
Logger
.
log
(
'edx.course.home.learn_about_verified.clicked'
,
{
location
:
'notification'
});
...
...
lms/static/js/dashboard/legacy.js
View file @
c32d8a62
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
var
user
=
$
(
event
.
target
).
closest
(
'.action-upgrade'
).
data
(
'user'
),
var
user
=
$
(
event
.
target
).
closest
(
'.action-upgrade'
).
data
(
'user'
),
course
=
$
(
event
.
target
).
closest
(
'.action-upgrade'
).
data
(
'course-id'
);
course
=
$
(
event
.
target
).
closest
(
'.action-upgrade'
).
data
(
'course-id'
);
Logger
.
log
(
'edx.course.enrollment.upgrade.clicked'
,
[
user
,
course
],
null
);
Logger
.
log
(
'edx.course.enrollment.upgrade.clicked'
,
[
user
,
course
],
{
location
:
'learner_dashboard'
}
);
});
});
$
(
'.action-email-settings'
).
click
(
function
(
event
)
{
$
(
'.action-email-settings'
).
click
(
function
(
event
)
{
...
...
lms/static/js/spec/courseware/course_home_events_spec.js
View file @
c32d8a62
...
@@ -19,13 +19,13 @@ define(['jquery', 'logger', 'js/courseware/course_home_events'], function($, Log
...
@@ -19,13 +19,13 @@ 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 sidebar'
,
function
()
{
$
(
'.date-summary-link'
).
click
();
$
(
'.date-summary-link'
).
click
();
expect
(
Logger
.
log
).
toHaveBeenCalledWith
(
'edx.course.
home.upgrade_verified
.clicked'
,
{
location
:
'sidebar'
});
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
()
{
it
(
'sends an event when "Upgrade Now" is clicked from the upsell notification'
,
function
()
{
$
(
'.upgrade-banner-button'
).
click
();
$
(
'.upgrade-banner-button'
).
click
();
expect
(
Logger
.
log
).
toHaveBeenCalledWith
(
expect
(
Logger
.
log
).
toHaveBeenCalledWith
(
'edx.course.
home.upgrade_verified
.clicked'
,
{
location
:
'notification'
}
'edx.course.
enrollment.upgrade
.clicked'
,
{
location
:
'notification'
}
);
);
});
});
...
...
openedx/features/course_experience/static/course_experience/js/CourseSock.js
View file @
c32d8a62
...
@@ -57,9 +57,9 @@ export class CourseSock { // eslint-disable-line import/prefer-default-export
...
@@ -57,9 +57,9 @@ export class CourseSock { // eslint-disable-line import/prefer-default-export
// Log open and close events
// Log open and close events
const
isOpening
=
$toggleActionButton
.
hasClass
(
'active'
);
const
isOpening
=
$toggleActionButton
.
hasClass
(
'active'
);
const
logMessage
=
isOpening
?
'
User opened the verification sock.
'
const
logMessage
=
isOpening
?
'
edx.bi.course.sock.toggle_opened
'
:
'
User closed the verification sock.
'
;
:
'
edx.bi.course.sock.toggle_closed
'
;
Logger
.
log
(
window
.
analytics
.
track
(
logMessage
,
logMessage
,
{
{
from_page
:
pageLocation
,
from_page
:
pageLocation
,
...
@@ -69,9 +69,9 @@ export class CourseSock { // eslint-disable-line import/prefer-default-export
...
@@ -69,9 +69,9 @@ export class CourseSock { // eslint-disable-line import/prefer-default-export
$upgradeToVerifiedButton
.
on
(
'click'
,
()
=>
{
$upgradeToVerifiedButton
.
on
(
'click'
,
()
=>
{
Logger
.
log
(
Logger
.
log
(
'
User clicked the upgrade button in the verification sock.
'
,
'
edx.course.enrollment.upgrade.clicked
'
,
{
{
from_page
:
pageLocation
,
location
:
'sock'
,
},
},
);
);
});
});
...
...
openedx/features/course_experience/views/course_sock.py
View file @
c32d8a62
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
Fragment for rendering the course's sock and associated toggle button.
Fragment for rendering the course's sock and associated toggle button.
"""
"""
from
django.template.loader
import
render_to_string
from
django.template.loader
import
render_to_string
from
django.utils.translation
import
get_language
from
opaque_keys.edx.keys
import
CourseKey
from
opaque_keys.edx.keys
import
CourseKey
from
web_fragments.fragment
import
Fragment
from
web_fragments.fragment
import
Fragment
...
@@ -37,7 +38,11 @@ class CourseSockFragmentView(EdxFragmentView):
...
@@ -37,7 +38,11 @@ class CourseSockFragmentView(EdxFragmentView):
verification_deadline
=
VerifiedUpgradeDeadlineDate
(
course
,
request
.
user
)
verification_deadline
=
VerifiedUpgradeDeadlineDate
(
course
,
request
.
user
)
deadline_has_passed
=
verification_deadline
.
deadline_has_passed
()
deadline_has_passed
=
verification_deadline
.
deadline_has_passed
()
show_course_sock
=
has_verified_mode
and
not
is_already_verified
and
not
deadline_has_passed
# If this proves its worth, we can internationalize and display for more than English speakers.
show_course_sock
=
(
has_verified_mode
and
not
is_already_verified
and
not
deadline_has_passed
and
get_language
()
==
'en'
)
# Get the price of the course and format correctly
# Get the price of the course and format correctly
course_price
=
get_cosmetic_verified_display_price
(
course
)
course_price
=
get_cosmetic_verified_display_price
(
course
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment