Caliper
class Caliper
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.
Methods
Get Caliper-style ISO8601 Datetime from unix timestamp
Required: $json->data[0]->actor->id = $user; $json->data[0]->object->{'@id'} = $path; $json->eventTime = Caliper::getISO8601($timestamp);
Minimal Caliper Event
This is just a test method to return properly formatted JSON for the Canvas prototype Caliper
Details
at line 21
static
getISO8601($timestamp = false)
Get Caliper-style ISO8601 Datetime from unix timestamp
at line 49
static
smallCaliper()
Required: $json->data[0]->actor->id = $user; $json->data[0]->object->{'@id'} = $path; $json->eventTime = Caliper::getISO8601($timestamp);
Optional: $json->data[0]->name = $name; $json->data[0]->extensions = new \stdClass(); $json->data[0]->extensions->email = $email;
at line 81
static
miniCaliper()
Minimal Caliper Event
$json = Caliper::miniCaliper(); $json->actor = $key_key . '::' . $user_id; $json->object = $path; $json->eventTime = Caliper::getISO8601($timestamp);
at line 104
static
sensorCanvasPageView($user, $application, $page, $timestamp = false, $name, $duration = 'PT5M30S')
This is just a test method to return properly formatted JSON for the Canvas prototype Caliper
This is just a starting point to lay some initial groundwork.