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
9d1deefc
Commit
9d1deefc
authored
Feb 06, 2017
by
David Ormsbee
Committed by
GitHub
Feb 06, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14475 from edx/ormsbee/dashboard_course_count
New Relic metric: Enrolled courses on dashboard.
parents
744fea8a
da5a8b55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
common/djangoapps/student/views.py
+6
-0
No files found.
common/djangoapps/student/views.py
View file @
9d1deefc
...
...
@@ -118,6 +118,8 @@ from openedx.core.djangoapps.embargo import api as embargo_api
import
analytics
from
eventtracking
import
tracker
import
newrelic_custom_metrics
# Note that this lives in LMS, so this dependency should be refactored.
from
notification_prefs.views
import
enable_notifications
...
...
@@ -615,6 +617,10 @@ def dashboard(request):
# enrollments, because it could have been a data push snafu.
course_enrollments
=
list
(
get_course_enrollments
(
user
,
course_org_filter
,
org_filter_out_set
))
# Record how many courses there are so that we can get a better
# understanding of usage patterns on prod.
newrelic_custom_metrics
.
accumulate
(
'num_courses'
,
len
(
course_enrollments
))
# sort the enrollment pairs by the enrollment date
course_enrollments
.
sort
(
key
=
lambda
x
:
x
.
created
,
reverse
=
True
)
...
...
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