Skip to content

Preserve sections and notebook path when copying or bundling a course#342

Open
JimWallace wants to merge 2 commits into
mainfrom
claude/sleepy-rhodes
Open

Preserve sections and notebook path when copying or bundling a course#342
JimWallace wants to merge 2 commits into
mainfrom
claude/sleepy-rhodes

Conversation

@JimWallace
Copy link
Copy Markdown
Owner

Course copy (copyCourse) now:

  • Loads and recreates APICourseSection rows for the new course
  • Maps old→new section UUIDs so copied assignments land in the right section
  • Uses setup.notebookPath directly instead of reconstructing the path as setupsDir+id.ipynb, which failed for notebooks stored in the new-style notebooks// subdirectory

Bundle export/import (CourseBundleRoutes + CourseBundleManifest) now:

  • Adds BundledSection type and sections:[BundledSection]? to the manifest (optional for backward-compat with old bundles)
  • Adds sectionBundleID? to BundledAssignment
  • Export serialises sections and wires sectionBundleID on each assignment
  • Import creates sections first, then sets sectionID on assignments via the bundleID→UUID map

New regression tests:

  • testCourseCopySectionsArePreserved
  • testCourseCopyNotebookPathIsPreserved
  • testRoundTripPreservesSections

JimWallace and others added 2 commits April 16, 2026 12:49
Course copy (copyCourse) now:
- Loads and recreates APICourseSection rows for the new course
- Maps old→new section UUIDs so copied assignments land in the right section
- Uses setup.notebookPath directly instead of reconstructing the path as
  setupsDir+id.ipynb, which failed for notebooks stored in the new-style
  notebooks/<id>/ subdirectory

Bundle export/import (CourseBundleRoutes + CourseBundleManifest) now:
- Adds BundledSection type and sections:[BundledSection]? to the manifest
  (optional for backward-compat with old bundles)
- Adds sectionBundleID? to BundledAssignment
- Export serialises sections and wires sectionBundleID on each assignment
- Import creates sections first, then sets sectionID on assignments via
  the bundleID→UUID map

New regression tests:
- testCourseCopySectionsArePreserved
- testCourseCopyNotebookPathIsPreserved
- testRoundTripPreservesSections

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-in-filter

- Replace UUID?? vs UUID? XCTAssertEqual comparisons with explicit if-let unwrapping
- Store requireID() result in a variable before using in filter() instead of
  calling try inside the filter DSL expression

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant