-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Description
Summary
The current Content Groups API v2 endpoint (/api/cohorts/v2/courses/{course_id}/group_configurations) returns an overly complex nested response structure that was designed for Studio's internal use. For the Instructor Dashboard, we need a simplified, flat response.
Current Response Structure
{
"all_group_configurations": [
{
"id": 18587404,
"name": "Content Groups",
"scheme": "cohort",
"groups": [
{"id": 1819362822, "name": "Content Group A", "version": 1, "usage": []},
{"id": 259161138, "name": "Test", "version": 1, "usage": []},
{"id": 205150518, "name": "Content Group B", "version": 1, "usage": []}
],
...
}
],
"context_course": null,
"course_outline_url": "...",
"group_configuration_url": "...",
"should_show_enrollment_track": false,
"should_show_experiment_groups": true
} Desired Response Structure
{
"id": 18587404,
"groups": [
{"id": 1819362822, "name": "Content Group A", "version": 1, "usage": []},
{"id": 259161138, "name": "Test", "version": 1, "usage": []},
{"id": 205150518, "name": "Content Group B", "version": 1, "usage": []}
],
"studio_content_groups_link": "http://example-host.com/authoring/course/course-v1:org+course+run/group_configurations"
} Requirements
- Return a flat
groupsarray containing just the content groups for the course - Include
studio_content_groups_link- a URL to Studio where instructors can create/manage content groups - Always return both fields, even when
groupsis an empty array (so users can navigate to Studio to create their first content group)
Acceptance Criteria
- API returns only
groupsandstudio_content_groups_linkfields groupsis a flat array of content group objectsstudio_content_groups_linkpoints to Studio's group configurations page- Response works correctly when no content groups exist (empty array)
- Update serializers and views accordingly
- Update API tests
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status