[英]Why my SCO does not count as finished
I have very simple SCO, containing empty html page. 我有一个非常简单的SCO,包含空的html页面。 Using chrome dev tools I use pipwerks scorm api wrapper to initialize LMS connection, set cmi.completion_status to "completed" and cmi.success_status to "failed" (according to scorm runtime reference ), save and exit.
使用chrome dev工具,我使用pipwerks scorm api包装器初始化LMS连接,将cmi.completion_status设置为“ completed”,将cmi.success_status设置为“ failed”(根据scorm运行时参考 ),保存并退出。 When I return back to LMS web page my attempt is not considered "completed".
当我返回LMS网页时,我的尝试不被视为“完成”。 If I try and set success status to "passed" everything is good, SCO is considered completed and I'm able to close it.
如果我尝试将成功状态设置为“通过”,则一切都很好,可以认为SCO已完成,并且可以关闭它。 I guess it's some imsmanifest.xml option I'm missing to get this done.
我想这是一些imsmanifest.xml选项,我无法做到这一点。
This is my imsmanifest.xml file: 这是我的imsmanifest.xml文件:
<?xml version="1.0" standalone="no" ?>
<manifest identifier="com.scorm.golfsamples.contentpackaging.singlesco.20043rd" version="1"
xmlns="http://www.imsglobal.org/xsd/imscp_v1p1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_v1p3"
xmlns:adlseq="http://www.adlnet.org/xsd/adlseq_v1p3"
xmlns:adlnav="http://www.adlnet.org/xsd/adlnav_v1p3"
xmlns:imsss="http://www.imsglobal.org/xsd/imsss"
xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1.xsd
http://www.adlnet.org/xsd/adlcp_v1p3 adlcp_v1p3.xsd
http://www.adlnet.org/xsd/adlseq_v1p3 adlseq_v1p3.xsd
http://www.adlnet.org/xsd/adlnav_v1p3 adlnav_v1p3.xsd
http://www.imsglobal.org/xsd/imsss imsss_v1p0.xsd">
<metadata>
<schema>ADL SCORM</schema>
<schemaversion>2004 3rd Edition</schemaversion>
</metadata>
<organizations default="golf_sample_default_org">
<organization identifier="golf_sample_default_org">
<title>Single SCO</title>
<item identifier="item_1" identifierref="resource_1">
<title>Single SCO</title>
</item>
</organization>
</organizations>
<resources>
<resource identifier="resource_1" type="webcontent" adlcp:scormType="sco" href="index.html">
<file href = "index.html"/>
<file href = "SCORM_API_WRAPPER.js"/>
</resource>
</resources>
</manifest>
HTML page I'm using: 我正在使用的HTML页面:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Single SCO</title>
<script src="SCORM_API_wrapper.js"></script>
<script>
function loadPage() {
pipwerks.SCORM.init();
pipwerks.SCORM.set("cmi.completion_status", "completed");
pipwerks.SCORM.set("cmi.success_status", "failed");
pipwerks.SCORM.set("cmi.score.raw", "50");
pipwerks.SCORM.set("cmi.score.min", "0");
pipwerks.SCORM.set("cmi.score.max", "100");
pipwerks.SCORM.save();
}
</script>
</head>
<body onload="loadPage()">
</body>
</html>
UPD: I modified html page to automatically make these calls. UPD:我修改了html页面以自动进行这些调用。
Looks like you're forgetting to set the exit status so you can re-load the same data - 好像您忘记设置退出状态,因此您可以重新加载相同的数据-
pipwerks.SCORM.set("cmi.exit", "suspend");
Without the suspend state the next time you load it'll treat it as a new attempt, so the previous state won't get supplied to the API. 如果没有暂停状态,则下次加载时会将其视为新尝试,因此不会将先前的状态提供给API。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.