我有一个由主权财富基金和玩家夫妇组成的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发布于 2015-09-15 16:45:37
日志指示课程正确启动。“错误”实际上是正确的行为:请求书签(cmi.location)将导致错误,如果课程是ab-initio (第一次发射)。没有书签,因为它还没有创建。
如果您期望课程有一个书签--也就是说,您正在重新启动课程,而它的行为仍然好像它是从头开始的--我猜您在将数据发布到LMS之后没有正确地使用Commit (此包装器中的scorm.save()),并且/或在结束课程之前没有发出Terminate (在这个包装器中的scorm.quit)。
根据下面的评论更新
如果您的课程检查cmi.entry并看到ab-initio,则无需查找书签。您应该使用一个条件语句来防止错误并减少LMS与course之间的聊天:
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);https://stackoverflow.com/questions/32580734
复制相似问题