Skip to content

Commit

Permalink
Added comments and better information in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jono-poltrack committed Jan 29, 2018
1 parent 70f20b4 commit 5f3f013
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 9 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
# LRS Launch Example

## Overview
This example implements xAPI launch. The xAPI Launch mechanism
is used to provide information to content so that it does not
need to be hard coded. For example, content can be provided the
LRS endpoint, LRS authorization information and the xAPI Actor
during launch.

## Structure
The LRS Launch Example includes the following files:

* cmi5.xml - Contains the manifest for the content (used during upload)
* index.html - HTML file containing the javascript that is used during launch and a simple UI
* README.md - This file
* xapiwrapper.min.js - ADL Initiative JavaScript wrapper file that abstract xAPI complexity

# License

Copyright 2018 Veracity Technology Consultants LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
31 changes: 22 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!--
Copyright 2018 Veracity Technology Consultants LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html lang="en">
<head>
Expand All @@ -12,19 +27,20 @@
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

<!-- Optional theme -->
<!-- Optional CSS theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<!-- Latest compiled and minified bootstrap JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

<!-- moment.js for date / time -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.3/moment.min.js"></script>

<!-- minified xAPI wrapper to make xAPI calls and handle launch -->
<!-- minified xAPI wrapper to make xAPI calls and handle xAPI Launch -->
<script src="xapiwrapper.min.js"></script>

<!-- custom xAPI script for this example -->
<!-- Script contains an xAPI statement template, default LRS configuration, and
convenience methods to abstact xAPI complexity -->
<script>
// default conf used if this file is not launched using xAPI launch
var conf = {
Expand All @@ -33,8 +49,6 @@
"password" : "1234",
};
ADL.XAPIWrapper.changeConfig(conf);

var usesXAPILaunch = false;

// statement template with default values (some that are replace by xAPI launch)
var myXAPI = {
Expand Down Expand Up @@ -118,7 +132,8 @@
}

</script>


<!-- Script to handle page-specific events and display messages -->
<script>
$(document).ready(function () {

Expand All @@ -138,8 +153,6 @@
myXAPI.statement.actor = launchdata.actor;
ADL.XAPIWrapper = wrapper;

usesXAPILaunch = true;

launchtypemessage = "Congratulations. Launched with xAPI Launch. Using launch values:";
}

Expand Down

0 comments on commit 5f3f013

Please sign in to comment.