Skip to content

Instantly share code, notes, and snippets.

@frumbert
Created May 4, 2020 04:28
Show Gist options
  • Save frumbert/11b31e67b78c4c37f56dd7540bce5715 to your computer and use it in GitHub Desktop.
Save frumbert/11b31e67b78c4c37f56dd7540bce5715 to your computer and use it in GitHub Desktop.
xAPI Example - Send simple Statement to LRS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Send xAPI statement</title>
<script type="text/javascript" src="xAPIWrapper-master/lib/cryptojs_v3.1.2.js"></script>
<script type="text/javascript" src="xAPIWrapper-master/lib/utf8-text-encoding.js"></script>
<script type="text/javascript" src="xAPIWrapper-master/src/activitytypes.js"></script>
<script type="text/javascript" src="xAPIWrapper-master/src/verbs.js"></script>
<script type="text/javascript" src="xAPIWrapper-master/src/xapiwrapper.js"></script>
<script type="text/javascript" src="xAPIWrapper-master/src/xapistatement.js"></script>
<script type="text/javascript" src="xAPIWrapper-master/src/xapi-util.js"></script>
<script type="text/javascript" src="xAPIWrapper-master/src/xapi-launch.js"></script>
<script type="text/javascript" src="send_statement.js"></script>
<style>
div:not(.row)>label{display:block}
</style>
</head>
<body>
<h1>Send xAPI statement</h1>
<form name="form1">
<h2>Actor</h2>
<div class="row">
<label><input type="radio" name="actor" checked value="[email protected]">Adam Adamson</label>
<label><input type="radio" name="actor" value="[email protected]">Carol Clarkson</label>
<label><input type="radio" name="actor" value="[email protected]">Emmet von Emmetsonson</label>
<label><input type="radio" name="actor" value="[email protected]">Geraldt Grindhoeffen</label>
<label><input type="radio" name="actor" value="[email protected]">Ingrid MacIngridson</label>
<label><input type="radio" name="actor" value="[email protected]">Admin Null</label>
</div>
<h2>Verb</h2>
<div>
<label>Verb <select name="verb">
<optgroup label="adlnet.gov">
<option>http://adlnet.gov/expapi/verbs/answered</option>
<option>http://adlnet.gov/expapi/verbs/asked</option>
<option>http://adlnet.gov/expapi/verbs/attempted</option>
<option>http://adlnet.gov/expapi/verbs/attended</option>
<option>http://adlnet.gov/expapi/verbs/commented</option>
<option selected>http://adlnet.gov/expapi/verbs/completed</option>
<option>http://adlnet.gov/expapi/verbs/exited</option>
<option>http://adlnet.gov/expapi/verbs/experienced</option>
<option>http://adlnet.gov/expapi/verbs/failed</option>
<option>http://adlnet.gov/expapi/verbs/imported</option>
<option>http://adlnet.gov/expapi/verbs/initialized</option>
<option>http://adlnet.gov/expapi/verbs/interacted</option>
<option>http://adlnet.gov/expapi/verbs/launched</option>
<option>http://adlnet.gov/expapi/verbs/mastered</option>
<option>http://adlnet.gov/expapi/verbs/passed</option>
<option>http://adlnet.gov/expapi/verbs/preferred</option>
<option>http://adlnet.gov/expapi/verbs/progressed</option>
<option>http://adlnet.gov/expapi/verbs/registered</option>
<option>http://adlnet.gov/expapi/verbs/responded</option>
<option>http://adlnet.gov/expapi/verbs/resumed</option>
<option>http://adlnet.gov/expapi/verbs/scored</option>
<option>http://adlnet.gov/expapi/verbs/shared</option>
<option>http://adlnet.gov/expapi/verbs/suspended</option>
<option>http://adlnet.gov/expapi/verbs/terminated</option>
<option>http://adlnet.gov/expapi/verbs/voided</option>
</optgroup>
<optgroup label="id.tincanapi.com">
<option>http://id.tincanapi.com/verb/adjourned</option>
<option>http://id.tincanapi.com/verb/applauded</option>
<option>http://id.tincanapi.com/verb/arranged</option>
<option>http://id.tincanapi.com/verb/bookmarked</option>
<option>http://id.tincanapi.com/verb/called</option>
<option>http://id.tincanapi.com/verb/closed-sale</option>
<option>http://id.tincanapi.com/verb/created-opportunity</option>
<option>http://id.tincanapi.com/verb/defined</option>
<option>http://id.tincanapi.com/verb/disabled</option>
<option>http://id.tincanapi.com/verb/discarded</option>
<option>http://id.tincanapi.com/verb/downloaded</option>
<option>http://id.tincanapi.com/verb/earned</option>
<option>http://id.tincanapi.com/verb/enabled</option>
<option>http://id.tincanapi.com/verb/estimated-duration</option>
<option>http://id.tincanapi.com/verb/expected</option>
<option>http://id.tincanapi.com/verb/expired</option>
<option>http://id.tincanapi.com/verb/focused</option>
<option>http://id.tincanapi.com/verb/frame/entered</option>
<option>http://id.tincanapi.com/verb/frame/exited</option>
<option>http://id.tincanapi.com/verb/hired</option>
<option>http://id.tincanapi.com/verb/interviewed</option>
<option>http://id.tincanapi.com/verb/laughed</option>
<option>http://id.tincanapi.com/verb/marked-unread</option>
<option>http://id.tincanapi.com/verb/mentioned</option>
<option>http://id.tincanapi.com/verb/mentored</option>
<option>http://id.tincanapi.com/verb/paused</option>
<option>http://id.tincanapi.com/verb/performed-offline</option>
<option>http://id.tincanapi.com/verb/personalized</option>
<option>http://id.tincanapi.com/verb/previewed</option>
<option>http://id.tincanapi.com/verb/promoted</option>
<option>http://id.tincanapi.com/verb/rated</option>
<option>http://id.tincanapi.com/verb/replied-to-tweet</option>
<option>http://id.tincanapi.com/verb/replied</option>
<option>http://id.tincanapi.com/verb/requested-attention</option>
<option>http://id.tincanapi.com/verb/retweeted</option>
<option>http://id.tincanapi.com/verb/reviewed</option>
<option>http://id.tincanapi.com/verb/secured</option>
<option>http://id.tincanapi.com/verb/selected</option>
<option>http://id.tincanapi.com/verb/skipped</option>
<option>http://id.tincanapi.com/verb/talked-with</option>
<option>http://id.tincanapi.com/verb/tweeted</option>
<option>http://id.tincanapi.com/verb/unfocused</option>
<option>http://id.tincanapi.com/verb/unregistered</option>
<option>http://id.tincanapi.com/verb/viewed</option>
<option>http://id.tincanapi.com/verb/voted-down</option>
<option>http://id.tincanapi.com/verb/voted-up</option>
</optgroup>
<optgroup label="risc-inc">
<option>http://risc-inc.com/annotator/verbs/annotated</option>
<option>http://risc-inc.com/annotator/verbs/modified</option>
</optgroup>
<optgroup label="w3id.org">
<option>https://w3id.org/xapi/acrossx/verbs/annotated</option>
<option>https://w3id.org/xapi/acrossx/verbs/designed</option>
<option>https://w3id.org/xapi/acrossx/verbs/disliked</option>
<option>https://w3id.org/xapi/acrossx/verbs/edited</option>
<option>https://w3id.org/xapi/acrossx/verbs/evaluated</option>
<option>https://w3id.org/xapi/acrossx/verbs/liked</option>
<option>https://w3id.org/xapi/acrossx/verbs/posted</option>
<option>https://w3id.org/xapi/acrossx/verbs/reported</option>
<option>https://w3id.org/xapi/acrossx/verbs/revealed</option>
<option>https://w3id.org/xapi/acrossx/verbs/searched</option>
<option>https://w3id.org/xapi/acrossx/verbs/was-assigned</option>
<option>https://w3id.org/xapi/acrossx/verbs/watched</option>
<option>https://w3id.org/xapi/adb/verbs/annotated</option>
<option>https://w3id.org/xapi/adb/verbs/arrived</option>
<option>https://w3id.org/xapi/adb/verbs/attended</option>
<option>https://w3id.org/xapi/adb/verbs/bookmarked</option>
<option>https://w3id.org/xapi/adb/verbs/coached</option>
<option>https://w3id.org/xapi/adb/verbs/demanded</option>
<option>https://w3id.org/xapi/adb/verbs/described</option>
<option>https://w3id.org/xapi/adb/verbs/highlighted</option>
<option>https://w3id.org/xapi/adb/verbs/initiated</option>
<option>https://w3id.org/xapi/adb/verbs/noted</option>
<option>https://w3id.org/xapi/adb/verbs/read</option>
<option>https://w3id.org/xapi/adb/verbs/referenced</option>
<option>https://w3id.org/xapi/adb/verbs/requested</option>
<option>https://w3id.org/xapi/adb/verbs/selected</option>
<option>https://w3id.org/xapi/adb/verbs/watched</option>
<option>https://w3id.org/xapi/adl/verbs/abandoned</option>
<option>https://w3id.org/xapi/adl/verbs/logged-in</option>
<option>https://w3id.org/xapi/adl/verbs/logged-out</option>
<option>https://w3id.org/xapi/adl/verbs/satisfied</option>
<option>https://w3id.org/xapi/adl/verbs/waived</option>
<option>https://w3id.org/xapi/dod-isd/verbs/abled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/accessed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/acclimatized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/accommodated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/accomplished</option>
<option>https://w3id.org/xapi/dod-isd/verbs/achieved</option>
<option>https://w3id.org/xapi/dod-isd/verbs/acknowledged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/activated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/actuated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/adapted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/adjusted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/administered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/advanced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/advised</option>
<option>https://w3id.org/xapi/dod-isd/verbs/alerted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/aligned</option>
<option>https://w3id.org/xapi/dod-isd/verbs/allocated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/allowed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/altered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/ambushed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/analyzed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/annotated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/announced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/answered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/applied</option>
<option>https://w3id.org/xapi/dod-isd/verbs/appraised</option>
<option>https://w3id.org/xapi/dod-isd/verbs/appreciated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/approved</option>
<option>https://w3id.org/xapi/dod-isd/verbs/archived</option>
<option>https://w3id.org/xapi/dod-isd/verbs/armed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/arranged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/asked</option>
<option>https://w3id.org/xapi/dod-isd/verbs/assaulted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/assembled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/assessed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/assigned</option>
<option>https://w3id.org/xapi/dod-isd/verbs/assisted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/assumed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/attached</option>
<option>https://w3id.org/xapi/dod-isd/verbs/attacked</option>
<option>https://w3id.org/xapi/dod-isd/verbs/attended-closely</option>
<option>https://w3id.org/xapi/dod-isd/verbs/authenticated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/balanced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/believed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/breached</option>
<option>https://w3id.org/xapi/dod-isd/verbs/briefed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/bypassed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/calculated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/calibrated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/camouflaged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/canceled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/carried</option>
<option>https://w3id.org/xapi/dod-isd/verbs/categorized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/caused</option>
<option>https://w3id.org/xapi/dod-isd/verbs/centered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/challenged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/changed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/charged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/checked</option>
<option>https://w3id.org/xapi/dod-isd/verbs/chose</option>
<option>https://w3id.org/xapi/dod-isd/verbs/classified</option>
<option>https://w3id.org/xapi/dod-isd/verbs/cleaned</option>
<option>https://w3id.org/xapi/dod-isd/verbs/cleared</option>
<option>https://w3id.org/xapi/dod-isd/verbs/closed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/collated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/collected</option>
<option>https://w3id.org/xapi/dod-isd/verbs/combined</option>
<option>https://w3id.org/xapi/dod-isd/verbs/commanded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/communicated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/compared</option>
<option>https://w3id.org/xapi/dod-isd/verbs/compiled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/completed-assignment</option>
<option>https://w3id.org/xapi/dod-isd/verbs/completed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/complied</option>
<option>https://w3id.org/xapi/dod-isd/verbs/composed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/computed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/conceived</option>
<option>https://w3id.org/xapi/dod-isd/verbs/concluded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/condensed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/conducted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/confirmed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/conjectured</option>
<option>https://w3id.org/xapi/dod-isd/verbs/connected</option>
<option>https://w3id.org/xapi/dod-isd/verbs/consolidated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/constructed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/contrasted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/contrived</option>
<option>https://w3id.org/xapi/dod-isd/verbs/controlled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/converted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/coordinated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/corrected</option>
<option>https://w3id.org/xapi/dod-isd/verbs/correlated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/covered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/created</option>
<option>https://w3id.org/xapi/dod-isd/verbs/crept</option>
<option>https://w3id.org/xapi/dod-isd/verbs/criticized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/cross-checked</option>
<option>https://w3id.org/xapi/dod-isd/verbs/crossed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/debriefed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/debugged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/decided</option>
<option>https://w3id.org/xapi/dod-isd/verbs/decontaminated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/defended</option>
<option>https://w3id.org/xapi/dod-isd/verbs/defined</option>
<option>https://w3id.org/xapi/dod-isd/verbs/delayed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/deleted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/delivered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/demonstrated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/departed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/deployed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/derived</option>
<option>https://w3id.org/xapi/dod-isd/verbs/described</option>
<option>https://w3id.org/xapi/dod-isd/verbs/designated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/designed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/destroyed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/detected</option>
<option>https://w3id.org/xapi/dod-isd/verbs/determined</option>
<option>https://w3id.org/xapi/dod-isd/verbs/developed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/devised</option>
<option>https://w3id.org/xapi/dod-isd/verbs/diagnosed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/diagrammed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/differentiated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/directed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/disassembled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/disconnected</option>
<option>https://w3id.org/xapi/dod-isd/verbs/discovered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/discriminated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/disengaged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/dismantled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/dispatched</option>
<option>https://w3id.org/xapi/dod-isd/verbs/displaced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/displayed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/disposed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/disseminated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/distinguished</option>
<option>https://w3id.org/xapi/dod-isd/verbs/distributed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/divided</option>
<option>https://w3id.org/xapi/dod-isd/verbs/drafted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/drew</option>
<option>https://w3id.org/xapi/dod-isd/verbs/drove</option>
<option>https://w3id.org/xapi/dod-isd/verbs/dug</option>
<option>https://w3id.org/xapi/dod-isd/verbs/edited</option>
<option>https://w3id.org/xapi/dod-isd/verbs/effected</option>
<option>https://w3id.org/xapi/dod-isd/verbs/egressed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/elaborated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/elevated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/eliminated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/emplaced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/employed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/encoded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/encrypted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/energized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/enforced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/engaged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/ensured</option>
<option>https://w3id.org/xapi/dod-isd/verbs/entered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/established</option>
<option>https://w3id.org/xapi/dod-isd/verbs/estimated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/evacuated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/evaded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/evaluated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/exchanged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/executed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/explained</option>
<option>https://w3id.org/xapi/dod-isd/verbs/expressed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/extended</option>
<option>https://w3id.org/xapi/dod-isd/verbs/extracted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/fell</option>
<option>https://w3id.org/xapi/dod-isd/verbs/felt</option>
<option>https://w3id.org/xapi/dod-isd/verbs/filled-out</option>
<option>https://w3id.org/xapi/dod-isd/verbs/finalized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/fired</option>
<option>https://w3id.org/xapi/dod-isd/verbs/fit</option>
<option>https://w3id.org/xapi/dod-isd/verbs/followed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/formatted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/formulated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/forwarded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/found</option>
<option>https://w3id.org/xapi/dod-isd/verbs/fueled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/gave</option>
<option>https://w3id.org/xapi/dod-isd/verbs/generalized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/generated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/grounded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/grouped</option>
<option>https://w3id.org/xapi/dod-isd/verbs/guarded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/guided</option>
<option>https://w3id.org/xapi/dod-isd/verbs/hardened</option>
<option>https://w3id.org/xapi/dod-isd/verbs/heard</option>
<option>https://w3id.org/xapi/dod-isd/verbs/held</option>
<option>https://w3id.org/xapi/dod-isd/verbs/hoisted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/hovered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/hypothesized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/identified</option>
<option>https://w3id.org/xapi/dod-isd/verbs/illustrated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/imagined</option>
<option>https://w3id.org/xapi/dod-isd/verbs/implemented</option>
<option>https://w3id.org/xapi/dod-isd/verbs/indicated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/inferred</option>
<option>https://w3id.org/xapi/dod-isd/verbs/infiltrated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/influenced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/informed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/initialized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/initiated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/innovated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/input</option>
<option>https://w3id.org/xapi/dod-isd/verbs/inserted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/inspected</option>
<option>https://w3id.org/xapi/dod-isd/verbs/installed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/instructed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/integrated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/intercepted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/interpreted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/invented</option>
<option>https://w3id.org/xapi/dod-isd/verbs/investigated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/isolated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/issued</option>
<option>https://w3id.org/xapi/dod-isd/verbs/jacked</option>
<option>https://w3id.org/xapi/dod-isd/verbs/judged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/jumped</option>
<option>https://w3id.org/xapi/dod-isd/verbs/justified</option>
<option>https://w3id.org/xapi/dod-isd/verbs/labeled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/laid</option>
<option>https://w3id.org/xapi/dod-isd/verbs/landed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/launched</option>
<option>https://w3id.org/xapi/dod-isd/verbs/led</option>
<option>https://w3id.org/xapi/dod-isd/verbs/leveled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/listed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/listened-attentively</option>
<option>https://w3id.org/xapi/dod-isd/verbs/listened</option>
<option>https://w3id.org/xapi/dod-isd/verbs/loaded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/located</option>
<option>https://w3id.org/xapi/dod-isd/verbs/logged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/lubricated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/made</option>
<option>https://w3id.org/xapi/dod-isd/verbs/maintained</option>
<option>https://w3id.org/xapi/dod-isd/verbs/managed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/maneuvered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/manipulated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/mapped</option>
<option>https://w3id.org/xapi/dod-isd/verbs/matched</option>
<option>https://w3id.org/xapi/dod-isd/verbs/measured</option>
<option>https://w3id.org/xapi/dod-isd/verbs/modified</option>
<option>https://w3id.org/xapi/dod-isd/verbs/monitored</option>
<option>https://w3id.org/xapi/dod-isd/verbs/mounted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/moved</option>
<option>https://w3id.org/xapi/dod-isd/verbs/named</option>
<option>https://w3id.org/xapi/dod-isd/verbs/navigated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/neutralized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/notified</option>
<option>https://w3id.org/xapi/dod-isd/verbs/obeyed-rules</option>
<option>https://w3id.org/xapi/dod-isd/verbs/observed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/obtained</option>
<option>https://w3id.org/xapi/dod-isd/verbs/occupied</option>
<option>https://w3id.org/xapi/dod-isd/verbs/opened</option>
<option>https://w3id.org/xapi/dod-isd/verbs/operated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/ordered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/organized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/oriented</option>
<option>https://w3id.org/xapi/dod-isd/verbs/originated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/outlined</option>
<option>https://w3id.org/xapi/dod-isd/verbs/packed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/parked</option>
<option>https://w3id.org/xapi/dod-isd/verbs/patrolled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/paused</option>
<option>https://w3id.org/xapi/dod-isd/verbs/perceived</option>
<option>https://w3id.org/xapi/dod-isd/verbs/performed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/placed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/planned</option>
<option>https://w3id.org/xapi/dod-isd/verbs/plotted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/policed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/positioned</option>
<option>https://w3id.org/xapi/dod-isd/verbs/posted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/predicted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/prepared</option>
<option>https://w3id.org/xapi/dod-isd/verbs/prescribed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/pressed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/pressurized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/prevented</option>
<option>https://w3id.org/xapi/dod-isd/verbs/primed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/prioritized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/processed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/procured</option>
<option>https://w3id.org/xapi/dod-isd/verbs/produced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/programmed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/projected</option>
<option>https://w3id.org/xapi/dod-isd/verbs/proposed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/protected</option>
<option>https://w3id.org/xapi/dod-isd/verbs/provided</option>
<option>https://w3id.org/xapi/dod-isd/verbs/published</option>
<option>https://w3id.org/xapi/dod-isd/verbs/pulled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/qualified</option>
<option>https://w3id.org/xapi/dod-isd/verbs/queued</option>
<option>https://w3id.org/xapi/dod-isd/verbs/raised</option>
<option>https://w3id.org/xapi/dod-isd/verbs/ran</option>
<option>https://w3id.org/xapi/dod-isd/verbs/ranged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/ranked</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reached</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reacted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/read</option>
<option>https://w3id.org/xapi/dod-isd/verbs/readied</option>
<option>https://w3id.org/xapi/dod-isd/verbs/realigned</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reassessed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/recalled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/received</option>
<option>https://w3id.org/xapi/dod-isd/verbs/recognized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/recommended</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reconciled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reconnoitered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/recorded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/recounted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/recovered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/redistributed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reduced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reestablished</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reexamined</option>
<option>https://w3id.org/xapi/dod-isd/verbs/refueled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/regulated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/released</option>
<option>https://w3id.org/xapi/dod-isd/verbs/relieved</option>
<option>https://w3id.org/xapi/dod-isd/verbs/relocated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/removed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reorganized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/repaired</option>
<option>https://w3id.org/xapi/dod-isd/verbs/replaced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/replenished</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reported</option>
<option>https://w3id.org/xapi/dod-isd/verbs/requested</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reset</option>
<option>https://w3id.org/xapi/dod-isd/verbs/resolved</option>
<option>https://w3id.org/xapi/dod-isd/verbs/responded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/restated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/resumed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/retrieved</option>
<option>https://w3id.org/xapi/dod-isd/verbs/returned</option>
<option>https://w3id.org/xapi/dod-isd/verbs/reviewed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/revised</option>
<option>https://w3id.org/xapi/dod-isd/verbs/rotated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/routed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/saved</option>
<option>https://w3id.org/xapi/dod-isd/verbs/saw</option>
<option>https://w3id.org/xapi/dod-isd/verbs/scanned</option>
<option>https://w3id.org/xapi/dod-isd/verbs/scheduled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/searched</option>
<option>https://w3id.org/xapi/dod-isd/verbs/secured</option>
<option>https://w3id.org/xapi/dod-isd/verbs/selected</option>
<option>https://w3id.org/xapi/dod-isd/verbs/sent</option>
<option>https://w3id.org/xapi/dod-isd/verbs/separated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/served</option>
<option>https://w3id.org/xapi/dod-isd/verbs/serviced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/set-up</option>
<option>https://w3id.org/xapi/dod-isd/verbs/set</option>
<option>https://w3id.org/xapi/dod-isd/verbs/shared</option>
<option>https://w3id.org/xapi/dod-isd/verbs/showed-awareness</option>
<option>https://w3id.org/xapi/dod-isd/verbs/showed-sensitivity</option>
<option>https://w3id.org/xapi/dod-isd/verbs/showed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/shut-down</option>
<option>https://w3id.org/xapi/dod-isd/verbs/sighted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/signaled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/smelled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/solved</option>
<option>https://w3id.org/xapi/dod-isd/verbs/sorted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/specified</option>
<option>https://w3id.org/xapi/dod-isd/verbs/splinted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/squeezed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/started</option>
<option>https://w3id.org/xapi/dod-isd/verbs/stated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/stayed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/steered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/stockpiled</option>
<option>https://w3id.org/xapi/dod-isd/verbs/stood-to</option>
<option>https://w3id.org/xapi/dod-isd/verbs/stopped</option>
<option>https://w3id.org/xapi/dod-isd/verbs/stored</option>
<option>https://w3id.org/xapi/dod-isd/verbs/stowed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/struck</option>
<option>https://w3id.org/xapi/dod-isd/verbs/studied</option>
<option>https://w3id.org/xapi/dod-isd/verbs/submitted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/summarized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/supervised</option>
<option>https://w3id.org/xapi/dod-isd/verbs/supported</option>
<option>https://w3id.org/xapi/dod-isd/verbs/suppressed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/swam</option>
<option>https://w3id.org/xapi/dod-isd/verbs/swept</option>
<option>https://w3id.org/xapi/dod-isd/verbs/synthesized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/tailored</option>
<option>https://w3id.org/xapi/dod-isd/verbs/tapped</option>
<option>https://w3id.org/xapi/dod-isd/verbs/tasked</option>
<option>https://w3id.org/xapi/dod-isd/verbs/tasted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/tempered</option>
<option>https://w3id.org/xapi/dod-isd/verbs/templated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/tested</option>
<option>https://w3id.org/xapi/dod-isd/verbs/threw</option>
<option>https://w3id.org/xapi/dod-isd/verbs/tightened</option>
<option>https://w3id.org/xapi/dod-isd/verbs/told</option>
<option>https://w3id.org/xapi/dod-isd/verbs/took-charge</option>
<option>https://w3id.org/xapi/dod-isd/verbs/took-off</option>
<option>https://w3id.org/xapi/dod-isd/verbs/took</option>
<option>https://w3id.org/xapi/dod-isd/verbs/traced</option>
<option>https://w3id.org/xapi/dod-isd/verbs/tracked</option>
<option>https://w3id.org/xapi/dod-isd/verbs/trained</option>
<option>https://w3id.org/xapi/dod-isd/verbs/transferred</option>
<option>https://w3id.org/xapi/dod-isd/verbs/translated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/transmitted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/transported</option>
<option>https://w3id.org/xapi/dod-isd/verbs/traversed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/treated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/triaged</option>
<option>https://w3id.org/xapi/dod-isd/verbs/troubleshot</option>
<option>https://w3id.org/xapi/dod-isd/verbs/tuned</option>
<option>https://w3id.org/xapi/dod-isd/verbs/turned</option>
<option>https://w3id.org/xapi/dod-isd/verbs/twisted</option>
<option>https://w3id.org/xapi/dod-isd/verbs/typed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/unloaded</option>
<option>https://w3id.org/xapi/dod-isd/verbs/updated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/used</option>
<option>https://w3id.org/xapi/dod-isd/verbs/utilized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/validated</option>
<option>https://w3id.org/xapi/dod-isd/verbs/verified</option>
<option>https://w3id.org/xapi/dod-isd/verbs/visualized</option>
<option>https://w3id.org/xapi/dod-isd/verbs/waited</option>
<option>https://w3id.org/xapi/dod-isd/verbs/war-gamed</option>
<option>https://w3id.org/xapi/dod-isd/verbs/wore</option>
<option>https://w3id.org/xapi/dod-isd/verbs/wrote</option>
<option>https://w3id.org/xapi/dod-isd/verbs/zeroed</option>
<option>https://w3id.org/xapi/medbiq/verbs/ignored</option>
<option>https://w3id.org/xapi/medbiq/verbs/updated</option>
<option>https://w3id.org/xapi/seriousgames/verbs/accessed</option>
<option>https://w3id.org/xapi/seriousgames/verbs/pressed</option>
<option>https://w3id.org/xapi/seriousgames/verbs/released</option>
<option>https://w3id.org/xapi/seriousgames/verbs/unlocked</option>
<option>https://w3id.org/xapi/seriousgames/verbs/used</option>
<option>https://w3id.org/xapi/video/verbs/paused</option>
<option>https://w3id.org/xapi/video/verbs/played</option>
<option>https://w3id.org/xapi/video/verbs/seeked</option>
</optgroup>
</select></label>
</div>
<h2>Object</h2>
<div>
<label>Id: <input type="text" size="30" name="objectid" value="https://some.fakesite.com/some/page/url" /></label>
<label>Name: <input type="text" size="30" name="objectname" value="Name of page" /></label>
</div>
<div><button onclick="return process()">Post xAPI statement</button></div>
<div><button onclick="return logActivities()">Log Activities</button></div>
</form>
<script type="text/javascript">
// statements we send in have this as a minimum form
let statement = {
"actor": {
"name": "No Body",
"mbox": "mailto:[email protected]"
},
"verb": {
"id":"http://adlnet.gov/expapi/verbs/completed",
"display": { "en-US": "completed" }
},
"object": {
"id": "https://some.fakesite.com/some/page/url",
"definition": {
"name": { "en-US": "Some Page on FakeSite" }
}
}
};
// you can query any of the commented lines
let record = {
"id": "d3ea3a54-2dfa-4912-8485-c3b6a77ee941", // statement id
"actor": {
"objectType": "Agent",
"mbox": "mailto:[email protected]", // agent
"name": "geraldt"
},
"verb": {
"id": "http://adlnet.gov/expapi/verbs/experienced", // verb id
"display": {
"en-US": "experienced"
}
},
"timestamp": "2020-04-30T11:25:16.695Z", // timestamp
"stored": "2020-04-30T11:25:16.695Z",
"authority": {
"account": {
"homePage": "http://cloud.scorm.com",
"name": "sNu5MjYoJu8UEWXnTYQ"
},
"objectType": "Agent",
"name": "Unnamed Account"
},
"version": "1.0.0",
"object": {
"id": "https://some.fakesite.com/some/page/url", // activity id
"definition": {
"name": {
"en-US": "Name of page"
}
},
"objectType": "Activity"
}
};
// this is all the config we need
const conf = {
"endpoint": <enter-your-lrs-endpoint>,
"auth": "Basic " + toBase64(<your-lrs-apikey> + ":" + <your-lrs-apisecret>)
};
// now globally initialise the API with the config
ADL.XAPIWrapper.changeConfig(conf);
function process() {
const statement = {
"actor": {
"name": document.forms[0].actor.value.split("@")[0],
"mbox": "mailto:" + document.forms[0].actor.value
},
"verb": {
"id": document.forms[0].verb.value,
"display": { "en-US": document.forms[0].verb.value.split("/").pop() }
},
"object": {
"id": document.forms[0].objectid.value,
"definition": {
"name": { "en-US": document.forms[0].objectname.value }
}
}
};
const result = ADL.XAPIWrapper.sendStatement(statement);
ADL.XAPIWrapper.log(result); console.dir(result);
return false;
}
function logActivities() {
ADL.XAPIWrapper.getActivities(document.forms[0].verb.value,
function(r){ADL.XAPIWrapper.log(JSON.parse(r.response));console.dir(r.response)});
return false;
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment