[feat] Add has_scheduled_content to outline API

The outline API that the learning MFE needs to know if a course has
upcomming content for a new alert.
This commit is contained in:
Thomas Tracy
2021-07-02 10:20:28 -04:00
committed by Albert (AJ) St. Aubin
parent b8114ebc59
commit 986f52faab
3 changed files with 3 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ class CourseBlockSerializer(serializers.Serializer):
'legacy_web_url': block['legacy_web_url'] if enable_links else None,
'resume_block': block.get('resume_block', False),
'type': block_type,
'has_scheduled_content': block.get('has_scheduled_content'),
},
}
for child in children:

View File

@@ -102,6 +102,7 @@ class OutlineTabView(RetrieveAPIView):
children: (list) If the block has child blocks, a list of IDs of
the child blocks.
resume_block: (bool) Whether the block is the resume block
has_scheduled_content: (bool) Whether the block has more content scheduled for the future
course_goals:
goal_options: (list) A list of goals where each goal is represented as a tuple (goal_key, goal_string)
selected_goal:

View File

@@ -105,6 +105,7 @@ def get_course_outline_block_tree(request, course_id, user=None, allow_start_dat
'effort_time',
'format',
'graded',
'has_scheduled_content',
'has_score',
'show_gated_sections',
'special_exam_info',