Select Page

xAPI Statement 101: Result Element

by | Jun 22, 2016

We’ve already talked about the Actor > Verb > Object triplet, but there can also be some other context derived from an xAPI statement as a such as the Result of the experience having occurred outside of those elements, and that’s what we’ll look at in this post.

Understanding the Result Element of an xAPI Statement

Result statements can include a number of optional details:

  • Score
    • scaled (a percentage between -1 and 1)
    • raw (the actual score)
    • min (minimum score achievable)
    • max (the maximum score achievable)
  • Success – Pass or Fail
  • Completion – Yes or No
  • Response – e.g. the actual comment/answer
  • Duration –  e.g. how long it took to complete the activity
  • Extensions – e.g. more detail about the result

An Example Result Statement Summary

A complete Result statement set up correctly will look something like this:

{

“actor”: {

“objectType”: “Agent”,

“name”: “John Smith”,

“account”: {

“name”: “123”,

“homePage”: “http://www.example.com/users/”

}

},

“verb”: {

“id”: “http://adlnet.gov/expapi/verbs/completed”,

“display”: {

“en-GB”: “completed”

}

},

“object”: {

“objectType”: “Activity”,

“id”: “http://www.example.com/activities/1”

},

“result”: {

“score”: {

“scaled”: 1,

“min”: 0,

“max”: 100,

“raw”: 100

},

“success”: true,

“completion”: true,

“response”: “Example string”,

“duration”: “P1DT12H”,

“extensions”: {

“http://www.example.com/ext”: true

}

}

}

Got it? Great!

Next up we’re looking at Context

About the Author

Ryan Smith

Ryan Smith

Software Engineer

Ryan joined us after graduating from Oxford Brookes University, where he won the John Birch prize for the highest grade average in the University.

When he's not injuring himself on a cricket field, he consults with people on all things xAPI and helps develop xAPI products and services such as Learning Locker and the Moodle xAPI Plugin.

Related Reading

shiftnav-red-panda

solutions-menu-mobile

about-menu-mobile

red-panda-menu

curatr-menu

learning-locker-menu

blog-menu

contact-us-menu

home-menu

Pin It on Pinterest

Thanks for reading!

Help us spread the love and share this post with your network