当我发送这个示例语句时,当我在LRS中查看信息时,动词不会显示。执行元和其他信息显示正确。谁能告诉我我可能做错了什么?谢谢。
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple Statement</title>
<script src="js/tincan.js" type="text/javascript"></script>
<script type="text/javascript">
function init()
{
var tincan = new TinCan (
{
recordStores: [
{
endpoint: "https://lrs.adlnet.gov/xapi/",
username: "xapi-tools",
password: "xapi-tools",
allowFail: false
}
]
}
);
tincan.sendStatement(
{
actor: {
mbox: "mailto:myemailaddress@example.com"
},
verb: {
id: "http://adlnet.gov/expapi/verbs/attempted"
},
target: {
id: "http://tincanapi.com/activities/sending-my-first-statement"
}
},
function (err, result) {
//Handle any errors here. This code just outputs the result to the page.
document.write("<pre>");
document.write(JSON.stringify(err, null, 4));
document.write("</pre>");
document.write("<pre>");
document.write(JSON.stringify(result, null, 4));
document.write("</pre>");
}
);
}
</script>
</head>
<body onload='init()'>发布于 2015-12-27 00:10:12
很可能什么都没有。您的语句可以通过提供“display”属性并在其中包含一个或多个语言代码/值对来“改进”,以便语句包含该对象的“人类可读”版本。我认为对于这个动词,TinCanJS会为你这么做。
https://stackoverflow.com/questions/34463582
复制相似问题