feat: Add unit from library into course (#1829)

* feat: Initial worflow to add unit to course
* test: Add initial tests
* feat: Show only published units
* test: Update Subsection card test and ComponentPicker tests
* feat: Connect add unit from library API
* test: Test for Add unit from library in CourseOutline
* fix: create a new Vertical from a Library Unit
* docs: add a little note about avoiding 'vertical' where possible
* refactor: Use visibleTabs instead of showOnlyHomeTab

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Braden MacDonald <braden@opencraft.com>
This commit is contained in:
Chris Chávez
2025-04-24 14:07:54 -05:00
committed by GitHub
parent 1fe1f93314
commit d6b51ecf0c
12 changed files with 372 additions and 94 deletions

View File

@@ -52,6 +52,15 @@ export const buildCollectionUsageKey = (learningContextKey: string, collectionId
export enum ContainerType {
Unit = 'unit',
/**
* Vertical is the old name for Unit. Generally, **please avoid using this term entirely in any libraries code** or
* anything based on the new Learning Core "Containers" framework - just call it a unit. We do still need to use this
* in the modulestore-based courseware, and currently the /xblock/ API used to copy library containers into courses
* also requires specifying this, though that should change to a better API that does the unit->vertical conversion
* automatically in the future.
* TODO: we should probably move this to a separate enum/mapping, and keep this for the new container types only.
*/
Vertical = 'vertical',
}
/**