Commit 9f8cf1c3 by David Ormsbee

Hide deleted course updates from mobile API.

parent d8e5fca3
...@@ -25,7 +25,12 @@ class CourseUpdatesList(generics.ListAPIView): ...@@ -25,7 +25,12 @@ class CourseUpdatesList(generics.ListAPIView):
course_id = CourseKey.from_string(kwargs['course_id']) course_id = CourseKey.from_string(kwargs['course_id'])
course = modulestore().get_course(course_id) course = modulestore().get_course(course_id)
course_updates_module = get_course_info_section_module(request, course, 'updates') course_updates_module = get_course_info_section_module(request, course, 'updates')
return Response(reversed(course_updates_module.items))
updates_to_show = [
update for update in reversed(course_updates_module.items)
if update.get("status") != "deleted"
]
return Response(updates_to_show)
class CourseHandoutsList(generics.ListAPIView): class CourseHandoutsList(generics.ListAPIView):
......
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