Tsugi

Caliper
in package

This is a general purpose LTI class with no Tsugi-specific dependencies.

This class provides helper capabilities for Caliper deal with how to use LTI data during the runtime of the tool.

This is under construction and is a place where the real Caliper implementation will eventually exist.

Table of Contents

Methods

getISO8601()  : mixed
Get Caliper-style ISO8601 Datetime from unix timestamp
miniCaliper()  : mixed
Minimal Caliper Event
sensorCanvasPageView()  : mixed
This is just a test method to return properly formatted JSON for the Canvas prototype Caliper
smallCaliper()  : mixed
Required: $json->data[0]->actor->id = $user; $json->data[0]->object->{'@id'} = $path; $json->eventTime = Caliper::getISO8601($timestamp);

Methods

getISO8601()

Get Caliper-style ISO8601 Datetime from unix timestamp

public static getISO8601([mixed $timestamp = false ]) : mixed
Parameters
$timestamp : mixed = false

miniCaliper()

Minimal Caliper Event

public static miniCaliper() : mixed

$json = Caliper::miniCaliper(); $json->actor = $key_key . '::' . $user_id; $json->object = $path; $json->eventTime = Caliper::getISO8601($timestamp);

sensorCanvasPageView()

This is just a test method to return properly formatted JSON for the Canvas prototype Caliper

public static sensorCanvasPageView(mixed $user, mixed $application, mixed $page[, mixed $timestamp = false ][, mixed $name = null ][, mixed $duration = 'PT5M30S' ]) : mixed

This is just a starting point to lay some initial groundwork.

Parameters
$user : mixed
$application : mixed

string This is the name of the application - typically it is the base domain name of the application like https://lti-tools.dr-chuck.com/tsugi/

$page : mixed

This is the url of page of that was viewed.

$timestamp : mixed = false
$name : mixed = null
$duration : mixed = 'PT5M30S'

This is the duration of the activity on the page.

smallCaliper()

Required: $json->data[0]->actor->id = $user; $json->data[0]->object->{'@id'} = $path; $json->eventTime = Caliper::getISO8601($timestamp);

public static smallCaliper() : mixed

Optional: $json->data[0]->name = $name; $json->data[0]->extensions = new \stdClass(); $json->data[0]->extensions->email = $email;


        
On this page

Search results