First version of an API to exchange Learning Analytics. This API is based on events (inspired by Caliper Analytics® Specification, version 1.1) that are send to the api. We use a number of events. The session event is used to register logins and logouts of the application The view event is used to register page views for theory. The grade event is used to register results of doing assignments. Such a result is modelled as a score. The assessment event is used to register the completion of an assignment. This information is transfered as an attempt. The item event is used to register the answer of a student to a question The navigation event is used to register url navigations in the application The media event is used to register media use like video and audio The tooluseevent is used to register usage of external tools that are accessed from the application Both theory and assignments are considered digital resources. An assignment is an assignable digital resource. Most events have an object and a target. The object needs to be used to set the stream (streamcode) and the target to set the content element within the stream. A student is seen as an actor.
This PHP package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Build package: org.openapitools.codegen.languages.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/qr/php-thas-client.git"
}
],
"require": {
"qr/php-thas-client": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/ThasClient/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: JWT
$config = Thas\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Thas\Api\AnalyticsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$one_of_view_event_grade_event_assignable_event_session_event_navigation_event_tool_use_event_media_event_assessment_item_event = array(new \Thas\Model\array()); // OneOfViewEventGradeEventAssignableEventSessionEventNavigationEventToolUseEventMediaEventAssessmentItemEvent[] |
try {
$apiInstance->learningAnalytics($one_of_view_event_grade_event_assignable_event_session_event_navigation_event_tool_use_event_media_event_assessment_item_event);
} catch (Exception $e) {
echo 'Exception when calling AnalyticsApi->learningAnalytics: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to http://thas.thiememeulenhoff.x-ip.nl/api/v1.0.0
Class | Method | HTTP request | Description |
---|---|---|---|
AnalyticsApi | learningAnalytics | POST /learning_analytics | |
AnalyticsApi | learningAnalyticsGet | GET /learning_analytics |
- AcrosticPuzzleAnswer
- Answer
- AssessmentItemEvent
- AssignableEvent
- CoupleAssociateAnswer
- DrawingAnswer
- Event
- GapMatchAnswer
- GradeEvent
- GraphicAssociateAnswer
- GraphicGapMatchAnswer
- GraphicHotspotAnswer
- InlineChoiceAnswer
- Match
- MediaEvent
- MultipleChoiceMatrixAnswer
- MultipleSelectAnswer
- NavigationEvent
- OpenQuestionAnswer
- SequencingAnswer
- SessionEvent
- SingleChoiceMatrixAnswer
- SingleSelectAnswer
- TextEntryAnswer
- TextEntrySelfScoreAnswer
- TextHighlightAnswer
- ToolUseEvent
- ViewEvent
- Type: Bearer authentication (JWT)