[4.1] SCORM Export

Author: James Derick Billate
Reviewer:
Jethro Lagmay & Joylynne Esportuno
Creation Date:
June 30, 2026
Status: Approved and Merged
References:
https://github.com/wyzlab/WyzQuests/issues/41

INTRODUCTION AND GOALS

Problem Summary: This features completes the overall goal of WyzQuests being an authoring tool. SCORM Export converts every quest into SCORM compliant packaged that can be uploaded to other Learning Management Systems (LMS), with the inclusion of Computer Managed Instruction (CMI) and Sharable Content Object (SCO) making the content dynamic to various channels and learners.

Goals & Non-Goals: There are already some implementation of SCORM CMIs particularly with the process of learners numerically and their current activity or navigation within the quest. However, the learners does not have the ability to backtrack yet whenever they offload themselves midway of the quest.


HIGH-LEVEL ARCHITECTURE

System Diagram:

Technologies Used: Next.js, Tailwind CSS, Zod Validation, Supabase, RESTful APIs, Shadcn Components, SCORM


DETAILED DESIGN & IMPLEMENTATION

API Specification:  

GET /api/creator/share/scorm

  • Fetches the quest created by creator for SCORM Export initiation

  • API Returns:

Status

Message

400

Missing Quest ID value parameter

404

The quest does not exist

200 OK

success: true, message: "Quest retrieved", quest: questData,

500

Internal Server Error

POST /api/creator/export/single-sco

  • Initiates the creation of SCORM packages for version 1.2 and 2004

  • API Returns:

Status

Message

403

Unauthorized

400 (Quest ID)

Quest ID is required

400 (SCORM Version)

Invalid SCORM version

error NextResponse

SCORM export failed

NextResponse Generation of Package

  • "Content-Type": "application/zip"

  • "Content-Disposition": attachment; filename="${version}-single-${questId}.zip"

  • "Content-Length": String(buffer.length)

  • "Cache-Control": "no-store"

Core Logic & Workflow: 

  1. Choose a quest created, prefferrably with a published status

  2. Either choose 1.2 or 2004 as SCORM Export version

  3. Once a version is picked, click the export button and wait

  4. Afterwards a .zip file is generated with the inclusion of .imsmanifest file

generateExportPackage(version, parsedMasteryScore, questData) - is a helper function that auto generates all neccessary files related to SCORM .zip package. This includes

  • index.html : the main identification of the quest as a SCORM compliant content

  • scorm-wrapper.js : fetches the SCORM version and function to run the data model.

  • scorm-functions.js : is a file consisting of all SCOMR data model, that connects the quest data to LMS SCORM reader.

The template is dynamic against the version and content.


INFRASTRUCTURE & OPERATIONS

Dependencies: No known major dependencies other than ZOD validation to ensure data inputs and returns are correct and accurate

Monitoring & Alerting:  No major monitoring is needed, since most of the functionalities in this feature are mostly export purposes only. Alert notification thus will be sent whenever internal services do not provide accurate returns or have an error.

Deployment Plan: 

  • Ensure all CMIs corresponds to the documentation of SCORM either 1.2 and 2004

  • All templates must also comply to SCORM standardization, especially .imsmanifest


TESTING & QUALITY ASSURANCE

Testing Strategy: 

  • Locally, use scorm-again by /jcputney

  • Import the scorm-again package via npm install

  • Include another file if exported a quest with a file name dev-scorm.js

// SCORM 1.2
window.API = new window.Scorm12API({
autocommit: true,
logLevel: 1,
});
// SCORM 2004
window.API_1484_11 = new window.Scorm2004API({
autocommit: true,
logLevel: 1,
});
// Add this in index.html
<script src="./dev-scorm.js"></script>
  • Upload the zip file to SCORM Cloud for testing, instead of directly to SCORM compliant LMS

Known Limitations: 

  • No ability to backtrack if learner exits midway


MAINTENANCE & SUPPORT

Troubleshooting: 

  • Re-export the quest.

  • Local testing for further validation with inclusion of scorm-again


Document Version

1.0 - Draft, Feature pushed but in need for further development 06/30/2026




Was this article helpful?