首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >谓词不从xAPI语句显示

谓词不从xAPI语句显示
EN

Stack Overflow用户
提问于 2015-12-25 22:13:33
回答 1查看 94关注 0票数 0

当我发送这个示例语句时,当我在LRS中查看信息时,动词不会显示。执行元和其他信息显示正确。谁能告诉我我可能做错了什么?谢谢。

代码语言:javascript
复制
<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()'>
EN

回答 1

Stack Overflow用户

发布于 2015-12-27 00:10:12

很可能什么都没有。您的语句可以通过提供“display”属性并在其中包含一个或多个语言代码/值对来“改进”,以便语句包含该对象的“人类可读”版本。我认为对于这个动词,TinCanJS会为你这么做。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34463582

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档