From f3a94ce1b26897efb5e099eee35b2deb945b3442 Mon Sep 17 00:00:00 2001 From: Andrew Downes Date: Fri, 7 Dec 2018 12:03:26 +0000 Subject: [PATCH] fix: Uses consistent verbs to close #338. (#340 - Thanks @garemoko) BREAKING CHANGE: Statements with `http://id.tincanapi.com/verb/completed` changed to `http://adlnet.gov/expapi/verbs/completed`. Changes `core/course_completed` and `core/course_module_completion_updated`. BREAKING CHANGE: Statements with `http://id.tincanapi.com/verb/submitted` changed to `http://activitystrea.ms/schema/1.0/submit`. Changes `mod_feedback/response_submitted`. --- src/transformer/events/core/course_completed.php | 2 +- .../events/core/course_module_completion_updated.php | 2 +- .../mod_feedback/response_submitted/response_submitted.php | 2 +- .../course_completed/completing_existing_course/statements.json | 2 +- .../completing_existing_module/statements.json | 2 +- .../mod_feedback/response_submitted/multichoice/statements.json | 2 +- .../response_submitted/multichoicerated/statements.json | 2 +- tests/mod_feedback/response_submitted/no_items/statements.json | 2 +- tests/mod_feedback/response_submitted/numerical/statements.json | 2 +- tests/mod_feedback/response_submitted/textarea/statements.json | 2 +- tests/mod_feedback/response_submitted/textfield/statements.json | 2 +- .../mod_feedback/response_submitted/unknown_typ/statements.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/transformer/events/core/course_completed.php b/src/transformer/events/core/course_completed.php index 3496ed514..8323b2353 100644 --- a/src/transformer/events/core/course_completed.php +++ b/src/transformer/events/core/course_completed.php @@ -29,7 +29,7 @@ function course_completed(array $config, \stdClass $event) { return [[ 'actor' => utils\get_user($config, $user), 'verb' => [ - 'id' => 'http://id.tincanapi.com/verb/completed', + 'id' => 'http://adlnet.gov/expapi/verbs/completed', 'display' => [ $lang => 'completed' ], diff --git a/src/transformer/events/core/course_module_completion_updated.php b/src/transformer/events/core/course_module_completion_updated.php index 3d18e2686..e1d8c3f17 100644 --- a/src/transformer/events/core/course_module_completion_updated.php +++ b/src/transformer/events/core/course_module_completion_updated.php @@ -32,7 +32,7 @@ function course_module_completion_updated(array $config, \stdClass $event) { return [[ 'actor' => utils\get_user($config, $user), 'verb' => [ - 'id' => 'http://id.tincanapi.com/verb/completed', + 'id' => 'http://adlnet.gov/expapi/verbs/completed', 'display' => [ $lang => 'completed' ], diff --git a/src/transformer/events/mod_feedback/response_submitted/response_submitted.php b/src/transformer/events/mod_feedback/response_submitted/response_submitted.php index 14c426626..403f33d60 100644 --- a/src/transformer/events/mod_feedback/response_submitted/response_submitted.php +++ b/src/transformer/events/mod_feedback/response_submitted/response_submitted.php @@ -31,7 +31,7 @@ function response_submitted(array $config, \stdClass $event) { return [[ 'actor' => utils\get_user($config, $user), 'verb' => [ - 'id' => 'http://id.tincanapi.com/verb/submitted', + 'id' => 'http://activitystrea.ms/schema/1.0/submit', 'display' => [ $lang => 'submitted' ], diff --git a/tests/core/course_completed/completing_existing_course/statements.json b/tests/core/course_completed/completing_existing_course/statements.json index 1cb5315ab..8f8b39e61 100644 --- a/tests/core/course_completed/completing_existing_course/statements.json +++ b/tests/core/course_completed/completing_existing_course/statements.json @@ -8,7 +8,7 @@ } }, "verb": { - "id": "http:\/\/id.tincanapi.com\/verb\/completed", + "id": "http:\/\/adlnet.gov\/expapi\/verbs\/completed", "display": { "en": "completed" } diff --git a/tests/core/course_module_completion_update/completing_existing_module/statements.json b/tests/core/course_module_completion_update/completing_existing_module/statements.json index 600abeec8..595380cfd 100644 --- a/tests/core/course_module_completion_update/completing_existing_module/statements.json +++ b/tests/core/course_module_completion_update/completing_existing_module/statements.json @@ -8,7 +8,7 @@ } }, "verb": { - "id": "http:\/\/id.tincanapi.com\/verb\/completed", + "id": "http:\/\/adlnet.gov\/expapi\/verbs\/completed", "display": { "en": "completed" } diff --git a/tests/mod_feedback/response_submitted/multichoice/statements.json b/tests/mod_feedback/response_submitted/multichoice/statements.json index d1f8f841a..4d9a2962b 100644 --- a/tests/mod_feedback/response_submitted/multichoice/statements.json +++ b/tests/mod_feedback/response_submitted/multichoice/statements.json @@ -8,7 +8,7 @@ } }, "verb": { - "id": "http:\/\/id.tincanapi.com\/verb\/submitted", + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/submit", "display": { "en": "submitted" } diff --git a/tests/mod_feedback/response_submitted/multichoicerated/statements.json b/tests/mod_feedback/response_submitted/multichoicerated/statements.json index 1532298be..372540547 100644 --- a/tests/mod_feedback/response_submitted/multichoicerated/statements.json +++ b/tests/mod_feedback/response_submitted/multichoicerated/statements.json @@ -8,7 +8,7 @@ } }, "verb": { - "id": "http:\/\/id.tincanapi.com\/verb\/submitted", + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/submit", "display": { "en": "submitted" } diff --git a/tests/mod_feedback/response_submitted/no_items/statements.json b/tests/mod_feedback/response_submitted/no_items/statements.json index c59c3347e..c3a6753af 100644 --- a/tests/mod_feedback/response_submitted/no_items/statements.json +++ b/tests/mod_feedback/response_submitted/no_items/statements.json @@ -8,7 +8,7 @@ } }, "verb": { - "id": "http:\/\/id.tincanapi.com\/verb\/submitted", + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/submit", "display": { "en": "submitted" } diff --git a/tests/mod_feedback/response_submitted/numerical/statements.json b/tests/mod_feedback/response_submitted/numerical/statements.json index 647392788..f0b991a95 100644 --- a/tests/mod_feedback/response_submitted/numerical/statements.json +++ b/tests/mod_feedback/response_submitted/numerical/statements.json @@ -8,7 +8,7 @@ } }, "verb": { - "id": "http:\/\/id.tincanapi.com\/verb\/submitted", + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/submit", "display": { "en": "submitted" } diff --git a/tests/mod_feedback/response_submitted/textarea/statements.json b/tests/mod_feedback/response_submitted/textarea/statements.json index b261db4c6..09faaa978 100644 --- a/tests/mod_feedback/response_submitted/textarea/statements.json +++ b/tests/mod_feedback/response_submitted/textarea/statements.json @@ -8,7 +8,7 @@ } }, "verb": { - "id": "http:\/\/id.tincanapi.com\/verb\/submitted", + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/submit", "display": { "en": "submitted" } diff --git a/tests/mod_feedback/response_submitted/textfield/statements.json b/tests/mod_feedback/response_submitted/textfield/statements.json index 112ae0aba..abe36b2bd 100644 --- a/tests/mod_feedback/response_submitted/textfield/statements.json +++ b/tests/mod_feedback/response_submitted/textfield/statements.json @@ -8,7 +8,7 @@ } }, "verb": { - "id": "http:\/\/id.tincanapi.com\/verb\/submitted", + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/submit", "display": { "en": "submitted" } diff --git a/tests/mod_feedback/response_submitted/unknown_typ/statements.json b/tests/mod_feedback/response_submitted/unknown_typ/statements.json index c59c3347e..c3a6753af 100644 --- a/tests/mod_feedback/response_submitted/unknown_typ/statements.json +++ b/tests/mod_feedback/response_submitted/unknown_typ/statements.json @@ -8,7 +8,7 @@ } }, "verb": { - "id": "http:\/\/id.tincanapi.com\/verb\/submitted", + "id": "http:\/\/activitystrea.ms\/schema\/1.0\/submit", "display": { "en": "submitted" }