Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-data-api
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-analytics-data-api
Commits
5a85c451
Commit
5a85c451
authored
May 22, 2017
by
Dennis Jen
Committed by
GitHub
May 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #169 from edx/dsjen/fix-course-ids
Fix course summaries query arg to use course_ids.
parents
662acec2
32b502c8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
analytics_data_api/v0/tests/views/test_course_summaries.py
+1
-1
analytics_data_api/v0/views/course_summaries.py
+2
-2
No files found.
analytics_data_api/v0/tests/views/test_course_summaries.py
View file @
5a85c451
...
@@ -139,7 +139,7 @@ class CourseSummariesViewTests(VerifyCourseIdMixin, TestCaseWithAuthentication,
...
@@ -139,7 +139,7 @@ class CourseSummariesViewTests(VerifyCourseIdMixin, TestCaseWithAuthentication,
[
CourseSamples
.
course_ids
[
0
],
'malformed-course-id'
],
[
CourseSamples
.
course_ids
[
0
],
'malformed-course-id'
],
)
)
def
test_bad_course_id
(
self
,
course_ids
):
def
test_bad_course_id
(
self
,
course_ids
):
response
=
self
.
authenticated_get
(
self
.
path
(
ids
=
course_ids
))
response
=
self
.
authenticated_get
(
self
.
path
(
course_
ids
=
course_ids
))
self
.
verify_bad_course_id
(
response
)
self
.
verify_bad_course_id
(
response
)
def
test_collapse_upcoming
(
self
):
def
test_collapse_upcoming
(
self
):
...
...
analytics_data_api/v0/views/course_summaries.py
View file @
5a85c451
...
@@ -15,7 +15,7 @@ class CourseSummariesView(APIListView):
...
@@ -15,7 +15,7 @@ class CourseSummariesView(APIListView):
**Example Request**
**Example Request**
GET /api/v0/course_summaries/?ids={course_id},{course_id}
GET /api/v0/course_summaries/?
course_
ids={course_id},{course_id}
**Response Values**
**Response Values**
...
@@ -63,7 +63,7 @@ class CourseSummariesView(APIListView):
...
@@ -63,7 +63,7 @@ class CourseSummariesView(APIListView):
programs
=
split_query_argument
(
query_params
.
get
(
'programs'
))
programs
=
split_query_argument
(
query_params
.
get
(
'programs'
))
if
not
programs
:
if
not
programs
:
self
.
always_exclude
=
self
.
always_exclude
+
[
'programs'
]
self
.
always_exclude
=
self
.
always_exclude
+
[
'programs'
]
self
.
ids
=
split_query_argument
(
query_params
.
get
(
'ids'
))
self
.
ids
=
split_query_argument
(
query_params
.
get
(
'
course_
ids'
))
self
.
verify_ids
()
self
.
verify_ids
()
response
=
super
(
CourseSummariesView
,
self
)
.
get
(
request
,
*
args
,
**
kwargs
)
response
=
super
(
CourseSummariesView
,
self
)
.
get
(
request
,
*
args
,
**
kwargs
)
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