Skip to content

First teaching-class import

Use the actual yxnu rosters to create Courses, Offerings, learners and teacher enrollments through the existing OneRoster importer. The initial trial uses Oral 26-3 on 10 October: its Deck has 18 Slides and no media uploads. The teacher sign-in email is anton@melser.org.

Prepare and validate the archive without an API or database:

Terminal window
bun tools/scripts/import-yxnu-teaching.ts \
--teacher-email anton@melser.org \
--class oral-english-1-26-3 \
--runsheet courses/oral-english-1/content/week06-extra/class-26-3.runsheet.yaml \
--archive-out tmp/agents/teaching-continuation/yxnu-pilot.private.zip

Omit --class to prepare all six classes across three Courses. Repeat --class to select several rosters. Supplying run-sheets requires exactly one selected class, whose Offering is the Meeting audience. This semester-specific tool reads the confirmed calendar and timetable; it creates selected manual Meetings rather than a whole semester’s Patterns.

Before applying, the maintainer applies the committed migrations using the migration runbook. Sign into Emergent with the confirmed teacher email. The existing OneRoster endpoints require platform-admin permission; use that account’s real Supabase access token in a local token file. DATABASE_URL must point to the same database as the API. The tool uses it only to read generated mappings after a successful authenticated import; mutations use the existing workflow and Operations endpoints.

Run the same preparation command with:

Terminal window
--apply \
--api-url https://YOUR-EMERGENT-API \
--token-file tmp/agents/teaching-continuation/emergent-session.private.txt \
--mapping-out tmp/agents/teaching-continuation/yxnu-pilot-mapping.json

The saved mapping retains the actual OneRoster source ID and the created Meeting ID. Keep it when rerunning or adding classes. The tool configures the semester calendar and room, then writes the Offering/Meeting mapping for the selected Deck and Plan.

Check the selected corpus with that mapping:

Terminal window
bun tools/scripts/import-deck-corpus.ts \
--root /home/anton/teaching/yxnu \
--mapping tmp/agents/teaching-continuation/yxnu-pilot-mapping.json \
--source courses/oral-english-1/content/week06-extra/class-meeting-slides.md \
--runsheet courses/oral-english-1/content/week06-extra/class-26-3.runsheet.yaml \
--dry-run

When the result is ready, remove --dry-run to import this Deck and Meeting Plan. Open the Offering’s Meeting in the teacher portal, Prepare it, then open Podium and its Audience window. The corpus importer refuses replacing an already imported Deck or authored Plan; it is a one-shot import, so inspect its dry run before the write.

Create the shared Offering and its teaching Group Set first. Supply an explicit JSON array through --class-groups tmp/agents/teaching-pilot/class-groups.json when importing. Each entry names classSourcedId, offeringId and groupId. The source class ID is its roster basename, such as oral-english-1-26-2. The destination IDs identify the existing Offering and teaching Group.

The import persists that mapping for subsequent CSV imports and REST updates. Each source class retains its identity. A source class refresh updates its Group provenance while the shared Offering keeps its authored title and state. Moving an already imported class to a different Offering requires the teaching-record transition first.

Fresh YXNU imports retain administrative class and classroom participation facts beside Offering membership. Prepared packages include a private roster-facts file bound to the OneRoster archive’s SHA-256 digest. Reprepare the package if those files become mismatched. Older packages can still import their original archive and retain existing membership metadata. The CLI reports the number of roster facts it will apply in its dry run.