Skip to content

Commit

Permalink
CMV changes
Browse files Browse the repository at this point in the history
  • Loading branch information
milt committed Oct 9, 2024
1 parent b049970 commit 8a29118
Show file tree
Hide file tree
Showing 24 changed files with 954 additions and 960 deletions.
3 changes: 1 addition & 2 deletions src/transformer/events/all/course_module_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ function course_module_viewed(array $config, \stdClass $event) {
'object' => utils\get_activity\course_module(
$config,
$course,
$event->contextinstanceid,
'http://id.tincanapi.com/activitytype/lms/module'
$event->contextinstanceid
),
'context' => [
'language' => $lang,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ function course_module_viewed(array $config, \stdClass $event) {
'object' => utils\get_activity\course_module(
$config,
$course,
$event->contextinstanceid,
'https://w3id.org/xapi/acrossx/activities/face-to-face-discussion'
$event->contextinstanceid
),
'context' => [
'language' => $lang,
Expand Down
3 changes: 1 addition & 2 deletions src/transformer/events/mod_lesson/course_module_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ function course_module_viewed(array $config, \stdClass $event) {
'object' => utils\get_activity\course_module(
$config,
$course,
$event->contextinstanceid,
'http://adlnet.gov/expapi/activities/lesson'
$event->contextinstanceid
),
'context' => [
'language' => $lang,
Expand Down
3 changes: 1 addition & 2 deletions src/transformer/events/mod_page/course_module_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ function course_module_viewed(array $config, \stdClass $event) {
'object' => utils\get_activity\course_module(
$config,
$course,
$event->contextinstanceid,
'https://w3id.org/xapi/acrossx/activities/page'
$event->contextinstanceid
),
'context' => [
'language' => $lang,
Expand Down
3 changes: 1 addition & 2 deletions src/transformer/events/mod_scorm/course_module_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ function course_module_viewed(array $config, \stdClass $event) {
'object' => utils\get_activity\course_module(
$config,
$course,
$event->contextinstanceid,
'http://id.tincanapi.com/activitytype/legacy-learning-standard'
$event->contextinstanceid
),
'context' => [
'language' => $lang,
Expand Down
3 changes: 1 addition & 2 deletions src/transformer/events/mod_survey/course_module_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ function course_module_viewed(array $config, \stdClass $event) {
'object' => utils\get_activity\course_module(
$config,
$course,
$event->contextinstanceid,
'http://id.tincanapi.com/activitytype/survey'
$event->contextinstanceid
),
'context' => [
'language' => $lang,
Expand Down
3 changes: 1 addition & 2 deletions src/transformer/events/mod_url/course_module_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ function course_module_viewed(array $config, \stdClass $event) {
'object' => utils\get_activity\course_module(
$config,
$course,
$event->contextinstanceid,
'http://adlnet.gov/expapi/activities/link'
$event->contextinstanceid
),
'context' => [
'language' => $lang,
Expand Down
1 change: 1 addition & 0 deletions src/transformer/utils/get_module_activity_type.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function get_module_activity_type_mapping() {
'chat' => 'http://id.tincanapi.com/activitytype/chat-channel',
'choice' => 'http://adlnet.gov/expapi/activities/cmi.interaction',
'data' => 'http://xapi.org.au/contentprofile/activitytype/database',
'facetoface' => 'https://w3id.org/xapi/acrossx/activities/face-to-face-discussion',
'feedback' => 'https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback',
'folder' => 'http://activitystrea.ms/collection',
'forum' => 'https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum',
Expand Down
126 changes: 63 additions & 63 deletions tests/mod_choice/course_module_viewed/existing_module/statements.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
[
{
"actor": {
"name": "test_fullname",
"account": {
"homePage": "http://www.example.org",
"name": "1"
}
},
"verb": {
"id": "http://id.tincanapi.com/verb/viewed",
"display": {
"en": "viewed"
{
"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/choice/view.php?id=1",
"definition": {
"type": "http://adlnet.gov/expapi/activities/cmi.interaction",
"name": {
"en": "test_name"
}
}
},
"context": {
"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_choice\\event\\course_module_viewed",
"event_function": "\\src\\transformer\\events\\all\\course_module_viewed"
}
},
"contextActivities": {
"grouping": [
{
"id": "http://www.example.org",
"definition": {
"type": "http://id.tincanapi.com/activitytype/lms",
"name": {
"en": "test_name"
}
}
},
"object": {
"id": "http://www.example.org/mod/choice/view.php?id=1",
},
{
"id": "http://www.example.org/course/view.php?id=1",
"definition": {
"type": "http://id.tincanapi.com/activitytype/lms/module",
"name": {
"en": "test_name"
}
"type": "https://w3id.org/xapi/cmi5/activitytype/course",
"name": {
"en": "test_name"
}
}
},
"context": {
"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_choice\\event\\course_module_viewed",
"event_function": "\\src\\transformer\\events\\all\\course_module_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": "https://w3id.org/xapi/cmi5/activitytype/course",
"name": {
"en": "test_name"
}
}
}
],
"category": [
{
"id": "http://moodle.org",
"definition": {
"type": "http://id.tincanapi.com/activitytype/source",
"name": {
"en": "Moodle"
}
}
}
]
}
],
"category": [
{
"id": "http://moodle.org",
"definition": {
"type": "http://id.tincanapi.com/activitytype/source",
"name": {
"en": "Moodle"
}
}
}
}
]
}
}
}
]
126 changes: 63 additions & 63 deletions tests/mod_data/course_module_viewed/existing_module/statements.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
[
{
"actor": {
"name": "test_fullname",
"account": {
"homePage": "http://www.example.org",
"name": "1"
}
},
"verb": {
"id": "http://id.tincanapi.com/verb/viewed",
"display": {
"en": "viewed"
{
"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/data/view.php?id=1",
"definition": {
"type": "http://xapi.org.au/contentprofile/activitytype/database",
"name": {
"en": "test_name"
}
}
},
"context": {
"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_data\\event\\course_module_viewed",
"event_function": "\\src\\transformer\\events\\all\\course_module_viewed"
}
},
"contextActivities": {
"grouping": [
{
"id": "http://www.example.org",
"definition": {
"type": "http://id.tincanapi.com/activitytype/lms",
"name": {
"en": "test_name"
}
}
},
"object": {
"id": "http://www.example.org/mod/data/view.php?id=1",
},
{
"id": "http://www.example.org/course/view.php?id=1",
"definition": {
"type": "http://id.tincanapi.com/activitytype/lms/module",
"name": {
"en": "test_name"
}
"type": "https://w3id.org/xapi/cmi5/activitytype/course",
"name": {
"en": "test_name"
}
}
},
"context": {
"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_data\\event\\course_module_viewed",
"event_function": "\\src\\transformer\\events\\all\\course_module_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": "https://w3id.org/xapi/cmi5/activitytype/course",
"name": {
"en": "test_name"
}
}
}
],
"category": [
{
"id": "http://moodle.org",
"definition": {
"type": "http://id.tincanapi.com/activitytype/source",
"name": {
"en": "Moodle"
}
}
}
]
}
],
"category": [
{
"id": "http://moodle.org",
"definition": {
"type": "http://id.tincanapi.com/activitytype/source",
"name": {
"en": "Moodle"
}
}
}
}
]
}
}
}
]
Loading

0 comments on commit 8a29118

Please sign in to comment.