Add Common Cartridge (.imscc) export for Canvas LMS import#2
Open
daTechGuy wants to merge 6 commits intojtangen:mainfrom
Open
Add Common Cartridge (.imscc) export for Canvas LMS import#2daTechGuy wants to merge 6 commits intojtangen:mainfrom
daTechGuy wants to merge 6 commits intojtangen:mainfrom
Conversation
Bundles each generated chapter as a learning module: reading HTML, practice quiz (QTI + interactive HTML), in-class quiz (QTI), weekly challenge (QTI MCQ subset + interactive HTML), slides PPTX, and infographic. Targets Common Cartridge 1.1 with QTI 1.2 — Canvas's best-tested import profile. Lossy conversions (assertion-reason, agreement-matrix, slider-estimation question types) are skipped from QTI; the rich HTML version ships alongside as a webcontent resource so the original interaction is still available inside Canvas. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bypasses the LLM pipeline so the Common Cartridge exporter can be exercised without an Anthropic API key. The fixture covers every IMSCC code path: HTML reading, practice quiz markdown, in-class quiz with distractors, weekly challenge across all question types (including the non-MCQ types that get skipped from QTI), slides JSON, and a tiny base64 JPEG infographic. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…es DOCX Canvas's Page sanitizer strips inline scripts on import, which left the rich practice-quiz and weekly-challenge single-page apps as dead markup. Removing them from the cartridge entirely — the QTI versions cover the gradeable use case, and the standalone "Publish Course" HTML viewer is the right home for the interactive UX. Teaching resources (discussions + activities) now ride along as a per- chapter DOCX file resource, mirroring the existing per-chapter download. Extracted the docx builder out of ExportPage into its own service module so both call sites share it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Each chapter's discussion prompts now become first-class IMS Discussion Topic 1.1 resources (one XML per prompt) instead of only living in the teaching-resources DOCX. Canvas imports them as native Discussions, so students can actually reply rather than read a Word doc. Activities still ride along in the DOCX — Canvas has no native primitive for multi-step activity guides with facilitation tips and debriefs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…us body Canvas reads a proprietary course_settings/course_settings.xml block during CC import to populate course-level fields. Adding it routes the syllabus.courseOverview into the Syllabus tab's body — which is visible to enrolled students, unlike the IMS LOM <description> in the manifest which only surfaces in Course Details. Resources flagged as 'settings' are added to the manifest <resources> list but intentionally omitted from the <organizations> tree, since they're LMS configuration rather than module content. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…nized Inline <syllabus_body> in course_settings.xml didn't take effect on Canvas import — the syllabus tab still showed the empty-state stub. Switching to Canvas's own export shape: separate course_settings/ syllabus.html file, course_settings.xml without the inline body, and the resource href pointed at canvas_export.txt (the sentinel) rather than course_settings.xml. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the JTprojects Team on Vercel. A member of the Team first needs to authorize it. |
daTechGuy
pushed a commit
to daTechGuy/CanvasClassBuild
that referenced
this pull request
May 9, 2026
main now contains all CanvasClassBuild fork work — Canvas template upload, IMSCC export (template-aware + non-template), Ollama Cloud LLM provider, Tavily / Wikipedia research backends, course-outline DOCX parsing, advanced-mode toggle, Canvas auto-publish sidecars, and the rebrand. The 'main is upstream-aligned with a pointer' phase ends here; visitors landing on the repo home now see the fork's full README and code. The imscc-canvas-only branch is unchanged and still scoped to the upstream PR (jtangen#2).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.imsccfile, suitable for native import into Instructure Canvas.discussionDataentry.course_settings/extension so the description appears in the Syllabus tab, not just the manifest LOM.What's in the cartridge
htmlContentwebcontentpracticeQuizData(markdown)inClassQuizDataweeklyChallengeDataslidesJsoninfographicDataUridiscussionData[]imsdt_xmlv1p1(one per prompt)discussionData+activityDatacourseTitle+courseOverviewcourse_settings/audioUrlhandleDownloadAll)Notes / known constraints
assertion-reason,agreement-matrix, andslider-estimationquestion types don't have clean QTI 1.2 equivalents — they're skipped from the gradeable assessment. The MCQ-shaped subset (mcq, two-stage, boss, confidence-weighted) converts cleanly.<script>, so the rich single-page-app quiz UI cannot survive import. The standalone "Publish Course" HTML viewer remains the right home for that UX.New / changed files
src/services/export/imsccExporter.ts— new, core exporter (manifest, QTI, IMSDT, course settings)src/services/export/teachingResourcesDocx.ts— new, extracted fromExportPageso both the per-chapter download and the IMSCC bundle share itsrc/pages/ExportPage.tsx— new "Export for Canvas (.imscc)" button + handler, and a small refactor where the teaching-resources docx logic moved outsrc/fixtures/demoCourse.ts+src/pages/LandingPage.tsx— optional "Load demo course" path for testing the export without an LLM round-trip. Happy to drop these from the PR if you'd rather keep the fixture out of the main app.Test plan
tsc -bexit 0); ESLint clean for the new codecourse_settings/🤖 Generated with Claude Code