我们在之前的电子学习“引擎”中一直使用 SCORM,但我们希望更改我们的托管学习环境 (MLE) 跟踪的元素,即电子学习模块中的每个可完成组件。
在运行时,我们运行以下代码来设置我们的 SCORM 连接:
var vault = {}; //vault 'namespace' helps ensure no conflicts with possible other "SCORM" variables
vault.UTILS = {}; //For holding UTILS functions
vault.debug = { isActive: true }; //Enable (true) or disable (false) for debug mode
vault.SCORM = { //Define the SCORM object
version: null, //Store SCORM version.
handleCompletionStatus: true, //Whether or not the wrapper should automatically handle the initial completion status
handleExitMode: true, //Whether or not the wrapper should automatically handle the exit mode
API:{handle: null, isFound: false}, //Create API child object
connection: { isActive: false }, //Create connection child object
data: { completionStatus: null, exitStatus: null}, //Create data child object
debug:{} //Create debug child object
};
vault.SCORM.API.find('win');
vault.SCORM.connection.initialize();
if (vault.SCORM.data.get("cmi.core.lesson_status")=="not attempted") {
vault.SCORM.data.set("cmi.core.lesson_status" , "incomplete");
vault.SCORM.data.save();
}
SCORM.js 文件中还有更多功能,但关键是这一切都有效;当模块加载到我们的 MLE 中时,以下代码会触发课程完成:
vault.SCORM.data.set("cmi.core.lesson_status" , "completed");
那么我们如何在 SCORM 中注册一个可完成的组件呢?(我们的“引擎”中的组件是通常称为“元素”的 jQuery 对象)。像下面这样的工作,或者 SCORM 中的自定义调用是不可能的?
vault.SCORM.data.set("cmi.interactions.n."+element.componentId() , "incomplete");
但是如果我通过指定一个id来注册一个交互,如下...
vault.SCORM.data.set("cmi.interactions.n.id", element.componentId());
...然后我如何设置或访问该组件的“完成”?
我一直在阅读来自各个站点的帖子和 pdf 规范,但解释充其量是稀疏的。
我知道这里没有很多 SCORM 追随者,但如果你有任何信息,我很想听听。