Gdevelop and SCORM

Hi,
I wonder if it is possible for gdevelop, or and exported game, to somehow connect with a SCORM format course?

Thanks in advance

If you’re good with javascript, you might be able to integrate an existing SCORM API with the javascript code events.

Yes, it is possible, and something that I’ve done for my company. I created a “build script” using NodeJS to turn the HMTL5 output folder into Scorm packages (both 2004 and 1.2 versions). It relies on the Pipwerks Scorm API wrapper

2 Likes

I would be really interested in learning how to do this if there is any way you could give more info?

Below is a little snippet of the code I use.

function isScormPresent() {
    scormPresent = pipwerks.SCORM.init();
    if (scormPresent) {
        initializeScorm();
    }
    updateSessionTimePeriodically();
    checkConnectionToScormPeriodically();
    return scormPresent;
}
function initializeScorm() {
    globalStartDate = new Date();
    globalStartTime = globalStartDate.getTime();
    scormVersion = pipwerks.SCORM.version;
    switch (scormVersion) {
        case "1.2":
            pipwerks.SCORM.set("cmi.core.score.min", 0);
            pipwerks.SCORM.set("cmi.core.score.max", 100);
            passingScore = pipwerks.SCORM.get("cmi.student_data.mastery_score");
            var entryStatus = pipwerks.SCORM.get("cmi.core.entry");
            if (entryStatus === "ab-initio" || entryStatus === null || entryStatus === undefined || entryStatus === "") {
                currentRawScore = 0;
                pipwerks.SCORM.set("cmi.core.score.raw", currentRawScore);
            }
            else {
                currentRawScore = pipwerks.SCORM.get("cmi.core.score.raw");
            }
            completionStatus = pipwerks.SCORM.get("cmi.core.lesson_status");
            console.log(completionStatus);
            if (completionStatus === "not attempted") {
                pipwerks.SCORM.set("cmi.core.lesson_status", "incomplete");
            }
            break;
        case "2004":
            pipwerks.SCORM.set("cmi.score.min", 0);
            pipwerks.SCORM.set("cmi.score.max", 100);
            passingScore = pipwerks.SCORM.get("cmi.scaled_passing_score");
            var entryStatus = pipwerks.SCORM.get("cmi.entry");
            if (entryStatus === "ab-initio" || entryStatus === null || entryStatus === undefined || entryStatus === "") {
                currentRawScore = 0;
                currentScaledScore = 0;
                pipwerks.SCORM.set("cmi.score.raw", currentRawScore);
                pipwerks.SCORM.set("cmi.score.scaled", currentScaledScore);
            }
            else {
                currentRawScore = pipwerks.SCORM.get("cmi.score.raw");
                currentScaledScore = pipwerks.SCORM.get("cmi.score.scaled");
            }
            break;
    }
}

1 Like