0

when I send this sample statement the verb is not displaying when I view the information in the LRS. The actor and other information is displaying correctly. Can someone tell me what I might be doing wrong? Thank you.

<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()'>
John M.
  • 347
  • 1
  • 11
  • I posted an answer, but it could be improved with more information. Where are you not finding this information? Is the LRS not returning the statement with the 'verb' property populated at all, are you looking at the request/response itself or are you looking at a UI layer that has been added to the LRS? An LRS by the specification in and of itself doesn't necessarily have a UI, so any UI is custom on top of the data contained in the LRS. If the verb 'id' and/or 'display' are populated in the get statements response then the problem is in the UI layer. – Brian J. Miller Dec 26 '15 at 16:11

1 Answers1

1

Most likely nothing. Your statement could be "improved" by supplying a 'display' property and including one or more language code/value pairs inside of it so that the statement includes a "human readable" version of that object. I would think TinCanJS would have been doing that for you for that verb.

Brian J. Miller
  • 2,169
  • 1
  • 12
  • 12