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
dec4034b
Commit
dec4034b
authored
Dec 20, 2016
by
Nimisha Asthagiri
Committed by
GitHub
Dec 20, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14177 from edx/naa/fix-marketing-pr
Fix Enrollment database access in Marketing Course URL PR
parents
ef55cc4f
f2483091
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
lms/djangoapps/mobile_api/users/views.py
+7
-5
No files found.
lms/djangoapps/mobile_api/users/views.py
View file @
dec4034b
...
@@ -272,13 +272,15 @@ class UserCourseEnrollmentsList(APIView):
...
@@ -272,13 +272,15 @@ class UserCourseEnrollmentsList(APIView):
Returns a list of courses enrolled by user.
Returns a list of courses enrolled by user.
"""
"""
queryset
=
CourseEnrollment
.
objects
.
all
()
queryset
=
CourseEnrollment
.
objects
.
all
()
course_ids
=
set
(
queryset
.
values_list
(
'course_id'
,
flat
=
True
))
enrollments
=
list
(
queryset
.
filter
(
user__username
=
username
,
is_active
=
True
)
.
order_by
(
'created'
)
.
reverse
()
)
course_ids
=
[
enrollment
.
course_id
for
enrollment
in
enrollments
]
catalog_course_runs_against_course_keys
=
get_course_runs
(
course_ids
,
request
.
user
)
catalog_course_runs_against_course_keys
=
get_course_runs
(
course_ids
,
request
.
user
)
enrollments
=
queryset
.
filter
(
user__username
=
username
,
is_active
=
True
)
.
order_by
(
'created'
)
.
reverse
()
org
=
request
.
query_params
.
get
(
'org'
,
None
)
org
=
request
.
query_params
.
get
(
'org'
,
None
)
return
Response
([
return
Response
([
...
...
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