Coach resource selection shows only the first learning activity of each resource
๐ Looking for an issue? Welcome! This issue is open for contribution. If this is the first time youโre requesting an issue, please:
- Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that donโt follow the guidelines wonโt be answered.
- Confirm that youโve read the guidelines in your comment.
Target branch: develop
Observed behavior
For a resource with more than one learning activity, the Coach resource-selection side panel, shared by lessons and quizzes, shows only the first activity:
LessonContentCard/index.vue#L49-L53passescontent.learning_activities[0]toLearningActivityChip, so a resource tagged['WATCH', 'EXPLORE']shows only a "Watch" chip. The Learn plugin renders one spaced chip per activity, e.g.TopicsPage/index.vue#L220-L237.ManageSelectedResources.vue#L21-L24passesresource.learning_activities[0]toLearningActivityIcon, which renders its "all activities" icon only when given the full array (LearningActivityIcon.vue#L36-L86).
User-facing consequences
Coaches choosing resources for a lesson or quiz see incomplete activity information for multi-activity resources, which differs from what learners see in Learn.
Steps to reproduce
- Import a channel containing a resource tagged with two or more learning activities.
- As a coach, open a lesson, click Manage resources, and browse to that resource. Its card shows only the first activity's chip.
- Select the resource and click the N resources selected link. Its row shows the first activity's icon, not the "all activities" icon.
Acceptance Criteria
- [ ] Resource cards in the lesson and quiz selection panels show one
LearningActivityChipper entry inlearning_activities. - [ ] Chips on one card are visibly separated and wrap onto a new line when they exceed the card width.
- [ ] The selected-resources list shows the "all activities" icon for a resource with two or more activities, and the activity's own icon for a resource with one.
- [ ] A resource with an empty
learning_activitiesarray renders without errors in both views. - [ ] New Vue Testing Library specs for
LessonContentCardandManageSelectedResourcescover single- and multi-activity resources.
Out of scope
my_downloads/DownloadsList/index.vue, tracked in #15381.
AI usage
I had Claude Code compare every call site of LearningActivityChip/LearningActivityIcon against how learning_activities is actually declared and consumed elsewhere, after fixing a related multi-activity crash (#15372) in the same resource-selection area. It found these two remaining single-index call sites, verified the bug with a Jest repro, and drafted this issue; I reviewed the trace and scoped the fix.
Hi! ๐
This issue is available for contribution and supports self-assignment. Here's how to get started:
- Comment
/assignto assign yourself to this issue - You can have up to 2 issues assigned at a time across all community repos
- Dropping an issue has a 7-day cooldown before the slot opens up
- Link your pull request to this issue when you submit it
๐ Read the Contributing guidelines before starting.
Are you preparing for Google Summer of Code? See our GSoC guidelines.
Hi! ๐
This issue is available for contribution and supports self-assignment. Here's how to get started:
- Comment
/assignto assign yourself to this issue - You can have up to 2 issues assigned at a time across all community repos
- Dropping an issue has a 7-day cooldown before the slot opens up
- Link your pull request to this issue when you submit it
๐ Read the Contributing guidelines before starting.
Are you preparing for Google Summer of Code? See our GSoC guidelines.
/assign
Hi! ๐
You've been assigned to this issue. Here's what to do next:
- Read the issue description carefully and make sure you understand the requirements
- Link your pull request to this issue when you submit it
- If you can no longer work on this, unassign yourself so others can pick it up
Good luck! ๐
Are you preparing for Google Summer of Code? See our GSoC guidelines.