SCORM 1.2 API Examples/Tutorials

SCORM 1.2 API Examples/Tutorials

我花了相当多的时间搜索 SCORM 1.2 API tutorials/examples,结果证明这是一项艰巨的任务。

我找到的唯一样本是: http://www.vsscorm.net/2009/05/30/ground-rules/

这是一个可靠的教程,但我想从其他来源找到更多信息。

欢迎所有建议。

您是要创建 SCORM 播放器还是要创建课程?我们这里有一些很棒的课程样本:

http://scorm.com/scorm-explained/technical-scorm/golf-examples/

我们的网站上也有一些很好的文档:

http://scorm.com/scorm-explained/scorm-resources/

如果您有具体问题,请告诉我,我们一定会尽力帮助您。

谢谢,


支持@scorm.com

Building a SCORM player is hard. Are you sure you want to build a SCORM player at this stage of the SCORM specification's lifecycle, especially since there are plenty of commercial and even open source 个选项已经存在?对于开源选项,播放器通常嵌入到开源 LMS 中,因此需要提取(或者您可以只使用 OS LMS!)

您可能会发现查找 Tin Can API 是有益的,这是一个旨在取代 SCORM 的新规范,然后再投入大量时间。 SCORM 支持在当今世界仍然很重要,但了解 Tin Can 可能会影响您的 SCORM 播放器 build/buy 决定;如果你打算在较短的时间内使用它,那么构建你自己的就没有意义了。

就像安德鲁提到的那样,自己完全实施 SCORM 真的很难。 我相信 Moodle 甚至不支持 Scorm 2004。

相比之下,AICC 非常容易实现,但它更难在完成时进行重定向等。并且功能较少。

在我的系统中,我实现了最少的功能集来支持使用 Articulate 等工具生成的简单课程。不同的课程以不同的顺序调用 api 或模型中的 get/set 不同的值,因此您可能希望仔细测试任何新课程格式。这是我发现最难的部分是补偿不同课程表现出的不同行为。

The vsscorm you mentioned is actually the best step by step explanation I have found on how to implement the server side I think he got up to 60 posts as he implemented more and more.
http://www.vsscorm.net/

Once you get it communicating with the server the Rustici docs and Run-Time API reference is very helpful for referencing model value descriptions and default values
http://scorm.com/scorm-explained/technical-scorm/run-time/run-time-reference/

Pipwerks has some interesting tools and blog posts though they are mostly focused on course creation.
http://pipwerks.com/downloads/

Also the ADL docs but it's been a long time since I looked at them. http://www.adlnet.gov/scorm/scorm-version-1-2/

如果您下载 Scorm 1.2 版本(基本 运行-Time Calls)并将下面发布的代码放在课程根目录的 html 文件中,然后在浏览器中打开该页面通过网络服务器,它会让课程认为它在 LMS 中足以不抱怨,并且会记录它发出的所有 api 调用。
http://scorm.com/scorm-explained/technical-scorm/golf-examples/

<html>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script>
        var API = {};

        (function ($) {
            $(document).ready(setupScormApi());

            function setupScormApi() {
                API.LMSInitialize = LMSInitialize;
                API.LMSGetValue = LMSGetValue;
                API.LMSSetValue = LMSSetValue;
                API.LMSCommit = LMSCommit;
                API.LMSFinish = LMSFinish;
                API.LMSGetLastError = LMSGetLastError;
                API.LMSGetDiagnostic = LMSGetDiagnostic;
                API.LMSGetErrorString = LMSGetErrorString;

                window.open("shared/launchpage.html", "popupname","resizable,scrollbars,status");
            }
            function LMSInitialize(initializeInput) {
                displayLog("LMSInitialize: " + initializeInput);
                return true;
            }
            function LMSGetValue(varname) {
                displayLog("LMSGetValue: " + varname);
                return "";
            }
            function LMSSetValue(varname, varvalue) {
                displayLog("LMSSetValue: " + varname + "=" + varvalue);
                return "";
            }
            function LMSCommit(commitInput) {
                displayLog("LMSCommit: " + commitInput);
                return true;
            }
            function LMSFinish(finishInput) {
                displayLog("LMSFinish: " + finishInput);
                return true;
            }
            function LMSGetLastError() {
                displayLog("LMSGetLastError: ");
                return 0;
            }
            function LMSGetDiagnostic(errorCode) {
                displayLog("LMSGetDiagnostic: " + errorCode);
                return "";
            }
            function LMSGetErrorString(errorCode) {
                displayLog("LMSGetErrorString: " + errorCode);
                return "";
            }
            function displayLog(textToDisplay){
                var loggerWindow = document.getElementById("logDisplay");
                var item = document.createElement("div");
                item.innerText = textToDisplay;
                loggerWindow.appendChild(item);
            }
        })(jQuery);
    </script>
    <div id="logDisplay">
    </div>
</html>

我认为主要的困难是解析规范。 SCORM 1.2 的大部分内容都是可选的,因此您可以选择要支持的内容和数量。触发错误代码、诊断消息、验证与否。您可以做出所有决定。但是从 JavaScript 的角度来看,它和 Nathan 展示的一样简单,除了您需要构建您的 CMI 对象,您可以使用 JSON 作为示例。

我在此处 https://github.com/cybercussion/SCOBot/blob/master/QUnit-Tests/js/scorm/SCOBot_API_1484_11.js 本地为 运行 设置了一个类似的模拟,考虑到 SCORM 2004。两个版本之间的名称空间发生了变化,因此它不是 1:1。这不包括真正的运行时通常抛出的所有丰富规则、验证和错误消息,这并不是故意的。

构建完整的运行时 API 可能非常耗时。您通常需要融入测试驱动开发,并摆脱数百页的规范。

  1. 设置您的 API
  2. 设置您的学生尝试
  3. 加载您的内容
  4. 等待用户交互
  5. 您需要 post 您的学生尝试 LMSCommit('')。这通常意味着同步 Ajax Post 到您的后端。我已经看到其他 LMS 系统采用非缓存方法,其中每个 LMSGetValue/SetValue 都是到服务器的往返。 SCORM 并没有真正规定什么是这里的最佳实践,但是太多的喋喋不休会导致疯狂的 DNS 延迟(沙滩球、沙漏)和减弱的用户体验。

有很多用例,但我不会劝你不要全部检查一下。无论如何都要有好知识。