diff --git a/src/transformer/events/mod_bigbluebuttonbn/activity_created.php b/src/transformer/events/mod_bigbluebuttonbn/activity_created.php new file mode 100644 index 000000000..8ddcd90b9 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/activity_created.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * Triggered when a new BBB activity gets created. + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function activity_created(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'https://w3id.org/xapi/dod-isd/verbs/created', 'created' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/activity_deleted.php b/src/transformer/events/mod_bigbluebuttonbn/activity_deleted.php new file mode 100644 index 000000000..7dc382f55 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/activity_deleted.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * Triggered when a BBB activity is deleted. + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function activity_deleted(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/delete', 'deleted' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/activity_updated.php b/src/transformer/events/mod_bigbluebuttonbn/activity_updated.php new file mode 100644 index 000000000..084cb09c7 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/activity_updated.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * Triggered when the an attribute like the name of the BBB activity is edited. + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function activity_updated(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/update', 'updated' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/activity_viewed.php b/src/transformer/events/mod_bigbluebuttonbn/activity_viewed.php new file mode 100644 index 000000000..f2675a0f2 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/activity_viewed.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * Triggered when a BBB activity is viewed. + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function activity_viewed(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/viewed', 'viewed' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed.php b/src/transformer/events/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed.php new file mode 100644 index 000000000..9a56b5d5b --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn activity management viewed event (triggered by index.php). + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function bigbluebuttonbn_activity_management_viewed(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/viewed', 'viewed' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/live_session.php b/src/transformer/events/mod_bigbluebuttonbn/live_session.php new file mode 100644 index 000000000..b0bd18c09 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/live_session.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * Used to convey what actions occur during a recording: + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function live_session(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/live', 'live' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/meeting_created.php b/src/transformer/events/mod_bigbluebuttonbn/meeting_created.php new file mode 100644 index 000000000..f4564188e --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/meeting_created.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn meeting created event (triggered by bbb_view.php when the meeting is created before join + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function meeting_created(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/create', 'created' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/meeting_ended.php b/src/transformer/events/mod_bigbluebuttonbn/meeting_ended.php new file mode 100644 index 000000000..00eecc811 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/meeting_ended.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn meeting ended event (triggered by bbb_ajax.php and index.php when the meeting is ended by the user). + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function meeting_ended(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/adjourned', 'adjourned' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/meeting_joined.php b/src/transformer/events/mod_bigbluebuttonbn/meeting_joined.php new file mode 100644 index 000000000..47976139a --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/meeting_joined.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn meeting joined event (triggered by bbb_view.php when the user joins the session). + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function meeting_joined(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/join', 'joined' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/meeting_left.php b/src/transformer/events/mod_bigbluebuttonbn/meeting_left.php new file mode 100644 index 000000000..4a8169710 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/meeting_left.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn meeting left event. + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function meeting_left(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/leave', 'left' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/recording_deleted.php b/src/transformer/events/mod_bigbluebuttonbn/recording_deleted.php new file mode 100644 index 000000000..16ef63eb1 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/recording_deleted.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn recording deleted event. + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function recording_deleted(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'https://w3id.org/xapi/dod-isd/verbs/deleted', 'deleted' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/recording_edited.php b/src/transformer/events/mod_bigbluebuttonbn/recording_edited.php new file mode 100644 index 000000000..4dd634d5a --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/recording_edited.php @@ -0,0 +1,32 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn recording edited event. + * + * @author Paul Walter (https://github.com/paulito-bandito) + * + * @param array $config + * @param \stdClass $event + * @return array + */ +function recording_edited(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'https://w3id.org/xapi/dod-isd/verbs/edited', 'edited' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/recording_imported.php b/src/transformer/events/mod_bigbluebuttonbn/recording_imported.php new file mode 100644 index 000000000..cdf61c8d3 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/recording_imported.php @@ -0,0 +1,32 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn recording imported event (triggered when a recording is imported). + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ + +function recording_imported(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://adlnet.gov/expapi/verbs/imported', 'imported' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/recording_protected.php b/src/transformer/events/mod_bigbluebuttonbn/recording_protected.php new file mode 100644 index 000000000..bdaf66f53 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/recording_protected.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn recording protected event (triggered when a recording is protected). + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function recording_protected(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/secured', 'secured' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/recording_published.php b/src/transformer/events/mod_bigbluebuttonbn/recording_published.php new file mode 100644 index 000000000..60b40c1da --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/recording_published.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn recording published event. + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function recording_published(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'https://w3id.org/xapi/dod-isd/verbs/published', 'published' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/recording_unprotected.php b/src/transformer/events/mod_bigbluebuttonbn/recording_unprotected.php new file mode 100644 index 000000000..5dcb55666 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/recording_unprotected.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn recording unprotected event (triggered when a recording is unprotected). + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function recording_unprotected(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/unsecured', 'unsecured' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/recording_unpublished.php b/src/transformer/events/mod_bigbluebuttonbn/recording_unpublished.php new file mode 100644 index 000000000..31819562f --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/recording_unpublished.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn recording unpublished event (triggered when a recording is unpublished). + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function recording_unpublished(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://activitystrea.ms/schema/1.0/retract', 'retracted' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/recording_viewed.php b/src/transformer/events/mod_bigbluebuttonbn/recording_viewed.php new file mode 100644 index 000000000..310ca1d95 --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/recording_viewed.php @@ -0,0 +1,31 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; +use function src\transformer\events\mod_bigbluebuttonbn\create_stmt; + +/** + * The mod_bigbluebuttonbn recording viewed event (triggered when a recording is viewed). + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @return array + */ +function recording_viewed(array $config, \stdClass $event) { + + return create_stmt( $config, $event, 'http://id.tincanapi.com/verb/viewed', 'viewed' ); +} \ No newline at end of file diff --git a/src/transformer/events/mod_bigbluebuttonbn/utils.php b/src/transformer/events/mod_bigbluebuttonbn/utils.php new file mode 100644 index 000000000..65486ef2a --- /dev/null +++ b/src/transformer/events/mod_bigbluebuttonbn/utils.php @@ -0,0 +1,71 @@ +. + +namespace src\transformer\events\mod_bigbluebuttonbn; + +defined('MOODLE_INTERNAL') || die(); + +use src\transformer\utils as utils; + +/** + * Create a Statement for the logs. + * + * @author Paul Walter (https://github.com/paulito-bandito) + * @param array $config + * @param \stdClass $event + * @param $evtid The URL of the Verb we wish to use. + * (example: 'http://activitystrea.ms/schema/1.0/leave' ) + * @param $evtdispname The conjugated Verb so it reads better in SCORM log. + * (example: 'left' ) + * @return array + */ +function create_stmt(array $config, \stdClass $event, $evtid, $evtdispname ) { + $repo = $config['repo']; + $user = $repo->read_record_by_id('user', $event->userid); + $course = $repo->read_record_by_id('course', $event->courseid); + $lang = utils\get_course_lang($course); + + return [[ + 'actor' => utils\get_user($config, $user), + 'verb' => [ + 'id' => $evtid, + 'display' => [ + $lang => $evtdispname + ], + ], + 'object' => utils\get_activity\course_module( + $config, + $course, + $event->contextinstanceid, + 'http://adlnet.gov/expapi/activities/link' + ), + 'timestamp' => utils\get_event_timestamp($event), + 'context' => [ + 'platform' => $config['source_name'], + 'language' => $lang, + 'extensions' => utils\extensions\base($config, $event, $course), + 'contextActivities' => [ + 'grouping' => [ + utils\get_activity\site($config), + utils\get_activity\course($config, $course), + ], + 'category' => [ + utils\get_activity\source($config), + ] + ], + ] + ]]; +} \ No newline at end of file diff --git a/src/transformer/get_event_function_map.php b/src/transformer/get_event_function_map.php index 58d5ae460..4c89f3d2b 100644 --- a/src/transformer/get_event_function_map.php +++ b/src/transformer/get_event_function_map.php @@ -28,6 +28,26 @@ function get_event_function_map() { '\core\event\course_module_completion_updated' => 'core\course_module_completion_updated', '\mod_assign\event\assessable_submitted' => 'mod_assign\assignment_submitted', '\mod_assign\event\submission_graded' => 'mod_assign\assignment_graded', + + '\mod_bigbluebuttonbn\event\activity_created' => 'mod_bigbluebuttonbn\activity_created', + '\mod_bigbluebuttonbn\event\activity_deleted' => 'mod_bigbluebuttonbn\activity_deleted', + '\mod_bigbluebuttonbn\event\activity_updated' => 'mod_bigbluebuttonbn\activity_updated', + '\mod_bigbluebuttonbn\event\activity_viewed' => 'mod_bigbluebuttonbn\activity_viewed', + '\mod_bigbluebuttonbn\event\bigbluebuttonbn_activity_management_viewed' => 'mod_bigbluebuttonbn\bigbluebuttonbn_activity_management_viewed', + '\mod_bigbluebuttonbn\event\live_session' => 'mod_bigbluebuttonbn\live_session', + '\mod_bigbluebuttonbn\event\meeting_created' => 'mod_bigbluebuttonbn\meeting_created', + '\mod_bigbluebuttonbn\event\meeting_ended' => 'mod_bigbluebuttonbn\meeting_ended', + '\mod_bigbluebuttonbn\event\meeting_joined' => 'mod_bigbluebuttonbn\meeting_joined', + '\mod_bigbluebuttonbn\event\meeting_left' => 'mod_bigbluebuttonbn\meeting_left', + '\mod_bigbluebuttonbn\event\recording_deleted' => 'mod_bigbluebuttonbn\recording_deleted', + '\mod_bigbluebuttonbn\event\recording_edited' => 'mod_bigbluebuttonbn\recording_edited', + '\mod_bigbluebuttonbn\event\recording_imported' => 'mod_bigbluebuttonbn\recording_imported', + '\mod_bigbluebuttonbn\event\recording_protected' => 'mod_bigbluebuttonbn\recording_protected', + '\mod_bigbluebuttonbn\event\recording_published' => 'mod_bigbluebuttonbn\recording_published', + '\mod_bigbluebuttonbn\event\recording_unprotected' => 'mod_bigbluebuttonbn\recording_unprotected', + '\mod_bigbluebuttonbn\event\recording_unpublished' => 'mod_bigbluebuttonbn\recording_unpublished', + '\mod_bigbluebuttonbn\event\recording_viewed' => 'mod_bigbluebuttonbn\recording_viewed', + '\mod_book\event\course_module_viewed' => 'mod_book\course_module_viewed', '\mod_book\event\chapter_viewed' => 'mod_book\chapter_viewed', '\mod_chat\event\course_module_viewed' => 'mod_chat\course_module_viewed', diff --git a/tests/mod_bigbluebuttonbn/activity_created/data.json b/tests/mod_bigbluebuttonbn/activity_created/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_created/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_created/event.json b/tests/mod_bigbluebuttonbn/activity_created/event.json new file mode 100644 index 000000000..d1d8bb563 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_created/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\activity_created" +} + diff --git a/tests/mod_bigbluebuttonbn/activity_created/statements.json b/tests/mod_bigbluebuttonbn/activity_created/statements.json new file mode 100644 index 000000000..bc19f353f --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_created/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "https:\/\/w3id.org\/xapi\/dod-isd\/verbs\/created", + "display": { + "en": "created" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\activity_created", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\activity_created" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_created/test.php b/tests/mod_bigbluebuttonbn/activity_created/test.php new file mode 100644 index 000000000..5c3acd780 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_created/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\activity_created; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_deleted/data.json b/tests/mod_bigbluebuttonbn/activity_deleted/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_deleted/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_deleted/event.json b/tests/mod_bigbluebuttonbn/activity_deleted/event.json new file mode 100644 index 000000000..0761377b7 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_deleted/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\activity_deleted" +} + diff --git a/tests/mod_bigbluebuttonbn/activity_deleted/statements.json b/tests/mod_bigbluebuttonbn/activity_deleted/statements.json new file mode 100644 index 000000000..864c5da42 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_deleted/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/delete", + "display": { + "en": "deleted" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\activity_deleted", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\activity_deleted" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_deleted/test.php b/tests/mod_bigbluebuttonbn/activity_deleted/test.php new file mode 100644 index 000000000..9504f9af0 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_deleted/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\activity_deleted; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_updated/data.json b/tests/mod_bigbluebuttonbn/activity_updated/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_updated/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_updated/event.json b/tests/mod_bigbluebuttonbn/activity_updated/event.json new file mode 100644 index 000000000..83a8b4cea --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_updated/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\activity_updated" +} + diff --git a/tests/mod_bigbluebuttonbn/activity_updated/statements.json b/tests/mod_bigbluebuttonbn/activity_updated/statements.json new file mode 100644 index 000000000..060062ec5 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_updated/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/update", + "display": { + "en": "updated" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\activity_updated", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\activity_updated" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_updated/test.php b/tests/mod_bigbluebuttonbn/activity_updated/test.php new file mode 100644 index 000000000..f80b7b15b --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_updated/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\activity_updated; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_viewed/data.json b/tests/mod_bigbluebuttonbn/activity_viewed/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_viewed/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_viewed/event.json b/tests/mod_bigbluebuttonbn/activity_viewed/event.json new file mode 100644 index 000000000..8be6b25f2 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_viewed/event.json @@ -0,0 +1,8 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\activity_viewed" +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_viewed/statements.json b/tests/mod_bigbluebuttonbn/activity_viewed/statements.json new file mode 100644 index 000000000..8eb152994 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_viewed/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/id.tincanapi.com\/verb\/viewed", + "display": { + "en": "viewed" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\activity_viewed", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\activity_viewed" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/activity_viewed/test.php b/tests/mod_bigbluebuttonbn/activity_viewed/test.php new file mode 100644 index 000000000..9f785fe97 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/activity_viewed/test.php @@ -0,0 +1,30 @@ +. + +namespace tests\mod_bigbluebuttonbn\activity_viewed; +defined('MOODLE_INTERNAL') || die(); + +/** + * Class test_activity_viewed + * + * @package tests\mod_bigbluebuttonbn\activity_viewed + * @group bigbluebuttonbn + */ +class test_activity_viewed extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/data.json b/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/event.json b/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/event.json new file mode 100644 index 000000000..f3811f8b7 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\bigbluebuttonbn_activity_management_viewed" +} + diff --git a/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/statements.json b/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/statements.json new file mode 100644 index 000000000..6a63d04e5 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/id.tincanapi.com\/verb\/viewed", + "display": { + "en": "viewed" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\bigbluebuttonbn_activity_management_viewed", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\bigbluebuttonbn_activity_management_viewed" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/test.php b/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/test.php new file mode 100644 index 000000000..8b071c219 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/bigbluebuttonbn_activity_management_viewed/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\bigbluebuttonbn_activity_management_viewed; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/live_session/data.json b/tests/mod_bigbluebuttonbn/live_session/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/live_session/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/live_session/event.json b/tests/mod_bigbluebuttonbn/live_session/event.json new file mode 100644 index 000000000..88db14f9e --- /dev/null +++ b/tests/mod_bigbluebuttonbn/live_session/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\live_session" +} + diff --git a/tests/mod_bigbluebuttonbn/live_session/statements.json b/tests/mod_bigbluebuttonbn/live_session/statements.json new file mode 100644 index 000000000..cd6dda472 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/live_session/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/id.tincanapi.com\/verb\/live", + "display": { + "en": "live" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\live_session", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\live_session" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/live_session/test.php b/tests/mod_bigbluebuttonbn/live_session/test.php new file mode 100644 index 000000000..5d7ffb9e7 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/live_session/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\live_session; +defined('MOODLE_INTERNAL') || die(); + +class test_live_session extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_created/data.json b/tests/mod_bigbluebuttonbn/meeting_created/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_created/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_created/event.json b/tests/mod_bigbluebuttonbn/meeting_created/event.json new file mode 100644 index 000000000..b985fb56b --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_created/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\meeting_created" +} + diff --git a/tests/mod_bigbluebuttonbn/meeting_created/statements.json b/tests/mod_bigbluebuttonbn/meeting_created/statements.json new file mode 100644 index 000000000..4fa25842a --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_created/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/create", + "display": { + "en": "created" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\meeting_created", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_created" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_created/test.php b/tests/mod_bigbluebuttonbn/meeting_created/test.php new file mode 100644 index 000000000..64adbbdd5 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_created/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\meeting_created; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_ended/data.json b/tests/mod_bigbluebuttonbn/meeting_ended/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_ended/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_ended/event.json b/tests/mod_bigbluebuttonbn/meeting_ended/event.json new file mode 100644 index 000000000..b985fe384 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_ended/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\meeting_ended" +} + diff --git a/tests/mod_bigbluebuttonbn/meeting_ended/statements.json b/tests/mod_bigbluebuttonbn/meeting_ended/statements.json new file mode 100644 index 000000000..c7b347f45 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_ended/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/id.tincanapi.com\/verb\/adjourned", + "display": { + "en": "adjourned" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\meeting_ended", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_ended" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_ended/test.php b/tests/mod_bigbluebuttonbn/meeting_ended/test.php new file mode 100644 index 000000000..03f128c51 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_ended/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\meeting_ended; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_joined/data.json b/tests/mod_bigbluebuttonbn/meeting_joined/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_joined/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_joined/event.json b/tests/mod_bigbluebuttonbn/meeting_joined/event.json new file mode 100644 index 000000000..3931a2e56 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_joined/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\meeting_joined" +} + diff --git a/tests/mod_bigbluebuttonbn/meeting_joined/statements.json b/tests/mod_bigbluebuttonbn/meeting_joined/statements.json new file mode 100644 index 000000000..945cce2ba --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_joined/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/join", + "display": { + "en": "joined" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\meeting_joined", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_joined" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_joined/test.php b/tests/mod_bigbluebuttonbn/meeting_joined/test.php new file mode 100644 index 000000000..5d42bc38c --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_joined/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\meeting_joined; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_left/data.json b/tests/mod_bigbluebuttonbn/meeting_left/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_left/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_left/event.json b/tests/mod_bigbluebuttonbn/meeting_left/event.json new file mode 100644 index 000000000..ab0429fa5 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_left/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\meeting_left" +} + diff --git a/tests/mod_bigbluebuttonbn/meeting_left/statements.json b/tests/mod_bigbluebuttonbn/meeting_left/statements.json new file mode 100644 index 000000000..1c4f39e20 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_left/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/leave", + "display": { + "en": "left" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\meeting_left", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_left" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/meeting_left/test.php b/tests/mod_bigbluebuttonbn/meeting_left/test.php new file mode 100644 index 000000000..238b68072 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/meeting_left/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\meeting_left; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_deleted/data.json b/tests/mod_bigbluebuttonbn/recording_deleted/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_deleted/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_deleted/event.json b/tests/mod_bigbluebuttonbn/recording_deleted/event.json new file mode 100644 index 000000000..adbe8f3d0 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_deleted/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\recording_deleted" +} + diff --git a/tests/mod_bigbluebuttonbn/recording_deleted/statements.json b/tests/mod_bigbluebuttonbn/recording_deleted/statements.json new file mode 100644 index 000000000..736088f37 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_deleted/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "https:\/\/w3id.org\/xapi\/dod-isd\/verbs\/deleted", + "display": { + "en": "deleted" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_deleted", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_deleted" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_deleted/test.php b/tests/mod_bigbluebuttonbn/recording_deleted/test.php new file mode 100644 index 000000000..329c93ad0 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_deleted/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\recording_deleted; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_edited/data.json b/tests/mod_bigbluebuttonbn/recording_edited/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_edited/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_edited/event.json b/tests/mod_bigbluebuttonbn/recording_edited/event.json new file mode 100644 index 000000000..adbe8f3d0 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_edited/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\recording_deleted" +} + diff --git a/tests/mod_bigbluebuttonbn/recording_edited/statements.json b/tests/mod_bigbluebuttonbn/recording_edited/statements.json new file mode 100644 index 000000000..736088f37 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_edited/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "https:\/\/w3id.org\/xapi\/dod-isd\/verbs\/deleted", + "display": { + "en": "deleted" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_deleted", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_deleted" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_edited/test.php b/tests/mod_bigbluebuttonbn/recording_edited/test.php new file mode 100644 index 000000000..33cc9f51b --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_edited/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\recording_deleted; +defined('MOODLE_INTERNAL') || die(); + +class test_recording_edited extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_imported/data.json b/tests/mod_bigbluebuttonbn/recording_imported/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_imported/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_imported/event.json b/tests/mod_bigbluebuttonbn/recording_imported/event.json new file mode 100644 index 000000000..e74511ce7 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_imported/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\recording_imported" +} + diff --git a/tests/mod_bigbluebuttonbn/recording_imported/statements.json b/tests/mod_bigbluebuttonbn/recording_imported/statements.json new file mode 100644 index 000000000..196ed277d --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_imported/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/adlnet.gov\/expapi\/verbs\/imported", + "display": { + "en": "imported" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_imported", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_imported" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_imported/test.php b/tests/mod_bigbluebuttonbn/recording_imported/test.php new file mode 100644 index 000000000..466800708 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_imported/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\recording_imported; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_protected/data.json b/tests/mod_bigbluebuttonbn/recording_protected/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_protected/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_protected/event.json b/tests/mod_bigbluebuttonbn/recording_protected/event.json new file mode 100644 index 000000000..5bc656556 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_protected/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\recording_protected" +} + diff --git a/tests/mod_bigbluebuttonbn/recording_protected/statements.json b/tests/mod_bigbluebuttonbn/recording_protected/statements.json new file mode 100644 index 000000000..3b74c4c0a --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_protected/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/id.tincanapi.com\/verb\/secured", + "display": { + "en": "secured" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_protected", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_protected" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_protected/test.php b/tests/mod_bigbluebuttonbn/recording_protected/test.php new file mode 100644 index 000000000..c6869424e --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_protected/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\recording_protected; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_published/data.json b/tests/mod_bigbluebuttonbn/recording_published/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_published/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_published/event.json b/tests/mod_bigbluebuttonbn/recording_published/event.json new file mode 100644 index 000000000..e5f95711a --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_published/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\recording_published" +} + diff --git a/tests/mod_bigbluebuttonbn/recording_published/statements.json b/tests/mod_bigbluebuttonbn/recording_published/statements.json new file mode 100644 index 000000000..682e9a8e3 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_published/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "https:\/\/w3id.org\/xapi\/dod-isd\/verbs\/published", + "display": { + "en": "published" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_published", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_published" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_published/test.php b/tests/mod_bigbluebuttonbn/recording_published/test.php new file mode 100644 index 000000000..0022890e2 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_published/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\recording_published; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_unprotected/data.json b/tests/mod_bigbluebuttonbn/recording_unprotected/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_unprotected/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_unprotected/event.json b/tests/mod_bigbluebuttonbn/recording_unprotected/event.json new file mode 100644 index 000000000..db17d2d8a --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_unprotected/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\recording_unprotected" +} + diff --git a/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json b/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json new file mode 100644 index 000000000..c6969e06b --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/id.tincanapi.com\/verb\/unsecured", + "display": { + "en": "unsecured" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_unprotected", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_unprotected" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_unprotected/test.php b/tests/mod_bigbluebuttonbn/recording_unprotected/test.php new file mode 100644 index 000000000..5d1f00ed2 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_unprotected/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\recording_unprotected; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_unpublished/data.json b/tests/mod_bigbluebuttonbn/recording_unpublished/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_unpublished/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_unpublished/event.json b/tests/mod_bigbluebuttonbn/recording_unpublished/event.json new file mode 100644 index 000000000..bed2dab26 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_unpublished/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\recording_unpublished" +} + diff --git a/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json b/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json new file mode 100644 index 000000000..ebae7281d --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/retract", + "display": { + "en": "retracted" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_unpublished", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_unpublished" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_unpublished/test.php b/tests/mod_bigbluebuttonbn/recording_unpublished/test.php new file mode 100644 index 000000000..c8d7e4f55 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_unpublished/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\recording_unpublished; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_viewed/data.json b/tests/mod_bigbluebuttonbn/recording_viewed/data.json new file mode 100644 index 000000000..63c13dbf6 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_viewed/data.json @@ -0,0 +1,54 @@ +{ + "user": [ + { + "id": 1, + "firstname": "test_fullname", + "email": "test@test.com" + } + ], + "course": [ + { + "id": 1, + "fullname": "test_name", + "lang": "en" + } + ], + "course_modules": [ + { + "id": 1, + "course": 1, + "module": 1, + "instance": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "book" + } + ], + "book": [ + { + "id": 1, + "name": "test_book_name" + } + ], + "book_chapters": [ + { + "id": 1, + "bookid": 1, + "pagenum": 1, + "subchapter": 0, + "title": "test_parent_name", + "content": "

test_parent_content

" + }, + { + "id": 2, + "bookid": 1, + "pagenum": 2, + "subchapter": 1, + "title": "test_book_chapter_title", + "content": "

test_book_chapter_content

" + } + ] +} \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_viewed/event.json b/tests/mod_bigbluebuttonbn/recording_viewed/event.json new file mode 100644 index 000000000..d21018405 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_viewed/event.json @@ -0,0 +1,9 @@ +{ + "id": 1, + "userid": 1, + "courseid": 1, + "timecreated": 1433946701, + "contextinstanceid": 1, + "eventname":"\\mod_bigbluebuttonbn\\event\\recording_viewed" +} + diff --git a/tests/mod_bigbluebuttonbn/recording_viewed/statements.json b/tests/mod_bigbluebuttonbn/recording_viewed/statements.json new file mode 100644 index 000000000..747f4dbfc --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_viewed/statements.json @@ -0,0 +1,72 @@ +[ + { + "actor": { + "name": "test_fullname", + "account": { + "homePage": "http:\/\/www.example.org", + "name": "1" + } + }, + "verb": { + "id": "http:\/\/id.tincanapi.com\/verb\/viewed", + "display": { + "en": "viewed" + } + }, + "object": { + "id": "http:\/\/www.example.org\/mod\/book\/view.php?id=1", + "definition": { + "type": "http:\/\/adlnet.gov\/expapi\/activities\/link", + "name": { + "en": "test_book_name" + } + } + }, + "timestamp": "2015-06-10T15:31:41+01:00", + "context": { + "platform": "Moodle", + "language": "en", + "extensions": { + "http:\/\/lrs.learninglocker.net\/define\/extensions\/info": { + "http:\/\/moodle.org": "1.0.0", + "https:\/\/github.com\/xAPI-vle\/moodle-logstore_xapi": "0.0.0-development", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_viewed", + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_viewed" + } + }, + "contextActivities": { + "grouping": [ + { + "id": "http:\/\/www.example.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms", + "name": { + "en": "test_name" + } + } + }, + { + "id": "http:\/\/www.example.org\/course\/view.php?id=1", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/lms\/course", + "name": { + "en": "test_name" + } + } + } + ], + "category": [ + { + "id": "http:\/\/moodle.org", + "definition": { + "type": "http:\/\/id.tincanapi.com\/activitytype\/source", + "name": { + "en": "Moodle" + } + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/tests/mod_bigbluebuttonbn/recording_viewed/test.php b/tests/mod_bigbluebuttonbn/recording_viewed/test.php new file mode 100644 index 000000000..9f9a549c5 --- /dev/null +++ b/tests/mod_bigbluebuttonbn/recording_viewed/test.php @@ -0,0 +1,24 @@ +. + +namespace tests\mod_bigbluebuttonbn\recording_viewed; +defined('MOODLE_INTERNAL') || die(); + +class test extends \tests\xapi_test_case { + protected function get_test_dir() { + return __DIR__; + } +} \ No newline at end of file