Prototype β simulate states:
Screen Flow (SUC-CCM-03):
Spec notes
Identity
SUC-CCM-03 Β· Screen: SCR-CCM.04 (Media Upload Dialog β parameterized: image)
ReturnUrl context
Current returnUrl: /author-course/
Fallback: / when returnUrl is empty.
Propagation: all state-toggle links carry returnUrl. Save β returnUrl. Cancel β returnUrl + &sub_cancelled=1.
Sub-flow context
SUC-CCM-03 Β· Invoked by (Backoffice Portal): UC-CCM.01 (Author Course Content), step 6 β Β«includeΒ» entry from the "Add Content β Image" action on the Content Editor.
Precondition: user has edit rights on the course; the selected Content Item has no content linked yet.
Success: image saved and bound to the lesson β Course Editor updates the lesson structure to show the new image (UC-CCM.01 step 7).
Cancel after upload (AF 5A): the uploaded file is deleted; the lesson item remains empty as before.
Reuse from the asset library is not part of this dialog β it is handled at SCR-CCM.26 "From Library" tab before entering this SUC.
Screen spec: SCR-CCM.04 (image case)
- Regions: Context header Β· Upload area Β· Resource metadata Β· Dialog actions
- context_header: read-only Β· default from param.context_header Β· data_ref: course name + lesson path
- file_input: required Β· visible when upload_state == idle Β· accept: JPG, PNG, WebP (SS-CCM.02) Β· max size TBD (design phase)
- upload_progress: visible when upload_state == uploading Β· range 0β100
- resource_title: required Β· min length 1 Β· default = original filename Β· visible when upload_state == complete Β· data_ref: CourseDraftResource.title
- resource_description: optional Β· visible when complete Β· data_ref: CourseDraftResource.description
- duration_estimate is defined on this shared screen but scoped to
resource_type == videoonly β not shown for the image case - "Require completion tracking" toggle: called out in SUC-CCM-03 main flow step 4 (not a numbered SCR-CCM.04 field) β controls whether the Content Player records completion for this item (AR#3, SS-PLY.06)
- AR#1: format + size validated 2-stage β client-side pre-check (AF 2A) then server-side on receive (SS-CCM.02)
- AR#2: no separate modal alert β errors shown inline within the dialog (NFR-06)
- AR#3: Save is atomic across storage write + CourseDraftResource row + CourseDraftItem link; any failure rolls back all three (SS-CCM.07)
- AR#5: WCAG-AA β file input label association, accessible progress bar, inline error association, full keyboard navigation
- Open issues: OI-30 (format whitelist confirmed as JPG/PNG/WebP; max size still TBD β deferred), OI-31 (automatic image resize/optimization β deferred to design phase), OI-32 (EXIF metadata stripping for privacy β deferred to design phase)