Skip to content

Using the SakaiXAPI Provider with OpenLRS and OpenDashboard

Code Hugger (Matthew Jones) edited this page Aug 27, 2016 · 4 revisions

A simple development setup for Apereo Learning Analytics consists of the following:

  • a learning record store (OpenLRS)
  • Sakai xAPI implementation
  • a reporting view (OpenDashboard)

Sakai uses xAPI to send event data to the learning record store. The reporting view is used to consume the data from the LRS. The view can be embedded in Sakai as an LTI tool.

To set up OpenLRS (Open Learning Record Store) on your local machine, follow the steps below:

  1. Check out the code from github git clone https://github.com/Apereo-Learning-Analytics-Initiative/OpenLRS.git

  2. Build and run the standalone server

mvn -Drun.jvmArguments="-Dserver.port=8091" clean package spring-boot:run

OR for debugging use

mvn -Drun.jvmArguments="-Dserver.port=8091 -agentlib:jdwp=transport=dt_socket,address=8001,server=y,suspend=n" clean package spring-boot:run

(create shell scripts for these if desired)

Note that is creates an in-memory store, so all the data disappears when you stop the server

Sakai xAPI Provider

  1. Check out the code from github git clone https://github.com/Apereo-Learning-Analytics-Initiative/SakaiXAPI-Provider.git

  2. Build and deploy to your local sakai installation (See the the Sakai Install Guide for more info)

mvn clean install sakai:deploy

  1. Set up the following sakai.properties
lrs.enabled=true 
lrs.tincanapi.basicAuthUserPass=openlrs:openlrs 
lrs.tincanapi.url=http://localhost:8091/v1/xAPI/statements 

(Check the OpenLRS site, this v1 in the URL may change, also it will need to match the port you specified above)

OpenDashboard

  1. Check out the code from github git clone https://github.com/Apereo-Learning-Analytics-Initiative/OpenDashboard.git

  2. Build and run the standalone server

mvn -Drun.jvmArguments="-Dserver.port=8092" clean package spring-boot:run

OR for debugging use

mvn -Drun.jvmArguments="-Dserver.port=8092 -agentlib:jdwp=transport=dt_socket,address=8002,server=y,suspend=n" clean package spring-boot:run

(create shell scripts for these if desired)

Note that this creates an in-memory store, so all the data disappears when the server stops

  1. Create an LTI 1.x tool inside your Sakai instance with the following config:
URL: http://localhost:8092 
Key: opendash 
Secret: opendash 
  1. Add the new LTI tool to a site

  2. Click on the LTI tool in the site.

(Tips from https://groups.google.com/a/apereo.org/d/msg/sakai-dev/kNA_3MYxBms/vLHm5ZrcCAAJ)