Supplementary Assets
Screen Flow (from flow.puml):
๐ Spec notes โ UC-LMS.21 / SCR-LMS.56, SCR-LMS.57 (fields, actions, requirements)
- Screen: SCR-LMS.56 โ Supplementary Assets
- Use case: UC-LMS.21 โ Manage Supplementary
The Supplementary tab within the Cohort Dashboard (SCR-LMS.50). Two-panel layout: the left panel shows the Course Content tree (Module > Lesson > Item) for the Course linked to this Cohort; items that already have Supplementary Assets show a count badge. Clicking an Item shows its Supplementary Asset list in the right panel, with an "+ Add Asset" button that opens SCR-LMS.57. Saved Assets appear in the Learner's Lesson Player only within this Cohort.
module_title/lesson_title/item_titleโ text ยท read-only ยท always visibleitem_type_badge"Item Type" โ enum (Content / Video / Quiz / PDF / Image / External Link) ยท read-onlyasset_count_badge"Number of Supplementary Assets" โ computed ยท visible when asset_count > 0selected_item_title,selected_item_type_badgeโ visible when selected_item_id != nullasset_title,asset_type_labelโ visible when selected_item_id != null && asset_list.length > 0empty_state_messageโ fallback "No Supplementary Assets have been added for this Item yet." ยท visible when list is emptyplaceholder_messageโ fallback "Please select an Item from the left panel to manage its Supplementary Assets." ยท visible when nothing selected
select_itemโ always enabled ยท triggers UC-LMS.21-M-2add_asset"+ Add Asset" โ enabled when selected_item_id != null ยท triggers UC-LMS.21-M-4edit_asset"Edit" โ always enabled ยท triggers UC-LMS.21-A-4A-1delete_asset"Delete" โ always enabled ยท triggers UC-LMS.21-A-4B-1confirm_delete"Confirm Delete" โ always enabled ยท triggers UC-LMS.21-A-4B-3cancel_delete"Cancel" โ always enabled ยท triggers UC-LMS.21-A-4B.3A-1reorder_asset"Drag an Asset row to reorder" โ enabled when selected_item_id != null && asset_list.length > 1 ยท triggers UC-LMS.21-A-3B-1
- Asset count indicator on each Item node shows only when count > 0; updates immediately after add/delete without a full page reload.
- Delete confirmation is an inline panel inside the right panel โ not a browser confirm dialog, not a separate screen โ showing the asset name plus "Confirm Delete" / "Cancel".
- The right-panel asset list is scoped to cohort_id + item_id; instructors in a different Cohort cannot view or modify these assets.
โณ Embedded dialog: SCR-LMS.57 โ Add/Edit Supplementary Asset Dialog (3-mode)
Three modes in one pop-up: (1) Picker โ lists InstituteCourseResource for this Course (same pool as Manage Asset / UC-LMS.22), filterable by type and searchable by name, plus an "Add New" button; (2) Add New โ form to create a new Supplementary Asset (Website URL or file upload); (3) Edit โ same form, pre-filled with the existing values (Document shows current file name + "Upload new file").
picker_type_filter"Asset type" โ one_of [All, Files, Video, SCORM, Quiz, Assignment] ยท visible in picker modepicker_search_query"Search asset name" โ max 200 chars ยท visible in picker modepicker_empty_stateโ fallback "No matching assets found" ยท visible when picker_result_count == 0form_asset_title"Asset name" โ required in add_new/edit ยท 1โ255 charsform_asset_type"Type" โ one_of [Website, Document] ยท default Website ยท required in add_new/editform_asset_url"Website URL" โ required when type == Website ยท format: url ยท max 2048 charsform_document_file"Upload file" โ required when add_new && type == Document ยท pdf/doc/docx/xls/xlsx/ppt/pptx ยท max 50 MBform_document_filename_display"Current file" โ read-only ยท visible in edit mode when type == Documentform_document_replace_file"Upload new file to replace current" โ optional ยท visible in edit mode when type == Document
picker_filter_by_type,picker_searchโ enabled in picker mode ยท triggers UC-LMS.21-M-5picker_select_assetโ enabled in picker mode ยท triggers UC-LMS.21-M-6add_new"Add New" โ enabled in picker mode ยท triggers UC-LMS.21-A-5A-1back_to_picker"โ Back" โ enabled in add_new mode ยท triggers UC-LMS.21-M-5save"Save" โ enabled when required fields valid ยท triggers UC-LMS.21-A-5A-3 / UC-LMS.21-A-4A-3cancel"Cancel" โ always enabled ยท triggers UC-LMS.21-A-5B-1
- Pop-up title changes per mode: picker โ "Add Supplementary Asset"; add_new โ "Add New Supplementary"; edit โ "Edit Supplementary Asset".
- Picker shows all InstituteCourseResource for the Course, no type pre-filter; assets already linked as a CohortSupplementary for this Lesson show an "Added" badge and remain visible.
- Changing the Type radio toggles Website/Document fields immediately without reloading the pop-up.
- Edit mode pre-fills all fields with current saved values; if no new file is selected, the system keeps the existing file.
- Validation errors render inline below the relevant field; the pop-up remains open (see additional requirement #4 of UC-LMS.21).
- File validation runs both client-side (accept attribute) and server-side (MIME type + extension). Helper text: "PDF / Word / Excel / PowerPoint (maximum 50 MB)".
Model/2 - Requirements/Modules/LMS Core/screens/scr-lms-57-add-edit-supplementary-asset-dialog.yaml