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
ee18a8b7
Commit
ee18a8b7
authored
Aug 27, 2014
by
Zia Fazal
Committed by
Jonathan Piacenti
Aug 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ziafazal/api-social-stats-avg-by-enrollments: added
total enrollments to data
parent
067c0331
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
lms/djangoapps/api_manager/courses/views.py
+2
-1
No files found.
lms/djangoapps/api_manager/courses/views.py
View file @
ee18a8b7
...
...
@@ -1700,7 +1700,8 @@ class CoursesSocialMetrics(SecureListAPIView):
for
user_id
in
exclude_users
:
if
str
(
user_id
)
in
data
:
del
data
[
str
(
user_id
)]
total_enrollments
=
CourseEnrollment
.
users_enrolled_in
(
course_key
)
.
exclude
(
id__in
=
exclude_users
)
.
count
()
data
=
{
'total_enrollments'
:
total_enrollments
,
'users'
:
data
}
http_status
=
status
.
HTTP_200_OK
except
CommentClientRequestError
,
e
:
data
=
{
...
...
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