Back to notes
The Tesseract MemoryTechnical note

Publishing reviewed course changes in one transaction

Separate revisions let instructors prepare changes without editing the approved course; publication locks both records and applies the reviewed content together.

Topics

Give the proposed course its own records

CourseRevisionWorkflowService finds or creates an editable copy of an approved course. Creation locks the course inside a transaction and checks again for an existing revision before creating separate course and content records. Edits can then continue without changing the approved lessons.

The administrator controller chooses approve or reject; the service performs the writes. On publication, it locks the course and revision, verifies their relationship, copies the explicit field list, synchronizes assignments and rebuilds chapters, lessons and announcements. Rejection keeps the proposed content out of the approved course.

The service removes the consumed revision before returning the updated course. Learner notifications are invoked after the publication transaction returns.

Atomic publication still changes lesson identity

Tests check that editing leaves the approved course unchanged, approval transfers content and removes the draft, and rejection preserves the approved content and review decision. Notification fakes check which messages should be queued, not whether they were delivered.

The current publication path deletes and recreates chapter and lesson rows. A transaction keeps those writes together, but it doesn't preserve references to the old IDs. The inspected tests don't establish that learner progress survives those replacements; that needs separate relationship handling and migration coverage.

Publishing a reviewed course revision

The transaction locks related records and replaces curriculum; progress continuity needs separate evidence.

Direct callBlocked / denied
Review and notification
Publication transaction
Database records

Scroll or drag the background to move. Use the zoom buttons to resize.Arrow keys move between components. Enter selects.

Choose a component to explore

Select a numbered component on the map or use the component menu. Its details and connections will appear here.

No component selected.

All connections (8)
  1. 01 · Admin course review action03 · CourseRevisionWorkflowServiceApprove revision · Direct call
  2. 03 · CourseRevisionWorkflowService05 · Live course recordLock and update · Direct call
  3. 03 · CourseRevisionWorkflowService06 · Reviewable revision recordLock and read · Direct call
  4. 03 · CourseRevisionWorkflowService04 · Revision-to-course relationship checkVerify parent relationship · Direct call
  5. 04 · Revision-to-course relationship check01 · Admin course review actionReject mismatched revision · Blocked / denied
  6. 04 · Revision-to-course relationship check07 · Published chapters and lessonsReplace after verification · Direct call
  7. 03 · CourseRevisionWorkflowService06 · Reviewable revision recordRemove consumed revision · Direct call
  8. 03 · CourseRevisionWorkflowService02 · Course workflow notificationsAfter transaction returns · Direct call