Commit ddc979d3 by Matt Drayer Committed by Jonathan Piacenti

mattdrayer/api-courses-list-fix: Add course_id to resource urls

parent 6aeb6d47
......@@ -359,6 +359,8 @@ def _get_course_data(request, course_key, course_descriptor, depth=0):
course_descriptor
)
base_uri_without_qs = generate_base_uri(request, True)
if unicode(course_key) not in base_uri_without_qs:
base_uri_without_qs = '{}/{}'.format(base_uri_without_qs, unicode(course_key))
data['course_image_url'] = course_image_url(course_descriptor)
data['resources'] = []
resource_uri = '{}/content/'.format(base_uri_without_qs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment