klaaspoortinga/tin-can-report-library

This package is abandoned and no longer maintained. No replacement package was suggested.

Tin Can Report Library

dev-master 2014-11-07 15:02 UTC

This package is auto-updated.

Last update: 2021-09-27 17:25:59 UTC


README

This is an very early draft of a Tin Can Report Library. Goal of this library is to make it easy to query and analyse Tin Can statements.

Getting started

Tin Can Report Library is available via Composer.

php composer.phar require klaaspoortinga/tin-can-report-library:dev-master

With the package installed require the Composer autoloader:

require 'vendor/autoload.php';

Connect to your LRS using:

$lrs = new Report();
$lrs->connectLrs('lrs_endpoint','lrs_username','lrs_password');

Retrieving statistics is as easy as:

$response = $lrs->Statistics->pastMonth(); //Get monthly statistics
$response = $lrs->Statistics->pastMonth()->filterActors(); //Retrieves amount of monthly actors

Or use the Analyse class to get suggestions or compare actors!

$response = $lrs->Analyse->getSuggestions(5); //Retrieves the 5 most popular activities
$response = $lrs->Analyse->compareActors(array(actor1, actor2, ..)) //Retrieves the activities these actors have in common