闪存包不当

Improper flash package

我有一个由几个 swf 和播放器组成的 SCORM 包。但是,当用户从 LMS 启动内容时,播放器初始化不正确或损坏,当然它无法正常工作和发挥应有的作用。有一个包的控制台日志可能会给出一个想法。

Synchronous XMLHttpRequest on the main thread is deprecated because of its   detrimental effects to the end user's experience. For more help, check     

http://xhr.spec.whatwg.org/.
Initializing SCORM class...ExternalInterface.available evaluates true.     
SCORM.isAvailable() evaluates true. SCORM class file check, ready.
SCORM.connect() called from class file
connection.initialize called.
SCORM.API.find: API found. Version: 2004
API: [object Object]
SCORM.data.get(cmi.completion_status)  value: unknown
__connectionActive: true
SCORM.data.get(cmi.location) failed. 
Error code: 403
Error info: hata
SCORM.data.get(cmi.location)  value: 
SCORM.get(cmi.location) failed. 
Error code: 403
Error info: hata
public function get returned: 
SCORM.data.get(cmi.entry)  value: ab-initio
public function get returned: ab-initio
SCORM.data.get(cmi.location) failed. 
Error code: 403
Error info: hata
SCORM.data.get(cmi.location)  value: 
SCORM.get(cmi.location) failed. 
Error code: 403
Error info: hata
public function get returned: 
SCORM.data.get(cmi.learner_name)  value: test test
public function get returned: test test

日志显示课程正常启动。 “错误”实际上是正确的行为:如果课程是 ab-initio(首次启动),请求书签 (cmi.location) 将导致错误。没有书签,因为还没有创建。

如果您希望课程有书签——即您正在重新启动课程,但它仍然表现得好像是从头开始——我猜你没有正确使用 Commitscorm.save() 在此包装中)将数据发布到 LMS 后,and/or 在关闭课程之前不会发布 Terminate(此包装中的 scorm.quit)。

根据下面的评论更新

如果您的课程检查 cmi.entry 并看到 ab-initio,则无需查找书签。您应该使用条件语句来防止错误并减少 LMS 和课程之间的交流:

var bookmark = "my default";
var entry = scorm.get("cmi.entry");
var location; //wait for it...

if(entry !== "ab-initio"){

    //not querying cmi.location unless we're sure this isn't the first visit
    location = scorm.get("cmi.location");

    //Wrapping in a conditional in case cmi.location returns false or an empty string
    if(location){ bookmark = location; }

}

courseFunctionThatUsesBookmarkValue(bookmark);