Prototype โ simulate states:
Screen Flow (SUC-CCM-04):
Spec notes
Identity
SUC-CCM-04 ยท Screen: SCR-CCM.04 (Media Upload Dialog โ parameterized: resource_type = video)
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-04 ยท Invoked by (Backoffice Portal): UC-CCM.01 (Author Course Content), step 6 "Add Content โ Video".
Precondition: the selected Content Item on the course editing page has no content linked yet.
Success: video saved and bound to the lesson; Course Editor updates its structure to display the new video.
Cancel after upload (AF 5A): the uploaded video file is deleted; the lesson item remains empty.
Selecting an existing video from the asset library (reuse) happens at SCR-CCM.26 "From library" tab, before this dialog opens โ out of scope here.
Screen spec: SCR-CCM.04 (video)
- Regions: Context header ยท Upload area ยท Resource metadata ยท Dialog actions
- context_header: read-only ยท default: param.context_header ยท data_ref: passed from calling SUC
- file_input: required ยท visible when upload_state == idle ยท accept: MP4, WebM (SS-CCM.02) ยท max size TBD (SS-CCM.02)
- upload_progress: read-only ยท visible when upload_state == uploading ยท range 0โ100
- resource_title: required ยท min length 1 ยท default = param.original_filename ยท visible when upload_state == complete ยท data_ref: CourseDraftResource.title
- resource_description: optional ยท visible when upload_state == complete ยท data_ref: CourseDraftResource.description
- duration_estimate: optional ยท min 1 ยท visible when upload_state == complete && resource_type == video ยท default: param.auto_detect_duration ยท data_ref: CourseDraftResource.metadata.duration_seconds
- Actions: save (enabled when upload_state == complete && resource_title != '') โ SUC-CCM-04-M-6; cancel (always enabled) โ SUC-CCM-04-A-5A
- AR#1: parameterized by resource_type โ video has no file preview, metadata = filename_original, file_size_bytes, mime_type, duration_seconds
- AR#2: 2-stage format/size validation โ client-side (AF 2A) + server-side re-check
- AR#3: atomic save (SS-CCM.07) โ binary write + CourseDraftResource insert + CourseDraftItem link commit/rollback together
- AR#4: upload transfer failure โ error + Retry button; user can pick a new file or cancel
- AR#5: WCAG-AA โ file input label linkage, accessible progress bar, field-associated error messages, full keyboard navigation