Prototype โ simulate states:
Screen Flow (SUC-CCM-05):
Spec notes
Identity
SUC-CCM-05 ยท Screen: SCR-CCM.04 (Media Upload Dialog โ parameterized: document) ยท Scope: PDF, Word (.docx), Excel (.xlsx). Upload-only โ reuse from the library is handled at SCR-CCM.26 "From library" tab before entering this SUC.
ReturnUrl context
Current returnUrl: /author-course/
Fallback: / when returnUrl is empty.
Propagation: all scenario-toggle links carry returnUrl. Save โ returnUrl. Cancel โ returnUrl + &sub_cancelled=1.
Sub-flow context
SUC-CCM-05 ยท Invoked by (Backoffice Portal): UC-CCM.01 (Author Course Content) step 6.
Precondition: The Content Item selected on the course editing page has no content linked yet.
Success: Document CourseDraftResource created + bound to the lesson โ Course Editor outline shows the new document (UC-CCM.01 step 7).
Cancel after upload (AF 5A): the uploaded file is deleted; the lesson item remains empty.
Screen spec: SCR-CCM.04 (document type)
- Regions: Context header ยท Upload area ยท Resource metadata ยท Dialog actions
- context_header: read-only ยท source: param.context_header
- file_input: required ยท visible when upload_state == idle ยท accept: PDF, .docx, .xlsx ยท client pre-check before upload (AR#2, SS-CCM.02)
- upload_progress: visible when upload_state == uploading ยท range 0โ100
- resource_title: required ยท min length 1 ยท default = filename ยท visible when complete ยท data_ref: CourseDraftResource.title
- resource_description: optional ยท visible when complete ยท data_ref: CourseDraftResource.description
- Completion tracking toggle: default off ยท data_ref: CourseDraftResource.is_tracked (see SCR-CCM.02 field no.28) ยท not itemized in SCR-CCM.04's field catalog but required by SUC-CCM-05 main flow step 4 + AR#3 (SS-PLY.06)
- duration_estimate: SCR-CCM.04 restricts this field to resource_type == video โ not shown for document
- metadata (JSONB): filename_original, file_size_bytes, mime_type, page_count (PDF only โ server-extracted, not a form field)
- AR#1: dialog is parameterized by resource_type; preview + metadata schema differ by type (SS-CCM.02). AR#2: 2-stage format/size validation, client (AF 2A) then server. AR#3: atomic save + rollback (SS-CCM.07)
- Open issues: max file size for document/PDF โ TBD, confirmed at design phase (OI ref: Asset format whitelist + max size, SS-CCM.02)