Skip to content

Import Common Cartridge and SCORM packages#105

Open
swilla wants to merge 16 commits into
4.xfrom
import-cartridge
Open

Import Common Cartridge and SCORM packages#105
swilla wants to merge 16 commits into
4.xfrom
import-cartridge

Conversation

@swilla
Copy link
Copy Markdown
Member

@swilla swilla commented May 21, 2026

Summary

  • Add Common Cartridge import: parse imsmanifest.xml, build courses/lessons/steps from cartridge structure, and extract Articulate Storyline slide content into document steps where possible.
  • Add SCORM / HTML5 package support: store extracted packages, serve them via authenticated routes, and embed them in document steps (Articulate Rise, Storyline HTML5, and cartridges that bundle Articulate content).
  • Expose imports from the admin UI (course list header action) and a new filament-lms:import-cartridges Artisan command (sync or queued), with completion notifications and config under common_cartridge_import.

Test plan

  • Run vendor/bin/pest tests/Feature/CommonCartridgeImportTest.php tests/Feature/ImportCartridgesCommandTest.php tests/Feature/ScormPackageServingTest.php
  • Publish/run the new document migration stub (scorm_package_* columns on lms_documents)
  • Import a Common Cartridge ZIP from Courses → Import cartridge and confirm course/lesson/step structure
  • Import Articulate Rise / Storyline HTML5 ZIPs via CLI (filament-lms:import-cartridges --file=... --sync) and verify SCORM content loads in a document step
  • Confirm SCORM asset URLs require auth and return expected MIME types

Made with Cursor


Note

High Risk
Large feature touching authenticated package serving, client-side SCORM bridges, and completion rules that affect course progress records.

Overview
Adds Common Cartridge / SCORM ZIP import (admin upload + filament-lms:import-cartridges CLI) that builds courses from manifests or Articulate frame.xml, retains extracted packages on documents, and can turn Storyline slides into steps/tests.

Imported package courses can run in embedded player mode with completion_mode native, SCORM 1.2 (in-page API bridge + ScormProgressService), or HTML5 (player postMessage, session minimums, guarded exit/complete). Authenticated ScormPackageController serves package files (path traversal checks, SVG CSP); ScormCommitController records progress.

Filament/LMS UX: course fields for embedded player + completion mode, launch-step-only navigation, full-width player CSS, document steps iframe SCORM packages, LmsTestFormShow card-style MCQ radios, and Step::getRenderedText() sanitization for imported HTML.

Reviewed by Cursor Bugbot for commit 188c2e2. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread src/FilamentLmsServiceProvider.php
Comment thread src/Services/CommonCartridge/ArticulateSlideContentExtractor.php
Comment thread src/Jobs/ImportCommonCartridgeJob.php
Comment thread src/Jobs/ImportCommonCartridgeJob.php Outdated
Comment thread src/Services/CommonCartridge/ScormPackageStorage.php Outdated
Comment thread src/Jobs/ImportCommonCartridgeJob.php
Comment thread src/Console/Commands/BackfillEmbeddedPlayerCourses.php
Comment thread src/Services/CommonCartridge/ManifestParser.php Outdated
Comment thread routes/web.php Outdated
Comment thread resources/views/components/exit-lms.blade.php
Comment thread src/Http/Controllers/ScormPackageController.php
Comment thread src/Services/CommonCartridge/CommonCartridgeImportService.php
Comment thread src/FilamentLmsServiceProvider.php
Comment thread src/Livewire/DocumentStep.php
Comment thread src/Models/Step.php
Comment thread src/Services/CommonCartridge/CommonCartridgeImportService.php
Comment thread src/Models/Step.php
Comment thread src/Http/Controllers/ScormPackageController.php Outdated
Comment thread src/LmsPanelProvider.php
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9c51df1. Configure here.

Comment thread src/LmsPanelProvider.php Outdated
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.

2 participants