From 88a3414c4c4166f85bdfd64c84f778b8f42c8261 Mon Sep 17 00:00:00 2001 From: Milton Reder Date: Thu, 6 Feb 2025 12:38:28 -0500 Subject: [PATCH 1/5] change default site object name to Moodle LMS --- src/transformer/utils/get_activity/site.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformer/utils/get_activity/site.php b/src/transformer/utils/get_activity/site.php index 2333a6a1d..d5ea875f7 100644 --- a/src/transformer/utils/get_activity/site.php +++ b/src/transformer/utils/get_activity/site.php @@ -37,7 +37,7 @@ function site(array $config) { $repo = $config['repo']; $site = $repo->read_record_by_id('course', 1); - $sitename = $site->fullname ? $site->fullname : 'A Moodle site'; + $sitename = $site->fullname ? $site->fullname : 'Moodle LMS'; $sitelang = utils\get_course_lang($site); return [ From 9405bb5f82cfdb81cfbf478988133eff112c37a2 Mon Sep 17 00:00:00 2001 From: Milton Reder Date: Thu, 6 Feb 2025 13:07:15 -0500 Subject: [PATCH 2/5] use util for LMS site obj --- src/transformer/events/core/badge_awarded.php | 13 +++---------- src/transformer/events/core/badge_revoked.php | 11 +++-------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/transformer/events/core/badge_awarded.php b/src/transformer/events/core/badge_awarded.php index 58e24192a..f742acc8a 100644 --- a/src/transformer/events/core/badge_awarded.php +++ b/src/transformer/events/core/badge_awarded.php @@ -74,16 +74,9 @@ function badge_awarded(array $config, \stdClass $event) { ...utils\get_context_base($config, $event, $lang, $course), 'instructor' => $awarder, 'contextActivities' => [ - 'category' => [[ - 'id' => $config['app_url'], - 'objectType' => 'Activity', - 'definition' => [ - 'name' => [ - 'en' => 'EDLM Moodle LMS' - ], - 'type' => 'http://id.tincanapi.com/activitytype/lms' - ] - ]], + 'category' => [ + utils\get_activity\site($config), + ], ], 'extensions' => array_merge(utils\extensions\base($config, $event, $course),[ 'https://xapi.edlm/profiles/edlm-lms/v1/concepts/context-extensions/badge-assignment-method' => ($manual ? 'Manual' : 'Automatic')]) diff --git a/src/transformer/events/core/badge_revoked.php b/src/transformer/events/core/badge_revoked.php index 96440220f..dcdfb8001 100644 --- a/src/transformer/events/core/badge_revoked.php +++ b/src/transformer/events/core/badge_revoked.php @@ -59,14 +59,9 @@ function badge_revoked(array $config, \stdClass $event) { ...utils\get_context_base($config, $event, $lang, $course), 'instructor' =>$revoker, 'contextActivities'=> [ - 'category' => [[ - 'id' => $config['app_url'], - 'objectType' => 'Activity', - 'definition' => [ - 'name' => ['en'=> 'EDLM Moodle LMS'], - 'type' => 'http://id.tincanapi.com/activitytype/lms' - ] - ]] + 'category' => [ + utils\get_activity\site($config), + ], ], 'extensions' => array_merge(utils\extensions\base($config, $event, $course),[ 'https://xapi.edlm/profiles/edlm-lms/v1/concepts/context-extensions/badge-assignment-method' => 'Manual']) From 240eb426e7fc48261b86df186909ab4af38be264 Mon Sep 17 00:00:00 2001 From: Milton Reder Date: Thu, 6 Feb 2025 13:11:10 -0500 Subject: [PATCH 3/5] add LMS course to common data, breaking almost everything --- tests/common/data.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/common/data.json b/tests/common/data.json index ce4a00b4a..6c699ece8 100644 --- a/tests/common/data.json +++ b/tests/common/data.json @@ -9,6 +9,11 @@ "course": [ { "id": 1, + "fullname": "test_site_fullname", + "lang": "en" + }, + { + "id": 2, "fullname": "test_name", "lang": "en" } @@ -16,14 +21,14 @@ "course_sections": [ { "id": 1, - "course": 1, + "course": 2, "section": 0 } ], "course_modules": [ { "id": 1, - "course": 1, + "course": 2, "module": 1, "instance": 1, "section": 1 From 128c2f2b9a643364f9105ee8941be2e35951d3a5 Mon Sep 17 00:00:00 2001 From: Milton Reder Date: Thu, 6 Feb 2025 16:00:53 -0500 Subject: [PATCH 4/5] amend tests to account for hidden course ID 1 --- tests/common/data.json | 32 +- tests/common/statement.json | 4 +- .../user_achieved_badge/data.json | 51 +-- .../user_achieved_badge/event.json | 10 +- .../user_achieved_badge/statements.json | 104 +++--- .../user_forfeited_badge/data.json | 30 +- .../user_forfeited_badge/event.json | 8 +- .../user_forfeited_badge/statements.json | 84 ++--- tests/core/badge_updated/data.json | 8 +- tests/core/badge_updated/event.json | 12 +- tests/core/badge_updated/statements.json | 74 ++--- .../badge_viewed/user_viewed_badge/data.json | 6 +- .../badge_viewed/user_viewed_badge/event.json | 14 +- .../user_viewed_badge/statements.json | 56 ++-- .../user_created_calendar_event/data.json | 9 +- .../user_created_calendar_event/event.json | 2 +- .../statements.json | 6 +- .../user_deleted_calendar_event/data.json | 9 +- .../user_deleted_calendar_event/event.json | 2 +- .../statements.json | 6 +- .../user_updated_calendar_event/data.json | 9 +- .../user_updated_calendar_event/event.json | 2 +- .../statements.json | 6 +- .../event.json | 14 +- .../statements.json | 60 ++-- .../event.json | 6 +- .../statements.json | 36 +-- .../event.json | 14 +- .../statements.json | 56 ++-- tests/core/course_category_created/data.json | 29 +- tests/core/course_category_created/event.json | 4 +- .../course_category_created/statements.json | 68 ++-- .../completing_existing_course/data.json | 11 +- .../completing_existing_course/event.json | 10 +- .../statements.json | 64 ++-- .../course_completed/send_jisc_data/data.json | 19 +- .../send_jisc_data/event.json | 12 +- .../send_jisc_data/statements.json | 76 ++--- .../core/course_completion_updated/data.json | 11 +- .../core/course_completion_updated/event.json | 8 +- .../course_completion_updated/statements.json | 70 ++-- .../creating_new_course/data.json | 11 +- .../creating_new_course/event.json | 6 +- .../creating_new_course/statements.json | 48 +-- .../completing_existing_module/data.json | 8 +- .../completing_existing_module/event.json | 10 +- .../statements.json | 92 +++--- .../uncompleting_existing_module/data.json | 8 +- .../uncompleting_existing_module/event.json | 10 +- .../statements.json | 84 ++--- .../creating_new_course_module/data.json | 8 +- .../creating_new_course_module/event.json | 10 +- .../statements.json | 68 ++-- .../data.json | 11 +- .../event.json | 10 +- .../statements.json | 76 ++--- .../new_course_section_created/data.json | 18 +- .../new_course_section_created/event.json | 8 +- .../statements.json | 60 ++-- .../updating_existing_course/data.json | 11 +- .../updating_existing_course/event.json | 6 +- .../updating_existing_course/statements.json | 48 +-- .../viewing_existing_course/data.json | 11 +- .../viewing_existing_course/event.json | 10 +- .../viewing_existing_course/statements.json | 64 ++-- .../creating_new_group/event.json | 6 +- .../creating_new_group/statements.json | 60 ++-- .../existing_group_deleted/event.json | 2 +- .../existing_group_deleted/statements.json | 48 +-- .../new_group_member_added/data.json | 20 +- .../new_group_member_added/event.json | 10 +- .../new_group_member_added/statements.json | 74 ++--- .../existing_group_member_removed/data.json | 20 +- .../existing_group_member_removed/event.json | 10 +- .../statements.json | 74 ++--- .../new_group_message_sent/data.json | 20 +- .../new_group_message_sent/event.json | 2 +- .../new_group_message_sent/statements.json | 70 ++-- .../message_sent/user_sent_message/data.json | 22 +- .../message_sent/user_sent_message/event.json | 6 +- .../user_sent_message/statements.json | 46 +-- .../user_viewed_message/data.json | 22 +- .../user_viewed_message/event.json | 6 +- .../user_viewed_message/statements.json | 14 +- .../note_created/user_created_note/data.json | 8 +- .../note_created/user_created_note/event.json | 6 +- .../user_created_note/statements.json | 68 ++-- .../note_updated/user_updated_note/data.json | 4 +- .../note_updated/user_updated_note/event.json | 6 +- .../user_updated_note/statements.json | 68 ++-- .../notes_viewed/user_viewed_notes/event.json | 6 +- .../user_viewed_notes/statements.json | 60 ++-- .../new_question_created/data.json | 10 +- .../new_question_created/event.json | 2 +- .../new_question_created/statements.json | 76 ++--- .../new_questions_imported/event.json | 6 +- .../new_questions_imported/statements.json | 54 ++-- .../user_viewed_search_results/event.json | 4 +- .../statements.json | 48 +-- .../existing_user_created/data.json | 11 +- .../existing_user_created/event.json | 10 +- .../existing_user_created/statements.json | 62 ++-- .../user_created/send_jisc_data/data.json | 19 +- .../user_created/send_jisc_data/event.json | 12 +- .../send_jisc_data/statements.json | 68 ++-- .../existing_user_enrolled/data.json | 8 +- .../existing_user_enrolled/event.json | 12 +- .../existing_user_enrolled/statements.json | 80 ++--- .../existing_user_enrolment_deleted/data.json | 8 +- .../event.json | 8 +- .../statements.json | 80 ++--- .../user_resumed_course/data.json | 8 +- .../user_resumed_course/event.json | 12 +- .../user_resumed_course/statements.json | 80 ++--- .../user_suspended_course/data.json | 8 +- .../user_suspended_course/event.json | 12 +- .../user_suspended_course/statements.json | 80 ++--- .../existing_user_loggedin/data.json | 4 +- .../existing_user_loggedin/event.json | 10 +- .../existing_user_loggedin/statements.json | 42 +-- .../existing_user_loggedinas/data.json | 8 +- .../existing_user_loggedinas/event.json | 10 +- .../existing_user_loggedinas/statements.json | 52 +-- .../existing_user_loggedout/data.json | 4 +- .../existing_user_loggedout/event.json | 10 +- .../existing_user_loggedout/statements.json | 42 +-- tests/core_h5p/course_module_viewed/data.json | 8 +- .../core_h5p/course_module_viewed/event.json | 8 +- .../course_module_viewed/statements.json | 84 ++--- .../data.json | 46 +-- .../event.json | 12 +- .../statements.json | 128 ++++---- .../data.json | 40 +-- .../event.json | 12 +- .../statements.json | 126 ++++---- .../existing_assignment_submitted/data.json | 10 +- .../existing_assignment_submitted/event.json | 12 +- .../statements.json | 96 +++--- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../user_viewed_feedback/data.json | 28 +- .../user_viewed_feedback/event.json | 6 +- .../user_viewed_feedback/statements.json | 90 +++--- tests/mod_assign/submission_locked/data.json | 18 +- tests/mod_assign/submission_locked/event.json | 16 +- .../submission_locked/statements.json | 110 +++---- .../mod_assign/submission_unlocked/data.json | 18 +- .../mod_assign/submission_unlocked/event.json | 16 +- .../submission_unlocked/statements.json | 110 +++---- tests/mod_assign/submission_viewed/data.json | 18 +- tests/mod_assign/submission_viewed/event.json | 14 +- .../submission_viewed/statements.json | 110 +++---- .../activity_management_viewed/data.json | 8 +- .../activity_management_viewed/event.json | 12 +- .../statements.json | 84 ++--- .../live_session/data.json | 8 +- .../live_session/event.json | 12 +- .../live_session/statements.json | 84 ++--- .../meeting_created/data.json | 8 +- .../meeting_created/event.json | 12 +- .../meeting_created/statements.json | 84 ++--- .../meeting_ended/data.json | 8 +- .../meeting_ended/event.json | 12 +- .../meeting_ended/statements.json | 84 ++--- .../meeting_joined/data.json | 8 +- .../meeting_joined/event.json | 12 +- .../meeting_joined/statements.json | 84 ++--- .../meeting_left/data.json | 8 +- .../meeting_left/event.json | 12 +- .../meeting_left/statements.json | 84 ++--- .../recording_deleted/data.json | 8 +- .../recording_deleted/event.json | 12 +- .../recording_deleted/statements.json | 84 ++--- .../recording_edited/data.json | 8 +- .../recording_edited/event.json | 12 +- .../recording_edited/statements.json | 84 ++--- .../recording_imported/data.json | 8 +- .../recording_imported/event.json | 12 +- .../recording_imported/statements.json | 84 ++--- .../recording_protected/data.json | 8 +- .../recording_protected/event.json | 12 +- .../recording_protected/statements.json | 84 ++--- .../recording_published/data.json | 8 +- .../recording_published/event.json | 12 +- .../recording_published/statements.json | 84 ++--- .../recording_unprotected/data.json | 8 +- .../recording_unprotected/event.json | 12 +- .../recording_unprotected/statements.json | 84 ++--- .../recording_unpublished/data.json | 8 +- .../recording_unpublished/event.json | 12 +- .../recording_unpublished/statements.json | 84 ++--- .../recording_viewed/data.json | 8 +- .../recording_viewed/event.json | 12 +- .../recording_viewed/statements.json | 84 ++--- tests/mod_book/chapter_created/data.json | 18 +- tests/mod_book/chapter_created/event.json | 2 +- .../mod_book/chapter_created/statements.json | 66 ++-- .../data.json | 24 +- .../event.json | 12 +- .../statements.json | 110 +++---- .../data.json | 18 +- .../event.json | 12 +- .../statements.json | 100 +++--- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- tests/mod_choice/answer_created/data.json | 20 +- tests/mod_choice/answer_created/event.json | 2 +- .../mod_choice/answer_created/statements.json | 102 +++--- .../existing_module/data.json | 20 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 126 ++++---- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../existing_booking_cancelled/data.json | 8 +- .../existing_booking_cancelled/event.json | 12 +- .../statements.json | 84 ++--- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../existing_signup_success/data.json | 8 +- .../existing_signup_success/event.json | 12 +- .../existing_signup_success/statements.json | 84 ++--- .../existing_attendance_taken/data.json | 54 ++-- .../existing_attendance_taken/event.json | 12 +- .../existing_attendance_taken/statements.json | 106 +++---- .../viewing_feedback/data.json | 8 +- .../viewing_feedback/event.json | 10 +- .../viewing_feedback/statements.json | 84 ++--- .../response_submitted/multichoice/data.json | 28 +- .../response_submitted/multichoice/event.json | 10 +- .../multichoice/statements.json | 238 +++++++------- .../multichoicerated/data.json | 28 +- .../multichoicerated/event.json | 10 +- .../multichoicerated/statements.json | 240 +++++++------- .../response_submitted/no_items/data.json | 16 +- .../response_submitted/no_items/event.json | 10 +- .../no_items/statements.json | 84 ++--- .../response_submitted/numerical/data.json | 28 +- .../response_submitted/numerical/event.json | 10 +- .../numerical/statements.json | 200 ++++++------ .../response_submitted/textarea/data.json | 24 +- .../response_submitted/textarea/event.json | 10 +- .../textarea/statements.json | 188 +++++------ .../textarea_anon/data.json | 24 +- .../textarea_anon/event.json | 10 +- .../textarea_anon/statements.json | 188 +++++------ .../response_submitted/textfield/data.json | 24 +- .../response_submitted/textfield/event.json | 10 +- .../textfield/statements.json | 188 +++++------ .../response_submitted/unknown_typ/data.json | 26 +- .../response_submitted/unknown_typ/event.json | 10 +- .../unknown_typ/statements.json | 84 ++--- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- tests/mod_forum/discussion_created/data.json | 12 +- tests/mod_forum/discussion_created/event.json | 12 +- .../discussion_created/statements.json | 94 +++--- .../discussion_subcription_created/data.json | 12 +- .../discussion_subcription_created/event.json | 12 +- .../statements.json | 94 +++--- .../discussion_subcription_deleted/data.json | 12 +- .../discussion_subcription_deleted/event.json | 12 +- .../statements.json | 94 +++--- .../existing_discussion_viewed/data.json | 12 +- .../existing_discussion_viewed/event.json | 12 +- .../statements.json | 94 +++--- tests/mod_forum/post_created/data.json | 14 +- tests/mod_forum/post_created/event.json | 12 +- tests/mod_forum/post_created/statements.json | 106 +++---- tests/mod_forum/post_deleted/data.json | 14 +- tests/mod_forum/post_deleted/event.json | 12 +- tests/mod_forum/post_deleted/statements.json | 94 +++--- tests/mod_forum/post_updated/data.json | 14 +- tests/mod_forum/post_updated/event.json | 12 +- tests/mod_forum/post_updated/statements.json | 106 +++---- .../mod_forum/subscription_created/data.json | 12 +- .../mod_forum/subscription_created/event.json | 12 +- .../subscription_created/statements.json | 84 ++--- .../mod_forum/subscription_deleted/data.json | 12 +- .../mod_forum/subscription_deleted/event.json | 12 +- .../subscription_deleted/statements.json | 84 ++--- .../existing_report_viewed/data.json | 15 +- .../existing_report_viewed/event.json | 10 +- .../existing_report_viewed/statements.json | 84 ++--- .../data.json | 15 +- .../event.json | 10 +- .../statements.json | 68 ++-- tests/mod_glossary/comment_created/data.json | 14 +- tests/mod_glossary/comment_created/event.json | 14 +- .../comment_created/statements.json | 110 +++---- tests/mod_glossary/comment_deleted/data.json | 16 +- tests/mod_glossary/comment_deleted/event.json | 14 +- .../comment_deleted/statements.json | 104 +++--- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- tests/mod_glossary/entry_viewed/data.json | 16 +- tests/mod_glossary/entry_viewed/event.json | 12 +- .../mod_glossary/entry_viewed/statements.json | 100 +++--- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../mod_lesson/content_page_viewed/data.json | 16 +- .../mod_lesson/content_page_viewed/event.json | 12 +- .../content_page_viewed/statements.json | 94 +++--- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- tests/mod_lesson/essay_assessed/data.json | 40 +-- tests/mod_lesson/essay_assessed/event.json | 12 +- .../mod_lesson/essay_assessed/statements.json | 132 ++++---- tests/mod_lesson/lesson_ended/data.json | 34 +- tests/mod_lesson/lesson_ended/event.json | 12 +- tests/mod_lesson/lesson_ended/statements.json | 120 +++---- tests/mod_lesson/lesson_restarted/data.json | 10 +- tests/mod_lesson/lesson_restarted/event.json | 12 +- .../lesson_restarted/statements.json | 100 +++--- tests/mod_lesson/lesson_resumed/data.json | 10 +- tests/mod_lesson/lesson_resumed/event.json | 12 +- .../mod_lesson/lesson_resumed/statements.json | 100 +++--- tests/mod_lesson/lesson_started/data.json | 10 +- tests/mod_lesson/lesson_started/event.json | 12 +- .../mod_lesson/lesson_started/statements.json | 100 +++--- .../question_answered/choice/data.json | 40 +-- .../question_answered/choice/event.json | 12 +- .../question_answered/choice/statements.json | 152 ++++----- .../question_answered/essay/data.json | 40 +-- .../question_answered/essay/event.json | 12 +- .../question_answered/essay/statements.json | 108 +++---- .../question_answered/matching/data.json | 44 +-- .../question_answered/matching/event.json | 12 +- .../matching/statements.json | 160 +++++----- .../question_answered/numerical/data.json | 40 +-- .../question_answered/numerical/event.json | 12 +- .../numerical/statements.json | 116 +++---- .../question_answered/shortanswer/data.json | 40 +-- .../question_answered/shortanswer/event.json | 12 +- .../shortanswer/statements.json | 116 +++---- .../question_answered/truefalse/data.json | 40 +-- .../question_answered/truefalse/event.json | 12 +- .../truefalse/statements.json | 140 ++++---- .../question_viewed/choice/data.json | 34 +- .../question_viewed/choice/event.json | 12 +- .../question_viewed/choice/statements.json | 144 ++++----- .../question_viewed/essay/data.json | 22 +- .../question_viewed/essay/event.json | 12 +- .../question_viewed/essay/statements.json | 102 +++--- .../question_viewed/matching/data.json | 38 +-- .../question_viewed/matching/event.json | 12 +- .../question_viewed/matching/statements.json | 156 ++++----- .../question_viewed/numerical/data.json | 24 +- .../question_viewed/numerical/event.json | 12 +- .../question_viewed/numerical/statements.json | 108 +++---- .../question_viewed/shortanswer/data.json | 24 +- .../question_viewed/shortanswer/event.json | 12 +- .../shortanswer/statements.json | 108 +++---- .../question_viewed/truefalse/data.json | 34 +- .../question_viewed/truefalse/event.json | 12 +- .../question_viewed/truefalse/statements.json | 132 ++++---- .../existing_module/data.json | 8 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../all_responses_viewed/event.json | 12 +- .../all_responses_viewed/statements.json | 94 +++--- .../attempt_resumed/event.json | 12 +- .../attempt_resumed/statements.json | 84 ++--- .../attempt_saved/event.json | 12 +- .../attempt_saved/statements.json | 84 ++--- .../attempt_submitted/event.json | 12 +- .../attempt_submitted/statements.json | 84 ++--- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../mod_quiz/attempt_becameoverdue/data.json | 14 +- .../mod_quiz/attempt_becameoverdue/event.json | 12 +- .../attempt_becameoverdue/statements.json | 94 +++--- .../existing_attempt_reviewed/data.json | 28 +- .../existing_attempt_reviewed/event.json | 14 +- .../existing_attempt_reviewed/statements.json | 114 +++---- .../existing_attempt_started/data.json | 14 +- .../existing_attempt_started/event.json | 12 +- .../existing_attempt_started/statements.json | 94 +++--- .../attempt_submitted/essay/data.json | 64 ++-- .../attempt_submitted/essay/event.json | 12 +- .../attempt_submitted/essay/statements.json | 230 +++++++------- .../essay_null_response/data.json | 64 ++-- .../essay_null_response/event.json | 12 +- .../essay_null_response/statements.json | 230 +++++++------- .../attempt_submitted/gapselect/data.json | 90 +++--- .../attempt_submitted/gapselect/event.json | 12 +- .../gapselect/statements.json | 244 +++++++------- .../attempt_submitted/match/data.json | 92 +++--- .../attempt_submitted/match/event.json | 12 +- .../attempt_submitted/match/statements.json | 300 +++++++++--------- .../attempt_submitted/multichoice/data.json | 90 +++--- .../attempt_submitted/multichoice/event.json | 12 +- .../multichoice/statements.json | 236 +++++++------- .../multichoice_withchoices/data.json | 68 ++-- .../multichoice_withchoices/event.json | 12 +- .../multichoice_withchoices/statements.json | 256 +++++++-------- .../multichoiceset/data.json | 90 +++--- .../multichoiceset/event.json | 12 +- .../multichoiceset/statements.json | 236 +++++++------- .../multichoiceset_withchoices/data.json | 90 +++--- .../multichoiceset_withchoices/event.json | 12 +- .../statements.json | 280 ++++++++-------- .../attempt_submitted/no_questions/data.json | 48 +-- .../attempt_submitted/no_questions/event.json | 12 +- .../no_questions/statements.json | 116 +++---- .../attempt_submitted/numerical/data.json | 76 ++--- .../attempt_submitted/numerical/event.json | 12 +- .../numerical/statements.json | 242 +++++++------- .../attempt_submitted/randomsamatch/data.json | 84 ++--- .../randomsamatch/event.json | 12 +- .../randomsamatch/statements.json | 288 ++++++++--------- .../attempt_submitted/shortanswer/data.json | 64 ++-- .../attempt_submitted/shortanswer/event.json | 12 +- .../shortanswer/statements.json | 230 +++++++------- .../attempt_submitted/truefalse/data.json | 80 ++--- .../attempt_submitted/truefalse/event.json | 12 +- .../truefalse/statements.json | 242 +++++++------- .../attempt_submitted/unknown_qtype/data.json | 64 ++-- .../unknown_qtype/event.json | 12 +- .../unknown_qtype/statements.json | 116 +++---- .../attempt_viewed/existing_module/data.json | 14 +- .../attempt_viewed/existing_module/event.json | 10 +- .../existing_module/statements.json | 94 +++--- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../question_manually_graded/data.json | 52 +-- .../question_manually_graded/event.json | 14 +- .../question_manually_graded/statements.json | 134 ++++---- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../existing_sco_launched/event.json | 10 +- .../existing_sco_launched/statements.json | 94 +++--- .../existing_scoreraw_submitted/data.json | 24 +- .../existing_scoreraw_submitted/event.json | 10 +- .../statements.json | 108 +++---- .../existing_status_submitted/data.json | 8 +- .../existing_status_submitted/event.json | 10 +- .../existing_status_submitted/statements.json | 94 +++--- .../existing_module/data.json | 4 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 90 +++--- tests/mod_survey/report_viewed/data.json | 4 +- tests/mod_survey/report_viewed/event.json | 11 +- .../mod_survey/report_viewed/statements.json | 100 +++--- tests/mod_survey/response_submitted/data.json | 4 +- .../mod_survey/response_submitted/event.json | 11 +- .../response_submitted/statements.json | 90 +++--- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- tests/mod_wiki/comment_created/data.json | 24 +- tests/mod_wiki/comment_created/event.json | 10 +- .../mod_wiki/comment_created/statements.json | 114 +++---- tests/mod_wiki/comment_deleted/data.json | 16 +- tests/mod_wiki/comment_deleted/event.json | 10 +- .../mod_wiki/comment_deleted/statements.json | 116 +++---- tests/mod_wiki/comments_viewed/data.json | 24 +- tests/mod_wiki/comments_viewed/event.json | 10 +- .../mod_wiki/comments_viewed/statements.json | 108 +++---- .../existing_module/data.json | 4 +- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 90 +++--- tests/mod_wiki/page_viewed/data.json | 16 +- tests/mod_wiki/page_viewed/event.json | 10 +- tests/mod_wiki/page_viewed/statements.json | 104 +++--- .../existing_module/event.json | 8 +- .../existing_module/statements.json | 84 ++--- .../certificate_issued/data.json | 22 +- .../certificate_issued/event.json | 14 +- .../certificate_issued/statements.json | 66 ++-- .../certificate_revoked/data.json | 8 +- .../certificate_revoked/event.json | 14 +- .../certificate_revoked/statements.json | 66 ++-- .../certificate_verified/data.json | 22 +- .../certificate_verified/event.json | 14 +- .../certificate_verified/statements.json | 52 +-- tests/tool_usertours/tour_ended/event.json | 10 +- .../tool_usertours/tour_ended/statements.json | 52 +-- .../existing_program/data.json | 4 +- .../existing_program/event.json | 8 +- .../existing_program/statements.json | 64 ++-- 497 files changed, 11297 insertions(+), 11339 deletions(-) diff --git a/tests/common/data.json b/tests/common/data.json index 6c699ece8..29b955bfd 100644 --- a/tests/common/data.json +++ b/tests/common/data.json @@ -1,37 +1,37 @@ { - "user": [ - { - "id": 1, - "firstname": "test_fullname", - "email": "test@test.com" - } - ], "course": [ { - "id": 1, "fullname": "test_site_fullname", + "id": 1, "lang": "en" }, { - "id": 2, "fullname": "test_name", + "id": 2, "lang": "en" } ], - "course_sections": [ + "course_modules": [ { + "course": 2, "id": 1, + "instance": 1, + "module": 1, + "section": 1 + } + ], + "course_sections": [ + { "course": 2, + "id": 1, "section": 0 } ], - "course_modules": [ + "user": [ { - "id": 1, - "course": 2, - "module": 1, - "instance": 1, - "section": 1 + "email": "test@test.com", + "firstname": "test_fullname", + "id": 1 } ] } diff --git a/tests/common/statement.json b/tests/common/statement.json index a90151b3e..dbfa0db7c 100644 --- a/tests/common/statement.json +++ b/tests/common/statement.json @@ -1,8 +1,8 @@ { - "timestamp": "2015-06-10T14:31:41.000Z", "context": { "language": "en", "platform": "Moodle", "registration": "58028332-2277-5b51-a632-7836992917ea" - } + }, + "timestamp": "2015-06-10T14:31:41.000Z" } diff --git a/tests/core/badge_awarded/user_achieved_badge/data.json b/tests/core/badge_awarded/user_achieved_badge/data.json index 407eee357..aec542a0b 100644 --- a/tests/core/badge_awarded/user_achieved_badge/data.json +++ b/tests/core/badge_awarded/user_achieved_badge/data.json @@ -1,43 +1,48 @@ { - "user": [ + "badge": [ { + "courseid": 2, + "description": "test badge description", "id": 1, - "firstname": "test_recipient_firstname", - "lastname": "test_recipient_lastname", - "email": "recipient@test.com", - "username": "recipient" - }, + "message": "you got the test badge!", + "name": "test_badgename", + "type": 2, + "version": "1.0" + } + ], + "badge_manual_award": [ { "id": 2, - "firstname": "test_awarder_firstname", - "lastname": "test_awarder_lastname", - "email": "awarder@test.com", - "username": "awarder" + "issuerid": 2 } ], "course": [ { + "fullname": "test_site_fullname", "id": 1, - "fullname": "test_course_name", + "lang": "en" + }, + { + "fullname": "test_name", + "id": 2, "lang": "en", - "summary": "test_course_summary" + "summary": "test_summary" } ], - "badge": [ + "user": [ { + "email": "recipient@test.com", + "firstname": "test_recipient_firstname", "id": 1, - "name": "test_badgename", - "description": "test badge description", - "type": 2, - "courseid": 1, - "version": "1.0", - "message": "you got the test badge!" - } - ], - "badge_manual_award": [ + "lastname": "test_recipient_lastname", + "username": "recipient" + }, { + "email": "awarder@test.com", + "firstname": "test_awarder_firstname", "id": 2, - "issuerid": 2 + "lastname": "test_awarder_lastname", + "username": "awarder" } ] } diff --git a/tests/core/badge_awarded/user_achieved_badge/event.json b/tests/core/badge_awarded/user_achieved_badge/event.json index 17cd4b02f..aa852e57f 100644 --- a/tests/core/badge_awarded/user_achieved_badge/event.json +++ b/tests/core/badge_awarded/user_achieved_badge/event.json @@ -1,10 +1,10 @@ { - "id": 1, + "courseid": 2, "eventname": "\\core\\event\\badge_awarded", - "timecreated": 1433946701, - "relateduserid": 1, - "courseid": 1, + "id": 1, "objectid": 1, + "objecttable": "badge", "other": "a:1:{s:13:\"badgeissuedid\";i:2;}", - "objecttable": "badge" + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/core/badge_awarded/user_achieved_badge/statements.json b/tests/core/badge_awarded/user_achieved_badge/statements.json index b3e8cd070..239731607 100644 --- a/tests/core/badge_awarded/user_achieved_badge/statements.json +++ b/tests/core/badge_awarded/user_achieved_badge/statements.json @@ -1,85 +1,85 @@ [ { "actor": { - "name": "test_recipient_firstname test_recipient_lastname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/achieved", - "display": { - "en": "Achieved" - } - }, - "object": { - "id": "http://www.example.org/badges/overview.php?id=1", - "definition": { - "name": { - "en": "test_badgename" - }, - "description": { - "en": "test badge description" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge", - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Course", - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" - } }, - "objectType": "Activity" - }, - "result": { - "response": "you got the test badge!" + "name": "test_recipient_firstname test_recipient_lastname" }, "context": { - "language": "en", - "instructor": { - "name": "test_awarder_firstname test_awarder_lastname", - "account": { - "homePage": "http://www.example.org", - "name": "2" - } - }, "contextActivities": { "category": [ { - "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { - "en": "EDLM Moodle LMS" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "id": "http://www.example.org", + "objectType": "Activity" } ], "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", - "objectType": "Activity", "definition": { - "name": { - "en": "test_course_name" - }, "description": { - "en": "test_course_summary" + "en": "test_summary" + }, + "name": { + "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" - } + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" } ] }, "extensions": { - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/context-extensions/badge-assignment-method": "Manual", "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_function": "\\src\\transformer\\events\\core\\badge_awarded", "event_name": "\\core\\event\\badge_awarded", - "event_function": "\\src\\transformer\\events\\core\\badge_awarded" - } - } + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/context-extensions/badge-assignment-method": "Manual" + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "test_awarder_firstname test_awarder_lastname" + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test badge description" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Course", + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" + }, + "name": { + "en": "test_badgename" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" + }, + "id": "http://www.example.org/badges/overview.php?id=1", + "objectType": "Activity" + }, + "result": { + "response": "you got the test badge!" + }, + "verb": { + "display": { + "en": "Achieved" + }, + "id": "https://w3id.org/xapi/tla/verbs/achieved" } } ] diff --git a/tests/core/badge_revoked/user_forfeited_badge/data.json b/tests/core/badge_revoked/user_forfeited_badge/data.json index fffa9fc53..18fd0b7de 100644 --- a/tests/core/badge_revoked/user_forfeited_badge/data.json +++ b/tests/core/badge_revoked/user_forfeited_badge/data.json @@ -1,29 +1,29 @@ { - "user": [ + "badge": [ { + "courseid": null, + "description": "test badge description", "id": 1, + "message": "you got the test badge!", + "name": "test_badgename", + "type": 1, + "version": "1.0" + } + ], + "user": [ + { + "email": "revoker@test.com", "firstname": "test_revoker_firstname", + "id": 1, "lastname": "test_revoker_lastname", - "email": "revoker@test.com", "username": "revoker" }, { - "id": 2, + "email": "recipient@test.com", "firstname": "test_recipient_firstname", + "id": 2, "lastname": "test_recipient_lastname", - "email": "recipient@test.com", "username": "recipient" } - ], - "badge": [ - { - "id": 1, - "name": "test_badgename", - "description": "test badge description", - "type": 1, - "courseid": null, - "version": "1.0", - "message": "you got the test badge!" - } ] } diff --git a/tests/core/badge_revoked/user_forfeited_badge/event.json b/tests/core/badge_revoked/user_forfeited_badge/event.json index 714afdab0..33a0c4672 100644 --- a/tests/core/badge_revoked/user_forfeited_badge/event.json +++ b/tests/core/badge_revoked/user_forfeited_badge/event.json @@ -1,9 +1,9 @@ { - "id": 1, "eventname": "\\core\\event\\badge_revoked", + "id": 1, + "objectid": 1, + "objecttable": "badge", "relateduserid": 2, "timecreated": 1433946701, - "objectid": 1, - "userid": 1, - "objecttable": "badge" + "userid": 1 } diff --git a/tests/core/badge_revoked/user_forfeited_badge/statements.json b/tests/core/badge_revoked/user_forfeited_badge/statements.json index 84c03df3e..1b8fe2ad0 100644 --- a/tests/core/badge_revoked/user_forfeited_badge/statements.json +++ b/tests/core/badge_revoked/user_forfeited_badge/statements.json @@ -1,67 +1,67 @@ [ { "actor": { - "name": "test_recipient_firstname test_recipient_lastname", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/forfeited", - "display": { - "en": "Forfeited" - } - }, - "object": { - "id": "http://www.example.org/badges/overview.php?id=1", - "definition": { - "name": { - "en": "test_badgename" - }, - "description": { - "en": "test badge description" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge", - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Global", - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" - } }, - "objectType": "Activity" + "name": "test_recipient_firstname test_recipient_lastname" }, "context": { - "language": "en", - "instructor": { - "name": "test_revoker_firstname test_revoker_lastname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, "contextActivities": { "category": [ { - "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { - "en": "EDLM Moodle LMS" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "id": "http://www.example.org", + "objectType": "Activity" } ] }, "extensions": { - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/context-extensions/badge-assignment-method": "Manual", "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_function": "\\src\\transformer\\events\\core\\badge_revoked", "event_name": "\\core\\event\\badge_revoked", - "event_function": "\\src\\transformer\\events\\core\\badge_revoked" - } - } + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/context-extensions/badge-assignment-method": "Manual" + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_revoker_firstname test_revoker_lastname" + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test badge description" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Global", + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" + }, + "name": { + "en": "test_badgename" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" + }, + "id": "http://www.example.org/badges/overview.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Forfeited" + }, + "id": "https://w3id.org/xapi/tla/verbs/forfeited" } } ] diff --git a/tests/core/badge_updated/data.json b/tests/core/badge_updated/data.json index cb48874a4..5c771013e 100644 --- a/tests/core/badge_updated/data.json +++ b/tests/core/badge_updated/data.json @@ -1,13 +1,13 @@ { "badge": [ { + "courseid": 2, + "description": "test badge description", "id": 1, + "message": "you got the test badge!", "name": "test_badgename", - "description": "test badge description", "type": 2, - "courseid": 1, - "version": "1.0", - "message": "you got the test badge!" + "version": "1.0" } ], "badge_manual_award": [ diff --git a/tests/core/badge_updated/event.json b/tests/core/badge_updated/event.json index e68948989..4497ad698 100644 --- a/tests/core/badge_updated/event.json +++ b/tests/core/badge_updated/event.json @@ -1,10 +1,10 @@ { - "id": 1, + "courseid": 2, "eventname": "\\core\\event\\badge_updated", - "timecreated": 1433946701, - "relateduserid": 1, - "courseid": 1, - "userid": 1, + "id": 1, "objectid": 1, - "objecttable": "badge" + "objecttable": "badge", + "relateduserid": 1, + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/core/badge_updated/statements.json b/tests/core/badge_updated/statements.json index b741ca9aa..d76928667 100644 --- a/tests/core/badge_updated/statements.json +++ b/tests/core/badge_updated/statements.json @@ -1,71 +1,71 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://w3id.org/xapi/acrossx/verbs/edited", - "display": { - "en": "Edited" - } - }, - "object": { - "id": "http://www.example.org/badges/overview.php?id=1", - "definition": { - "name": { - "en": "test_badgename" - }, - "description": { - "en": "test badge description" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge", - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Course", - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "context": { - "language": "en", "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] }, "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_function": "\\src\\transformer\\events\\core\\badge_updated", "event_name": "\\core\\event\\badge_updated", - "event_function": "\\src\\transformer\\events\\core\\badge_updated" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } - } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test badge description" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Course", + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" + }, + "name": { + "en": "test_badgename" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" + }, + "id": "http://www.example.org/badges/overview.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Edited" + }, + "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/core/badge_viewed/user_viewed_badge/data.json b/tests/core/badge_viewed/user_viewed_badge/data.json index 7d9b39f28..72b214fd1 100644 --- a/tests/core/badge_viewed/user_viewed_badge/data.json +++ b/tests/core/badge_viewed/user_viewed_badge/data.json @@ -1,11 +1,11 @@ { "badge": [ { + "description": "badge description", "id": 1, "name": "testbadge", - "description": "badge description", - "version": "1.0", - "type": 1 + "type": 1, + "version": "1.0" } ] } diff --git a/tests/core/badge_viewed/user_viewed_badge/event.json b/tests/core/badge_viewed/user_viewed_badge/event.json index fc06cb26e..d1f541071 100644 --- a/tests/core/badge_viewed/user_viewed_badge/event.json +++ b/tests/core/badge_viewed/user_viewed_badge/event.json @@ -1,9 +1,9 @@ { - "courseid" : 1, - "eventname" : "\\core\\event\\badge_viewed", - "id" : 1, - "objectid" : 1, - "objecttable" : "badge", - "timecreated" : 1433946701, - "userid" : 1 + "courseid": 2, + "eventname": "\\core\\event\\badge_viewed", + "id": 1, + "objectid": 1, + "objecttable": "badge", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/core/badge_viewed/user_viewed_badge/statements.json b/tests/core/badge_viewed/user_viewed_badge/statements.json index 2f2e50c42..13934fdf1 100644 --- a/tests/core/badge_viewed/user_viewed_badge/statements.json +++ b/tests/core/badge_viewed/user_viewed_badge/statements.json @@ -7,41 +7,18 @@ }, "name": "test_fullname" }, - "verb": { - "id": "http://id.tincanapi.com/verb/viewed", - "display": { - "en": "Viewed" - } - }, - "object": { - "id": "http://www.example.org/badges/overview.php?id=1", - "definition": { - "name": { - "en": "testbadge" - }, - "description": { - "en": "badge description" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge", - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Global", - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" - } - }, - "objectType": "Activity" - }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "id": "http://www.example.org", - "objectType": "Activity" + } } ], "parent": [ @@ -52,7 +29,7 @@ }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -66,6 +43,29 @@ } }, "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "badge description" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Global", + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" + }, + "name": { + "en": "testbadge" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" + }, + "id": "http://www.example.org/badges/overview.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/core/calendar_event_created/user_created_calendar_event/data.json b/tests/core/calendar_event_created/user_created_calendar_event/data.json index a56463a3a..bbdae1c88 100644 --- a/tests/core/calendar_event_created/user_created_calendar_event/data.json +++ b/tests/core/calendar_event_created/user_created_calendar_event/data.json @@ -1,10 +1,15 @@ { "course": [ { - "fullname": "test_course_name", + "fullname": "test_site_fullname", "id": 1, + "lang": "en" + }, + { + "fullname": "test_name", + "id": 2, "lang": "en", - "summary": "test_course_summary" + "summary": "test_summary" } ], "event": [ diff --git a/tests/core/calendar_event_created/user_created_calendar_event/event.json b/tests/core/calendar_event_created/user_created_calendar_event/event.json index 6316e8a5d..bc7b3b6d4 100644 --- a/tests/core/calendar_event_created/user_created_calendar_event/event.json +++ b/tests/core/calendar_event_created/user_created_calendar_event/event.json @@ -1,5 +1,5 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\calendar_event_created", "id": 1, "objectid": 1, diff --git a/tests/core/calendar_event_created/user_created_calendar_event/statements.json b/tests/core/calendar_event_created/user_created_calendar_event/statements.json index 55ea4cf24..04ba9833e 100644 --- a/tests/core/calendar_event_created/user_created_calendar_event/statements.json +++ b/tests/core/calendar_event_created/user_created_calendar_event/statements.json @@ -13,7 +13,7 @@ { "definition": { "name": { - "en": "test_course_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" }, @@ -25,11 +25,11 @@ { "definition": { "name": { - "en": "test_course_name" + "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] diff --git a/tests/core/calendar_event_deleted/user_deleted_calendar_event/data.json b/tests/core/calendar_event_deleted/user_deleted_calendar_event/data.json index e3e8d3fdc..587e91f23 100644 --- a/tests/core/calendar_event_deleted/user_deleted_calendar_event/data.json +++ b/tests/core/calendar_event_deleted/user_deleted_calendar_event/data.json @@ -1,10 +1,15 @@ { "course": [ { - "fullname": "test_course_name", + "fullname": "test_site_fullname", "id": 1, + "lang": "en" + }, + { + "fullname": "test_name", + "id": 2, "lang": "en", - "summary": "test_course_summary" + "summary": "test_summary" } ], "event": [], diff --git a/tests/core/calendar_event_deleted/user_deleted_calendar_event/event.json b/tests/core/calendar_event_deleted/user_deleted_calendar_event/event.json index 4779cb711..781831fc6 100644 --- a/tests/core/calendar_event_deleted/user_deleted_calendar_event/event.json +++ b/tests/core/calendar_event_deleted/user_deleted_calendar_event/event.json @@ -1,5 +1,5 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\calendar_event_deleted", "id": 1, "objectid": 1, diff --git a/tests/core/calendar_event_deleted/user_deleted_calendar_event/statements.json b/tests/core/calendar_event_deleted/user_deleted_calendar_event/statements.json index a6be183fa..6867d1399 100644 --- a/tests/core/calendar_event_deleted/user_deleted_calendar_event/statements.json +++ b/tests/core/calendar_event_deleted/user_deleted_calendar_event/statements.json @@ -13,7 +13,7 @@ { "definition": { "name": { - "en": "test_course_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" }, @@ -25,11 +25,11 @@ { "definition": { "name": { - "en": "test_course_name" + "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] diff --git a/tests/core/calendar_event_updated/user_updated_calendar_event/data.json b/tests/core/calendar_event_updated/user_updated_calendar_event/data.json index b3b356dfa..b48fa05be 100644 --- a/tests/core/calendar_event_updated/user_updated_calendar_event/data.json +++ b/tests/core/calendar_event_updated/user_updated_calendar_event/data.json @@ -1,10 +1,15 @@ { "course": [ { - "fullname": "test_course_name", + "fullname": "test_site_fullname", "id": 1, + "lang": "en" + }, + { + "fullname": "test_name", + "id": 2, "lang": "en", - "summary": "test_course_summary" + "summary": "test_summary" } ], "event": [ diff --git a/tests/core/calendar_event_updated/user_updated_calendar_event/event.json b/tests/core/calendar_event_updated/user_updated_calendar_event/event.json index d11edd5f8..b4196a555 100644 --- a/tests/core/calendar_event_updated/user_updated_calendar_event/event.json +++ b/tests/core/calendar_event_updated/user_updated_calendar_event/event.json @@ -1,5 +1,5 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\calendar_event_updated", "id": 1, "objectid": 1, diff --git a/tests/core/calendar_event_updated/user_updated_calendar_event/statements.json b/tests/core/calendar_event_updated/user_updated_calendar_event/statements.json index ab1621b42..7e514082a 100644 --- a/tests/core/calendar_event_updated/user_updated_calendar_event/statements.json +++ b/tests/core/calendar_event_updated/user_updated_calendar_event/statements.json @@ -13,7 +13,7 @@ { "definition": { "name": { - "en": "test_course_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" }, @@ -25,11 +25,11 @@ { "definition": { "name": { - "en": "test_course_name" + "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] diff --git a/tests/core/calendar_subscription_created/user_created_calendar_subscription/event.json b/tests/core/calendar_subscription_created/user_created_calendar_subscription/event.json index 23000b72f..362d91129 100644 --- a/tests/core/calendar_subscription_created/user_created_calendar_subscription/event.json +++ b/tests/core/calendar_subscription_created/user_created_calendar_subscription/event.json @@ -1,9 +1,9 @@ { - "courseid" : 1, - "eventname" : "\\core\\event\\calendar_subscription_created", - "id" : 1, - "objectid" : 1, - "objecttable" : "event_subscriptions", - "timecreated" : 1433946701, - "userid" : 1 + "courseid": 2, + "eventname": "\\core\\event\\calendar_subscription_created", + "id": 1, + "objectid": 1, + "objecttable": "event_subscriptions", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/core/calendar_subscription_created/user_created_calendar_subscription/statements.json b/tests/core/calendar_subscription_created/user_created_calendar_subscription/statements.json index ea5b92c84..ce7fef6ef 100644 --- a/tests/core/calendar_subscription_created/user_created_calendar_subscription/statements.json +++ b/tests/core/calendar_subscription_created/user_created_calendar_subscription/statements.json @@ -7,46 +7,29 @@ }, "name": "test_fullname" }, - "verb": { - "id": "http://activitystrea.ms/create", - "display": { - "en": "Created" - } - }, - "object": { - "id": "http://www.example.org/calendar/subscription?id=1", - "definition": { - "name": { - "en": "example calendar subscription" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" - }, - "objectType": "Activity" - }, "context": { - "language": "en", "contextActivities": { - "other": [ + "category": [ { - "id": "http://example-cal.com/HASH", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar", "name": { - "en": "Web Calendar" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "other": [ { "definition": { "name": { - "en": "test_name" + "en": "Web Calendar" }, - "type": "http://id.tincanapi.com/activitytype/lms" + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar" }, - "id": "http://www.example.org", + "id": "http://example-cal.com/HASH", "objectType": "Activity" } ], @@ -58,7 +41,7 @@ }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -70,7 +53,24 @@ "http://moodle.org": "1.0.0", "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } - } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "example calendar subscription" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" + }, + "id": "http://www.example.org/calendar/subscription?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/event.json b/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/event.json index 9dc49a330..74c73ec88 100644 --- a/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/event.json +++ b/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/event.json @@ -1,10 +1,10 @@ { - "courseid": 1, + "action": "deleted", + "courseid": 2, "eventname": "\\core\\event\\calendar_subscription_deleted", "id": 1, "objectid": 1, "objecttable": "event_subscriptions", "timecreated": 1433946701, - "userid": 1, - "action": "deleted" + "userid": 1 } diff --git a/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/statements.json b/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/statements.json index d32a92da3..106796afe 100644 --- a/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/statements.json +++ b/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/statements.json @@ -7,31 +7,18 @@ }, "name": "test_fullname" }, - "verb": { - "id": "http://activitystrea.ms/delete", - "display": { - "en": "Deleted" - } - }, - "object": { - "id": "http://www.example.org/calendar/subscription?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" - }, - "objectType": "Activity" - }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "id": "http://www.example.org", - "objectType": "Activity" + } } ], "parent": [ @@ -42,7 +29,7 @@ }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -56,6 +43,19 @@ } }, "language": "en" + }, + "object": { + "definition": { + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" + }, + "id": "http://www.example.org/calendar/subscription?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Deleted" + }, + "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/event.json b/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/event.json index d7a27f495..508fd467d 100644 --- a/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/event.json +++ b/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/event.json @@ -1,9 +1,9 @@ { - "courseid" : 1, - "eventname" : "\\core\\event\\calendar_subscription_updated", - "id" : 1, - "objectid" : 1, - "objecttable" : "event_subscriptions", - "timecreated" : 1433946701, - "userid" : 1 + "courseid": 2, + "eventname": "\\core\\event\\calendar_subscription_updated", + "id": 1, + "objectid": 1, + "objecttable": "event_subscriptions", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/statements.json b/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/statements.json index 0f9768705..d36983d85 100644 --- a/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/statements.json +++ b/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/statements.json @@ -7,45 +7,29 @@ }, "name": "test_fullname" }, - "verb": { - "id": "https://w3id.org/xapi/acrossx/verbs/edited", - "display": { - "en": "Edited" - } - }, - "object": { - "id": "http://www.example.org/calendar/subscription?id=1", - "definition": { - "name": { - "en": "example calendar subscription" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" - }, - "objectType": "Activity" - }, "context": { "contextActivities": { - "other": [ + "category": [ { - "id": "http://example-cal.com/HASH", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar", "name": { - "en": "Web Calendar" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "other": [ { "definition": { "name": { - "en": "test_name" + "en": "Web Calendar" }, - "type": "http://id.tincanapi.com/activitytype/lms" + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar" }, - "id": "http://www.example.org", + "id": "http://example-cal.com/HASH", "objectType": "Activity" } ], @@ -57,7 +41,7 @@ }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -71,6 +55,22 @@ } }, "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "example calendar subscription" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" + }, + "id": "http://www.example.org/calendar/subscription?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Edited" + }, + "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/core/course_category_created/data.json b/tests/core/course_category_created/data.json index ede262d75..9aa4e7764 100644 --- a/tests/core/course_category_created/data.json +++ b/tests/core/course_category_created/data.json @@ -1,29 +1,22 @@ { - "course": [ - { - "id": 1, - "fullname": "test_name", - "lang": "en" - } - ], - "user": [ - { - "id": 1, - "firstname": "test_fullname", - "email": "test@test.com" - } - ], "course_categories": [ { + "description": "Default Moodle Course Category", "id": 2, - "name": "Base Category", - "description": "Default Moodle Course Category" + "name": "Base Category" }, { + "description": "Moodle Course Sub-Category", "id": 3, - "parent": 2, "name": "Sub Category", - "description": "Moodle Course Sub-Category" + "parent": 2 + } + ], + "user": [ + { + "email": "test@test.com", + "firstname": "test_fullname", + "id": 1 } ] } diff --git a/tests/core/course_category_created/event.json b/tests/core/course_category_created/event.json index 930237626..d9625e3c9 100644 --- a/tests/core/course_category_created/event.json +++ b/tests/core/course_category_created/event.json @@ -1,8 +1,8 @@ { + "eventname": "\\core\\event\\course_category_created", "id": 1, + "objectid": 3, "objecttable": "course_categories", "timecreated": 1433946701, - "objectid": 3, - "eventname": "\\core\\event\\course_category_created", "userid": 1 } diff --git a/tests/core/course_category_created/statements.json b/tests/core/course_category_created/statements.json index f102a7b3a..bc513ad73 100644 --- a/tests/core/course_category_created/statements.json +++ b/tests/core/course_category_created/statements.json @@ -7,63 +7,63 @@ }, "name": "test_fullname" }, - "verb": { - "id": "http://activitystrea.ms/create", - "display": { - "en": "Created" - } - }, - "object": { - "id": "http://www.example.org/course/management.php?categoryid=3", - "objectType": "Activity", - "definition": { - "name": { - "en": "Sub Category" - }, - "description": { - "en": "Moodle Course Sub-Category" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-category" - } - }, "context": { "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/management.php?categoryid=2", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "Base Category" - }, - "description": { - "en": "Default Moodle Course Category" + "en": "test_site_fullname" }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-category" + "type": "http://id.tincanapi.com/activitytype/lms" } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", + "description": { + "en": "Default Moodle Course Category" + }, "name": { - "en": "test_name" - } + "en": "Base Category" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-category" }, + "id": "http://www.example.org/course/management.php?categoryid=2", "objectType": "Activity" } ] }, "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_function": "\\src\\transformer\\events\\core\\course_category_created", "event_name": "\\core\\event\\course_category_created", - "event_function": "\\src\\transformer\\events\\core\\course_category_created" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } + }, + "object": { + "definition": { + "description": { + "en": "Moodle Course Sub-Category" + }, + "name": { + "en": "Sub Category" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-category" + }, + "id": "http://www.example.org/course/management.php?categoryid=3", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/course_completed/completing_existing_course/data.json b/tests/core/course_completed/completing_existing_course/data.json index 614658e31..4e1f072a1 100644 --- a/tests/core/course_completed/completing_existing_course/data.json +++ b/tests/core/course_completed/completing_existing_course/data.json @@ -1,16 +1,9 @@ { "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname", - "email": "test@test.com" - } - ], - "course": [ - { - "id": 1, - "fullname": "test_name", - "lang": "en" + "id": 1 } ] } diff --git a/tests/core/course_completed/completing_existing_course/event.json b/tests/core/course_completed/completing_existing_course/event.json index e41fb4258..743ecb553 100644 --- a/tests/core/course_completed/completing_existing_course/event.json +++ b/tests/core/course_completed/completing_existing_course/event.json @@ -1,9 +1,9 @@ { + "courseid": 2, + "eventname": "\\core\\event\\course_completed", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, + "objectid": 2, "objecttable": "course", - "objectid": 1, - "eventname": "\\core\\event\\course_completed" + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/core/course_completed/completing_existing_course/statements.json b/tests/core/course_completed/completing_existing_course/statements.json index 5ec6a8376..a809823bb 100644 --- a/tests/core/course_completed/completing_existing_course/statements.json +++ b/tests/core/course_completed/completing_existing_course/statements.json @@ -1,52 +1,52 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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": "\\core\\event\\course_completed", - "event_function": "\\src\\transformer\\events\\core\\course_completed" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\course_completed", + "event_name": "\\core\\event\\course_completed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Completed" + }, + "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/core/course_completed/send_jisc_data/data.json b/tests/core/course_completed/send_jisc_data/data.json index b3719b756..f7cb90a10 100644 --- a/tests/core/course_completed/send_jisc_data/data.json +++ b/tests/core/course_completed/send_jisc_data/data.json @@ -1,17 +1,22 @@ { - "user": [ - { - "id": 1, - "firstname": "test_fullname", - "email": "test@test.com" - } - ], "course": [ { + "fullname": "test_site_fullname", "id": 1, + "lang": "en" + }, + { "fullname": "test_name", + "id": 2, "lang": "en", "shortname": "test_course_short_name" } + ], + "user": [ + { + "email": "test@test.com", + "firstname": "test_fullname", + "id": 1 + } ] } diff --git a/tests/core/course_completed/send_jisc_data/event.json b/tests/core/course_completed/send_jisc_data/event.json index f8682bf19..f5dd5e3c1 100644 --- a/tests/core/course_completed/send_jisc_data/event.json +++ b/tests/core/course_completed/send_jisc_data/event.json @@ -1,10 +1,10 @@ { + "courseid": 2, + "eventname": "\\core\\event\\course_completed", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, + "ip": "127.0.0.1", + "objectid": 2, "objecttable": "course", - "objectid": 1, - "eventname": "\\core\\event\\course_completed", - "ip": "127.0.0.1" + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/core/course_completed/send_jisc_data/statements.json b/tests/core/course_completed/send_jisc_data/statements.json index b21a41572..ccae20e5e 100644 --- a/tests/core/course_completed/send_jisc_data/statements.json +++ b/tests/core/course_completed/send_jisc_data/statements.json @@ -1,58 +1,58 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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": "\\core\\event\\course_completed", - "event_function": "\\src\\transformer\\events\\core\\course_completed" - }, - "http://xapi.jisc.ac.uk/sessionId": "test_session_id", - "http://id.tincanapi.com/extension/ip-address": "127.0.0.1", - "http://xapi.jisc.ac.uk/statementCat": "VLE", - "http://xapi.jisc.ac.uk/courseArea": { - "http://xapi.jisc.ac.uk/vle_mod_id": "test_course_short_name" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] - } + }, + "extensions": { + "http://id.tincanapi.com/extension/ip-address": "127.0.0.1", + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\course_completed", + "event_name": "\\core\\event\\course_completed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "http://xapi.jisc.ac.uk/courseArea": { + "http://xapi.jisc.ac.uk/vle_mod_id": "test_course_short_name" + }, + "http://xapi.jisc.ac.uk/sessionId": "test_session_id", + "http://xapi.jisc.ac.uk/statementCat": "VLE" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Completed" + }, + "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/core/course_completion_updated/data.json b/tests/core/course_completion_updated/data.json index 11cebcfb4..4e1f072a1 100644 --- a/tests/core/course_completion_updated/data.json +++ b/tests/core/course_completion_updated/data.json @@ -1,16 +1,9 @@ { - "course": [ - { - "id": 1, - "fullname": "test_name", - "lang": "en" - } - ], "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname", - "email": "test@test.com" + "id": 1 } ] } diff --git a/tests/core/course_completion_updated/event.json b/tests/core/course_completion_updated/event.json index 85686ea46..dba69aec5 100644 --- a/tests/core/course_completion_updated/event.json +++ b/tests/core/course_completion_updated/event.json @@ -1,9 +1,9 @@ { + "courseid": 2, + "eventname": "\\core\\event\\course_completion_updated", "id": 1, + "objectid": null, "objecttable": null, "timecreated": 1433946701, - "objectid": null, - "eventname": "\\core\\event\\course_completion_updated", - "userid": 1, - "courseid": 1 + "userid": 1 } diff --git a/tests/core/course_completion_updated/statements.json b/tests/core/course_completion_updated/statements.json index a71f476b4..3152d28ca 100644 --- a/tests/core/course_completion_updated/statements.json +++ b/tests/core/course_completion_updated/statements.json @@ -7,57 +7,57 @@ }, "name": "test_fullname" }, - "verb": { - "id": "https://w3id.org/xapi/acrossx/verbs/edited", - "display": { - "en": "Edited" - } - }, - "object": { - "id": "http://www.example.org/course/completion.php?id=1", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-completion-criteria", - "name": { - "en": "test_name Completion Criteria" - } - } - }, "context": { - "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": "\\core\\event\\course_completion_updated", - "event_function": "\\src\\transformer\\events\\core\\course_completion_updated" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\course_completion_updated", + "event_name": "\\core\\event\\course_completion_updated", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } } + }, + "object": { + "definition": { + "name": { + "en": "test_name Completion Criteria" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-completion-criteria" + }, + "id": "http://www.example.org/course/completion.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Edited" + }, + "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/core/course_created/creating_new_course/data.json b/tests/core/course_created/creating_new_course/data.json index 11cebcfb4..4e1f072a1 100644 --- a/tests/core/course_created/creating_new_course/data.json +++ b/tests/core/course_created/creating_new_course/data.json @@ -1,16 +1,9 @@ { - "course": [ - { - "id": 1, - "fullname": "test_name", - "lang": "en" - } - ], "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname", - "email": "test@test.com" + "id": 1 } ] } diff --git a/tests/core/course_created/creating_new_course/event.json b/tests/core/course_created/creating_new_course/event.json index da06075a3..3760e2066 100644 --- a/tests/core/course_created/creating_new_course/event.json +++ b/tests/core/course_created/creating_new_course/event.json @@ -1,9 +1,9 @@ { + "courseid": 2, + "eventname": "\\core\\event\\course_created", "id": 1, + "objectid": 2, "objecttable": "course", "timecreated": 1433946701, - "objectid": 1, - "courseid": 1, - "eventname": "\\core\\event\\course_created", "userid": 1 } diff --git a/tests/core/course_created/creating_new_course/statements.json b/tests/core/course_created/creating_new_course/statements.json index 3fe22844d..b1e1a2f9f 100644 --- a/tests/core/course_created/creating_new_course/statements.json +++ b/tests/core/course_created/creating_new_course/statements.json @@ -7,45 +7,45 @@ }, "name": "test_fullname" }, - "verb": { - "id": "http://activitystrea.ms/create", - "display": { - "en": "Created" - } - }, - "object": { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] }, "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_function": "\\src\\transformer\\events\\core\\course_created", "event_name": "\\core\\event\\course_created", - "event_function": "\\src\\transformer\\events\\core\\course_created" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/course_module_completion_update/completing_existing_module/data.json b/tests/core/course_module_completion_update/completing_existing_module/data.json index 1183172e7..659a77ea2 100644 --- a/tests/core/course_module_completion_update/completing_existing_module/data.json +++ b/tests/core/course_module_completion_update/completing_existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "book": [ { "id": 1, - "name": "book" + "name": "test_book_name" } ], - "book": [ + "modules": [ { "id": 1, - "name": "test_book_name" + "name": "book" } ] } diff --git a/tests/core/course_module_completion_update/completing_existing_module/event.json b/tests/core/course_module_completion_update/completing_existing_module/event.json index 2be1bab43..7d55e1302 100644 --- a/tests/core/course_module_completion_update/completing_existing_module/event.json +++ b/tests/core/course_module_completion_update/completing_existing_module/event.json @@ -1,9 +1,9 @@ { - "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\core\\event\\course_module_completion_updated", - "other": "a:3:{s:13:\"relateduserid\";i:1;s:10:\"overrideby\";N;s:15:\"completionstate\";i:2;}" + "id": 1, + "other": "a:3:{s:13:\"relateduserid\";i:1;s:10:\"overrideby\";N;s:15:\"completionstate\";i:2;}", + "relateduserid": 1, + "timecreated": 1433946701 } 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 48ab87ebb..9b07b4e51 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 @@ -1,78 +1,78 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/book/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/book", - "name": { - "en": "test_book_name" - } }, - "objectType": "Activity" - }, - "result": { - "completion": true, - "success": true + "name": "test_fullname" }, "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": "\\core\\event\\course_module_completion_updated", - "event_function": "\\src\\transformer\\events\\core\\course_module_completion_updated" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\course_module_completion_updated", + "event_name": "\\core\\event\\course_module_completion_updated", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_book_name" + }, + "type": "http://id.tincanapi.com/activitytype/book" + }, + "id": "http://www.example.org/mod/book/view.php?id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "success": true + }, + "verb": { + "display": { + "en": "Completed" + }, + "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/core/course_module_completion_update/uncompleting_existing_module/data.json b/tests/core/course_module_completion_update/uncompleting_existing_module/data.json index 1183172e7..659a77ea2 100644 --- a/tests/core/course_module_completion_update/uncompleting_existing_module/data.json +++ b/tests/core/course_module_completion_update/uncompleting_existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "book": [ { "id": 1, - "name": "book" + "name": "test_book_name" } ], - "book": [ + "modules": [ { "id": 1, - "name": "test_book_name" + "name": "book" } ] } diff --git a/tests/core/course_module_completion_update/uncompleting_existing_module/event.json b/tests/core/course_module_completion_update/uncompleting_existing_module/event.json index 51e1af8b6..2ec9a9469 100644 --- a/tests/core/course_module_completion_update/uncompleting_existing_module/event.json +++ b/tests/core/course_module_completion_update/uncompleting_existing_module/event.json @@ -1,9 +1,9 @@ { - "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\core\\event\\course_module_completion_updated", - "other": "a:3:{s:13:\"relateduserid\";i:1;s:10:\"overrideby\";N;s:15:\"completionstate\";i:0;}" + "id": 1, + "other": "a:3:{s:13:\"relateduserid\";i:1;s:10:\"overrideby\";N;s:15:\"completionstate\";i:0;}", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/core/course_module_completion_update/uncompleting_existing_module/statements.json b/tests/core/course_module_completion_update/uncompleting_existing_module/statements.json index b5973a162..80aa7f84f 100644 --- a/tests/core/course_module_completion_update/uncompleting_existing_module/statements.json +++ b/tests/core/course_module_completion_update/uncompleting_existing_module/statements.json @@ -1,74 +1,74 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/uncompleted", - "display": { - "en": "Uncompleted" - } - }, - "object": { - "id": "http://www.example.org/mod/book/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/book", - "name": { - "en": "test_book_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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": "\\core\\event\\course_module_completion_updated", - "event_function": "\\src\\transformer\\events\\core\\course_module_completion_updated" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\course_module_completion_updated", + "event_name": "\\core\\event\\course_module_completion_updated", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_book_name" + }, + "type": "http://id.tincanapi.com/activitytype/book" + }, + "id": "http://www.example.org/mod/book/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Uncompleted" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/uncompleted" } } ] diff --git a/tests/core/course_module_created/creating_new_course_module/data.json b/tests/core/course_module_created/creating_new_course_module/data.json index 1183172e7..659a77ea2 100644 --- a/tests/core/course_module_created/creating_new_course_module/data.json +++ b/tests/core/course_module_created/creating_new_course_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "book": [ { "id": 1, - "name": "book" + "name": "test_book_name" } ], - "book": [ + "modules": [ { "id": 1, - "name": "test_book_name" + "name": "book" } ] } diff --git a/tests/core/course_module_created/creating_new_course_module/event.json b/tests/core/course_module_created/creating_new_course_module/event.json index 9be749c52..dce86210e 100644 --- a/tests/core/course_module_created/creating_new_course_module/event.json +++ b/tests/core/course_module_created/creating_new_course_module/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\core\\event\\course_module_created", "id": 1, + "objectid": 1, "objecttable": "course_modules", "timecreated": 1433946701, - "objectid": 1, - "courseid": 1, - "eventname": "\\core\\event\\course_module_created", - "userid": 1, - "contextinstanceid": 1 + "userid": 1 } diff --git a/tests/core/course_module_created/creating_new_course_module/statements.json b/tests/core/course_module_created/creating_new_course_module/statements.json index 1a1ac4e9c..2e32d0042 100644 --- a/tests/core/course_module_created/creating_new_course_module/statements.json +++ b/tests/core/course_module_created/creating_new_course_module/statements.json @@ -7,67 +7,67 @@ }, "name": "test_fullname" }, - "verb": { - "id": "http://activitystrea.ms/create", - "display": { - "en": "Created" - } - }, - "object": { - "id": "http://www.example.org/mod/book/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/book", - "name": { - "en": "test_book_name" - } - }, - "objectType": "Activity" - }, "context": { "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] }, "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_function": "\\src\\transformer\\events\\core\\course_module_created", "event_name": "\\core\\event\\course_module_created", - "event_function": "\\src\\transformer\\events\\core\\course_module_created" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } + }, + "object": { + "definition": { + "name": { + "en": "test_book_name" + }, + "type": "http://id.tincanapi.com/activitytype/book" + }, + "id": "http://www.example.org/mod/book/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/data.json b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/data.json index 614658e31..4e1f072a1 100644 --- a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/data.json +++ b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/data.json @@ -1,16 +1,9 @@ { "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname", - "email": "test@test.com" - } - ], - "course": [ - { - "id": 1, - "fullname": "test_name", - "lang": "en" + "id": 1 } ] } diff --git a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/event.json b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/event.json index 38bf55d64..89553a1b3 100644 --- a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/event.json +++ b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/event.json @@ -1,9 +1,9 @@ { + "courseid": 2, + "eventname": "\\core\\event\\course_resources_list_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": null, "objectid": null, - "eventname": "\\core\\event\\course_resources_list_viewed" + "objecttable": null, + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/statements.json b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/statements.json index 1413b08e1..5c1fca0b9 100644 --- a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/statements.json +++ b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/statements.json @@ -1,64 +1,64 @@ [ { "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/course/resources.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/acrossx/activities/webpage", - "name": { - "en": "test_name Resources" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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": "\\core\\event\\course_resources_list_viewed", - "event_function": "\\src\\transformer\\events\\core\\course_resources_list_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\course_resources_list_viewed", + "event_name": "\\core\\event\\course_resources_list_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Resources" + }, + "type": "https://w3id.org/xapi/acrossx/activities/webpage" + }, + "id": "http://www.example.org/course/resources.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/core/course_section_created/new_course_section_created/data.json b/tests/core/course_section_created/new_course_section_created/data.json index 06f647d74..74233d1fa 100644 --- a/tests/core/course_section_created/new_course_section_created/data.json +++ b/tests/core/course_section_created/new_course_section_created/data.json @@ -1,24 +1,24 @@ { "course": [ { - "id": 1, "fullname": "test_name", + "id": 1, "lang": "en" } ], - "user": [ + "course_sections": [ { + "course": 2, "id": 1, - "firstname": "test_fullname", - "email": "test@test.com" + "name": null, + "section": 5 } ], - "course_sections": [ + "user": [ { - "id": 1, - "course": 1, - "section": 5, - "name": null + "email": "test@test.com", + "firstname": "test_fullname", + "id": 1 } ] } diff --git a/tests/core/course_section_created/new_course_section_created/event.json b/tests/core/course_section_created/new_course_section_created/event.json index 1b6ca0523..cb6077a59 100644 --- a/tests/core/course_section_created/new_course_section_created/event.json +++ b/tests/core/course_section_created/new_course_section_created/event.json @@ -1,9 +1,9 @@ { + "courseid": 2, + "eventname": "\\core\\event\\course_section_created", "id": 1, + "objectid": 1, "objecttable": "course_sections", "timecreated": 1433946701, - "objectid": 1, - "eventname": "\\core\\event\\course_section_created", - "userid": 1, - "courseid": 1 + "userid": 1 } diff --git a/tests/core/course_section_created/new_course_section_created/statements.json b/tests/core/course_section_created/new_course_section_created/statements.json index 60e67cd8e..3ea9bcbf5 100644 --- a/tests/core/course_section_created/new_course_section_created/statements.json +++ b/tests/core/course_section_created/new_course_section_created/statements.json @@ -7,57 +7,57 @@ }, "name": "test_fullname" }, - "verb": { - "id": "http://activitystrea.ms/create", - "display": { - "en": "Created" - } - }, - "object": { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", - "definition": { - "name": { - "en": "test_name Section 5" - }, - "type": "http://id.tincanapi.com/activitytype/section" - } - }, "context": { "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] }, "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_function": "\\src\\transformer\\events\\core\\course_section_created", "event_name": "\\core\\event\\course_section_created", - "event_function": "\\src\\transformer\\events\\core\\course_section_created" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } + }, + "object": { + "definition": { + "name": { + "en": "test_name Section 5" + }, + "type": "http://id.tincanapi.com/activitytype/section" + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/course_updated/updating_existing_course/data.json b/tests/core/course_updated/updating_existing_course/data.json index 11cebcfb4..4e1f072a1 100644 --- a/tests/core/course_updated/updating_existing_course/data.json +++ b/tests/core/course_updated/updating_existing_course/data.json @@ -1,16 +1,9 @@ { - "course": [ - { - "id": 1, - "fullname": "test_name", - "lang": "en" - } - ], "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname", - "email": "test@test.com" + "id": 1 } ] } diff --git a/tests/core/course_updated/updating_existing_course/event.json b/tests/core/course_updated/updating_existing_course/event.json index d77ecfdd1..8a7f0c918 100644 --- a/tests/core/course_updated/updating_existing_course/event.json +++ b/tests/core/course_updated/updating_existing_course/event.json @@ -1,9 +1,9 @@ { + "courseid": 2, + "eventname": "\\core\\event\\course_updated", "id": 1, + "objectid": 2, "objecttable": "course", "timecreated": 1433946701, - "objectid": 1, - "courseid": 1, - "eventname": "\\core\\event\\course_updated", "userid": 1 } diff --git a/tests/core/course_updated/updating_existing_course/statements.json b/tests/core/course_updated/updating_existing_course/statements.json index 964e42b66..8eb03cbe3 100644 --- a/tests/core/course_updated/updating_existing_course/statements.json +++ b/tests/core/course_updated/updating_existing_course/statements.json @@ -7,45 +7,45 @@ }, "name": "test_fullname" }, - "verb": { - "id": "https://w3id.org/xapi/acrossx/verbs/edited", - "display": { - "en": "Edited" - } - }, - "object": { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] }, "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_function": "\\src\\transformer\\events\\core\\course_updated", "event_name": "\\core\\event\\course_updated", - "event_function": "\\src\\transformer\\events\\core\\course_updated" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Edited" + }, + "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/core/course_viewed/viewing_existing_course/data.json b/tests/core/course_viewed/viewing_existing_course/data.json index 614658e31..4e1f072a1 100644 --- a/tests/core/course_viewed/viewing_existing_course/data.json +++ b/tests/core/course_viewed/viewing_existing_course/data.json @@ -1,16 +1,9 @@ { "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname", - "email": "test@test.com" - } - ], - "course": [ - { - "id": 1, - "fullname": "test_name", - "lang": "en" + "id": 1 } ] } diff --git a/tests/core/course_viewed/viewing_existing_course/event.json b/tests/core/course_viewed/viewing_existing_course/event.json index 07290c53f..7e8831a99 100644 --- a/tests/core/course_viewed/viewing_existing_course/event.json +++ b/tests/core/course_viewed/viewing_existing_course/event.json @@ -1,9 +1,9 @@ { + "courseid": 2, + "eventname": "\\core\\event\\course_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, + "objectid": 2, "objecttable": "course", - "objectid": 1, - "eventname": "\\core\\event\\course_viewed" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/core/course_viewed/viewing_existing_course/statements.json b/tests/core/course_viewed/viewing_existing_course/statements.json index e2490c903..a26b87e8a 100644 --- a/tests/core/course_viewed/viewing_existing_course/statements.json +++ b/tests/core/course_viewed/viewing_existing_course/statements.json @@ -1,52 +1,52 @@ [ { "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/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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": "\\core\\event\\course_viewed", - "event_function": "\\src\\transformer\\events\\core\\course_viewed" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\course_viewed", + "event_name": "\\core\\event\\course_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/core/group_created/creating_new_group/event.json b/tests/core/group_created/creating_new_group/event.json index a10a75825..a6b5eee47 100644 --- a/tests/core/group_created/creating_new_group/event.json +++ b/tests/core/group_created/creating_new_group/event.json @@ -1,9 +1,9 @@ { + "courseid": 2, + "eventname": "\\core\\event\\group_created", "id": 1, + "objectid": 1, "objecttable": "groups", "timecreated": 1433946701, - "objectid": 1, - "courseid": 1, - "eventname": "\\core\\event\\group_created", "userid": 1 } diff --git a/tests/core/group_created/creating_new_group/statements.json b/tests/core/group_created/creating_new_group/statements.json index 8ad4c3133..a63ec3531 100644 --- a/tests/core/group_created/creating_new_group/statements.json +++ b/tests/core/group_created/creating_new_group/statements.json @@ -7,57 +7,57 @@ }, "name": "test_fullname" }, - "verb": { - "id": "http://activitystrea.ms/create", - "display": { - "en": "Created" - } - }, - "object": { - "id": "http://www.example.org/group/index.php?id=1", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group", - "name": { - "en": "test_name" - } - } - }, "context": { "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] }, "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_function": "\\src\\transformer\\events\\core\\group_created", "event_name": "\\core\\event\\group_created", - "event_function": "\\src\\transformer\\events\\core\\group_created" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" + }, + "id": "http://www.example.org/group/index.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/group_deleted/existing_group_deleted/event.json b/tests/core/group_deleted/existing_group_deleted/event.json index e1e7e3378..6b17ff298 100644 --- a/tests/core/group_deleted/existing_group_deleted/event.json +++ b/tests/core/group_deleted/existing_group_deleted/event.json @@ -1,5 +1,5 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\group_deleted", "id": 1, "objectid": 1, diff --git a/tests/core/group_deleted/existing_group_deleted/statements.json b/tests/core/group_deleted/existing_group_deleted/statements.json index dc95ee5ea..e1d3b6553 100644 --- a/tests/core/group_deleted/existing_group_deleted/statements.json +++ b/tests/core/group_deleted/existing_group_deleted/statements.json @@ -7,42 +7,29 @@ }, "name": "test_fullname" }, - "verb": { - "id": "http://activitystrea.ms/delete", - "display": { - "en": "Deleted" - } - }, - "object": { - "id": "http://www.example.org/group/index.php?id=1", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" - } - }, "context": { "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -55,6 +42,19 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } + }, + "object": { + "definition": { + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" + }, + "id": "http://www.example.org/group/index.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Deleted" + }, + "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/core/group_member_added/new_group_member_added/data.json b/tests/core/group_member_added/new_group_member_added/data.json index a58cca882..423f4a1c1 100644 --- a/tests/core/group_member_added/new_group_member_added/data.json +++ b/tests/core/group_member_added/new_group_member_added/data.json @@ -1,20 +1,20 @@ { - "user": [ + "groups": [ { "id": 1, + "name": "test_name" + } + ], + "user": [ + { + "email": "test1@test.com", "firstname": "test_fullname1", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "test_fullname2", - "email": "test2@test.com" - } - ], - "groups": [ - { - "id": 1, - "name": "test_name" + "id": 2 } ] } diff --git a/tests/core/group_member_added/new_group_member_added/event.json b/tests/core/group_member_added/new_group_member_added/event.json index b0d97e497..ae1926017 100644 --- a/tests/core/group_member_added/new_group_member_added/event.json +++ b/tests/core/group_member_added/new_group_member_added/event.json @@ -1,10 +1,10 @@ { + "courseid": 2, + "eventname": "\\core\\event\\group_member_added", "id": 1, + "objectid": 1, "objecttable": "groups", + "relateduserid": 2, "timecreated": 1433946701, - "objectid": 1, - "courseid": 1, - "eventname": "\\core\\event\\group_member_added", - "userid": 1, - "relateduserid": 2 + "userid": 1 } diff --git a/tests/core/group_member_added/new_group_member_added/statements.json b/tests/core/group_member_added/new_group_member_added/statements.json index 277e751bd..0400d310e 100644 --- a/tests/core/group_member_added/new_group_member_added/statements.json +++ b/tests/core/group_member_added/new_group_member_added/statements.json @@ -7,64 +7,64 @@ }, "name": "test_fullname2" }, - "verb": { - "id": "http://activitystrea.ms/join", - "display": { - "en": "Joined" - } - }, - "object": { - "id": "http://www.example.org/group/index.php?id=1", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group", - "name": { - "en": "test_name" - } - } - }, "context": { - "instructor": { - "account": { - "homePage": "http://www.example.org", - "name": "1" - }, - "name": "test_fullname1" - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] }, "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_function": "\\src\\transformer\\events\\core\\group_member_added", "event_name": "\\core\\event\\group_member_added", - "event_function": "\\src\\transformer\\events\\core\\group_member_added" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname1" } + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" + }, + "id": "http://www.example.org/group/index.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Joined" + }, + "id": "http://activitystrea.ms/join" } } ] diff --git a/tests/core/group_member_removed/existing_group_member_removed/data.json b/tests/core/group_member_removed/existing_group_member_removed/data.json index a58cca882..423f4a1c1 100644 --- a/tests/core/group_member_removed/existing_group_member_removed/data.json +++ b/tests/core/group_member_removed/existing_group_member_removed/data.json @@ -1,20 +1,20 @@ { - "user": [ + "groups": [ { "id": 1, + "name": "test_name" + } + ], + "user": [ + { + "email": "test1@test.com", "firstname": "test_fullname1", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "test_fullname2", - "email": "test2@test.com" - } - ], - "groups": [ - { - "id": 1, - "name": "test_name" + "id": 2 } ] } diff --git a/tests/core/group_member_removed/existing_group_member_removed/event.json b/tests/core/group_member_removed/existing_group_member_removed/event.json index 4ac35312c..c5b5595b3 100644 --- a/tests/core/group_member_removed/existing_group_member_removed/event.json +++ b/tests/core/group_member_removed/existing_group_member_removed/event.json @@ -1,10 +1,10 @@ { + "courseid": 2, + "eventname": "\\core\\event\\group_member_removed", "id": 1, + "objectid": 1, "objecttable": "groups", + "relateduserid": 2, "timecreated": 1433946701, - "objectid": 1, - "courseid": 1, - "eventname": "\\core\\event\\group_member_removed", - "userid": 1, - "relateduserid": 2 + "userid": 1 } diff --git a/tests/core/group_member_removed/existing_group_member_removed/statements.json b/tests/core/group_member_removed/existing_group_member_removed/statements.json index feb4493b8..59845d419 100644 --- a/tests/core/group_member_removed/existing_group_member_removed/statements.json +++ b/tests/core/group_member_removed/existing_group_member_removed/statements.json @@ -7,64 +7,64 @@ }, "name": "test_fullname2" }, - "verb": { - "id": "http://activitystrea.ms/leave", - "display": { - "en": "Left" - } - }, - "object": { - "id": "http://www.example.org/group/index.php?id=1", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group", - "name": { - "en": "test_name" - } - } - }, "context": { - "instructor": { - "account": { - "homePage": "http://www.example.org", - "name": "1" - }, - "name": "test_fullname1" - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] }, "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_function": "\\src\\transformer\\events\\core\\group_member_removed", "event_name": "\\core\\event\\group_member_removed", - "event_function": "\\src\\transformer\\events\\core\\group_member_removed" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname1" } + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" + }, + "id": "http://www.example.org/group/index.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Left" + }, + "id": "http://activitystrea.ms/leave" } } ] diff --git a/tests/core/group_message_sent/new_group_message_sent/data.json b/tests/core/group_message_sent/new_group_message_sent/data.json index 2fa2ffd06..6f311bcd2 100644 --- a/tests/core/group_message_sent/new_group_message_sent/data.json +++ b/tests/core/group_message_sent/new_group_message_sent/data.json @@ -1,17 +1,15 @@ { "groups": [ { + "courseid": 2, "id": 1, - "name": "test_name", - "courseid": 1 + "name": "test_name" } ], - "messages": [ + "groups_members": [ { - "id": 1, - "subject": "test_message_subject", - "fullmessage": "test_message_body", - "conversationid": 1 + "groupid": 1, + "userid": 1 } ], "message_conversations": [ @@ -20,10 +18,12 @@ "itemid": 1 } ], - "groups_members": [ + "messages": [ { - "groupid": 1, - "userid": 1 + "conversationid": 1, + "fullmessage": "test_message_body", + "id": 1, + "subject": "test_message_subject" } ] } diff --git a/tests/core/group_message_sent/new_group_message_sent/event.json b/tests/core/group_message_sent/new_group_message_sent/event.json index d73534937..280ba5b4f 100644 --- a/tests/core/group_message_sent/new_group_message_sent/event.json +++ b/tests/core/group_message_sent/new_group_message_sent/event.json @@ -1,5 +1,5 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\group_message_sent", "id": 1, "objectid": 1, diff --git a/tests/core/group_message_sent/new_group_message_sent/statements.json b/tests/core/group_message_sent/new_group_message_sent/statements.json index 991b9d384..dc460dd72 100644 --- a/tests/core/group_message_sent/new_group_message_sent/statements.json +++ b/tests/core/group_message_sent/new_group_message_sent/statements.json @@ -7,60 +7,41 @@ }, "name": "test_fullname" }, - "verb": { - "display": { - "en": "Sent" - }, - "id": "http://activitystrea.ms/send" - }, - "object": { - "id": "http://www.example.org/message?id=1", - "objectType": "Activity", - "definition": { - "name": { - "en": "test_message_subject" - }, - "description": { - "en": "test_message_body" - }, - "type": "http://id.tincanapi.com/activitytype/chat-message" - } - }, "context": { "contextActivities": { - "grouping": [ + "category": [ { - "id": "http://www.example.org/group/index.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group", "name": { - "en": "test_name" - } + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" } } ], - "parent": [ + "grouping": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" }, + "id": "http://www.example.org/group/index.php?id=1", "objectType": "Activity" } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -73,8 +54,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" }, "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/to": { - "name": "test_name", - "objectType": "Group", "member": [ { "account": { @@ -83,9 +62,30 @@ }, "name": "test_fullname" } - ] + ], + "name": "test_name", + "objectType": "Group" } } + }, + "object": { + "definition": { + "description": { + "en": "test_message_body" + }, + "name": { + "en": "test_message_subject" + }, + "type": "http://id.tincanapi.com/activitytype/chat-message" + }, + "id": "http://www.example.org/message?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Sent" + }, + "id": "http://activitystrea.ms/send" } } ] diff --git a/tests/core/message_sent/user_sent_message/data.json b/tests/core/message_sent/user_sent_message/data.json index dd1047304..695565b39 100644 --- a/tests/core/message_sent/user_sent_message/data.json +++ b/tests/core/message_sent/user_sent_message/data.json @@ -1,25 +1,25 @@ { - "user": [ + "messages": [ { + "fullmessage": "hi there!(messagetext)", "id": 1, + "subject": "hi there(subject)" + } + ], + "user": [ + { + "email": "sender@example.com", "firstname": "sender", + "id": 1, "lastname": "senderson", - "email": "sender@example.com", "username": "sender" }, { - "id": 2, + "email": "receiver@example.com", "firstname": "receiver", + "id": 2, "lastname": "receiverson", - "email": "receiver@example.com", "username": "receiver" } - ], - "messages": [ - { - "id": 1, - "fullmessage": "hi there!(messagetext)", - "subject": "hi there(subject)" - } ] } diff --git a/tests/core/message_sent/user_sent_message/event.json b/tests/core/message_sent/user_sent_message/event.json index eba3864e9..b0b420713 100644 --- a/tests/core/message_sent/user_sent_message/event.json +++ b/tests/core/message_sent/user_sent_message/event.json @@ -1,10 +1,10 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\message_sent", "id": 1, "objectid": 1, "objecttable": "messages", + "relateduserid": 2, "timecreated": 1433946701, - "userid": 1, - "relateduserid": 2 + "userid": 1 } diff --git a/tests/core/message_sent/user_sent_message/statements.json b/tests/core/message_sent/user_sent_message/statements.json index 83c98111d..5df39342c 100644 --- a/tests/core/message_sent/user_sent_message/statements.json +++ b/tests/core/message_sent/user_sent_message/statements.json @@ -7,48 +7,29 @@ }, "name": "sender senderson" }, - "verb": { - "id": "http://activitystrea.ms/send", - "display": { - "en": "Sent" - } - }, - "object": { - "id": "http://www.example.org/message?id=1", - "definition": { - "description": { - "en": "hi there!(messagetext)" - }, - "name": { - "en": "hi there(subject)" - }, - "type": "http://id.tincanapi.com/activitytype/chat-message" - }, - "objectType": "Activity" - }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "objectType": "Activity" + } } ], "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -69,6 +50,25 @@ } }, "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "hi there!(messagetext)" + }, + "name": { + "en": "hi there(subject)" + }, + "type": "http://id.tincanapi.com/activitytype/chat-message" + }, + "id": "http://www.example.org/message?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Sent" + }, + "id": "http://activitystrea.ms/send" } } ] diff --git a/tests/core/message_viewed/user_viewed_message/data.json b/tests/core/message_viewed/user_viewed_message/data.json index dd1047304..695565b39 100644 --- a/tests/core/message_viewed/user_viewed_message/data.json +++ b/tests/core/message_viewed/user_viewed_message/data.json @@ -1,25 +1,25 @@ { - "user": [ + "messages": [ { + "fullmessage": "hi there!(messagetext)", "id": 1, + "subject": "hi there(subject)" + } + ], + "user": [ + { + "email": "sender@example.com", "firstname": "sender", + "id": 1, "lastname": "senderson", - "email": "sender@example.com", "username": "sender" }, { - "id": 2, + "email": "receiver@example.com", "firstname": "receiver", + "id": 2, "lastname": "receiverson", - "email": "receiver@example.com", "username": "receiver" } - ], - "messages": [ - { - "id": 1, - "fullmessage": "hi there!(messagetext)", - "subject": "hi there(subject)" - } ] } diff --git a/tests/core/message_viewed/user_viewed_message/event.json b/tests/core/message_viewed/user_viewed_message/event.json index feb3aa550..faa6ed6dd 100644 --- a/tests/core/message_viewed/user_viewed_message/event.json +++ b/tests/core/message_viewed/user_viewed_message/event.json @@ -1,10 +1,10 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\message_viewed", "id": 1, "objectid": 1, "objecttable": "messages", + "relateduserid": 1, "timecreated": 1433946701, - "userid": 2, - "relateduserid": 1 + "userid": 2 } diff --git a/tests/core/message_viewed/user_viewed_message/statements.json b/tests/core/message_viewed/user_viewed_message/statements.json index eaa23e77d..7ebf449d6 100644 --- a/tests/core/message_viewed/user_viewed_message/statements.json +++ b/tests/core/message_viewed/user_viewed_message/statements.json @@ -12,24 +12,24 @@ "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "objectType": "Activity" + } } ], "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -52,7 +52,6 @@ "language": "en" }, "object": { - "id": "http://www.example.org/message?id=1", "definition": { "description": { "en": "hi there!(messagetext)" @@ -62,13 +61,14 @@ }, "type": "http://id.tincanapi.com/activitytype/chat-message" }, + "id": "http://www.example.org/message?id=1", "objectType": "Activity" }, "verb": { - "id": "http://id.tincanapi.com/verb/viewed", "display": { "en": "Viewed" - } + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/core/note_created/user_created_note/data.json b/tests/core/note_created/user_created_note/data.json index 7b0e98471..c850d99c3 100644 --- a/tests/core/note_created/user_created_note/data.json +++ b/tests/core/note_created/user_created_note/data.json @@ -1,22 +1,22 @@ { "post": [ { + "content": "here is a note", "id": 1, - "subject": "no subject", - "content": "here is a note" + "subject": "no subject" } ], "user": [ { - "id": 1, "email": "author@test.com", "firstname": "note_author_firstname", + "id": 1, "lastname": "note_author_lastname" }, { - "id": 2, "email": "subject@test.com", "firstname": "note_subject_firstname", + "id": 2, "lastname": "note_subject_lastname" } ] diff --git a/tests/core/note_created/user_created_note/event.json b/tests/core/note_created/user_created_note/event.json index 72a487d70..534c585c7 100644 --- a/tests/core/note_created/user_created_note/event.json +++ b/tests/core/note_created/user_created_note/event.json @@ -1,10 +1,10 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\note_created", "id": 1, "objectid": 1, "objecttable": "post", + "relateduserid": 2, "timecreated": 1433946701, - "userid": 1, - "relateduserid": 2 + "userid": 1 } diff --git a/tests/core/note_created/user_created_note/statements.json b/tests/core/note_created/user_created_note/statements.json index 403944308..9ae7d0e90 100644 --- a/tests/core/note_created/user_created_note/statements.json +++ b/tests/core/note_created/user_created_note/statements.json @@ -7,47 +7,18 @@ }, "name": "note_author_firstname note_author_lastname" }, - "verb": { - "id": "http://activitystrea.ms/create", - "display": { - "en": "Created" - } - }, - "object": { - "id": "http://www.example.org/notes/view.php?id=1", - "definition": { - "name": { - "en": "no subject" - }, - "description": { - "en": "here is a note" - }, - "type": "http://activitystrea.ms/note", - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-type": "course", - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { - "account": { - "homePage": "http://www.example.org", - "name": "2" - }, - "name": "note_subject_firstname note_subject_lastname" - } - } - }, - "objectType": "Activity" - }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "id": "http://www.example.org", - "objectType": "Activity" + } } ], "parent": [ @@ -58,7 +29,7 @@ }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -72,6 +43,35 @@ } }, "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "here is a note" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "note_subject_firstname note_subject_lastname" + }, + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-type": "course" + }, + "name": { + "en": "no subject" + }, + "type": "http://activitystrea.ms/note" + }, + "id": "http://www.example.org/notes/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/note_updated/user_updated_note/data.json b/tests/core/note_updated/user_updated_note/data.json index 9e30d0cf4..b0074ce49 100644 --- a/tests/core/note_updated/user_updated_note/data.json +++ b/tests/core/note_updated/user_updated_note/data.json @@ -1,9 +1,9 @@ { "post": [ { + "content": "contents of a note", "id": 1, - "subject": "a note title", - "content": "contents of a note" + "subject": "a note title" } ], "user": [ diff --git a/tests/core/note_updated/user_updated_note/event.json b/tests/core/note_updated/user_updated_note/event.json index 34e8be33c..9da56573a 100644 --- a/tests/core/note_updated/user_updated_note/event.json +++ b/tests/core/note_updated/user_updated_note/event.json @@ -1,10 +1,10 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\note_updated", "id": 1, "objectid": 1, "objecttable": "post", + "relateduserid": 2, "timecreated": 1433946701, - "userid": 1, - "relateduserid": 2 + "userid": 1 } diff --git a/tests/core/note_updated/user_updated_note/statements.json b/tests/core/note_updated/user_updated_note/statements.json index c153a7160..6c74ac064 100644 --- a/tests/core/note_updated/user_updated_note/statements.json +++ b/tests/core/note_updated/user_updated_note/statements.json @@ -7,47 +7,18 @@ }, "name": "note_editor_firstname note_editor_lastname" }, - "verb": { - "id": "http://activitystrea.ms/update", - "display": { - "en": "Updated" - } - }, - "object": { - "id": "http://www.example.org/notes/view.php?id=1", - "definition": { - "name": { - "en": "a note title" - }, - "type": "http://activitystrea.ms/note", - "description": { - "en": "contents of a note" - }, - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-type": "course", - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { - "account": { - "homePage": "http://www.example.org", - "name": "2" - }, - "name": "note_subject_firstname note_subject_lastname" - } - } - }, - "objectType": "Activity" - }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "id": "http://www.example.org", - "objectType": "Activity" + } } ], "parent": [ @@ -58,7 +29,7 @@ }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -72,6 +43,35 @@ } }, "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "contents of a note" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "note_subject_firstname note_subject_lastname" + }, + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-type": "course" + }, + "name": { + "en": "a note title" + }, + "type": "http://activitystrea.ms/note" + }, + "id": "http://www.example.org/notes/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Updated" + }, + "id": "http://activitystrea.ms/update" } } ] diff --git a/tests/core/notes_viewed/user_viewed_notes/event.json b/tests/core/notes_viewed/user_viewed_notes/event.json index 1a9cb40b3..77194cb9b 100644 --- a/tests/core/notes_viewed/user_viewed_notes/event.json +++ b/tests/core/notes_viewed/user_viewed_notes/event.json @@ -1,10 +1,10 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\notes_viewed", "id": 1, "objectid": 1, "objecttable": "post", + "relateduserid": 2, "timecreated": 1433946701, - "userid": 1, - "relateduserid": 2 + "userid": 1 } diff --git a/tests/core/notes_viewed/user_viewed_notes/statements.json b/tests/core/notes_viewed/user_viewed_notes/statements.json index f0b03205a..15a4e840e 100644 --- a/tests/core/notes_viewed/user_viewed_notes/statements.json +++ b/tests/core/notes_viewed/user_viewed_notes/statements.json @@ -7,43 +7,18 @@ }, "name": "notes_viewer_firstname notes_viewer_lastname" }, - "verb": { - "id": "http://id.tincanapi.com/verb/viewed", - "display": { - "en": "Viewed" - } - }, - "object": { - "id": "http://www.example.org/notes/index.php", - "definition": { - "name": { - "en": "Notes" - }, - "type": "https://w3id.org/xapi/acrossx/activities/webpage", - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { - "account": { - "homePage": "http://www.example.org", - "name": "2" - }, - "name": "notes_subject_firstname notes_subject_lastname" - } - } - }, - "objectType": "Activity" - }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "id": "http://www.example.org", - "objectType": "Activity" + } } ], "parent": [ @@ -54,7 +29,7 @@ }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -75,6 +50,31 @@ } }, "language": "en" + }, + "object": { + "definition": { + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "notes_subject_firstname notes_subject_lastname" + } + }, + "name": { + "en": "Notes" + }, + "type": "https://w3id.org/xapi/acrossx/activities/webpage" + }, + "id": "http://www.example.org/notes/index.php", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/core/question_created/new_question_created/data.json b/tests/core/question_created/new_question_created/data.json index 86ff914fc..2aff646b1 100644 --- a/tests/core/question_created/new_question_created/data.json +++ b/tests/core/question_created/new_question_created/data.json @@ -2,22 +2,22 @@ "question": [ { "id": 1, - "qtype": "truefalse", "name": "True or False?", + "qtype": "truefalse", "questiontext": "

Is the sky blue?

" } ], "question_answers": [ { - "id": 1, - "fraction": 1.0, "answer": "True", + "fraction": 1.0, + "id": 1, "question": 1 }, { - "id": 2, - "fraction": 0.0, "answer": "False", + "fraction": 0.0, + "id": 2, "question": 1 } ] diff --git a/tests/core/question_created/new_question_created/event.json b/tests/core/question_created/new_question_created/event.json index e16203a9e..78460573c 100644 --- a/tests/core/question_created/new_question_created/event.json +++ b/tests/core/question_created/new_question_created/event.json @@ -1,5 +1,5 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\question_created", "id": 1, "objectid": 1, diff --git a/tests/core/question_created/new_question_created/statements.json b/tests/core/question_created/new_question_created/statements.json index be8a28c05..2316b4be8 100644 --- a/tests/core/question_created/new_question_created/statements.json +++ b/tests/core/question_created/new_question_created/statements.json @@ -1,61 +1,35 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" - }, - "object": { - "id": "http://www.example.org/question?id=1", - "definition": { - "name": { - "en": "True or False?" - }, - "description": { - "en": "Is the sky blue?" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "interactionType": "true-false", - "correctResponsesPattern": [ - "true" - ], - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/moodle-question-type": "truefalse" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "context": { "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -68,6 +42,32 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } + }, + "object": { + "definition": { + "correctResponsesPattern": [ + "true" + ], + "description": { + "en": "Is the sky blue?" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/moodle-question-type": "truefalse" + }, + "interactionType": "true-false", + "name": { + "en": "True or False?" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/questions_imported/new_questions_imported/event.json b/tests/core/questions_imported/new_questions_imported/event.json index a1c3da99f..0582ad6e6 100644 --- a/tests/core/questions_imported/new_questions_imported/event.json +++ b/tests/core/questions_imported/new_questions_imported/event.json @@ -1,10 +1,10 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\questions_imported", "id": 1, "objectid": 1, "objecttable": null, + "other": "a:2:{s:6:\"format\";s:3:\"xml\";s:10:\"categoryid\";s:2:\"10\";}", "timecreated": 1433946701, - "userid": 1, - "other": "a:2:{s:6:\"format\";s:3:\"xml\";s:10:\"categoryid\";s:2:\"10\";}" + "userid": 1 } diff --git a/tests/core/questions_imported/new_questions_imported/statements.json b/tests/core/questions_imported/new_questions_imported/statements.json index 6be099a19..2923a9c59 100644 --- a/tests/core/questions_imported/new_questions_imported/statements.json +++ b/tests/core/questions_imported/new_questions_imported/statements.json @@ -7,45 +7,29 @@ }, "name": "test_fullname" }, - "verb": { - "display": { - "en": "Imported" - }, - "id": "http://adlnet.gov/expapi/verbs/imported" - }, - "object": { - "id": "http://www.example.org/question/bank/importquestions/import.php", - "objectType": "Activity", - "definition": { - "type": "http://adlnet.gov/expapi/activities/file", - "name": { - "en": "Questions in xml format" - } - } - }, "context": { "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -58,6 +42,22 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } + }, + "object": { + "definition": { + "name": { + "en": "Questions in xml format" + }, + "type": "http://adlnet.gov/expapi/activities/file" + }, + "id": "http://www.example.org/question/bank/importquestions/import.php", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Imported" + }, + "id": "http://adlnet.gov/expapi/verbs/imported" } } ] diff --git a/tests/core/search_results_viewed/user_viewed_search_results/event.json b/tests/core/search_results_viewed/user_viewed_search_results/event.json index 7c5cf6e1c..6a3ca12f7 100644 --- a/tests/core/search_results_viewed/user_viewed_search_results/event.json +++ b/tests/core/search_results_viewed/user_viewed_search_results/event.json @@ -4,7 +4,7 @@ "id": 1, "objectid": null, "objecttable": null, + "other": "a:7:{s:1:\"q\";s:5:\"query\";s:4:\"page\";i:0;s:5:\"title\";s:0:\"\";s:7:\"areaids\";a:0:{}s:9:\"courseids\";a:0:{}s:9:\"timestart\";i:0;s:7:\"timeend\";i:0;}", "timecreated": 1433946701, - "userid": 1, - "other": "a:7:{s:1:\"q\";s:5:\"query\";s:4:\"page\";i:0;s:5:\"title\";s:0:\"\";s:7:\"areaids\";a:0:{}s:9:\"courseids\";a:0:{}s:9:\"timestart\";i:0;s:7:\"timeend\";i:0;}" + "userid": 1 } diff --git a/tests/core/search_results_viewed/user_viewed_search_results/statements.json b/tests/core/search_results_viewed/user_viewed_search_results/statements.json index b5d184931..a5567e629 100644 --- a/tests/core/search_results_viewed/user_viewed_search_results/statements.json +++ b/tests/core/search_results_viewed/user_viewed_search_results/statements.json @@ -7,37 +7,18 @@ }, "name": "test_fullname" }, - "verb": { - "id": "https://w3id.org/xapi/acrossx/verbs/searched", - "display": { - "en": "Searched" - } - }, - "object": { - "id": "http://www.example.org/search/index.php", - "objectType": "Activity", - "definition": { - "type": "https://w3id.org/xapi/acrossx/activities/webpage", - "name": { - "en": "Global Search" - } - } - }, - "result": { - "response": "query" - }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] }, @@ -49,6 +30,25 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } + }, + "object": { + "definition": { + "name": { + "en": "Global Search" + }, + "type": "https://w3id.org/xapi/acrossx/activities/webpage" + }, + "id": "http://www.example.org/search/index.php", + "objectType": "Activity" + }, + "result": { + "response": "query" + }, + "verb": { + "display": { + "en": "Searched" + }, + "id": "https://w3id.org/xapi/acrossx/verbs/searched" } } ] diff --git a/tests/core/user_created/existing_user_created/data.json b/tests/core/user_created/existing_user_created/data.json index 614658e31..4e1f072a1 100644 --- a/tests/core/user_created/existing_user_created/data.json +++ b/tests/core/user_created/existing_user_created/data.json @@ -1,16 +1,9 @@ { "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname", - "email": "test@test.com" - } - ], - "course": [ - { - "id": 1, - "fullname": "test_name", - "lang": "en" + "id": 1 } ] } diff --git a/tests/core/user_created/existing_user_created/event.json b/tests/core/user_created/existing_user_created/event.json index a9ed6e03f..f3135b292 100644 --- a/tests/core/user_created/existing_user_created/event.json +++ b/tests/core/user_created/existing_user_created/event.json @@ -1,9 +1,9 @@ { + "courseid": 2, + "eventname": "\\core\\event\\user_created", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "user", "objectid": 1, - "eventname": "\\core\\event\\user_created" + "objecttable": "user", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/core/user_created/existing_user_created/statements.json b/tests/core/user_created/existing_user_created/statements.json index 5e4020eb7..188f7d063 100644 --- a/tests/core/user_created/existing_user_created/statements.json +++ b/tests/core/user_created/existing_user_created/statements.json @@ -1,52 +1,52 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/registered", - "display": { - "en": "Registered" - } - }, - "object": { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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": "\\core\\event\\user_created", - "event_function": "\\src\\transformer\\events\\core\\user_created" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\user_created", + "event_name": "\\core\\event\\user_created", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" } + }, + "verb": { + "display": { + "en": "Registered" + }, + "id": "http://adlnet.gov/expapi/verbs/registered" } } ] diff --git a/tests/core/user_created/send_jisc_data/data.json b/tests/core/user_created/send_jisc_data/data.json index b3719b756..f7cb90a10 100644 --- a/tests/core/user_created/send_jisc_data/data.json +++ b/tests/core/user_created/send_jisc_data/data.json @@ -1,17 +1,22 @@ { - "user": [ - { - "id": 1, - "firstname": "test_fullname", - "email": "test@test.com" - } - ], "course": [ { + "fullname": "test_site_fullname", "id": 1, + "lang": "en" + }, + { "fullname": "test_name", + "id": 2, "lang": "en", "shortname": "test_course_short_name" } + ], + "user": [ + { + "email": "test@test.com", + "firstname": "test_fullname", + "id": 1 + } ] } diff --git a/tests/core/user_created/send_jisc_data/event.json b/tests/core/user_created/send_jisc_data/event.json index c5828b1a7..78a08fd8c 100644 --- a/tests/core/user_created/send_jisc_data/event.json +++ b/tests/core/user_created/send_jisc_data/event.json @@ -1,10 +1,10 @@ { + "courseid": 2, + "eventname": "\\core\\event\\user_created", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "user", + "ip": "127.0.0.1", "objectid": 1, - "eventname": "\\core\\event\\user_created", - "ip": "127.0.0.1" + "objecttable": "user", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/core/user_created/send_jisc_data/statements.json b/tests/core/user_created/send_jisc_data/statements.json index 416857ca0..0181f5369 100644 --- a/tests/core/user_created/send_jisc_data/statements.json +++ b/tests/core/user_created/send_jisc_data/statements.json @@ -1,55 +1,55 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/registered", - "display": { - "en": "Registered" - } - }, - "object": { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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": "\\core\\event\\user_created", - "event_function": "\\src\\transformer\\events\\core\\user_created" - }, - "http://xapi.jisc.ac.uk/sessionId": "test_session_id", - "http://id.tincanapi.com/extension/ip-address": "127.0.0.1", - "http://xapi.jisc.ac.uk/statementCat": "VLE" - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] + }, + "extensions": { + "http://id.tincanapi.com/extension/ip-address": "127.0.0.1", + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\user_created", + "event_name": "\\core\\event\\user_created", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "http://xapi.jisc.ac.uk/sessionId": "test_session_id", + "http://xapi.jisc.ac.uk/statementCat": "VLE" + }, + "language": "en" + }, + "object": { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" } + }, + "verb": { + "display": { + "en": "Registered" + }, + "id": "http://adlnet.gov/expapi/verbs/registered" } } ] diff --git a/tests/core/user_enrolment_created/existing_user_enrolled/data.json b/tests/core/user_enrolment_created/existing_user_enrolled/data.json index 65f4262d0..91d9ed16d 100644 --- a/tests/core/user_enrolment_created/existing_user_enrolled/data.json +++ b/tests/core/user_enrolment_created/existing_user_enrolled/data.json @@ -1,14 +1,14 @@ { "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname1", - "email": "test@test.com" + "id": 1 }, { - "id": 2, + "email": "test@test.com", "firstname": "test_fullname2", - "email": "test@test.com" + "id": 2 } ] } diff --git a/tests/core/user_enrolment_created/existing_user_enrolled/event.json b/tests/core/user_enrolment_created/existing_user_enrolled/event.json index f0e9e8ea4..f7a81d0b8 100644 --- a/tests/core/user_enrolment_created/existing_user_enrolled/event.json +++ b/tests/core/user_enrolment_created/existing_user_enrolled/event.json @@ -1,11 +1,11 @@ { + "courseid": 2, + "eventname": "\\core\\event\\user_enrolment_created", "id": 1, - "userid": 1, + "objectid": 1, + "objecttable": "user_enrolments", + "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", "relateduserid": 2, - "courseid": 1, "timecreated": 1433946701, - "objecttable": "user_enrolments", - "objectid": 1, - "eventname": "\\core\\event\\user_enrolment_created", - "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}" + "userid": 1 } diff --git a/tests/core/user_enrolment_created/existing_user_enrolled/statements.json b/tests/core/user_enrolment_created/existing_user_enrolled/statements.json index c5bceb01b..8fc5077b5 100644 --- a/tests/core/user_enrolment_created/existing_user_enrolled/statements.json +++ b/tests/core/user_enrolment_created/existing_user_enrolled/statements.json @@ -1,60 +1,60 @@ [ { "actor": { - "name": "test_fullname2", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/enrolled", - "display": { - "en": "Enrolled" - } - }, - "object": { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname2" }, "context": { - "instructor": { - "name": "test_fullname1", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "language": "en", - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/context-extensions/enrolment-type": "manual", - "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": "\\core\\event\\user_enrolment_created", - "event_function": "\\src\\transformer\\events\\core\\user_enrolment_created" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\user_enrolment_created", + "event_name": "\\core\\event\\user_enrolment_created", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "https://xapi.edlm/profiles/edlm-lms/concepts/context-extensions/enrolment-type": "manual" + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname1" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Enrolled" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/enrolled" } } ] diff --git a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/data.json b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/data.json index 65f4262d0..91d9ed16d 100644 --- a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/data.json +++ b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/data.json @@ -1,14 +1,14 @@ { "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname1", - "email": "test@test.com" + "id": 1 }, { - "id": 2, + "email": "test@test.com", "firstname": "test_fullname2", - "email": "test@test.com" + "id": 2 } ] } diff --git a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/event.json b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/event.json index 6b4d92275..04dcaac47 100644 --- a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/event.json +++ b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/event.json @@ -1,11 +1,11 @@ { - "courseid": 1, + "courseid": 2, "eventname": "\\core\\event\\user_enrolment_deleted", "id": 1, "objectid": 1, "objecttable": "user_enrolments", - "timecreated": 1433946701, - "userid": 1, + "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", "relateduserid": 2, - "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/statements.json b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/statements.json index 9634f55af..052e63f06 100644 --- a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/statements.json +++ b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/statements.json @@ -1,60 +1,60 @@ [ { "actor": { - "name": "test_fullname2", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "http://activitystrea.ms/leave", - "display": { - "en": "Left" - } - }, - "object": { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname2" }, "context": { - "instructor": { - "name": "test_fullname1", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "language": "en", - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/context-extensions/enrolment-type": "manual", - "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": "\\core\\event\\user_enrolment_deleted", - "event_function": "\\src\\transformer\\events\\core\\user_enrolment_deleted" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\user_enrolment_deleted", + "event_name": "\\core\\event\\user_enrolment_deleted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "https://xapi.edlm/profiles/edlm-lms/concepts/context-extensions/enrolment-type": "manual" + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname1" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Left" + }, + "id": "http://activitystrea.ms/leave" } } ] diff --git a/tests/core/user_enrolment_updated/user_resumed_course/data.json b/tests/core/user_enrolment_updated/user_resumed_course/data.json index 487c142dc..90a2668e9 100644 --- a/tests/core/user_enrolment_updated/user_resumed_course/data.json +++ b/tests/core/user_enrolment_updated/user_resumed_course/data.json @@ -1,14 +1,14 @@ { "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname1", - "email": "test@test.com" + "id": 1 }, { - "id": 2, + "email": "test@test.com", "firstname": "test_fullname2", - "email": "test@test.com" + "id": 2 } ], "user_enrolments": [ diff --git a/tests/core/user_enrolment_updated/user_resumed_course/event.json b/tests/core/user_enrolment_updated/user_resumed_course/event.json index 710673801..5066f24f9 100644 --- a/tests/core/user_enrolment_updated/user_resumed_course/event.json +++ b/tests/core/user_enrolment_updated/user_resumed_course/event.json @@ -1,11 +1,11 @@ { + "courseid": 2, + "eventname": "\\core\\event\\user_enrolment_updated", "id": 1, - "userid": 1, + "objectid": 1, + "objecttable": "user_enrolments", + "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", "relateduserid": 2, - "courseid": 1, "timecreated": 1433946701, - "objecttable": "user_enrolments", - "objectid": 1, - "eventname": "\\core\\event\\user_enrolment_updated", - "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}" + "userid": 1 } diff --git a/tests/core/user_enrolment_updated/user_resumed_course/statements.json b/tests/core/user_enrolment_updated/user_resumed_course/statements.json index a982ebf9f..a86b83016 100644 --- a/tests/core/user_enrolment_updated/user_resumed_course/statements.json +++ b/tests/core/user_enrolment_updated/user_resumed_course/statements.json @@ -1,60 +1,60 @@ [ { "actor": { - "name": "test_fullname2", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/resumed", - "display": { - "en": "Resumed" - } - }, - "object": { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname2" }, "context": { - "instructor": { - "name": "test_fullname1", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "language": "en", - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/context-extensions/enrolment-type": "manual", - "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": "\\core\\event\\user_enrolment_updated", - "event_function": "\\src\\transformer\\events\\core\\user_enrolment_updated" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\user_enrolment_updated", + "event_name": "\\core\\event\\user_enrolment_updated", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "https://xapi.edlm/profiles/edlm-lms/concepts/context-extensions/enrolment-type": "manual" + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname1" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Resumed" + }, + "id": "https://w3id.org/xapi/tla/verbs/resumed" } } ] diff --git a/tests/core/user_enrolment_updated/user_suspended_course/data.json b/tests/core/user_enrolment_updated/user_suspended_course/data.json index aa1811f1f..67afa3580 100644 --- a/tests/core/user_enrolment_updated/user_suspended_course/data.json +++ b/tests/core/user_enrolment_updated/user_suspended_course/data.json @@ -1,14 +1,14 @@ { "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname1", - "email": "test@test.com" + "id": 1 }, { - "id": 2, + "email": "test@test.com", "firstname": "test_fullname2", - "email": "test@test.com" + "id": 2 } ], "user_enrolments": [ diff --git a/tests/core/user_enrolment_updated/user_suspended_course/event.json b/tests/core/user_enrolment_updated/user_suspended_course/event.json index 710673801..5066f24f9 100644 --- a/tests/core/user_enrolment_updated/user_suspended_course/event.json +++ b/tests/core/user_enrolment_updated/user_suspended_course/event.json @@ -1,11 +1,11 @@ { + "courseid": 2, + "eventname": "\\core\\event\\user_enrolment_updated", "id": 1, - "userid": 1, + "objectid": 1, + "objecttable": "user_enrolments", + "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", "relateduserid": 2, - "courseid": 1, "timecreated": 1433946701, - "objecttable": "user_enrolments", - "objectid": 1, - "eventname": "\\core\\event\\user_enrolment_updated", - "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}" + "userid": 1 } diff --git a/tests/core/user_enrolment_updated/user_suspended_course/statements.json b/tests/core/user_enrolment_updated/user_suspended_course/statements.json index c315e5cf0..a1d87a7db 100644 --- a/tests/core/user_enrolment_updated/user_suspended_course/statements.json +++ b/tests/core/user_enrolment_updated/user_suspended_course/statements.json @@ -1,60 +1,60 @@ [ { "actor": { - "name": "test_fullname2", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/suspended", - "display": { - "en": "Suspended" - } - }, - "object": { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname2" }, "context": { - "instructor": { - "name": "test_fullname1", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "language": "en", - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/context-extensions/enrolment-type": "manual", - "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": "\\core\\event\\user_enrolment_updated", - "event_function": "\\src\\transformer\\events\\core\\user_enrolment_updated" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\user_enrolment_updated", + "event_name": "\\core\\event\\user_enrolment_updated", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "https://xapi.edlm/profiles/edlm-lms/concepts/context-extensions/enrolment-type": "manual" + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname1" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Suspended" + }, + "id": "https://w3id.org/xapi/tla/verbs/suspended" } } ] diff --git a/tests/core/user_loggedin/existing_user_loggedin/data.json b/tests/core/user_loggedin/existing_user_loggedin/data.json index 13de62cac..4e1f072a1 100644 --- a/tests/core/user_loggedin/existing_user_loggedin/data.json +++ b/tests/core/user_loggedin/existing_user_loggedin/data.json @@ -1,9 +1,9 @@ { "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname", - "email": "test@test.com" + "id": 1 } ] } diff --git a/tests/core/user_loggedin/existing_user_loggedin/event.json b/tests/core/user_loggedin/existing_user_loggedin/event.json index c534c0b39..9285ca419 100644 --- a/tests/core/user_loggedin/existing_user_loggedin/event.json +++ b/tests/core/user_loggedin/existing_user_loggedin/event.json @@ -1,10 +1,10 @@ { + "courseid": 2, + "eventname": "\\core\\event\\user_loggedin", "id": 1, - "userid": 1, + "objectid": 1, + "objecttable": "course", "relateduserid": null, - "courseid": 1, "timecreated": 1433946701, - "objecttable": "course", - "objectid": 1, - "eventname": "\\core\\event\\user_loggedin" + "userid": 1 } diff --git a/tests/core/user_loggedin/existing_user_loggedin/statements.json b/tests/core/user_loggedin/existing_user_loggedin/statements.json index 8976449d9..450809461 100644 --- a/tests/core/user_loggedin/existing_user_loggedin/statements.json +++ b/tests/core/user_loggedin/existing_user_loggedin/statements.json @@ -1,38 +1,38 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/login", - "display": { - "en": "Logged In" - } - }, - "object": { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_function": "\\src\\transformer\\events\\core\\user_loggedin", "event_name": "\\core\\event\\user_loggedin", - "event_function": "\\src\\transformer\\events\\core\\user_loggedin" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } + }, + "language": "en" + }, + "object": { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" } + }, + "verb": { + "display": { + "en": "Logged In" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/login" } } ] diff --git a/tests/core/user_loggedinas/existing_user_loggedinas/data.json b/tests/core/user_loggedinas/existing_user_loggedinas/data.json index 0b0e7b25a..2f6b7f08a 100644 --- a/tests/core/user_loggedinas/existing_user_loggedinas/data.json +++ b/tests/core/user_loggedinas/existing_user_loggedinas/data.json @@ -1,14 +1,14 @@ { "user": [ { - "id": 1, + "email": "test1@test.com", "firstname": "test_fullname1", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "test_fullname2", - "email": "test2@test.com" + "id": 2 } ] } diff --git a/tests/core/user_loggedinas/existing_user_loggedinas/event.json b/tests/core/user_loggedinas/existing_user_loggedinas/event.json index 4c845dd61..0c86cc0c4 100644 --- a/tests/core/user_loggedinas/existing_user_loggedinas/event.json +++ b/tests/core/user_loggedinas/existing_user_loggedinas/event.json @@ -1,10 +1,10 @@ { + "courseid": 2, + "eventname": "\\core\\event\\user_loggedinas", "id": 1, - "userid": 1, + "objectid": 1, + "objecttable": "user", "relateduserid": 2, - "courseid": 1, "timecreated": 1433946701, - "objecttable": "user", - "objectid": 1, - "eventname": "\\core\\event\\user_loggedinas" + "userid": 1 } diff --git a/tests/core/user_loggedinas/existing_user_loggedinas/statements.json b/tests/core/user_loggedinas/existing_user_loggedinas/statements.json index 9b4ac83cc..b7cba7d4f 100644 --- a/tests/core/user_loggedinas/existing_user_loggedinas/statements.json +++ b/tests/core/user_loggedinas/existing_user_loggedinas/statements.json @@ -1,45 +1,45 @@ [ { "actor": { - "name": "test_fullname1", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/login", - "display": { - "en": "Logged In" - } - }, - "object": { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname1" }, "context": { - "language": "en", "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\user_loggedin", + "event_name": "\\core\\event\\user_loggedinas", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/as": { - "name": "test_fullname2", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "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": "\\core\\event\\user_loggedinas", - "event_function": "\\src\\transformer\\events\\core\\user_loggedin" + }, + "name": "test_fullname2" } + }, + "language": "en" + }, + "object": { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" } + }, + "verb": { + "display": { + "en": "Logged In" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/login" } } ] diff --git a/tests/core/user_loggedout/existing_user_loggedout/data.json b/tests/core/user_loggedout/existing_user_loggedout/data.json index 13de62cac..4e1f072a1 100644 --- a/tests/core/user_loggedout/existing_user_loggedout/data.json +++ b/tests/core/user_loggedout/existing_user_loggedout/data.json @@ -1,9 +1,9 @@ { "user": [ { - "id": 1, + "email": "test@test.com", "firstname": "test_fullname", - "email": "test@test.com" + "id": 1 } ] } diff --git a/tests/core/user_loggedout/existing_user_loggedout/event.json b/tests/core/user_loggedout/existing_user_loggedout/event.json index 36b34b41a..6c7f4eb4a 100644 --- a/tests/core/user_loggedout/existing_user_loggedout/event.json +++ b/tests/core/user_loggedout/existing_user_loggedout/event.json @@ -1,9 +1,9 @@ { + "courseid": 2, + "eventname": "\\core\\event\\user_loggedout", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "course", "objectid": 1, - "eventname": "\\core\\event\\user_loggedout" + "objecttable": "course", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/core/user_loggedout/existing_user_loggedout/statements.json b/tests/core/user_loggedout/existing_user_loggedout/statements.json index 2ec5c0ca0..e45488bba 100644 --- a/tests/core/user_loggedout/existing_user_loggedout/statements.json +++ b/tests/core/user_loggedout/existing_user_loggedout/statements.json @@ -1,38 +1,38 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/logout", - "display": { - "en": "Logged Out" - } - }, - "object": { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_function": "\\src\\transformer\\events\\core\\user_loggedout", "event_name": "\\core\\event\\user_loggedout", - "event_function": "\\src\\transformer\\events\\core\\user_loggedout" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } + }, + "language": "en" + }, + "object": { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" } + }, + "verb": { + "display": { + "en": "Logged Out" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/logout" } } ] diff --git a/tests/core_h5p/course_module_viewed/data.json b/tests/core_h5p/course_module_viewed/data.json index d68be86e6..586adad33 100644 --- a/tests/core_h5p/course_module_viewed/data.json +++ b/tests/core_h5p/course_module_viewed/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "h5pactivity": [ { "id": 1, - "name": "h5pactivity" + "name": "test_name" } ], - "h5pactivity": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "h5pactivity" } ] } diff --git a/tests/core_h5p/course_module_viewed/event.json b/tests/core_h5p/course_module_viewed/event.json index b3b0172fb..570211e2c 100644 --- a/tests/core_h5p/course_module_viewed/event.json +++ b/tests/core_h5p/course_module_viewed/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\core_h5p\\event\\h5p_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\core_h5p\\event\\h5p_viewed" + "userid": 1 } diff --git a/tests/core_h5p/course_module_viewed/statements.json b/tests/core_h5p/course_module_viewed/statements.json index c19e4c4f7..a9fdac3f8 100644 --- a/tests/core_h5p/course_module_viewed/statements.json +++ b/tests/core_h5p/course_module_viewed/statements.json @@ -1,74 +1,74 @@ [ { "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/h5pactivity/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/media", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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": "\\core_h5p\\event\\h5p_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\core_h5p\\event\\h5p_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/media" + }, + "id": "http://www.example.org/mod/h5pactivity/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/data.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/data.json index 792f10383..cbd7edb43 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/data.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/data.json @@ -1,46 +1,34 @@ { - "user": [ - { - "id": 1, - "firstname": "test_fullname", - "email": "test@test.com" - }, - { - "id": 2, - "firstname": "test2_fullname", - "email": "test2@test.com" - } - ], "assign": [ { "id": 1, "name": "test_name" } ], - "grade": [ + "assignfeedback_comments": [ { - "id": 1, - "userid": 2, "assignment": 1, - "grade": 1 + "commenttext": "test_comment_text", + "grade": 1, + "id": 1 } ], - "assignfeedback_comments": [ + "grade": [ { - "id": 1, "assignment": 1, "grade": 1, - "commenttext": "test_comment_text" + "id": 1, + "userid": 2 } ], "grade_items": [ { + "grademax": 2, + "grademin": 0, + "gradepass": 1, "id": 1, - "itemmodule": "assign", "iteminstance": 1, - "grademin": 0, - "grademax": 2, - "gradepass": 1 + "itemmodule": "assign" } ], "modules": [ @@ -48,5 +36,17 @@ "id": 1, "name": "assign" } + ], + "user": [ + { + "email": "test@test.com", + "firstname": "test_fullname", + "id": 1 + }, + { + "email": "test2@test.com", + "firstname": "test2_fullname", + "id": 2 + } ] } diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/event.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/event.json index 490ae6308..e3fb81e0d 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/event.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_assign\\event\\submission_graded", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "grade", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_assign\\event\\submission_graded" + "objecttable": "grade", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/statements.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/statements.json index d80afd47a..780fc1f56 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/statements.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/statements.json @@ -1,101 +1,101 @@ [ { "actor": { - "name": "test2_fullname", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/scored", - "display": { - "en": "Scored" - } - }, - "object": { - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission", - "name": { - "en": "test_name Submission" - } - } - }, - "result": { - "score": { - "raw": 1.0, - "min": 0.0, - "max": 2.0, - "scaled": 0.0 }, - "success": true, - "response": "test_comment_text" + "name": "test2_fullname" }, "context": { - "instructor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "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_assign\\event\\submission_graded", - "event_function": "\\src\\transformer\\events\\mod_assign\\assignment_graded" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment", "name": { "en": "test_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, + "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_assign\\assignment_graded", + "event_name": "\\mod_assign\\event\\submission_graded", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "objectType": "Activity" + }, + "result": { + "response": "test_comment_text", + "score": { + "max": 2.0, + "min": 0.0, + "raw": 1.0, + "scaled": 0.0 + }, + "success": true + }, + "verb": { + "display": { + "en": "Scored" + }, + "id": "https://w3id.org/xapi/tla/verbs/scored" } } ] diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/data.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/data.json index 64de30ccb..db220b29d 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/data.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/data.json @@ -1,39 +1,27 @@ { - "user": [ - { - "id": 1, - "firstname": "test_fullname", - "email": "test@test.com" - }, - { - "id": 2, - "firstname": "test2_fullname", - "email": "test2@test.com" - } - ], "assign": [ { "id": 1, "name": "test_name" } ], + "assignfeedback_comments": [], "grade": [ { - "id": 1, - "userid": 2, "assignment": 1, - "grade": 1 + "grade": 1, + "id": 1, + "userid": 2 } ], - "assignfeedback_comments": [], "grade_items": [ { + "grademax": 2, + "grademin": 0, + "gradepass": 1, "id": 1, - "itemmodule": "assign", "iteminstance": 1, - "grademin": 0, - "grademax": 2, - "gradepass": 1 + "itemmodule": "assign" } ], "modules": [ @@ -41,5 +29,17 @@ "id": 1, "name": "assign" } + ], + "user": [ + { + "email": "test@test.com", + "firstname": "test_fullname", + "id": 1 + }, + { + "email": "test2@test.com", + "firstname": "test2_fullname", + "id": 2 + } ] } diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/event.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/event.json index 490ae6308..e3fb81e0d 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/event.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_assign\\event\\submission_graded", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "grade", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_assign\\event\\submission_graded" + "objecttable": "grade", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/statements.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/statements.json index e0dd6c392..8f7ba207d 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/statements.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/statements.json @@ -1,100 +1,100 @@ [ { "actor": { - "name": "test2_fullname", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/scored", - "display": { - "en": "Scored" - } - }, - "object": { - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission", - "name": { - "en": "test_name Submission" - } - } - }, - "result": { - "score": { - "raw": 1.0, - "min": 0.0, - "max": 2.0, - "scaled": 0.0 }, - "success": true + "name": "test2_fullname" }, "context": { - "instructor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "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_assign\\event\\submission_graded", - "event_function": "\\src\\transformer\\events\\mod_assign\\assignment_graded" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment", "name": { "en": "test_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, + "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_assign\\assignment_graded", + "event_name": "\\mod_assign\\event\\submission_graded", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "objectType": "Activity" + }, + "result": { + "score": { + "max": 2.0, + "min": 0.0, + "raw": 1.0, + "scaled": 0.0 + }, + "success": true + }, + "verb": { + "display": { + "en": "Scored" + }, + "id": "https://w3id.org/xapi/tla/verbs/scored" } } ] diff --git a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/data.json b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/data.json index cd911388d..b2a562763 100644 --- a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/data.json +++ b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/data.json @@ -1,14 +1,14 @@ { - "assign_submission": [ + "assign": [ { "id": 1, - "assignment": 1 + "name": "test_name" } ], - "assign": [ + "assign_submission": [ { - "id": 1, - "name": "test_name" + "assignment": 1, + "id": 1 } ], "modules": [ diff --git a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/event.json b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/event.json index 95b4f8c37..210e992b8 100644 --- a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/event.json +++ b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_assign\\event\\assessable_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "assignment_submissions", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_assign\\event\\assessable_submitted" + "objecttable": "assignment_submissions", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json index 9555bb673..3d7188b85 100644 --- a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json +++ b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json @@ -1,84 +1,84 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission", - "name": { - "en": "test_name Submission" - } - } + }, + "name": "test_fullname" }, "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_assign\\event\\assessable_submitted", - "event_function": "\\src\\transformer\\events\\mod_assign\\assignment_submitted" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment", "name": { "en": "test_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, + "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_assign\\assignment_submitted", + "event_name": "\\mod_assign\\event\\assessable_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/schema/1.0/submit" } } ] diff --git a/tests/mod_assign/course_module_viewed/existing_module/data.json b/tests/mod_assign/course_module_viewed/existing_module/data.json index 92a47ecc5..8fc74245a 100644 --- a/tests/mod_assign/course_module_viewed/existing_module/data.json +++ b/tests/mod_assign/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "assign": [ { "id": 1, - "name": "assign" + "name": "test_name" } ], - "assign": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "assign" } ] } diff --git a/tests/mod_assign/course_module_viewed/existing_module/event.json b/tests/mod_assign/course_module_viewed/existing_module/event.json index b0dd18e3f..308305f8c 100644 --- a/tests/mod_assign/course_module_viewed/existing_module/event.json +++ b/tests/mod_assign/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_assign\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_assign\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_assign/course_module_viewed/existing_module/statements.json b/tests/mod_assign/course_module_viewed/existing_module/statements.json index 0194c9cf1..a1068ed7a 100644 --- a/tests/mod_assign/course_module_viewed/existing_module/statements.json +++ b/tests/mod_assign/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/assign/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_assign\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_assign\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" + }, + "id": "http://www.example.org/mod/assign/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_assign/feedback_viewed/user_viewed_feedback/data.json b/tests/mod_assign/feedback_viewed/user_viewed_feedback/data.json index 41a8a5985..c11238ba7 100644 --- a/tests/mod_assign/feedback_viewed/user_viewed_feedback/data.json +++ b/tests/mod_assign/feedback_viewed/user_viewed_feedback/data.json @@ -1,20 +1,14 @@ { - "assign_grades": [ + "assign": [ { "id": 1, - "grader": 2 + "name": "test_name" } ], - "user": [ - { - "id": 1, - "firstname": "test_fullname1", - "email": "test1@test.com" - }, + "assign_grades": [ { - "id": 2, - "firstname": "test_fullname2", - "email": "test2@test.com" + "grader": 2, + "id": 1 } ], "modules": [ @@ -23,10 +17,16 @@ "name": "assign" } ], - "assign": [ + "user": [ { - "id": 1, - "name": "test_name" + "email": "test1@test.com", + "firstname": "test_fullname1", + "id": 1 + }, + { + "email": "test2@test.com", + "firstname": "test_fullname2", + "id": 2 } ] } diff --git a/tests/mod_assign/feedback_viewed/user_viewed_feedback/event.json b/tests/mod_assign/feedback_viewed/user_viewed_feedback/event.json index 24905420d..6f1b7bf75 100644 --- a/tests/mod_assign/feedback_viewed/user_viewed_feedback/event.json +++ b/tests/mod_assign/feedback_viewed/user_viewed_feedback/event.json @@ -1,10 +1,10 @@ { - "courseid": 1, + "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_assign\\event\\feedback_viewed", "id": 1, "objectid": 1, "objecttable": "assign_grades", "timecreated": 1433946701, - "userid": 1, - "contextinstanceid": 1 + "userid": 1 } diff --git a/tests/mod_assign/feedback_viewed/user_viewed_feedback/statements.json b/tests/mod_assign/feedback_viewed/user_viewed_feedback/statements.json index b66ea1fce..d63426d05 100644 --- a/tests/mod_assign/feedback_viewed/user_viewed_feedback/statements.json +++ b/tests/mod_assign/feedback_viewed/user_viewed_feedback/statements.json @@ -1,78 +1,55 @@ [ { "actor": { - "name": "test_fullname1", "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/assign/view.php?id=1#feedback", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", - "name": { - "en": "test_name Feedback" - } - } + }, + "name": "test_fullname1" }, "context": { - "instructor": { - "name": "test_fullname2", - "account": { - "homePage": "http://www.example.org", - "name": "2" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment", "name": { "en": "test_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, + "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -85,7 +62,30 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "test_fullname2" + }, "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Feedback" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "id": "http://www.example.org/mod/assign/view.php?id=1#feedback", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_assign/submission_locked/data.json b/tests/mod_assign/submission_locked/data.json index b9dd218b4..7bac6385b 100644 --- a/tests/mod_assign/submission_locked/data.json +++ b/tests/mod_assign/submission_locked/data.json @@ -1,14 +1,14 @@ { - "assign_submission": [ + "assign": [ { "id": 1, - "assignment": 1 + "name": "test_name" } ], - "assign": [ + "assign_submission": [ { - "id": 1, - "name": "test_name" + "assignment": 1, + "id": 1 } ], "modules": [ @@ -19,14 +19,14 @@ ], "user": [ { - "id": 1, + "email": "test1@test.com", "firstname": "test_fullname1", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "test_fullname2", - "email": "test2@test.com" + "id": 2 } ] } diff --git a/tests/mod_assign/submission_locked/event.json b/tests/mod_assign/submission_locked/event.json index 93198d51b..0a597d2af 100644 --- a/tests/mod_assign/submission_locked/event.json +++ b/tests/mod_assign/submission_locked/event.json @@ -1,12 +1,12 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "assign", - "objectid": 1, + "action": "locked", "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_assign\\event\\submission_locked", - "action": "locked", - "relateduserid": 2 + "id": 1, + "objectid": 1, + "objecttable": "assign", + "relateduserid": 2, + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_assign/submission_locked/statements.json b/tests/mod_assign/submission_locked/statements.json index b620dc886..4c21278ab 100644 --- a/tests/mod_assign/submission_locked/statements.json +++ b/tests/mod_assign/submission_locked/statements.json @@ -1,91 +1,91 @@ [ { "actor": { - "name": "test_fullname1", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/locked", - "display": { - "en": "Locked" - } - }, - "object": { - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission", - "name": { - "en": "test_name Submission" - } - } + }, + "name": "test_fullname1" }, "context": { - "language": "en", - "extensions": { - "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/for": { - "name": "test_fullname2", - "account": { - "homePage": "http://www.example.org", - "name": "2" - } - }, - "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_assign\\event\\submission_locked", - "event_function": "\\src\\transformer\\events\\mod_assign\\submission_locked" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment", "name": { "en": "test_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, + "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_assign\\submission_locked", + "event_name": "\\mod_assign\\event\\submission_locked", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/for": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "test_fullname2" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Locked" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/locked" } } ] diff --git a/tests/mod_assign/submission_unlocked/data.json b/tests/mod_assign/submission_unlocked/data.json index b9dd218b4..7bac6385b 100644 --- a/tests/mod_assign/submission_unlocked/data.json +++ b/tests/mod_assign/submission_unlocked/data.json @@ -1,14 +1,14 @@ { - "assign_submission": [ + "assign": [ { "id": 1, - "assignment": 1 + "name": "test_name" } ], - "assign": [ + "assign_submission": [ { - "id": 1, - "name": "test_name" + "assignment": 1, + "id": 1 } ], "modules": [ @@ -19,14 +19,14 @@ ], "user": [ { - "id": 1, + "email": "test1@test.com", "firstname": "test_fullname1", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "test_fullname2", - "email": "test2@test.com" + "id": 2 } ] } diff --git a/tests/mod_assign/submission_unlocked/event.json b/tests/mod_assign/submission_unlocked/event.json index 3d48c680b..66ea7adf0 100644 --- a/tests/mod_assign/submission_unlocked/event.json +++ b/tests/mod_assign/submission_unlocked/event.json @@ -1,12 +1,12 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "assign", - "objectid": 1, + "action": "unlocked", "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_assign\\event\\submission_unlocked", - "action": "unlocked", - "relateduserid": 2 + "id": 1, + "objectid": 1, + "objecttable": "assign", + "relateduserid": 2, + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_assign/submission_unlocked/statements.json b/tests/mod_assign/submission_unlocked/statements.json index 2033546e2..38ff094c7 100644 --- a/tests/mod_assign/submission_unlocked/statements.json +++ b/tests/mod_assign/submission_unlocked/statements.json @@ -1,91 +1,91 @@ [ { "actor": { - "name": "test_fullname1", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unlocked", - "display": { - "en": "Unocked" - } - }, - "object": { - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission", - "name": { - "en": "test_name Submission" - } - } + }, + "name": "test_fullname1" }, "context": { - "language": "en", - "extensions": { - "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/for": { - "name": "test_fullname2", - "account": { - "homePage": "http://www.example.org", - "name": "2" - } - }, - "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_assign\\event\\submission_unlocked", - "event_function": "\\src\\transformer\\events\\mod_assign\\submission_locked" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment", "name": { "en": "test_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, + "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_assign\\submission_locked", + "event_name": "\\mod_assign\\event\\submission_unlocked", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/for": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "test_fullname2" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Unocked" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unlocked" } } ] diff --git a/tests/mod_assign/submission_viewed/data.json b/tests/mod_assign/submission_viewed/data.json index b9dd218b4..7bac6385b 100644 --- a/tests/mod_assign/submission_viewed/data.json +++ b/tests/mod_assign/submission_viewed/data.json @@ -1,14 +1,14 @@ { - "assign_submission": [ + "assign": [ { "id": 1, - "assignment": 1 + "name": "test_name" } ], - "assign": [ + "assign_submission": [ { - "id": 1, - "name": "test_name" + "assignment": 1, + "id": 1 } ], "modules": [ @@ -19,14 +19,14 @@ ], "user": [ { - "id": 1, + "email": "test1@test.com", "firstname": "test_fullname1", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "test_fullname2", - "email": "test2@test.com" + "id": 2 } ] } diff --git a/tests/mod_assign/submission_viewed/event.json b/tests/mod_assign/submission_viewed/event.json index b32faec61..dc89af31a 100644 --- a/tests/mod_assign/submission_viewed/event.json +++ b/tests/mod_assign/submission_viewed/event.json @@ -1,11 +1,11 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "assign", - "objectid": 1, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_assign\\event\\submission_viewed", - "relateduserid": 2 + "id": 1, + "objectid": 1, + "objecttable": "assign", + "relateduserid": 2, + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_assign/submission_viewed/statements.json b/tests/mod_assign/submission_viewed/statements.json index 1e58a1cb2..db780b89b 100644 --- a/tests/mod_assign/submission_viewed/statements.json +++ b/tests/mod_assign/submission_viewed/statements.json @@ -1,91 +1,91 @@ [ { "actor": { - "name": "test_fullname1", "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/assign/view.php?id=1#submission", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission", - "name": { - "en": "test_name Submission" - } - } + }, + "name": "test_fullname1" }, "context": { - "language": "en", - "extensions": { - "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/for": { - "name": "test_fullname2", - "account": { - "homePage": "http://www.example.org", - "name": "2" - } - }, - "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_assign\\event\\submission_viewed", - "event_function": "\\src\\transformer\\events\\mod_assign\\submission_viewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment", "name": { "en": "test_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, + "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_assign\\submission_viewed", + "event_name": "\\mod_assign\\event\\submission_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/for": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "test_fullname2" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_bigbluebuttonbn/activity_management_viewed/data.json b/tests/mod_bigbluebuttonbn/activity_management_viewed/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/activity_management_viewed/data.json +++ b/tests/mod_bigbluebuttonbn/activity_management_viewed/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/activity_management_viewed/event.json b/tests/mod_bigbluebuttonbn/activity_management_viewed/event.json index dd96e039f..78ab44a1a 100644 --- a/tests/mod_bigbluebuttonbn/activity_management_viewed/event.json +++ b/tests/mod_bigbluebuttonbn/activity_management_viewed/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\activity_management_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\activity_management_viewed" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/activity_management_viewed/statements.json b/tests/mod_bigbluebuttonbn/activity_management_viewed/statements.json index b4e9c6508..d447f6051 100644 --- a/tests/mod_bigbluebuttonbn/activity_management_viewed/statements.json +++ b/tests/mod_bigbluebuttonbn/activity_management_viewed/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\activity_management_viewed", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\activity_management_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\activity_management_viewed", + "event_name": "\\mod_bigbluebuttonbn\\event\\activity_management_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_bigbluebuttonbn/live_session/data.json b/tests/mod_bigbluebuttonbn/live_session/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/live_session/data.json +++ b/tests/mod_bigbluebuttonbn/live_session/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/live_session/event.json b/tests/mod_bigbluebuttonbn/live_session/event.json index 04641164b..5828a3013 100644 --- a/tests/mod_bigbluebuttonbn/live_session/event.json +++ b/tests/mod_bigbluebuttonbn/live_session/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\live_session_event", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\live_session_event" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/live_session/statements.json b/tests/mod_bigbluebuttonbn/live_session/statements.json index 2ba0c4384..3bfd38da3 100644 --- a/tests/mod_bigbluebuttonbn/live_session/statements.json +++ b/tests/mod_bigbluebuttonbn/live_session/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\live_session_event", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\live_session" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\live_session", + "event_name": "\\mod_bigbluebuttonbn\\event\\live_session_event", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Live" + }, + "id": "http://id.tincanapi.com/verb/live" } } ] diff --git a/tests/mod_bigbluebuttonbn/meeting_created/data.json b/tests/mod_bigbluebuttonbn/meeting_created/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/meeting_created/data.json +++ b/tests/mod_bigbluebuttonbn/meeting_created/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/meeting_created/event.json b/tests/mod_bigbluebuttonbn/meeting_created/event.json index 6e181aa6d..381262a2f 100644 --- a/tests/mod_bigbluebuttonbn/meeting_created/event.json +++ b/tests/mod_bigbluebuttonbn/meeting_created/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_created", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_created" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/meeting_created/statements.json b/tests/mod_bigbluebuttonbn/meeting_created/statements.json index cfce61bfd..f7956e698 100644 --- a/tests/mod_bigbluebuttonbn/meeting_created/statements.json +++ b/tests/mod_bigbluebuttonbn/meeting_created/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\meeting_created", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_created" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_created", + "event_name": "\\mod_bigbluebuttonbn\\event\\meeting_created", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/schema/1.0/create" } } ] diff --git a/tests/mod_bigbluebuttonbn/meeting_ended/data.json b/tests/mod_bigbluebuttonbn/meeting_ended/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/meeting_ended/data.json +++ b/tests/mod_bigbluebuttonbn/meeting_ended/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/meeting_ended/event.json b/tests/mod_bigbluebuttonbn/meeting_ended/event.json index aa629120f..361e7cf26 100644 --- a/tests/mod_bigbluebuttonbn/meeting_ended/event.json +++ b/tests/mod_bigbluebuttonbn/meeting_ended/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_ended", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_ended" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/meeting_ended/statements.json b/tests/mod_bigbluebuttonbn/meeting_ended/statements.json index 0e777e304..c05326bfb 100644 --- a/tests/mod_bigbluebuttonbn/meeting_ended/statements.json +++ b/tests/mod_bigbluebuttonbn/meeting_ended/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\meeting_ended", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_ended" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_ended", + "event_name": "\\mod_bigbluebuttonbn\\event\\meeting_ended", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Adjourned" + }, + "id": "http://id.tincanapi.com/verb/adjourned" } } ] diff --git a/tests/mod_bigbluebuttonbn/meeting_joined/data.json b/tests/mod_bigbluebuttonbn/meeting_joined/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/meeting_joined/data.json +++ b/tests/mod_bigbluebuttonbn/meeting_joined/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/meeting_joined/event.json b/tests/mod_bigbluebuttonbn/meeting_joined/event.json index a9b71d966..eda0e5679 100644 --- a/tests/mod_bigbluebuttonbn/meeting_joined/event.json +++ b/tests/mod_bigbluebuttonbn/meeting_joined/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_joined", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_joined" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/meeting_joined/statements.json b/tests/mod_bigbluebuttonbn/meeting_joined/statements.json index 53f30ad00..01e45dc87 100644 --- a/tests/mod_bigbluebuttonbn/meeting_joined/statements.json +++ b/tests/mod_bigbluebuttonbn/meeting_joined/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\meeting_joined", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_joined" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_joined", + "event_name": "\\mod_bigbluebuttonbn\\event\\meeting_joined", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Joined" + }, + "id": "http://activitystrea.ms/schema/1.0/join" } } ] diff --git a/tests/mod_bigbluebuttonbn/meeting_left/data.json b/tests/mod_bigbluebuttonbn/meeting_left/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/meeting_left/data.json +++ b/tests/mod_bigbluebuttonbn/meeting_left/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/meeting_left/event.json b/tests/mod_bigbluebuttonbn/meeting_left/event.json index c34b8a26b..425abb5ce 100644 --- a/tests/mod_bigbluebuttonbn/meeting_left/event.json +++ b/tests/mod_bigbluebuttonbn/meeting_left/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_left", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_left" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/meeting_left/statements.json b/tests/mod_bigbluebuttonbn/meeting_left/statements.json index e9bc8c707..002d5e221 100644 --- a/tests/mod_bigbluebuttonbn/meeting_left/statements.json +++ b/tests/mod_bigbluebuttonbn/meeting_left/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\meeting_left", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_left" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\meeting_left", + "event_name": "\\mod_bigbluebuttonbn\\event\\meeting_left", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Left" + }, + "id": "http://activitystrea.ms/schema/1.0/leave" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_deleted/data.json b/tests/mod_bigbluebuttonbn/recording_deleted/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/recording_deleted/data.json +++ b/tests/mod_bigbluebuttonbn/recording_deleted/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/recording_deleted/event.json b/tests/mod_bigbluebuttonbn/recording_deleted/event.json index 5444ed237..6773c866a 100644 --- a/tests/mod_bigbluebuttonbn/recording_deleted/event.json +++ b/tests/mod_bigbluebuttonbn/recording_deleted/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_deleted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_deleted" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/recording_deleted/statements.json b/tests/mod_bigbluebuttonbn/recording_deleted/statements.json index c520e242a..366416258 100644 --- a/tests/mod_bigbluebuttonbn/recording_deleted/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_deleted/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\recording_deleted", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_deleted" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_deleted", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_deleted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Deleted" + }, + "id": "https://w3id.org/xapi/dod-isd/verbs/deleted" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_edited/data.json b/tests/mod_bigbluebuttonbn/recording_edited/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/recording_edited/data.json +++ b/tests/mod_bigbluebuttonbn/recording_edited/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/recording_edited/event.json b/tests/mod_bigbluebuttonbn/recording_edited/event.json index 5444ed237..6773c866a 100644 --- a/tests/mod_bigbluebuttonbn/recording_edited/event.json +++ b/tests/mod_bigbluebuttonbn/recording_edited/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_deleted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_deleted" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/recording_edited/statements.json b/tests/mod_bigbluebuttonbn/recording_edited/statements.json index c520e242a..366416258 100644 --- a/tests/mod_bigbluebuttonbn/recording_edited/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_edited/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\recording_deleted", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_deleted" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_deleted", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_deleted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Deleted" + }, + "id": "https://w3id.org/xapi/dod-isd/verbs/deleted" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_imported/data.json b/tests/mod_bigbluebuttonbn/recording_imported/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/recording_imported/data.json +++ b/tests/mod_bigbluebuttonbn/recording_imported/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/recording_imported/event.json b/tests/mod_bigbluebuttonbn/recording_imported/event.json index 2d79b9501..5aacc2661 100644 --- a/tests/mod_bigbluebuttonbn/recording_imported/event.json +++ b/tests/mod_bigbluebuttonbn/recording_imported/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_imported", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_imported" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/recording_imported/statements.json b/tests/mod_bigbluebuttonbn/recording_imported/statements.json index c3793bea6..378ad655d 100644 --- a/tests/mod_bigbluebuttonbn/recording_imported/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_imported/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\recording_imported", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_imported" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_imported", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_imported", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Imported" + }, + "id": "http://adlnet.gov/expapi/verbs/imported" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_protected/data.json b/tests/mod_bigbluebuttonbn/recording_protected/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/recording_protected/data.json +++ b/tests/mod_bigbluebuttonbn/recording_protected/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/recording_protected/event.json b/tests/mod_bigbluebuttonbn/recording_protected/event.json index 40b8acaf9..7ff06f774 100644 --- a/tests/mod_bigbluebuttonbn/recording_protected/event.json +++ b/tests/mod_bigbluebuttonbn/recording_protected/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_protected", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_protected" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/recording_protected/statements.json b/tests/mod_bigbluebuttonbn/recording_protected/statements.json index 3c9bfbfc1..4913ae36f 100644 --- a/tests/mod_bigbluebuttonbn/recording_protected/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_protected/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\recording_protected", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_protected" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_protected", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_protected", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Secured" + }, + "id": "http://id.tincanapi.com/verb/secured" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_published/data.json b/tests/mod_bigbluebuttonbn/recording_published/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/recording_published/data.json +++ b/tests/mod_bigbluebuttonbn/recording_published/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/recording_published/event.json b/tests/mod_bigbluebuttonbn/recording_published/event.json index 1bd031bbd..812859d75 100644 --- a/tests/mod_bigbluebuttonbn/recording_published/event.json +++ b/tests/mod_bigbluebuttonbn/recording_published/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_published", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_published" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/recording_published/statements.json b/tests/mod_bigbluebuttonbn/recording_published/statements.json index 691328d63..7a7f2eee4 100644 --- a/tests/mod_bigbluebuttonbn/recording_published/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_published/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\recording_published", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_published" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_published", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_published", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Published" + }, + "id": "https://w3id.org/xapi/dod-isd/verbs/published" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_unprotected/data.json b/tests/mod_bigbluebuttonbn/recording_unprotected/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/recording_unprotected/data.json +++ b/tests/mod_bigbluebuttonbn/recording_unprotected/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/recording_unprotected/event.json b/tests/mod_bigbluebuttonbn/recording_unprotected/event.json index 83cd51474..29a0a17bc 100644 --- a/tests/mod_bigbluebuttonbn/recording_unprotected/event.json +++ b/tests/mod_bigbluebuttonbn/recording_unprotected/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_unprotected", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_unprotected" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json b/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json index af740043d..5f4830b39 100644 --- a/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\recording_unprotected", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_unprotected" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_unprotected", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_unprotected", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Unsecured" + }, + "id": "http://id.tincanapi.com/verb/unsecured" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_unpublished/data.json b/tests/mod_bigbluebuttonbn/recording_unpublished/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/recording_unpublished/data.json +++ b/tests/mod_bigbluebuttonbn/recording_unpublished/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/recording_unpublished/event.json b/tests/mod_bigbluebuttonbn/recording_unpublished/event.json index f065b60b8..b81e86968 100644 --- a/tests/mod_bigbluebuttonbn/recording_unpublished/event.json +++ b/tests/mod_bigbluebuttonbn/recording_unpublished/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_unpublished", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_unpublished" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json b/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json index 97c500209..781f7a147 100644 --- a/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\recording_unpublished", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_unpublished" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_unpublished", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_unpublished", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Retracted" + }, + "id": "http://activitystrea.ms/schema/1.0/retract" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_viewed/data.json b/tests/mod_bigbluebuttonbn/recording_viewed/data.json index ad97bc94c..3c5c87afa 100644 --- a/tests/mod_bigbluebuttonbn/recording_viewed/data.json +++ b/tests/mod_bigbluebuttonbn/recording_viewed/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "bigbluebuttonbn": [ { "id": 1, - "name": "bigbluebuttonbn" + "name": "test_bigbluebuttonbn_name" } ], - "bigbluebuttonbn": [ + "modules": [ { "id": 1, - "name": "test_bigbluebuttonbn_name" + "name": "bigbluebuttonbn" } ] } diff --git a/tests/mod_bigbluebuttonbn/recording_viewed/event.json b/tests/mod_bigbluebuttonbn/recording_viewed/event.json index a8315a719..cbf5cec5b 100644 --- a/tests/mod_bigbluebuttonbn/recording_viewed/event.json +++ b/tests/mod_bigbluebuttonbn/recording_viewed/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "bigbluebuttonbn", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_viewed" + "objecttable": "bigbluebuttonbn", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_bigbluebuttonbn/recording_viewed/statements.json b/tests/mod_bigbluebuttonbn/recording_viewed/statements.json index e28982f4a..6c243a133 100644 --- a/tests/mod_bigbluebuttonbn/recording_viewed/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_viewed/statements.json @@ -1,74 +1,74 @@ [ { "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/bigbluebuttonbn/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/meeting", - "name": { - "en": "test_bigbluebuttonbn_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_bigbluebuttonbn\\event\\recording_viewed", - "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_bigbluebuttonbn\\recording_viewed", + "event_name": "\\mod_bigbluebuttonbn\\event\\recording_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_book/chapter_created/data.json b/tests/mod_book/chapter_created/data.json index ce17a3c3e..cf73c42eb 100644 --- a/tests/mod_book/chapter_created/data.json +++ b/tests/mod_book/chapter_created/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "book" - } - ], "book": [ { "id": 1, @@ -13,12 +7,18 @@ ], "book_chapters": [ { - "id": 1, "bookid": "1", + "content": "

test_book_chapter_content

", + "id": 1, "pagenum": "1", "subchapter": "0", - "title": "test_book_chapter_title", - "content": "

test_book_chapter_content

" + "title": "test_book_chapter_title" + } + ], + "modules": [ + { + "id": 1, + "name": "book" } ] } diff --git a/tests/mod_book/chapter_created/event.json b/tests/mod_book/chapter_created/event.json index b325e4e82..a882d1bb1 100644 --- a/tests/mod_book/chapter_created/event.json +++ b/tests/mod_book/chapter_created/event.json @@ -1,6 +1,6 @@ { - "courseid": 1, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_book\\event\\chapter_created", "id": 1, "objectid": 1, diff --git a/tests/mod_book/chapter_created/statements.json b/tests/mod_book/chapter_created/statements.json index e15edde97..7b23f1df8 100644 --- a/tests/mod_book/chapter_created/statements.json +++ b/tests/mod_book/chapter_created/statements.json @@ -1,74 +1,55 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/create", - "display": { - "en": "Created" - } - }, - "object": { - "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/chapter", - "name": { - "en": "test_book_chapter_title" - }, - "description": { - "en": "test_book_chapter_content" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "id": "http://www.example.org", - "objectType": "Activity" + } } ], "parent": [ { - "id": "http://www.example.org/mod/book/view.php?id=1", "definition": { - "type": "http://id.tincanapi.com/activitytype/book", "name": { "en": "test_name" - } + }, + "type": "http://id.tincanapi.com/activitytype/book" }, + "id": "http://www.example.org/mod/book/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -82,6 +63,25 @@ } }, "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_book_chapter_content" + }, + "name": { + "en": "test_book_chapter_title" + }, + "type": "http://id.tincanapi.com/activitytype/chapter" + }, + "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/data.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/data.json index ceaa5fc7a..ff34002e7 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/data.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "book" - } - ], "book": [ { "id": 1, @@ -13,20 +7,26 @@ ], "book_chapters": [ { - "id": 1, "bookid": 1, + "content": "

test_parent_content

", + "id": 1, "pagenum": 1, "subchapter": 0, - "title": "test_parent_name", - "content": "

test_parent_content

" + "title": "test_parent_name" }, { - "id": 2, "bookid": 1, + "content": "

test_book_chapter_content

", + "id": 2, "pagenum": 2, "subchapter": 1, - "title": "test_book_chapter_title", - "content": "

test_book_chapter_content

" + "title": "test_book_chapter_title" + } + ], + "modules": [ + { + "id": 1, + "name": "book" } ] } diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/event.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/event.json index 99d591432..4c7e5dcd0 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/event.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_book\\event\\chapter_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "book_chapters", "objectid": 2, - "contextinstanceid": 1, - "eventname": "\\mod_book\\event\\chapter_viewed" + "objecttable": "book_chapters", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/statements.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/statements.json index e0e8872b1..80d88a431 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/statements.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/statements.json @@ -1,100 +1,100 @@ [ { "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&chapterid=2", - "definition": { - "type": "http://id.tincanapi.com/activitytype/chapter", - "name": { - "en": "test_book_chapter_title" - }, - "description": { - "en": "test_book_chapter_content" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_book\\event\\chapter_viewed", - "event_function": "\\src\\transformer\\events\\mod_book\\chapter_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/chapter", "name": { - "en": "test_parent_name" + "en": "test_site_fullname" }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { "description": { "en": "test_parent_content" - } + }, + "name": { + "en": "test_parent_name" + }, + "type": "http://id.tincanapi.com/activitytype/chapter" }, + "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/book/view.php?id=1", "definition": { - "type": "http://id.tincanapi.com/activitytype/book", "name": { "en": "test_book_name" - } + }, + "type": "http://id.tincanapi.com/activitytype/book" }, + "id": "http://www.example.org/mod/book/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_book\\chapter_viewed", + "event_name": "\\mod_book\\event\\chapter_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_book_chapter_content" + }, + "name": { + "en": "test_book_chapter_title" + }, + "type": "http://id.tincanapi.com/activitytype/chapter" + }, + "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/data.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/data.json index 8fd012ba3..d9b9e5a9c 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/data.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "book" - } - ], "book": [ { "id": 1, @@ -13,12 +7,18 @@ ], "book_chapters": [ { - "id": 1, "bookid": "1", + "content": "

test_book_chapter_content

", + "id": 1, "pagenum": "1", "subchapter": "0", - "title": "test_book_chapter_title", - "content": "

test_book_chapter_content

" + "title": "test_book_chapter_title" + } + ], + "modules": [ + { + "id": 1, + "name": "book" } ] } diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/event.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/event.json index dd1e42e40..fb5d4a0f4 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/event.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_book\\event\\chapter_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "book_chapters", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_book\\event\\chapter_viewed" + "objecttable": "book_chapters", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/statements.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/statements.json index 32f84ef17..c8d6c3cac 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/statements.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/statements.json @@ -1,87 +1,87 @@ [ { "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&chapterid=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/chapter", - "name": { - "en": "test_book_chapter_title" - }, - "description": { - "en": "test_book_chapter_content" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_book\\event\\chapter_viewed", - "event_function": "\\src\\transformer\\events\\mod_book\\chapter_viewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/book/view.php?id=1", "definition": { - "type": "http://id.tincanapi.com/activitytype/book", "name": { "en": "test_book_name" - } + }, + "type": "http://id.tincanapi.com/activitytype/book" }, + "id": "http://www.example.org/mod/book/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_book\\chapter_viewed", + "event_name": "\\mod_book\\event\\chapter_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_book_chapter_content" + }, + "name": { + "en": "test_book_chapter_title" + }, + "type": "http://id.tincanapi.com/activitytype/chapter" + }, + "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_book/course_module_viewed/existing_module/data.json b/tests/mod_book/course_module_viewed/existing_module/data.json index b0a4b39c1..847c76f86 100644 --- a/tests/mod_book/course_module_viewed/existing_module/data.json +++ b/tests/mod_book/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "book": [ { "id": 1, - "name": "book" + "name": "test_name" } ], - "book": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "book" } ] } diff --git a/tests/mod_book/course_module_viewed/existing_module/event.json b/tests/mod_book/course_module_viewed/existing_module/event.json index 37b282b60..fcd6e6702 100644 --- a/tests/mod_book/course_module_viewed/existing_module/event.json +++ b/tests/mod_book/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_book\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_book\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_book/course_module_viewed/existing_module/statements.json b/tests/mod_book/course_module_viewed/existing_module/statements.json index 6272d7c87..577e3f529 100644 --- a/tests/mod_book/course_module_viewed/existing_module/statements.json +++ b/tests/mod_book/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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://id.tincanapi.com/activitytype/book", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_book\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_book\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/book" + }, + "id": "http://www.example.org/mod/book/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_chat/course_module_viewed/existing_module/data.json b/tests/mod_chat/course_module_viewed/existing_module/data.json index 1fdb6b1c0..d7aee7980 100644 --- a/tests/mod_chat/course_module_viewed/existing_module/data.json +++ b/tests/mod_chat/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "chat": [ { "id": 1, - "name": "chat" + "name": "test_name" } ], - "chat": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "chat" } ] } diff --git a/tests/mod_chat/course_module_viewed/existing_module/event.json b/tests/mod_chat/course_module_viewed/existing_module/event.json index 486aa04e2..7c3d0e362 100644 --- a/tests/mod_chat/course_module_viewed/existing_module/event.json +++ b/tests/mod_chat/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_chat\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_chat\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_chat/course_module_viewed/existing_module/statements.json b/tests/mod_chat/course_module_viewed/existing_module/statements.json index 5192d2698..1c54b7fd3 100644 --- a/tests/mod_chat/course_module_viewed/existing_module/statements.json +++ b/tests/mod_chat/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/chat/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/chat-channel", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_chat\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_chat\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/chat-channel" + }, + "id": "http://www.example.org/mod/chat/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_choice/answer_created/data.json b/tests/mod_choice/answer_created/data.json index 71d43c049..16c29ff50 100644 --- a/tests/mod_choice/answer_created/data.json +++ b/tests/mod_choice/answer_created/data.json @@ -1,34 +1,34 @@ { - "modules": [ + "choice": [ { "id": 1, - "name": "choice" + "intro": "

That is the question.

", + "name": "To be or not to be?" } ], - "choice": [ + "choice_answers": [ { + "choiceid": 1, "id": 1, - "name": "To be or not to be?", - "intro": "

That is the question.

" + "optionid": 1 } ], "choice_options": [ { - "id": 2, "choiceid": 1, + "id": 2, "text": "Not to be" }, { - "id": 1, "choiceid": 1, + "id": 1, "text": "To be" } ], - "choice_answers": [ + "modules": [ { "id": 1, - "choiceid": 1, - "optionid": 1 + "name": "choice" } ] } diff --git a/tests/mod_choice/answer_created/event.json b/tests/mod_choice/answer_created/event.json index 1e24970d0..02544bc32 100644 --- a/tests/mod_choice/answer_created/event.json +++ b/tests/mod_choice/answer_created/event.json @@ -1,6 +1,6 @@ { - "courseid": 1, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_choice\\event\\answer_created", "id": 1, "objectid": 1, diff --git a/tests/mod_choice/answer_created/statements.json b/tests/mod_choice/answer_created/statements.json index 04a5c0285..24aee77d4 100644 --- a/tests/mod_choice/answer_created/statements.json +++ b/tests/mod_choice/answer_created/statements.json @@ -7,79 +7,39 @@ }, "name": "test_fullname" }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" - }, - "object": { - "id": "http://www.example.org/mod/choice/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "To be or not to be?" - }, - "description": { - "en": "That is the question." - }, - "interactionType": "choice", - "correctResponsesPattern": [ - "to-be[,]not-to-be" - ], - "choices": [ - { - "id": "to-be", - "description": { - "en": "To be" - } - }, - { - "id": "not-to-be", - "description": { - "en": "Not to be" - } - } - ] - }, - "objectType": "Activity" - }, - "result": { - "response": "To be" - }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], "parent": [ { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -93,6 +53,46 @@ } }, "language": "en" + }, + "object": { + "definition": { + "choices": [ + { + "description": { + "en": "To be" + }, + "id": "to-be" + }, + { + "description": { + "en": "Not to be" + }, + "id": "not-to-be" + } + ], + "correctResponsesPattern": [ + "to-be[,]not-to-be" + ], + "description": { + "en": "That is the question." + }, + "interactionType": "choice", + "name": { + "en": "To be or not to be?" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/choice/view.php?id=1", + "objectType": "Activity" + }, + "result": { + "response": "To be" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_choice/course_module_viewed/existing_module/data.json b/tests/mod_choice/course_module_viewed/existing_module/data.json index e38bf7d5f..c04d3a8d3 100644 --- a/tests/mod_choice/course_module_viewed/existing_module/data.json +++ b/tests/mod_choice/course_module_viewed/existing_module/data.json @@ -1,34 +1,34 @@ { - "modules": [ + "choice": [ { "id": 1, - "name": "choice" + "intro": "

That is the question.

", + "name": "To be or not to be?" } ], - "choice": [ + "choice_answers": [ { + "choiceid": 1, "id": 1, - "name": "To be or not to be?", - "intro": "

That is the question.

" + "optionid": 1 } ], "choice_options": [ { - "id": 1, "choiceid": 1, + "id": 1, "text": "To be" }, { - "id": 2, "choiceid": 1, + "id": 2, "text": "Not to be" } ], - "choice_answers": [ + "modules": [ { "id": 1, - "choiceid": 1, - "optionid": 1 + "name": "choice" } ] } diff --git a/tests/mod_choice/course_module_viewed/existing_module/event.json b/tests/mod_choice/course_module_viewed/existing_module/event.json index cbe892108..4563e814e 100644 --- a/tests/mod_choice/course_module_viewed/existing_module/event.json +++ b/tests/mod_choice/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_choice\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_choice\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_choice/course_module_viewed/existing_module/statements.json b/tests/mod_choice/course_module_viewed/existing_module/statements.json index 85c022222..393364c65 100644 --- a/tests/mod_choice/course_module_viewed/existing_module/statements.json +++ b/tests/mod_choice/course_module_viewed/existing_module/statements.json @@ -1,95 +1,95 @@ [ { "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": "To be or not to be?" - }, - "description": { - "en": "That is the question." - }, - "interactionType": "choice", - "correctResponsesPattern": [ - "to-be[,]not-to-be" - ], - "choices": [ - { - "id": "to-be", - "description": { - "en": "To be" - } - }, - { - "id": "not-to-be", - "description": { - "en": "Not to be" - } - } - ] }, - "objectType": "Activity" + "name": "test_fullname" }, "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": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_choice\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "choices": [ + { + "description": { + "en": "To be" + }, + "id": "to-be" + }, + { + "description": { + "en": "Not to be" + }, + "id": "not-to-be" + } + ], + "correctResponsesPattern": [ + "to-be[,]not-to-be" + ], + "description": { + "en": "That is the question." + }, + "interactionType": "choice", + "name": { + "en": "To be or not to be?" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/choice/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_data/course_module_viewed/existing_module/data.json b/tests/mod_data/course_module_viewed/existing_module/data.json index 67160e65b..4b6e502a5 100644 --- a/tests/mod_data/course_module_viewed/existing_module/data.json +++ b/tests/mod_data/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "data": [ { "id": 1, - "name": "data" + "name": "test_name" } ], - "data": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "data" } ] } diff --git a/tests/mod_data/course_module_viewed/existing_module/event.json b/tests/mod_data/course_module_viewed/existing_module/event.json index 11d5220d9..078dcd9a8 100644 --- a/tests/mod_data/course_module_viewed/existing_module/event.json +++ b/tests/mod_data/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_data\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_data\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_data/course_module_viewed/existing_module/statements.json b/tests/mod_data/course_module_viewed/existing_module/statements.json index 48be9aa76..bfe19a6d3 100644 --- a/tests/mod_data/course_module_viewed/existing_module/statements.json +++ b/tests/mod_data/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_data\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://xapi.org.au/contentprofile/activitytype/database" + }, + "id": "http://www.example.org/mod/data/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/data.json b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/data.json index 574fb9954..91e18efd1 100644 --- a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/data.json +++ b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "facetoface": [ { "id": 1, - "name": "facetoface" + "name": "test_facetoface_name" } ], - "facetoface": [ + "modules": [ { "id": 1, - "name": "test_facetoface_name" + "name": "facetoface" } ] } diff --git a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/event.json b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/event.json index db9216904..913d66095 100644 --- a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/event.json +++ b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_facetoface\\event\\cancel_booking", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "facetoface", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_facetoface\\event\\cancel_booking" + "objecttable": "facetoface", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json index 1d6719b9a..1be3e09b0 100644 --- a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json +++ b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json @@ -1,74 +1,74 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://id.tincanapi.com/verb/unregistered", - "display": { - "en": "Unregistered" - } - }, - "object": { - "id": "http://www.example.org/mod/facetoface/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion", - "name": { - "en": "test_facetoface_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_facetoface\\event\\cancel_booking", - "event_function": "\\src\\transformer\\events\\mod_facetoface\\cancel_booking" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_facetoface\\cancel_booking", + "event_name": "\\mod_facetoface\\event\\cancel_booking", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_facetoface_name" + }, + "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" + }, + "id": "http://www.example.org/mod/facetoface/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Unregistered" + }, + "id": "http://id.tincanapi.com/verb/unregistered" } } ] diff --git a/tests/mod_facetoface/course_module_viewed/existing_module/data.json b/tests/mod_facetoface/course_module_viewed/existing_module/data.json index 4f0f7392d..feefbf040 100644 --- a/tests/mod_facetoface/course_module_viewed/existing_module/data.json +++ b/tests/mod_facetoface/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "facetoface": [ { "id": 1, - "name": "facetoface" + "name": "test_name" } ], - "facetoface": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "facetoface" } ] } diff --git a/tests/mod_facetoface/course_module_viewed/existing_module/event.json b/tests/mod_facetoface/course_module_viewed/existing_module/event.json index cf838704f..b2560b333 100644 --- a/tests/mod_facetoface/course_module_viewed/existing_module/event.json +++ b/tests/mod_facetoface/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_facetoface\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_facetoface\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_facetoface/course_module_viewed/existing_module/statements.json b/tests/mod_facetoface/course_module_viewed/existing_module/statements.json index 330f11bcd..bfe06d0d4 100644 --- a/tests/mod_facetoface/course_module_viewed/existing_module/statements.json +++ b/tests/mod_facetoface/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/facetoface/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_facetoface\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_facetoface\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" + }, + "id": "http://www.example.org/mod/facetoface/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_facetoface/signup_success/existing_signup_success/data.json b/tests/mod_facetoface/signup_success/existing_signup_success/data.json index 574fb9954..91e18efd1 100644 --- a/tests/mod_facetoface/signup_success/existing_signup_success/data.json +++ b/tests/mod_facetoface/signup_success/existing_signup_success/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "facetoface": [ { "id": 1, - "name": "facetoface" + "name": "test_facetoface_name" } ], - "facetoface": [ + "modules": [ { "id": 1, - "name": "test_facetoface_name" + "name": "facetoface" } ] } diff --git a/tests/mod_facetoface/signup_success/existing_signup_success/event.json b/tests/mod_facetoface/signup_success/existing_signup_success/event.json index d0302ddcb..2865e4b7d 100644 --- a/tests/mod_facetoface/signup_success/existing_signup_success/event.json +++ b/tests/mod_facetoface/signup_success/existing_signup_success/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_facetoface\\event\\signup_success", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "facetoface", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_facetoface\\event\\signup_success" + "objecttable": "facetoface", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_facetoface/signup_success/existing_signup_success/statements.json b/tests/mod_facetoface/signup_success/existing_signup_success/statements.json index 242ce6ee3..2eaf3e514 100644 --- a/tests/mod_facetoface/signup_success/existing_signup_success/statements.json +++ b/tests/mod_facetoface/signup_success/existing_signup_success/statements.json @@ -1,74 +1,74 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/registered", - "display": { - "en": "Registered" - } - }, - "object": { - "id": "http://www.example.org/mod/facetoface/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion", - "name": { - "en": "test_facetoface_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_facetoface\\event\\signup_success", - "event_function": "\\src\\transformer\\events\\mod_facetoface\\signup_success" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_facetoface\\signup_success", + "event_name": "\\mod_facetoface\\event\\signup_success", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_facetoface_name" + }, + "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" + }, + "id": "http://www.example.org/mod/facetoface/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Registered" + }, + "id": "http://adlnet.gov/expapi/verbs/registered" } } ] diff --git a/tests/mod_facetoface/take_attendance/existing_attendance_taken/data.json b/tests/mod_facetoface/take_attendance/existing_attendance_taken/data.json index 1d91030df..93d0b234e 100644 --- a/tests/mod_facetoface/take_attendance/existing_attendance_taken/data.json +++ b/tests/mod_facetoface/take_attendance/existing_attendance_taken/data.json @@ -1,22 +1,4 @@ { - "user": [ - { - "id": 1, - "firstname": "test_instructor_name", - "email": "instructor@test.com" - }, - { - "id": 2, - "firstname": "test_attendee_name", - "email": "attendee@test.com" - } - ], - "modules": [ - { - "id": 1, - "name": "facetoface" - } - ], "facetoface": [ { "id": 1, @@ -25,31 +7,49 @@ ], "facetoface_sessions": [ { - "id": 1, - "facetoface": 1 + "facetoface": 1, + "id": 1 } ], - "facetoface_signups": [ + "facetoface_sessions_dates": [ { "id": 1, "sessionid": 1, - "userid": 2 + "timefinish": 123123123, + "timestart": 123123123 } ], - "facetoface_sessions_dates": [ + "facetoface_signups": [ { "id": 1, "sessionid": 1, - "timestart": 123123123, - "timefinish": 123123123 + "userid": 2 } ], "facetoface_signups_status": [ { "id": 1, "signupid": 1, - "timecreated": 123123123, - "statuscode": 100 + "statuscode": 100, + "timecreated": 123123123 + } + ], + "modules": [ + { + "id": 1, + "name": "facetoface" + } + ], + "user": [ + { + "email": "instructor@test.com", + "firstname": "test_instructor_name", + "id": 1 + }, + { + "email": "attendee@test.com", + "firstname": "test_attendee_name", + "id": 2 } ] } diff --git a/tests/mod_facetoface/take_attendance/existing_attendance_taken/event.json b/tests/mod_facetoface/take_attendance/existing_attendance_taken/event.json index 3f89bfefb..662b51719 100644 --- a/tests/mod_facetoface/take_attendance/existing_attendance_taken/event.json +++ b/tests/mod_facetoface/take_attendance/existing_attendance_taken/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_facetoface\\event\\take_attendance", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "facetoface", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_facetoface\\event\\take_attendance" + "objecttable": "facetoface", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json b/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json index d1b586d5d..531f33f6e 100644 --- a/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json +++ b/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json @@ -1,85 +1,85 @@ [ { "actor": { - "name": "test_attendee_name", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/attended", - "display": { - "en": "Attended" - } - }, - "object": { - "id": "http://www.example.org/mod/facetoface/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion", - "name": { - "en": "test_facetoface_name" - } }, - "objectType": "Activity" - }, - "result": { - "duration": "PT0S", - "completion": true + "name": "test_attendee_name" }, "context": { - "language": "en", - "instructor": { - "name": "test_instructor_name", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "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_facetoface\\event\\take_attendance", - "event_function": "\\src\\transformer\\events\\mod_facetoface\\take_attendance" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_facetoface\\take_attendance", + "event_name": "\\mod_facetoface\\event\\take_attendance", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_instructor_name" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_facetoface_name" + }, + "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" + }, + "id": "http://www.example.org/mod/facetoface/view.php?id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "duration": "PT0S" + }, + "verb": { + "display": { + "en": "Attended" + }, + "id": "http://adlnet.gov/expapi/verbs/attended" } } ] diff --git a/tests/mod_feedback/course_module_viewed/viewing_feedback/data.json b/tests/mod_feedback/course_module_viewed/viewing_feedback/data.json index 78c432ac1..d5f88b86b 100644 --- a/tests/mod_feedback/course_module_viewed/viewing_feedback/data.json +++ b/tests/mod_feedback/course_module_viewed/viewing_feedback/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "feedback": [ { "id": 1, - "name": "feedback" + "name": "test_name" } ], - "feedback": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "feedback" } ] } diff --git a/tests/mod_feedback/course_module_viewed/viewing_feedback/event.json b/tests/mod_feedback/course_module_viewed/viewing_feedback/event.json index e82e710b1..3a9da48a3 100644 --- a/tests/mod_feedback/course_module_viewed/viewing_feedback/event.json +++ b/tests/mod_feedback/course_module_viewed/viewing_feedback/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_feedback\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_feedback\\event\\course_module_viewed" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_feedback/course_module_viewed/viewing_feedback/statements.json b/tests/mod_feedback/course_module_viewed/viewing_feedback/statements.json index 4d9056aea..9e9737deb 100644 --- a/tests/mod_feedback/course_module_viewed/viewing_feedback/statements.json +++ b/tests/mod_feedback/course_module_viewed/viewing_feedback/statements.json @@ -1,74 +1,74 @@ [ { "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/feedback/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_feedback\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_feedback\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_feedback/response_submitted/multichoice/data.json b/tests/mod_feedback/response_submitted/multichoice/data.json index 3f73c969b..bbf94b5ce 100644 --- a/tests/mod_feedback/response_submitted/multichoice/data.json +++ b/tests/mod_feedback/response_submitted/multichoice/data.json @@ -1,38 +1,38 @@ { - "modules": [ + "feedback": [ { "id": 1, - "name": "feedback" + "name": "test_feedback_name" } ], "feedback_completed": [ { - "id": 1, + "anonymous_response": 0, "feedback": 1, - "anonymous_response": 0 - } - ], - "feedback": [ - { - "id": 1, - "name": "test_feedback_name" + "id": 1 } ], "feedback_item": [ { - "id": 1, "feedback": 1, + "id": 1, "name": "test_feedback_item", - "typ": "multichoice", - "presentation": "r>>>>>test_choice_1\n|test_choice_2\n|test_choice_3" + "presentation": "r>>>>>test_choice_1\n|test_choice_2\n|test_choice_3", + "typ": "multichoice" } ], "feedback_value": [ { + "completed": 1, "id": 1, "item": 1, - "completed": 1, "value": "2" } + ], + "modules": [ + { + "id": 1, + "name": "feedback" + } ] } diff --git a/tests/mod_feedback/response_submitted/multichoice/event.json b/tests/mod_feedback/response_submitted/multichoice/event.json index bd62a9675..b0ba554b4 100644 --- a/tests/mod_feedback/response_submitted/multichoice/event.json +++ b/tests/mod_feedback/response_submitted/multichoice/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_feedback\\event\\response_submitted" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_feedback/response_submitted/multichoice/statements.json b/tests/mod_feedback/response_submitted/multichoice/statements.json index a28de9abb..13a5b3df8 100644 --- a/tests/mod_feedback/response_submitted/multichoice/statements.json +++ b/tests/mod_feedback/response_submitted/multichoice/statements.json @@ -1,187 +1,187 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", - "name": { - "en": "test_feedback_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_feedback_item" + "en": "test_feedback_name" }, - "interactionType": "choice", - "correctResponsesPattern": [ - "test-choice-1[,]test-choice-2[,]test-choice-3" - ], - "choices": [ - { - "id": "test-choice-1", - "description": { - "en": "test_choice_1" - } - }, - { - "id": "test-choice-2", - "description": { - "en": "test_choice_2" - } - }, - { - "id": "test-choice-3", - "description": { - "en": "test_choice_3" - } - } - ] + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, - "result": { - "response": "test_choice_2", - "completion": true, - "extensions": { - "http://learninglocker.net/xapi/cmi/choice/response": "test_choice_2" - } + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/schema/1.0/submit" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", "name": { "en": "test_feedback_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } - ], - "category": [ + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "choices": [ { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } + "description": { + "en": "test_choice_1" }, - "objectType": "Activity" + "id": "test-choice-1" + }, + { + "description": { + "en": "test_choice_2" + }, + "id": "test-choice-2" + }, + { + "description": { + "en": "test_choice_3" + }, + "id": "test-choice-3" } - ] - } + ], + "correctResponsesPattern": [ + "test-choice-1[,]test-choice-2[,]test-choice-3" + ], + "interactionType": "choice", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "extensions": { + "http://learninglocker.net/xapi/cmi/choice/response": "test_choice_2" + }, + "response": "test_choice_2" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/multichoicerated/data.json b/tests/mod_feedback/response_submitted/multichoicerated/data.json index c438629b1..56856b841 100644 --- a/tests/mod_feedback/response_submitted/multichoicerated/data.json +++ b/tests/mod_feedback/response_submitted/multichoicerated/data.json @@ -1,38 +1,38 @@ { - "modules": [ + "feedback": [ { "id": 1, - "name": "feedback" + "name": "test_feedback_name" } ], "feedback_completed": [ { - "id": 1, + "anonymous_response": 0, "feedback": 1, - "anonymous_response": 0 - } - ], - "feedback": [ - { - "id": 1, - "name": "test_feedback_name" + "id": 1 } ], "feedback_item": [ { - "id": 1, "feedback": 1, + "id": 1, "name": "test_feedback_item", - "typ": "multichoicerated", - "presentation": "r>>>>>3####test_choice_1|2####test_choice_2|1####test_choice_3" + "presentation": "r>>>>>3####test_choice_1|2####test_choice_2|1####test_choice_3", + "typ": "multichoicerated" } ], "feedback_value": [ { + "completed": 1, "id": 1, "item": 1, - "completed": 1, "value": "3" } + ], + "modules": [ + { + "id": 1, + "name": "feedback" + } ] } diff --git a/tests/mod_feedback/response_submitted/multichoicerated/event.json b/tests/mod_feedback/response_submitted/multichoicerated/event.json index bd62a9675..b0ba554b4 100644 --- a/tests/mod_feedback/response_submitted/multichoicerated/event.json +++ b/tests/mod_feedback/response_submitted/multichoicerated/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_feedback\\event\\response_submitted" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_feedback/response_submitted/multichoicerated/statements.json b/tests/mod_feedback/response_submitted/multichoicerated/statements.json index 3366d21de..2889baf6f 100644 --- a/tests/mod_feedback/response_submitted/multichoicerated/statements.json +++ b/tests/mod_feedback/response_submitted/multichoicerated/statements.json @@ -1,188 +1,188 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", - "name": { - "en": "test_feedback_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_feedback_item" + "en": "test_feedback_name" }, - "interactionType": "choice", - "correctResponsesPattern": [ - "test-choice-1[,]test-choice-2[,]test-choice-3" - ], - "choices": [ - { - "id": "test-choice-1", - "description": { - "en": "test_choice_1" - } - }, - { - "id": "test-choice-2", - "description": { - "en": "test_choice_2" - } - }, - { - "id": "test-choice-3", - "description": { - "en": "test_choice_3" - } - } - ] + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, - "result": { - "response": "test_choice_3", - "completion": true, - "extensions": { - "http://learninglocker.net/xapi/moodle/feedback_item_rating": 1, - "http://learninglocker.net/xapi/cmi/choice/response": "test_choice_3" - } + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/schema/1.0/submit" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", "name": { "en": "test_feedback_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } - ], - "category": [ + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "choices": [ { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } + "description": { + "en": "test_choice_1" }, - "objectType": "Activity" + "id": "test-choice-1" + }, + { + "description": { + "en": "test_choice_2" + }, + "id": "test-choice-2" + }, + { + "description": { + "en": "test_choice_3" + }, + "id": "test-choice-3" } - ] - } + ], + "correctResponsesPattern": [ + "test-choice-1[,]test-choice-2[,]test-choice-3" + ], + "interactionType": "choice", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "extensions": { + "http://learninglocker.net/xapi/cmi/choice/response": "test_choice_3", + "http://learninglocker.net/xapi/moodle/feedback_item_rating": 1 + }, + "response": "test_choice_3" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/no_items/data.json b/tests/mod_feedback/response_submitted/no_items/data.json index 3e0cfe56b..1262c2a5b 100644 --- a/tests/mod_feedback/response_submitted/no_items/data.json +++ b/tests/mod_feedback/response_submitted/no_items/data.json @@ -1,22 +1,22 @@ { - "modules": [ + "feedback": [ { "id": 1, - "name": "feedback" + "name": "test_feedback_name" } ], "feedback_completed": [ { - "id": 1, + "anonymous_response": 0, "feedback": 1, - "anonymous_response": 0 + "id": 1 } ], - "feedback": [ + "feedback_value": [], + "modules": [ { "id": 1, - "name": "test_feedback_name" + "name": "feedback" } - ], - "feedback_value": [] + ] } diff --git a/tests/mod_feedback/response_submitted/no_items/event.json b/tests/mod_feedback/response_submitted/no_items/event.json index bd62a9675..b0ba554b4 100644 --- a/tests/mod_feedback/response_submitted/no_items/event.json +++ b/tests/mod_feedback/response_submitted/no_items/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_feedback\\event\\response_submitted" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_feedback/response_submitted/no_items/statements.json b/tests/mod_feedback/response_submitted/no_items/statements.json index 32144c28e..b7906d0bd 100644 --- a/tests/mod_feedback/response_submitted/no_items/statements.json +++ b/tests/mod_feedback/response_submitted/no_items/statements.json @@ -1,74 +1,74 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", - "name": { - "en": "test_feedback_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_feedback_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/schema/1.0/submit" } } ] diff --git a/tests/mod_feedback/response_submitted/numerical/data.json b/tests/mod_feedback/response_submitted/numerical/data.json index 7e713d163..c43a35397 100644 --- a/tests/mod_feedback/response_submitted/numerical/data.json +++ b/tests/mod_feedback/response_submitted/numerical/data.json @@ -1,38 +1,38 @@ { - "modules": [ + "feedback": [ { "id": 1, - "name": "feedback" + "name": "test_feedback_name" } ], "feedback_completed": [ { - "id": 1, + "anonymous_response": 0, "feedback": 1, - "anonymous_response": 0 - } - ], - "feedback": [ - { - "id": 1, - "name": "test_feedback_name" + "id": 1 } ], "feedback_item": [ { - "id": 1, "feedback": 1, + "id": 1, "name": "test_feedback_item", - "typ": "numeric", - "presentation": "0|10" + "presentation": "0|10", + "typ": "numeric" } ], "feedback_value": [ { + "completed": 1, "id": 1, "item": 1, - "completed": 1, "value": "3" } + ], + "modules": [ + { + "id": 1, + "name": "feedback" + } ] } diff --git a/tests/mod_feedback/response_submitted/numerical/event.json b/tests/mod_feedback/response_submitted/numerical/event.json index bd62a9675..b0ba554b4 100644 --- a/tests/mod_feedback/response_submitted/numerical/event.json +++ b/tests/mod_feedback/response_submitted/numerical/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_feedback\\event\\response_submitted" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_feedback/response_submitted/numerical/statements.json b/tests/mod_feedback/response_submitted/numerical/statements.json index d961f2a38..2765ecc2c 100644 --- a/tests/mod_feedback/response_submitted/numerical/statements.json +++ b/tests/mod_feedback/response_submitted/numerical/statements.json @@ -1,167 +1,167 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", - "name": { - "en": "test_feedback_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_feedback_item" + "en": "test_feedback_name" }, - "interactionType": "numeric", - "correctResponsesPattern": [ - "0[:]10" - ] + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, - "result": { - "response": "3", - "completion": true, - "extensions": { - "http://learninglocker.net/xapi/cmi/numeric/response": 3 - } + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/schema/1.0/submit" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", "name": { "en": "test_feedback_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "correctResponsesPattern": [ + "0[:]10" + ], + "interactionType": "numeric", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "extensions": { + "http://learninglocker.net/xapi/cmi/numeric/response": 3 + }, + "response": "3" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/textarea/data.json b/tests/mod_feedback/response_submitted/textarea/data.json index 50a185786..0e4a678e3 100644 --- a/tests/mod_feedback/response_submitted/textarea/data.json +++ b/tests/mod_feedback/response_submitted/textarea/data.json @@ -1,37 +1,37 @@ { - "modules": [ + "feedback": [ { "id": 1, - "name": "feedback" + "name": "test_feedback_name" } ], "feedback_completed": [ { - "id": 1, + "anonymous_response": 0, "feedback": 1, - "anonymous_response": 0 - } - ], - "feedback": [ - { - "id": 1, - "name": "test_feedback_name" + "id": 1 } ], "feedback_item": [ { - "id": 1, "feedback": 1, + "id": 1, "name": "test_feedback_item", "typ": "textarea" } ], "feedback_value": [ { + "completed": 1, "id": 1, "item": 1, - "completed": 1, "value": "test_long_text_answer" } + ], + "modules": [ + { + "id": 1, + "name": "feedback" + } ] } diff --git a/tests/mod_feedback/response_submitted/textarea/event.json b/tests/mod_feedback/response_submitted/textarea/event.json index bd62a9675..b0ba554b4 100644 --- a/tests/mod_feedback/response_submitted/textarea/event.json +++ b/tests/mod_feedback/response_submitted/textarea/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_feedback\\event\\response_submitted" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_feedback/response_submitted/textarea/statements.json b/tests/mod_feedback/response_submitted/textarea/statements.json index c0ab51e79..20d5c2784 100644 --- a/tests/mod_feedback/response_submitted/textarea/statements.json +++ b/tests/mod_feedback/response_submitted/textarea/statements.json @@ -1,161 +1,161 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", - "name": { - "en": "test_feedback_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_feedback_item" + "en": "test_feedback_name" }, - "interactionType": "long-fill-in" + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, - "result": { - "response": "test_long_text_answer", - "completion": true + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/schema/1.0/submit" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", "name": { "en": "test_feedback_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "interactionType": "long-fill-in", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "response": "test_long_text_answer" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/textarea_anon/data.json b/tests/mod_feedback/response_submitted/textarea_anon/data.json index 0ff469cd0..2f5d8d285 100644 --- a/tests/mod_feedback/response_submitted/textarea_anon/data.json +++ b/tests/mod_feedback/response_submitted/textarea_anon/data.json @@ -1,37 +1,37 @@ { - "modules": [ + "feedback": [ { "id": 1, - "name": "feedback" + "name": "test_feedback_name" } ], "feedback_completed": [ { - "id": 1, + "anonymous_response": 1, "feedback": 1, - "anonymous_response": 1 - } - ], - "feedback": [ - { - "id": 1, - "name": "test_feedback_name" + "id": 1 } ], "feedback_item": [ { - "id": 1, "feedback": 1, + "id": 1, "name": "test_feedback_item", "typ": "textarea" } ], "feedback_value": [ { + "completed": 1, "id": 1, "item": 1, - "completed": 1, "value": "test_long_text_answer" } + ], + "modules": [ + { + "id": 1, + "name": "feedback" + } ] } diff --git a/tests/mod_feedback/response_submitted/textarea_anon/event.json b/tests/mod_feedback/response_submitted/textarea_anon/event.json index bd62a9675..b0ba554b4 100644 --- a/tests/mod_feedback/response_submitted/textarea_anon/event.json +++ b/tests/mod_feedback/response_submitted/textarea_anon/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_feedback\\event\\response_submitted" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_feedback/response_submitted/textarea_anon/statements.json b/tests/mod_feedback/response_submitted/textarea_anon/statements.json index cb297f195..eb2c3228f 100644 --- a/tests/mod_feedback/response_submitted/textarea_anon/statements.json +++ b/tests/mod_feedback/response_submitted/textarea_anon/statements.json @@ -1,161 +1,161 @@ [ { "actor": { - "name": "Anonymous Course Participant", "account": { "homePage": "http://www.example.org", "name": "anonymous" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", - "name": { - "en": "test_feedback_name" - } }, - "objectType": "Activity" + "name": "Anonymous Course Participant" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "Anonymous Course Participant", - "account": { - "homePage": "http://www.example.org", - "name": "anonymous" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_feedback_item" + "en": "test_feedback_name" }, - "interactionType": "long-fill-in" + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, - "result": { - "response": "test_long_text_answer", - "completion": true + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/schema/1.0/submit" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "anonymous" + }, + "name": "Anonymous Course Participant" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", "name": { "en": "test_feedback_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "interactionType": "long-fill-in", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "response": "test_long_text_answer" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/textfield/data.json b/tests/mod_feedback/response_submitted/textfield/data.json index 8e9b958e5..b889726f6 100644 --- a/tests/mod_feedback/response_submitted/textfield/data.json +++ b/tests/mod_feedback/response_submitted/textfield/data.json @@ -1,37 +1,37 @@ { - "modules": [ + "feedback": [ { "id": 1, - "name": "feedback" + "name": "test_feedback_name" } ], "feedback_completed": [ { - "id": 1, + "anonymous_response": 0, "feedback": 1, - "anonymous_response": 0 - } - ], - "feedback": [ - { - "id": 1, - "name": "test_feedback_name" + "id": 1 } ], "feedback_item": [ { - "id": 1, "feedback": 1, + "id": 1, "name": "test_feedback_item", "typ": "textfield" } ], "feedback_value": [ { + "completed": 1, "id": 1, "item": 1, - "completed": 1, "value": "test_short_text_answer" } + ], + "modules": [ + { + "id": 1, + "name": "feedback" + } ] } diff --git a/tests/mod_feedback/response_submitted/textfield/event.json b/tests/mod_feedback/response_submitted/textfield/event.json index bd62a9675..b0ba554b4 100644 --- a/tests/mod_feedback/response_submitted/textfield/event.json +++ b/tests/mod_feedback/response_submitted/textfield/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_feedback\\event\\response_submitted" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_feedback/response_submitted/textfield/statements.json b/tests/mod_feedback/response_submitted/textfield/statements.json index b89c6133b..592d115dd 100644 --- a/tests/mod_feedback/response_submitted/textfield/statements.json +++ b/tests/mod_feedback/response_submitted/textfield/statements.json @@ -1,161 +1,161 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", - "name": { - "en": "test_feedback_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_feedback_item" + "en": "test_feedback_name" }, - "interactionType": "fill-in" + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, - "result": { - "response": "test_short_text_answer", - "completion": true + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/schema/1.0/submit" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", "name": { "en": "test_feedback_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "interactionType": "fill-in", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "response": "test_short_text_answer" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/unknown_typ/data.json b/tests/mod_feedback/response_submitted/unknown_typ/data.json index a7adc7eeb..2b371f1a3 100644 --- a/tests/mod_feedback/response_submitted/unknown_typ/data.json +++ b/tests/mod_feedback/response_submitted/unknown_typ/data.json @@ -1,36 +1,36 @@ { - "modules": [ + "feedback": [ { "id": 1, - "name": "feedback" + "name": "test_feedback_name" } ], "feedback_completed": [ { - "id": 1, + "anonymous_response": 0, "feedback": 1, - "anonymous_response": 0 - } - ], - "feedback": [ - { - "id": 1, - "name": "test_feedback_name" + "id": 1 } ], "feedback_item": [ { - "id": 1, "feedback": 1, + "id": 1, "name": "test_feedback_item", "typ": "unknown" } ], "feedback_value": [ { + "completed": 1, "id": 1, - "item": 1, - "completed": 1 + "item": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "feedback" } ] } diff --git a/tests/mod_feedback/response_submitted/unknown_typ/event.json b/tests/mod_feedback/response_submitted/unknown_typ/event.json index bd62a9675..b0ba554b4 100644 --- a/tests/mod_feedback/response_submitted/unknown_typ/event.json +++ b/tests/mod_feedback/response_submitted/unknown_typ/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_feedback\\event\\response_submitted" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_feedback/response_submitted/unknown_typ/statements.json b/tests/mod_feedback/response_submitted/unknown_typ/statements.json index 32144c28e..b7906d0bd 100644 --- a/tests/mod_feedback/response_submitted/unknown_typ/statements.json +++ b/tests/mod_feedback/response_submitted/unknown_typ/statements.json @@ -1,74 +1,74 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback", - "name": { - "en": "test_feedback_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_feedback\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_feedback\\response_submitted\\handler", + "event_name": "\\mod_feedback\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_feedback_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/schema/1.0/submit" } } ] diff --git a/tests/mod_folder/course_module_viewed/existing_module/data.json b/tests/mod_folder/course_module_viewed/existing_module/data.json index 02e4af53b..e799108f9 100644 --- a/tests/mod_folder/course_module_viewed/existing_module/data.json +++ b/tests/mod_folder/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "folder": [ { "id": 1, - "name": "folder" + "name": "test_name" } ], - "folder": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "folder" } ] } diff --git a/tests/mod_folder/course_module_viewed/existing_module/event.json b/tests/mod_folder/course_module_viewed/existing_module/event.json index 36cd354ba..4a9bee08a 100644 --- a/tests/mod_folder/course_module_viewed/existing_module/event.json +++ b/tests/mod_folder/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_folder\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_folder\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_folder/course_module_viewed/existing_module/statements.json b/tests/mod_folder/course_module_viewed/existing_module/statements.json index 886128cc7..27128be8d 100644 --- a/tests/mod_folder/course_module_viewed/existing_module/statements.json +++ b/tests/mod_folder/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/folder/view.php?id=1", - "definition": { - "type": "http://activitystrea.ms/collection", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_folder\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_folder\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://activitystrea.ms/collection" + }, + "id": "http://www.example.org/mod/folder/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_forum/course_module_viewed/existing_module/data.json b/tests/mod_forum/course_module_viewed/existing_module/data.json index 062023ee1..7b14e90db 100644 --- a/tests/mod_forum/course_module_viewed/existing_module/data.json +++ b/tests/mod_forum/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "forum": [ { "id": 1, - "name": "forum" + "name": "test_name" } ], - "forum": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "forum" } ] } diff --git a/tests/mod_forum/course_module_viewed/existing_module/event.json b/tests/mod_forum/course_module_viewed/existing_module/event.json index 535b8bd4d..b14384d02 100644 --- a/tests/mod_forum/course_module_viewed/existing_module/event.json +++ b/tests/mod_forum/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_forum\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_forum\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_forum/course_module_viewed/existing_module/statements.json b/tests/mod_forum/course_module_viewed/existing_module/statements.json index 5d4c6f4e2..9de0b2cca 100644 --- a/tests/mod_forum/course_module_viewed/existing_module/statements.json +++ b/tests/mod_forum/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/forum/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_forum\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_forum\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" + }, + "id": "http://www.example.org/mod/forum/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_forum/discussion_created/data.json b/tests/mod_forum/discussion_created/data.json index dd84aa11f..8b8b179eb 100644 --- a/tests/mod_forum/discussion_created/data.json +++ b/tests/mod_forum/discussion_created/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "forum" - } - ], "forum": [ { "id": 1, @@ -16,5 +10,11 @@ "id": 1, "name": "test_forum_discussion_name" } + ], + "modules": [ + { + "id": 1, + "name": "forum" + } ] } diff --git a/tests/mod_forum/discussion_created/event.json b/tests/mod_forum/discussion_created/event.json index ccecfd346..01ce99cdc 100644 --- a/tests/mod_forum/discussion_created/event.json +++ b/tests/mod_forum/discussion_created/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_forum\\event\\discussion_created", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "forum", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_forum\\event\\discussion_created" + "objecttable": "forum", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_forum/discussion_created/statements.json b/tests/mod_forum/discussion_created/statements.json index 756f613c9..546e23787 100644 --- a/tests/mod_forum/discussion_created/statements.json +++ b/tests/mod_forum/discussion_created/statements.json @@ -1,84 +1,84 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/create", - "display": { - "en": "Created" - } - }, - "object": { - "id": "http://www.example.org/mod/forum/discuss.php?d=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/discussion", - "name": { - "en": "test_forum_discussion_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_forum\\event\\discussion_created", - "event_function": "\\src\\transformer\\events\\mod_forum\\discussion_created" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum", "name": { "en": "test_forum_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, + "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\discussion_created", + "event_name": "\\mod_forum\\event\\discussion_created", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "id": "http://www.example.org/mod/forum/discuss.php?d=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Created" + }, + "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/mod_forum/discussion_subcription_created/data.json b/tests/mod_forum/discussion_subcription_created/data.json index dd84aa11f..8b8b179eb 100644 --- a/tests/mod_forum/discussion_subcription_created/data.json +++ b/tests/mod_forum/discussion_subcription_created/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "forum" - } - ], "forum": [ { "id": 1, @@ -16,5 +10,11 @@ "id": 1, "name": "test_forum_discussion_name" } + ], + "modules": [ + { + "id": 1, + "name": "forum" + } ] } diff --git a/tests/mod_forum/discussion_subcription_created/event.json b/tests/mod_forum/discussion_subcription_created/event.json index 71e0bf2b1..eb49d42ad 100644 --- a/tests/mod_forum/discussion_subcription_created/event.json +++ b/tests/mod_forum/discussion_subcription_created/event.json @@ -1,11 +1,11 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_forum\\event\\discussion_subscription_created", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "forum", "objectid": 1, - "contextinstanceid": 1, + "objecttable": "forum", "other": "a:2:{s:10:\"discussion\";i:1;s:7:\"forumid\";i:1;}", - "eventname": "\\mod_forum\\event\\discussion_subscription_created" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_forum/discussion_subcription_created/statements.json b/tests/mod_forum/discussion_subcription_created/statements.json index 7789b7a81..6c21a32f7 100644 --- a/tests/mod_forum/discussion_subcription_created/statements.json +++ b/tests/mod_forum/discussion_subcription_created/statements.json @@ -1,84 +1,84 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/subscribed", - "display": { - "en": "Subscribed" - } - }, - "object": { - "id": "http://www.example.org/mod/forum/discuss.php?d=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/discussion", - "name": { - "en": "test_forum_discussion_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_forum\\event\\discussion_subscription_created", - "event_function": "\\src\\transformer\\events\\mod_forum\\discussion_subscription_created" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum", "name": { "en": "test_forum_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, + "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\discussion_subscription_created", + "event_name": "\\mod_forum\\event\\discussion_subscription_created", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "id": "http://www.example.org/mod/forum/discuss.php?d=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Subscribed" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/subscribed" } } ] diff --git a/tests/mod_forum/discussion_subcription_deleted/data.json b/tests/mod_forum/discussion_subcription_deleted/data.json index dd84aa11f..8b8b179eb 100644 --- a/tests/mod_forum/discussion_subcription_deleted/data.json +++ b/tests/mod_forum/discussion_subcription_deleted/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "forum" - } - ], "forum": [ { "id": 1, @@ -16,5 +10,11 @@ "id": 1, "name": "test_forum_discussion_name" } + ], + "modules": [ + { + "id": 1, + "name": "forum" + } ] } diff --git a/tests/mod_forum/discussion_subcription_deleted/event.json b/tests/mod_forum/discussion_subcription_deleted/event.json index 5a7f9cf07..439f91f0f 100644 --- a/tests/mod_forum/discussion_subcription_deleted/event.json +++ b/tests/mod_forum/discussion_subcription_deleted/event.json @@ -1,11 +1,11 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_forum\\event\\discussion_subscription_deleted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "forum", "objectid": 1, - "contextinstanceid": 1, + "objecttable": "forum", "other": "a:2:{s:10:\"discussion\";i:1;s:7:\"forumid\";i:1;}", - "eventname": "\\mod_forum\\event\\discussion_subscription_deleted" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_forum/discussion_subcription_deleted/statements.json b/tests/mod_forum/discussion_subcription_deleted/statements.json index 7abccede7..e6646722f 100644 --- a/tests/mod_forum/discussion_subcription_deleted/statements.json +++ b/tests/mod_forum/discussion_subcription_deleted/statements.json @@ -1,84 +1,84 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unsubscribed", - "display": { - "en": "Unsubscribed" - } - }, - "object": { - "id": "http://www.example.org/mod/forum/discuss.php?d=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/discussion", - "name": { - "en": "test_forum_discussion_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_forum\\event\\discussion_subscription_deleted", - "event_function": "\\src\\transformer\\events\\mod_forum\\discussion_subscription_deleted" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum", "name": { "en": "test_forum_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, + "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\discussion_subscription_deleted", + "event_name": "\\mod_forum\\event\\discussion_subscription_deleted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "id": "http://www.example.org/mod/forum/discuss.php?d=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Unsubscribed" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unsubscribed" } } ] diff --git a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/data.json b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/data.json index dd84aa11f..8b8b179eb 100644 --- a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/data.json +++ b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "forum" - } - ], "forum": [ { "id": 1, @@ -16,5 +10,11 @@ "id": 1, "name": "test_forum_discussion_name" } + ], + "modules": [ + { + "id": 1, + "name": "forum" + } ] } diff --git a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/event.json b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/event.json index 0ef8b3079..014092504 100644 --- a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/event.json +++ b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_forum\\event\\discussion_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "forum", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_forum\\event\\discussion_viewed" + "objecttable": "forum", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json index 98e354a86..be23bed7d 100644 --- a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json +++ b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json @@ -1,84 +1,84 @@ [ { "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/forum/discuss.php?d=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/discussion", - "name": { - "en": "test_forum_discussion_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_forum\\event\\discussion_viewed", - "event_function": "\\src\\transformer\\events\\mod_forum\\discussion_viewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum", "name": { "en": "test_forum_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, + "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\discussion_viewed", + "event_name": "\\mod_forum\\event\\discussion_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "id": "http://www.example.org/mod/forum/discuss.php?d=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_forum/post_created/data.json b/tests/mod_forum/post_created/data.json index f6c68e850..31dea7255 100644 --- a/tests/mod_forum/post_created/data.json +++ b/tests/mod_forum/post_created/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "forum" - } - ], "forum": [ { "id": 1, @@ -19,10 +13,16 @@ ], "forum_posts": [ { + "discussion": 1, "id": 1, "message": "
test_response_text
", - "discussion": 1, "subject": "Re: test_forum_discussion_name" } + ], + "modules": [ + { + "id": 1, + "name": "forum" + } ] } diff --git a/tests/mod_forum/post_created/event.json b/tests/mod_forum/post_created/event.json index c8d86e7fa..f136ae314 100644 --- a/tests/mod_forum/post_created/event.json +++ b/tests/mod_forum/post_created/event.json @@ -1,11 +1,11 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_forum\\event\\post_created", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "forum", "objectid": 1, - "contextinstanceid": 1, + "objecttable": "forum", "other": "a:3:{s:12:\"discussionid\";i:1;s:7:\"forumid\";i:2;s:9:\"forumtype\";s:7:\"general\";}", - "eventname": "\\mod_forum\\event\\post_created" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_forum/post_created/statements.json b/tests/mod_forum/post_created/statements.json index 01f4f99df..1f340bd6b 100644 --- a/tests/mod_forum/post_created/statements.json +++ b/tests/mod_forum/post_created/statements.json @@ -1,97 +1,97 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://id.tincanapi.com/verb/replied", - "display": { - "en": "Replied" - } - }, - "object": { - "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/forum-reply", - "name": { - "en": "Re: test_forum_discussion_name" - }, - "description": { - "en": "test_response_text" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_forum\\event\\post_created", - "event_function": "\\src\\transformer\\events\\mod_forum\\post_created" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/forum/discuss.php?d=1", "definition": { - "type": "http://id.tincanapi.com/activitytype/discussion", "name": { "en": "test_forum_discussion_name" - } + }, + "type": "http://id.tincanapi.com/activitytype/discussion" }, + "id": "http://www.example.org/mod/forum/discuss.php?d=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum", "name": { "en": "test_forum_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, + "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\post_created", + "event_name": "\\mod_forum\\event\\post_created", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_response_text" + }, + "name": { + "en": "Re: test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/forum-reply" + }, + "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Replied" + }, + "id": "http://id.tincanapi.com/verb/replied" } } ] diff --git a/tests/mod_forum/post_deleted/data.json b/tests/mod_forum/post_deleted/data.json index f6c68e850..31dea7255 100644 --- a/tests/mod_forum/post_deleted/data.json +++ b/tests/mod_forum/post_deleted/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "forum" - } - ], "forum": [ { "id": 1, @@ -19,10 +13,16 @@ ], "forum_posts": [ { + "discussion": 1, "id": 1, "message": "
test_response_text
", - "discussion": 1, "subject": "Re: test_forum_discussion_name" } + ], + "modules": [ + { + "id": 1, + "name": "forum" + } ] } diff --git a/tests/mod_forum/post_deleted/event.json b/tests/mod_forum/post_deleted/event.json index 41fecd439..e8ee43efa 100644 --- a/tests/mod_forum/post_deleted/event.json +++ b/tests/mod_forum/post_deleted/event.json @@ -1,11 +1,11 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_forum\\event\\post_deleted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "forum", "objectid": 1, - "contextinstanceid": 1, + "objecttable": "forum", "other": "a:3:{s:12:\"discussionid\";i:1;s:7:\"forumid\";i:2;s:9:\"forumtype\";s:7:\"general\";}", - "eventname": "\\mod_forum\\event\\post_deleted" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_forum/post_deleted/statements.json b/tests/mod_forum/post_deleted/statements.json index ce833bdc0..56af68796 100644 --- a/tests/mod_forum/post_deleted/statements.json +++ b/tests/mod_forum/post_deleted/statements.json @@ -1,91 +1,91 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/delete", - "display": { - "en": "Deleted" - } - }, - "object": { - "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/forum-reply" }, - "objectType": "Activity" + "name": "test_fullname" }, "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_forum\\event\\post_deleted", - "event_function": "\\src\\transformer\\events\\mod_forum\\post_deleted" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/forum/discuss.php?d=1", "definition": { - "type": "http://id.tincanapi.com/activitytype/discussion", "name": { "en": "test_forum_discussion_name" - } + }, + "type": "http://id.tincanapi.com/activitytype/discussion" }, + "id": "http://www.example.org/mod/forum/discuss.php?d=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum", "name": { "en": "test_forum_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, + "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\post_deleted", + "event_name": "\\mod_forum\\event\\post_deleted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "type": "http://id.tincanapi.com/activitytype/forum-reply" + }, + "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Deleted" + }, + "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/mod_forum/post_updated/data.json b/tests/mod_forum/post_updated/data.json index f6c68e850..31dea7255 100644 --- a/tests/mod_forum/post_updated/data.json +++ b/tests/mod_forum/post_updated/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "forum" - } - ], "forum": [ { "id": 1, @@ -19,10 +13,16 @@ ], "forum_posts": [ { + "discussion": 1, "id": 1, "message": "
test_response_text
", - "discussion": 1, "subject": "Re: test_forum_discussion_name" } + ], + "modules": [ + { + "id": 1, + "name": "forum" + } ] } diff --git a/tests/mod_forum/post_updated/event.json b/tests/mod_forum/post_updated/event.json index b598e4ad4..825c1fe8c 100644 --- a/tests/mod_forum/post_updated/event.json +++ b/tests/mod_forum/post_updated/event.json @@ -1,11 +1,11 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_forum\\event\\post_updated", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "forum", "objectid": 1, - "contextinstanceid": 1, + "objecttable": "forum", "other": "a:3:{s:12:\"discussionid\";i:1;s:7:\"forumid\";i:2;s:9:\"forumtype\";s:7:\"general\";}", - "eventname": "\\mod_forum\\event\\post_updated" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_forum/post_updated/statements.json b/tests/mod_forum/post_updated/statements.json index 31aff40d4..021dd353b 100644 --- a/tests/mod_forum/post_updated/statements.json +++ b/tests/mod_forum/post_updated/statements.json @@ -1,97 +1,97 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://w3id.org/xapi/acrossx/verbs/edited", - "display": { - "en": "Edited" - } - }, - "object": { - "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/forum-reply", - "name": { - "en": "Re: test_forum_discussion_name" - }, - "description": { - "en": "test_response_text" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_forum\\event\\post_updated", - "event_function": "\\src\\transformer\\events\\mod_forum\\post_updated" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/forum/discuss.php?d=1", "definition": { - "type": "http://id.tincanapi.com/activitytype/discussion", "name": { "en": "test_forum_discussion_name" - } + }, + "type": "http://id.tincanapi.com/activitytype/discussion" }, + "id": "http://www.example.org/mod/forum/discuss.php?d=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum", "name": { "en": "test_forum_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, + "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\post_updated", + "event_name": "\\mod_forum\\event\\post_updated", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_response_text" + }, + "name": { + "en": "Re: test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/forum-reply" + }, + "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Edited" + }, + "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/mod_forum/subscription_created/data.json b/tests/mod_forum/subscription_created/data.json index dd84aa11f..8b8b179eb 100644 --- a/tests/mod_forum/subscription_created/data.json +++ b/tests/mod_forum/subscription_created/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "forum" - } - ], "forum": [ { "id": 1, @@ -16,5 +10,11 @@ "id": 1, "name": "test_forum_discussion_name" } + ], + "modules": [ + { + "id": 1, + "name": "forum" + } ] } diff --git a/tests/mod_forum/subscription_created/event.json b/tests/mod_forum/subscription_created/event.json index 1924063d3..f74022bc7 100644 --- a/tests/mod_forum/subscription_created/event.json +++ b/tests/mod_forum/subscription_created/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_forum\\event\\subscription_created", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "forum", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_forum\\event\\subscription_created" + "objecttable": "forum", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_forum/subscription_created/statements.json b/tests/mod_forum/subscription_created/statements.json index af841b8c8..748814115 100644 --- a/tests/mod_forum/subscription_created/statements.json +++ b/tests/mod_forum/subscription_created/statements.json @@ -1,74 +1,74 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/subscribed", - "display": { - "en": "Subscribed" - } - }, - "object": { - "id": "http://www.example.org/mod/forum/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum", - "name": { - "en": "test_forum_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_forum\\event\\subscription_created", - "event_function": "\\src\\transformer\\events\\mod_forum\\subscription_created" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\subscription_created", + "event_name": "\\mod_forum\\event\\subscription_created", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_forum_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" + }, + "id": "http://www.example.org/mod/forum/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Subscribed" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/subscribed" } } ] diff --git a/tests/mod_forum/subscription_deleted/data.json b/tests/mod_forum/subscription_deleted/data.json index dd84aa11f..8b8b179eb 100644 --- a/tests/mod_forum/subscription_deleted/data.json +++ b/tests/mod_forum/subscription_deleted/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "forum" - } - ], "forum": [ { "id": 1, @@ -16,5 +10,11 @@ "id": 1, "name": "test_forum_discussion_name" } + ], + "modules": [ + { + "id": 1, + "name": "forum" + } ] } diff --git a/tests/mod_forum/subscription_deleted/event.json b/tests/mod_forum/subscription_deleted/event.json index 53932a4cf..74b5fd687 100644 --- a/tests/mod_forum/subscription_deleted/event.json +++ b/tests/mod_forum/subscription_deleted/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_forum\\event\\subscription_deleted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "forum", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_forum\\event\\subscription_deleted" + "objecttable": "forum", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_forum/subscription_deleted/statements.json b/tests/mod_forum/subscription_deleted/statements.json index fb3ad11e2..0150de999 100644 --- a/tests/mod_forum/subscription_deleted/statements.json +++ b/tests/mod_forum/subscription_deleted/statements.json @@ -1,74 +1,74 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unsubscribed", - "display": { - "en": "Unsubscribed" - } - }, - "object": { - "id": "http://www.example.org/mod/forum/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum", - "name": { - "en": "test_forum_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_forum\\event\\subscription_deleted", - "event_function": "\\src\\transformer\\events\\mod_forum\\subscription_deleted" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\subscription_deleted", + "event_name": "\\mod_forum\\event\\subscription_deleted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_forum_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" + }, + "id": "http://www.example.org/mod/forum/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Unsubscribed" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unsubscribed" } } ] diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed/data.json b/tests/mod_forum/user_report_viewed/existing_report_viewed/data.json index 2ce825e6a..a57c8314e 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed/data.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed/data.json @@ -1,21 +1,14 @@ { "user": [ { - "id": 1, + "email": "test1@test.com", "firstname": "loggedin_user_firstname", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "viewed_user_firstname", - "email": "test2@test.com" - } - ], - "course": [ - { - "id": 1, - "fullname": "test_name", - "lang": "en" + "id": 2 } ] } diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed/event.json b/tests/mod_forum/user_report_viewed/existing_report_viewed/event.json index 120625b34..fab9d0a56 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed/event.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed/event.json @@ -1,10 +1,10 @@ { + "courseid": 2, + "eventname": "\\mod_forum\\event\\user_report_viewed", "id": 1, - "userid": 1, + "objectid": null, + "objecttable": null, "relateduserid": 2, - "courseid": 1, "timecreated": 1433946701, - "objecttable": null, - "objectid": null, - "eventname": "\\mod_forum\\event\\user_report_viewed" + "userid": 1 } diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json b/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json index a4841f59d..5b3032327 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json @@ -1,68 +1,68 @@ [ { "actor": { - "name": "loggedin_user_firstname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://id.tincanapi.com/verb/viewed", - "display": { - "en": "Viewed" - } - }, - "object": { - "definition": { - "type": "http://id.tincanapi.com/activitytype/user-profile", - "name": { - "en": "forum posts of viewed_user_firstname" - }, - "extensions": { - "https://moodle.org/xapi/extensions/user_id": 2, - "https://moodle.org/xapi/extensions/course_id": 1 - } }, - "id": "http://www.example.org/mod/forum/user.php?id=2&course=1", - "objectType": "Activity" + "name": "loggedin_user_firstname" }, "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_forum\\event\\user_report_viewed", - "event_function": "\\src\\transformer\\events\\mod_forum\\user_report_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ], - "category": [ + "parent": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\user_report_viewed", + "event_name": "\\mod_forum\\event\\user_report_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "extensions": { + "https://moodle.org/xapi/extensions/course_id": 2, + "https://moodle.org/xapi/extensions/user_id": 2 + }, + "name": { + "en": "forum posts of viewed_user_firstname" + }, + "type": "http://id.tincanapi.com/activitytype/user-profile" + }, + "id": "http://www.example.org/mod/forum/user.php?id=2&course=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/data.json b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/data.json index 2ce825e6a..a57c8314e 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/data.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/data.json @@ -1,21 +1,14 @@ { "user": [ { - "id": 1, + "email": "test1@test.com", "firstname": "loggedin_user_firstname", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "viewed_user_firstname", - "email": "test2@test.com" - } - ], - "course": [ - { - "id": 1, - "fullname": "test_name", - "lang": "en" + "id": 2 } ] } diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/event.json b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/event.json index caafba106..b6dca7dd1 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/event.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/event.json @@ -1,10 +1,10 @@ { + "courseid": 0, + "eventname": "\\mod_forum\\event\\user_report_viewed", "id": 1, - "userid": 1, + "objectid": null, + "objecttable": null, "relateduserid": 2, - "courseid": 0, "timecreated": 1433946701, - "objecttable": null, - "objectid": null, - "eventname": "\\mod_forum\\event\\user_report_viewed" + "userid": 1 } diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/statements.json b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/statements.json index b8058a060..604faf6ad 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/statements.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/statements.json @@ -1,55 +1,55 @@ [ { "actor": { - "name": "loggedin_user_firstname", "account": { "homePage": "http://www.example.org", "name": "1" - } + }, + "name": "loggedin_user_firstname" }, - "verb": { - "id": "http://id.tincanapi.com/verb/viewed", - "display": { - "en": "Viewed" - } + "context": { + "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_forum\\user_report_viewed", + "event_name": "\\mod_forum\\event\\user_report_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { "definition": { - "type": "http://id.tincanapi.com/activitytype/user-profile", + "extensions": { + "https://moodle.org/xapi/extensions/user_id": 2 + }, "name": { "en": "forum posts of viewed_user_firstname" }, - "extensions": { - "https://moodle.org/xapi/extensions/user_id": 2 - } + "type": "http://id.tincanapi.com/activitytype/user-profile" }, "id": "http://www.example.org/mod/forum/user.php?id=2", "objectType": "Activity" }, - "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_forum\\event\\user_report_viewed", - "event_function": "\\src\\transformer\\events\\mod_forum\\user_report_viewed" - } + "verb": { + "display": { + "en": "Viewed" }, - "contextActivities": { - "category": [ - { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - } - ] - } + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_glossary/comment_created/data.json b/tests/mod_glossary/comment_created/data.json index dfdd534a5..748ee0eb3 100644 --- a/tests/mod_glossary/comment_created/data.json +++ b/tests/mod_glossary/comment_created/data.json @@ -1,8 +1,9 @@ { - "modules": [ + "comments": [ { + "content": "test_glossary_entry_comment_content", "id": 1, - "name": "glossary" + "itemid": 1 } ], "glossary": [ @@ -13,17 +14,16 @@ ], "glossary_entries": [ { - "id": 1, "concept": "test_glossary_entry_name", + "definition": "test_glossary_entry_description", "glossaryid": 1, - "definition": "test_glossary_entry_description" + "id": 1 } ], - "comments": [ + "modules": [ { "id": 1, - "content": "test_glossary_entry_comment_content", - "itemid": 1 + "name": "glossary" } ] } diff --git a/tests/mod_glossary/comment_created/event.json b/tests/mod_glossary/comment_created/event.json index 50572e05b..f1d287516 100644 --- a/tests/mod_glossary/comment_created/event.json +++ b/tests/mod_glossary/comment_created/event.json @@ -1,11 +1,11 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_glossary\\event\\comment_created", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "comments", - "other":"a:1:{s:6:\"itemid\";i:1;}", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_glossary\\event\\comment_created" + "objecttable": "comments", + "other": "a:1:{s:6:\"itemid\";i:1;}", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_glossary/comment_created/statements.json b/tests/mod_glossary/comment_created/statements.json index 84323dbb2..2c9240fef 100644 --- a/tests/mod_glossary/comment_created/statements.json +++ b/tests/mod_glossary/comment_created/statements.json @@ -1,100 +1,100 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/commented", - "display": { - "en": "Commented" - } - }, - "object": { - "id": "http://www.example.org/mod/glossary/showentry.php?eid=1#c1", - "definition": { - "type": "http://activitystrea.ms/comment", - "name": { - "en": "RE: test_glossary_entry_name" - }, - "description": { - "en": "test_glossary_entry_comment_content" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_glossary\\event\\comment_created", - "event_function": "\\src\\transformer\\events\\mod_glossary\\comment_created" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary-entry", "name": { - "en": "test_glossary_entry_name" + "en": "test_site_fullname" }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { "description": { "en": "test_glossary_entry_description" - } + }, + "name": { + "en": "test_glossary_entry_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary-entry" }, + "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/glossary/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary", "name": { "en": "test_glossary_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary" }, + "id": "http://www.example.org/mod/glossary/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_glossary\\comment_created", + "event_name": "\\mod_glossary\\event\\comment_created", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_glossary_entry_comment_content" + }, + "name": { + "en": "RE: test_glossary_entry_name" + }, + "type": "http://activitystrea.ms/comment" + }, + "id": "http://www.example.org/mod/glossary/showentry.php?eid=1#c1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Commented" + }, + "id": "http://adlnet.gov/expapi/verbs/commented" } } ] diff --git a/tests/mod_glossary/comment_deleted/data.json b/tests/mod_glossary/comment_deleted/data.json index 7fbdd87b0..df9a779a0 100644 --- a/tests/mod_glossary/comment_deleted/data.json +++ b/tests/mod_glossary/comment_deleted/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "glossary" - } - ], "glossary": [ { "id": 1, @@ -13,10 +7,16 @@ ], "glossary_entries": [ { - "id": 1, "concept": "test_glossary_entry_name", + "definition": "test_glossary_entry_description", "glossaryid": 1, - "definition": "test_glossary_entry_description" + "id": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "glossary" } ] } diff --git a/tests/mod_glossary/comment_deleted/event.json b/tests/mod_glossary/comment_deleted/event.json index cca69fd52..18b25834f 100644 --- a/tests/mod_glossary/comment_deleted/event.json +++ b/tests/mod_glossary/comment_deleted/event.json @@ -1,11 +1,11 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_glossary\\event\\comment_deleted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "comments", - "other":"a:1:{s:6:\"itemid\";i:1;}", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_glossary\\event\\comment_deleted" + "objecttable": "comments", + "other": "a:1:{s:6:\"itemid\";i:1;}", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_glossary/comment_deleted/statements.json b/tests/mod_glossary/comment_deleted/statements.json index 78011f5f0..65f71df32 100644 --- a/tests/mod_glossary/comment_deleted/statements.json +++ b/tests/mod_glossary/comment_deleted/statements.json @@ -1,97 +1,97 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/delete", - "display": { - "en": "Deleted" - } - }, - "object": { - "id": "http://www.example.org/mod/glossary/showentry.php?eid=1#c1", - "definition": { - "type": "http://activitystrea.ms/comment", - "name": { - "en": "RE: test_glossary_entry_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_glossary\\event\\comment_deleted", - "event_function": "\\src\\transformer\\events\\mod_glossary\\comment_deleted" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary-entry", "name": { - "en": "test_glossary_entry_name" + "en": "test_site_fullname" }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { "description": { "en": "test_glossary_entry_description" - } + }, + "name": { + "en": "test_glossary_entry_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary-entry" }, + "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/glossary/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary", "name": { "en": "test_glossary_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary" }, + "id": "http://www.example.org/mod/glossary/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_glossary\\comment_deleted", + "event_name": "\\mod_glossary\\event\\comment_deleted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "RE: test_glossary_entry_name" + }, + "type": "http://activitystrea.ms/comment" + }, + "id": "http://www.example.org/mod/glossary/showentry.php?eid=1#c1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Deleted" + }, + "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/mod_glossary/course_module_viewed/existing_module/data.json b/tests/mod_glossary/course_module_viewed/existing_module/data.json index 4124f910a..868ac8c16 100644 --- a/tests/mod_glossary/course_module_viewed/existing_module/data.json +++ b/tests/mod_glossary/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "glossary": [ { "id": 1, - "name": "glossary" + "name": "test_name" } ], - "glossary": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "glossary" } ] } diff --git a/tests/mod_glossary/course_module_viewed/existing_module/event.json b/tests/mod_glossary/course_module_viewed/existing_module/event.json index 376f4c9f0..89642b72a 100644 --- a/tests/mod_glossary/course_module_viewed/existing_module/event.json +++ b/tests/mod_glossary/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_glossary\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_glossary\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_glossary/course_module_viewed/existing_module/statements.json b/tests/mod_glossary/course_module_viewed/existing_module/statements.json index 321eb5c93..2b6559ad3 100644 --- a/tests/mod_glossary/course_module_viewed/existing_module/statements.json +++ b/tests/mod_glossary/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/glossary/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_glossary\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_glossary\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary" + }, + "id": "http://www.example.org/mod/glossary/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_glossary/entry_viewed/data.json b/tests/mod_glossary/entry_viewed/data.json index 7fbdd87b0..df9a779a0 100644 --- a/tests/mod_glossary/entry_viewed/data.json +++ b/tests/mod_glossary/entry_viewed/data.json @@ -1,10 +1,4 @@ { - "modules": [ - { - "id": 1, - "name": "glossary" - } - ], "glossary": [ { "id": 1, @@ -13,10 +7,16 @@ ], "glossary_entries": [ { - "id": 1, "concept": "test_glossary_entry_name", + "definition": "test_glossary_entry_description", "glossaryid": 1, - "definition": "test_glossary_entry_description" + "id": 1 + } + ], + "modules": [ + { + "id": 1, + "name": "glossary" } ] } diff --git a/tests/mod_glossary/entry_viewed/event.json b/tests/mod_glossary/entry_viewed/event.json index a74dd2f6f..623e3b83d 100644 --- a/tests/mod_glossary/entry_viewed/event.json +++ b/tests/mod_glossary/entry_viewed/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_glossary\\event\\entry_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "glossary_entries", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_glossary\\event\\entry_viewed" + "objecttable": "glossary_entries", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_glossary/entry_viewed/statements.json b/tests/mod_glossary/entry_viewed/statements.json index e3577bb2f..3e4289f19 100644 --- a/tests/mod_glossary/entry_viewed/statements.json +++ b/tests/mod_glossary/entry_viewed/statements.json @@ -1,87 +1,87 @@ [ { "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/glossary/showentry.php?eid=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary-entry", - "name": { - "en": "test_glossary_entry_name" - }, - "description": { - "en": "test_glossary_entry_description" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_glossary\\event\\entry_viewed", - "event_function": "\\src\\transformer\\events\\mod_glossary\\entry_viewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/glossary/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary", "name": { "en": "test_glossary_name" - } + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary" }, + "id": "http://www.example.org/mod/glossary/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_glossary\\entry_viewed", + "event_name": "\\mod_glossary\\event\\entry_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_glossary_entry_description" + }, + "name": { + "en": "test_glossary_entry_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary-entry" + }, + "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_imscp/course_module_viewed/existing_module/data.json b/tests/mod_imscp/course_module_viewed/existing_module/data.json index 575da027e..6d946a654 100644 --- a/tests/mod_imscp/course_module_viewed/existing_module/data.json +++ b/tests/mod_imscp/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "imscp": [ { "id": 1, - "name": "imscp" + "name": "test_name" } ], - "imscp": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "imscp" } ] } diff --git a/tests/mod_imscp/course_module_viewed/existing_module/event.json b/tests/mod_imscp/course_module_viewed/existing_module/event.json index 2469345dd..b5d77f168 100644 --- a/tests/mod_imscp/course_module_viewed/existing_module/event.json +++ b/tests/mod_imscp/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_imscp\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_imscp\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_imscp/course_module_viewed/existing_module/statements.json b/tests/mod_imscp/course_module_viewed/existing_module/statements.json index 3cf708899..88543b109 100644 --- a/tests/mod_imscp/course_module_viewed/existing_module/statements.json +++ b/tests/mod_imscp/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/imscp/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_imscp\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_imscp\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/mod/imscp/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/content_page_viewed/data.json b/tests/mod_lesson/content_page_viewed/data.json index 611ac6517..418d6a7e6 100644 --- a/tests/mod_lesson/content_page_viewed/data.json +++ b/tests/mod_lesson/content_page_viewed/data.json @@ -1,15 +1,9 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_pages": [ @@ -18,5 +12,11 @@ "lessonid": 1, "title": "lesson_content_page_title" } + ], + "modules": [ + { + "id": 1, + "name": "lesson" + } ] } diff --git a/tests/mod_lesson/content_page_viewed/event.json b/tests/mod_lesson/content_page_viewed/event.json index 9ae76c861..43ebe95f3 100644 --- a/tests/mod_lesson/content_page_viewed/event.json +++ b/tests/mod_lesson/content_page_viewed/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\content_page_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\content_page_viewed" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/content_page_viewed/statements.json b/tests/mod_lesson/content_page_viewed/statements.json index a4b29df13..872fb624d 100644 --- a/tests/mod_lesson/content_page_viewed/statements.json +++ b/tests/mod_lesson/content_page_viewed/statements.json @@ -1,84 +1,84 @@ [ { "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/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson-content-page", - "name": { - "en": "lesson_content_page_title" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_lesson\\event\\content_page_viewed", - "event_function": "\\src\\transformer\\events\\mod_lesson\\content_page_viewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\content_page_viewed", + "event_name": "\\mod_lesson\\event\\content_page_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "lesson_content_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/lesson-content-page" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/course_module_viewed/existing_module/data.json b/tests/mod_lesson/course_module_viewed/existing_module/data.json index eb5521a1e..7e8b4598d 100644 --- a/tests/mod_lesson/course_module_viewed/existing_module/data.json +++ b/tests/mod_lesson/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "lesson": [ { "id": 1, - "name": "lesson" + "name": "test_name" } ], - "lesson": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "lesson" } ] } diff --git a/tests/mod_lesson/course_module_viewed/existing_module/event.json b/tests/mod_lesson/course_module_viewed/existing_module/event.json index 1e49d002e..2a061b9a3 100644 --- a/tests/mod_lesson/course_module_viewed/existing_module/event.json +++ b/tests/mod_lesson/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_lesson/course_module_viewed/existing_module/statements.json b/tests/mod_lesson/course_module_viewed/existing_module/statements.json index b23c4a3a9..f0920200b 100644 --- a/tests/mod_lesson/course_module_viewed/existing_module/statements.json +++ b/tests/mod_lesson/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/lesson/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_lesson\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_lesson\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/lesson" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/essay_assessed/data.json b/tests/mod_lesson/essay_assessed/data.json index 29c234329..a64d9edaa 100644 --- a/tests/mod_lesson/essay_assessed/data.json +++ b/tests/mod_lesson/essay_assessed/data.json @@ -1,24 +1,9 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" - } - ], - "lesson_pages": [ - { - "id": 1, - "lessonid": 1, - "qtype": 10, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_answers": [ @@ -29,13 +14,28 @@ ], "lesson_attempts": [ { + "correct": 1, "id": 1, "lessonid": 1, "pageid": 1, - "userid": 1, - "correct": 1, + "timeseen": "1731972680", "useranswer": "O:8:\"stdClass\":7:{s:4:\"sent\";i:0;s:6:\"graded\";i:0;s:5:\"score\";i:1;s:6:\"answer\";s:30:\"lesson_question_essay_response\";s:12:\"answerformat\";s:1:\"1\";s:8:\"response\";s:20:\"essay_grade_response\";s:14:\"responseformat\";s:1:\"1\";}", - "timeseen": "1731972680" + "userid": 1 + } + ], + "lesson_pages": [ + { + "contents": "lesson_question_page_contents", + "id": 1, + "lessonid": 1, + "qtype": 10, + "title": "lesson_question_page_title" + } + ], + "modules": [ + { + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/essay_assessed/event.json b/tests/mod_lesson/essay_assessed/event.json index 4f38d1c8d..2fed34ab2 100644 --- a/tests/mod_lesson/essay_assessed/event.json +++ b/tests/mod_lesson/essay_assessed/event.json @@ -1,11 +1,11 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\essay_assessed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, + "objectid": 1, "objecttable": "lesson_pages", "other": "a:2:{s:8:\"lessonid\";s:1:\"1\";s:9:\"attemptid\";i:1;}", - "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\essay_assessed" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/essay_assessed/statements.json b/tests/mod_lesson/essay_assessed/statements.json index 44c1fff30..36d7bd491 100644 --- a/tests/mod_lesson/essay_assessed/statements.json +++ b/tests/mod_lesson/essay_assessed/statements.json @@ -1,104 +1,104 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://w3id.org/xapi/dod-isd/verbs/assessed", - "display": { - "en": "Assessed" - } - }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "long-fill-in" }, - "objectType": "Activity" - }, - "result": { - "response": "essay_grade_response", - "score": { - "min": 0, - "max": 1, - "raw": 1, - "scaled": 1 - } + "name": "test_fullname" }, "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_lesson\\event\\essay_assessed", - "event_function": "\\src\\transformer\\events\\mod_lesson\\essay_assessed" - }, - "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/for": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\essay_assessed", + "event_name": "\\mod_lesson\\event\\essay_assessed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + }, + "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/for": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "long-fill-in", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "result": { + "response": "essay_grade_response", + "score": { + "max": 1, + "min": 0, + "raw": 1, + "scaled": 1 } + }, + "verb": { + "display": { + "en": "Assessed" + }, + "id": "https://w3id.org/xapi/dod-isd/verbs/assessed" } } ] diff --git a/tests/mod_lesson/lesson_ended/data.json b/tests/mod_lesson/lesson_ended/data.json index 7f2bee151..4ba2480e9 100644 --- a/tests/mod_lesson/lesson_ended/data.json +++ b/tests/mod_lesson/lesson_ended/data.json @@ -1,33 +1,33 @@ { - "modules": [ + "grade_grades": [ { - "id": 1, - "name": "lesson" + "itemid": 1, + "rawgrade": 75, + "rawgrademax": 100, + "rawgrademin": 0, + "timemodified": 1731595610, + "userid": 1 } ], - "lesson": [ + "grade_items": [ { + "gradepass": 50, "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" + "iteminstance": 1, + "itemmodule": "lesson" } ], - "grade_items": [ + "lesson": [ { "id": 1, - "itemmodule": "lesson", - "iteminstance": 1, - "gradepass": 50 + "intro": "test_lesson_intro", + "name": "test_lesson" } ], - "grade_grades": [ + "modules": [ { - "itemid": 1, - "userid": 1, - "timemodified": 1731595610, - "rawgrademin": 0, - "rawgrademax": 100, - "rawgrade": 75 + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/lesson_ended/event.json b/tests/mod_lesson/lesson_ended/event.json index 5745124cc..50ae19c1c 100644 --- a/tests/mod_lesson/lesson_ended/event.json +++ b/tests/mod_lesson/lesson_ended/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\lesson_ended", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\lesson_ended" + "objecttable": "lesson", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/lesson_ended/statements.json b/tests/mod_lesson/lesson_ended/statements.json index 61ba7463c..481c6d3f1 100644 --- a/tests/mod_lesson/lesson_ended/statements.json +++ b/tests/mod_lesson/lesson_ended/statements.json @@ -1,97 +1,97 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session", - "name": { - "en": "test_lesson" - }, - "description": { - "en": "test_lesson_intro" - } }, - "objectType": "Activity" - }, - "result": { - "completion": true, - "success": true, - "score": { - "min": 0, - "max": 100, - "raw": 75, - "scaled": 0.5 - } + "name": "test_fullname" }, "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_lesson\\event\\lesson_ended", - "event_function": "\\src\\transformer\\events\\mod_lesson\\lesson_ended" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\lesson_ended", + "event_name": "\\mod_lesson\\event\\lesson_ended", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_lesson_intro" + }, + "name": { + "en": "test_lesson" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", + "objectType": "Activity" + }, + "result": { + "completion": true, + "score": { + "max": 100, + "min": 0, + "raw": 75, + "scaled": 0.5 + }, + "success": true + }, + "verb": { + "display": { + "en": "Completed" + }, + "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/mod_lesson/lesson_restarted/data.json b/tests/mod_lesson/lesson_restarted/data.json index ae34a1414..b48b3684c 100644 --- a/tests/mod_lesson/lesson_restarted/data.json +++ b/tests/mod_lesson/lesson_restarted/data.json @@ -1,15 +1,15 @@ { - "modules": [ + "lesson": [ { "id": 1, - "name": "lesson" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], - "lesson": [ + "modules": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" + "name": "lesson" } ] } diff --git a/tests/mod_lesson/lesson_restarted/event.json b/tests/mod_lesson/lesson_restarted/event.json index 456ab37fa..38568c06d 100644 --- a/tests/mod_lesson/lesson_restarted/event.json +++ b/tests/mod_lesson/lesson_restarted/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\lesson_restarted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\lesson_restarted" + "objecttable": "lesson", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/lesson_restarted/statements.json b/tests/mod_lesson/lesson_restarted/statements.json index 6b8d9f1e5..20620200b 100644 --- a/tests/mod_lesson/lesson_restarted/statements.json +++ b/tests/mod_lesson/lesson_restarted/statements.json @@ -1,87 +1,87 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/restarted", - "display": { - "en": "Restarted" - } - }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session", - "name": { - "en": "test_lesson" - }, - "description": { - "en": "test_lesson_intro" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_lesson\\event\\lesson_restarted", - "event_function": "\\src\\transformer\\events\\mod_lesson\\lesson_restarted" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\lesson_restarted", + "event_name": "\\mod_lesson\\event\\lesson_restarted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_lesson_intro" + }, + "name": { + "en": "test_lesson" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Restarted" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/restarted" } } ] diff --git a/tests/mod_lesson/lesson_resumed/data.json b/tests/mod_lesson/lesson_resumed/data.json index ae34a1414..b48b3684c 100644 --- a/tests/mod_lesson/lesson_resumed/data.json +++ b/tests/mod_lesson/lesson_resumed/data.json @@ -1,15 +1,15 @@ { - "modules": [ + "lesson": [ { "id": 1, - "name": "lesson" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], - "lesson": [ + "modules": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" + "name": "lesson" } ] } diff --git a/tests/mod_lesson/lesson_resumed/event.json b/tests/mod_lesson/lesson_resumed/event.json index cc219252f..5172e3c2b 100644 --- a/tests/mod_lesson/lesson_resumed/event.json +++ b/tests/mod_lesson/lesson_resumed/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\lesson_resumed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\lesson_resumed" + "objecttable": "lesson", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/lesson_resumed/statements.json b/tests/mod_lesson/lesson_resumed/statements.json index 522bf4a55..101eaa406 100644 --- a/tests/mod_lesson/lesson_resumed/statements.json +++ b/tests/mod_lesson/lesson_resumed/statements.json @@ -1,87 +1,87 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/resumed", - "display": { - "en": "Resumed" - } - }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session", - "name": { - "en": "test_lesson" - }, - "description": { - "en": "test_lesson_intro" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_lesson\\event\\lesson_resumed", - "event_function": "\\src\\transformer\\events\\mod_lesson\\lesson_resumed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\lesson_resumed", + "event_name": "\\mod_lesson\\event\\lesson_resumed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_lesson_intro" + }, + "name": { + "en": "test_lesson" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Resumed" + }, + "id": "https://w3id.org/xapi/tla/verbs/resumed" } } ] diff --git a/tests/mod_lesson/lesson_started/data.json b/tests/mod_lesson/lesson_started/data.json index ae34a1414..b48b3684c 100644 --- a/tests/mod_lesson/lesson_started/data.json +++ b/tests/mod_lesson/lesson_started/data.json @@ -1,15 +1,15 @@ { - "modules": [ + "lesson": [ { "id": 1, - "name": "lesson" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], - "lesson": [ + "modules": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" + "name": "lesson" } ] } diff --git a/tests/mod_lesson/lesson_started/event.json b/tests/mod_lesson/lesson_started/event.json index 8d17dfa71..11fef0471 100644 --- a/tests/mod_lesson/lesson_started/event.json +++ b/tests/mod_lesson/lesson_started/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\lesson_started", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\lesson_started" + "objecttable": "lesson", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/lesson_started/statements.json b/tests/mod_lesson/lesson_started/statements.json index 2d6efc1ea..18d10342d 100644 --- a/tests/mod_lesson/lesson_started/statements.json +++ b/tests/mod_lesson/lesson_started/statements.json @@ -1,87 +1,87 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/start", - "display": { - "en": "Started" - } - }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session", - "name": { - "en": "test_lesson" - }, - "description": { - "en": "test_lesson_intro" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_lesson\\event\\lesson_started", - "event_function": "\\src\\transformer\\events\\mod_lesson\\lesson_started" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\lesson_started", + "event_name": "\\mod_lesson\\event\\lesson_started", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_lesson_intro" + }, + "name": { + "en": "test_lesson" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Started" + }, + "id": "http://activitystrea.ms/start" } } ] diff --git a/tests/mod_lesson/question_answered/choice/data.json b/tests/mod_lesson/question_answered/choice/data.json index 612b2e332..b1c259478 100644 --- a/tests/mod_lesson/question_answered/choice/data.json +++ b/tests/mod_lesson/question_answered/choice/data.json @@ -1,24 +1,9 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" - } - ], - "lesson_pages": [ - { - "id": 1, - "lessonid": 1, - "qtype": 3, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_answers": [ @@ -40,12 +25,27 @@ ], "lesson_attempts": [ { + "correct": 1, "lessonid": 1, "pageid": 1, - "userid": 1, - "correct": 1, + "timeseen": "1731972680", "useranswer": "a", - "timeseen": "1731972680" + "userid": 1 + } + ], + "lesson_pages": [ + { + "contents": "lesson_question_page_contents", + "id": 1, + "lessonid": 1, + "qtype": 3, + "title": "lesson_question_page_title" + } + ], + "modules": [ + { + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/question_answered/choice/event.json b/tests/mod_lesson/question_answered/choice/event.json index 62695efa7..271cac578 100644 --- a/tests/mod_lesson/question_answered/choice/event.json +++ b/tests/mod_lesson/question_answered/choice/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_answered" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_answered/choice/statements.json b/tests/mod_lesson/question_answered/choice/statements.json index fa8e2c69f..426595f6b 100644 --- a/tests/mod_lesson/question_answered/choice/statements.json +++ b/tests/mod_lesson/question_answered/choice/statements.json @@ -1,115 +1,115 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "name": "test_fullname" }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "choice", - "choices": [ - { - "id": "a", - "description": { - "en": "a" - } - }, - { - "id": "b", - "description": { - "en": "b" - } - }, + "context": { + "contextActivities": { + "category": [ { - "id": "c", - "description": { - "en": "c" + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" } } ], - "correctResponsesPattern": [ - "a[,]b" - ] - }, - "objectType": "Activity" - }, - "result": { - "success": true, - "response": "a" - }, - "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_lesson\\event\\question_answered", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered" - } - }, - "contextActivities": { "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } - ], - "category": [ + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered", + "event_name": "\\mod_lesson\\event\\question_answered", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "choices": [ { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } + "description": { + "en": "a" }, - "objectType": "Activity" + "id": "a" + }, + { + "description": { + "en": "b" + }, + "id": "b" + }, + { + "description": { + "en": "c" + }, + "id": "c" } - ] - } + ], + "correctResponsesPattern": [ + "a[,]b" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "choice", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "result": { + "response": "a", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_answered/essay/data.json b/tests/mod_lesson/question_answered/essay/data.json index 9aa40d16b..b408a1256 100644 --- a/tests/mod_lesson/question_answered/essay/data.json +++ b/tests/mod_lesson/question_answered/essay/data.json @@ -1,24 +1,9 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" - } - ], - "lesson_pages": [ - { - "id": 1, - "lessonid": 1, - "qtype": 10, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_answers": [ @@ -29,12 +14,27 @@ ], "lesson_attempts": [ { + "correct": 0, "lessonid": 1, "pageid": 1, - "userid": 1, - "correct": 0, + "timeseen": "1731972680", "useranswer": "O:8:\"stdClass\":7:{s:4:\"sent\";i:0;s:6:\"graded\";i:0;s:5:\"score\";i:0;s:6:\"answer\";s:30:\"lesson_question_essay_response\";s:12:\"answerformat\";s:1:\"1\";s:8:\"response\";s:0:\"\";s:14:\"responseformat\";s:1:\"1\";}", - "timeseen": "1731972680" + "userid": 1 + } + ], + "lesson_pages": [ + { + "contents": "lesson_question_page_contents", + "id": 1, + "lessonid": 1, + "qtype": 10, + "title": "lesson_question_page_title" + } + ], + "modules": [ + { + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/question_answered/essay/event.json b/tests/mod_lesson/question_answered/essay/event.json index 62695efa7..271cac578 100644 --- a/tests/mod_lesson/question_answered/essay/event.json +++ b/tests/mod_lesson/question_answered/essay/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_answered" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_answered/essay/statements.json b/tests/mod_lesson/question_answered/essay/statements.json index 7a4e83227..07f1119d9 100644 --- a/tests/mod_lesson/question_answered/essay/statements.json +++ b/tests/mod_lesson/question_answered/essay/statements.json @@ -1,91 +1,91 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } - }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "long-fill-in" }, - "objectType": "Activity" - }, - "result": { - "response": "lesson_question_essay_response" + "name": "test_fullname" }, "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_lesson\\event\\question_answered", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered", + "event_name": "\\mod_lesson\\event\\question_answered", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "long-fill-in", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "result": { + "response": "lesson_question_essay_response" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_answered/matching/data.json b/tests/mod_lesson/question_answered/matching/data.json index 4636b3c6e..bdf172eea 100644 --- a/tests/mod_lesson/question_answered/matching/data.json +++ b/tests/mod_lesson/question_answered/matching/data.json @@ -1,50 +1,50 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" - } - ], - "lesson_pages": [ - { - "id": 1, - "lessonid": 1, - "qtype": 5, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_answers": [ { + "answer": "A", "id": 1, "pageid": 1, "response": "Apple", - "answer": "A", "score": 0 }, { + "answer": "B", "id": 2, "pageid": 1, "response": "Banana", - "answer": "B", "score": 0 } ], "lesson_attempts": [ { + "correct": 1, "lessonid": 1, "pageid": 1, - "userid": 1, - "correct": 1, + "timeseen": "1731972680", "useranswer": "Apple,Banana", - "timeseen": "1731972680" + "userid": 1 + } + ], + "lesson_pages": [ + { + "contents": "lesson_question_page_contents", + "id": 1, + "lessonid": 1, + "qtype": 5, + "title": "lesson_question_page_title" + } + ], + "modules": [ + { + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/question_answered/matching/event.json b/tests/mod_lesson/question_answered/matching/event.json index 62695efa7..271cac578 100644 --- a/tests/mod_lesson/question_answered/matching/event.json +++ b/tests/mod_lesson/question_answered/matching/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_answered" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_answered/matching/statements.json b/tests/mod_lesson/question_answered/matching/statements.json index 9e078ebb0..c99d567fb 100644 --- a/tests/mod_lesson/question_answered/matching/statements.json +++ b/tests/mod_lesson/question_answered/matching/statements.json @@ -1,123 +1,123 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } + }, + "name": "test_fullname" }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + "context": { + "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { + "name": { + "en": "test_lesson" + }, + "type": "http://adlnet.gov/expapi/activities/lesson" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", + "objectType": "Activity" + }, + { + "definition": { + "name": { + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" + }, + { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + } + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered", + "event_name": "\\mod_lesson\\event\\question_answered", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, + "correctResponsesPattern": [ + "a[.]apple[,]b[.]banana" + ], "description": { "en": "lesson_question_page_contents" }, "interactionType": "matching", + "name": { + "en": "lesson_question_page_title" + }, "source": [ { - "id": "a", "description": { "en": "A" - } + }, + "id": "a" }, { - "id": "b", "description": { "en": "B" - } + }, + "id": "b" } ], "target": [ { - "id": "apple", "description": { "en": "Apple" - } + }, + "id": "apple" }, { - "id": "banana", "description": { "en": "Banana" - } + }, + "id": "banana" } ], - "correctResponsesPattern": [ - "a[.]apple[,]b[.]banana" - ] + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", "objectType": "Activity" }, "result": { - "success": true, - "response": "a[.]apple[,]b[.]banana" + "response": "a[.]apple[,]b[.]banana", + "success": true }, - "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_lesson\\event\\question_answered", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered" - } + "verb": { + "display": { + "en": "Answered" }, - "contextActivities": { - "parent": [ - { - "id": "http://www.example.org/mod/lesson/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", - "name": { - "en": "test_lesson" - } - }, - "objectType": "Activity" - }, - { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", - "definition": { - "name": { - "en": "test_name Section 0" - }, - "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - } - ], - "category": [ - { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - } - ] - } + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_answered/numerical/data.json b/tests/mod_lesson/question_answered/numerical/data.json index 1e887a15f..593ed6ede 100644 --- a/tests/mod_lesson/question_answered/numerical/data.json +++ b/tests/mod_lesson/question_answered/numerical/data.json @@ -1,24 +1,9 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" - } - ], - "lesson_pages": [ - { - "id": 1, - "lessonid": 1, - "qtype": 8, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_answers": [ @@ -30,12 +15,27 @@ ], "lesson_attempts": [ { + "correct": 1, "lessonid": 1, "pageid": 1, - "userid": 1, - "correct": 1, + "timeseen": "1731972680", "useranswer": "23", - "timeseen": "1731972680" + "userid": 1 + } + ], + "lesson_pages": [ + { + "contents": "lesson_question_page_contents", + "id": 1, + "lessonid": 1, + "qtype": 8, + "title": "lesson_question_page_title" + } + ], + "modules": [ + { + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/question_answered/numerical/event.json b/tests/mod_lesson/question_answered/numerical/event.json index 62695efa7..271cac578 100644 --- a/tests/mod_lesson/question_answered/numerical/event.json +++ b/tests/mod_lesson/question_answered/numerical/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_answered" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_answered/numerical/statements.json b/tests/mod_lesson/question_answered/numerical/statements.json index fbec7e136..4bec641a4 100644 --- a/tests/mod_lesson/question_answered/numerical/statements.json +++ b/tests/mod_lesson/question_answered/numerical/statements.json @@ -1,95 +1,95 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } - }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "numeric", - "correctResponsesPattern": [ - "23" - ] }, - "objectType": "Activity" - }, - "result": { - "success": true, - "response": "23" + "name": "test_fullname" }, "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_lesson\\event\\question_answered", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered", + "event_name": "\\mod_lesson\\event\\question_answered", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "correctResponsesPattern": [ + "23" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "numeric", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "result": { + "response": "23", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_answered/shortanswer/data.json b/tests/mod_lesson/question_answered/shortanswer/data.json index 2f514ac4a..fb15e40fa 100644 --- a/tests/mod_lesson/question_answered/shortanswer/data.json +++ b/tests/mod_lesson/question_answered/shortanswer/data.json @@ -1,24 +1,9 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" - } - ], - "lesson_pages": [ - { - "id": 1, - "lessonid": 1, - "qtype": 1, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_answers": [ @@ -30,12 +15,27 @@ ], "lesson_attempts": [ { + "correct": 1, "lessonid": 1, "pageid": 1, - "userid": 1, - "correct": 1, + "timeseen": "1731972680", "useranswer": "Thing", - "timeseen": "1731972680" + "userid": 1 + } + ], + "lesson_pages": [ + { + "contents": "lesson_question_page_contents", + "id": 1, + "lessonid": 1, + "qtype": 1, + "title": "lesson_question_page_title" + } + ], + "modules": [ + { + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/question_answered/shortanswer/event.json b/tests/mod_lesson/question_answered/shortanswer/event.json index 62695efa7..271cac578 100644 --- a/tests/mod_lesson/question_answered/shortanswer/event.json +++ b/tests/mod_lesson/question_answered/shortanswer/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_answered" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_answered/shortanswer/statements.json b/tests/mod_lesson/question_answered/shortanswer/statements.json index e8b33f6d2..4ada4fe4b 100644 --- a/tests/mod_lesson/question_answered/shortanswer/statements.json +++ b/tests/mod_lesson/question_answered/shortanswer/statements.json @@ -1,95 +1,95 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } - }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "fill-in", - "correctResponsesPattern": [ - "Thing" - ] }, - "objectType": "Activity" - }, - "result": { - "success": true, - "response": "Thing" + "name": "test_fullname" }, "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_lesson\\event\\question_answered", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered", + "event_name": "\\mod_lesson\\event\\question_answered", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "correctResponsesPattern": [ + "Thing" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "fill-in", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "result": { + "response": "Thing", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_answered/truefalse/data.json b/tests/mod_lesson/question_answered/truefalse/data.json index d3c59645b..d9b8bbc6a 100644 --- a/tests/mod_lesson/question_answered/truefalse/data.json +++ b/tests/mod_lesson/question_answered/truefalse/data.json @@ -1,24 +1,9 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" - } - ], - "lesson_pages": [ - { - "id": 1, - "lessonid": 1, - "qtype": 2, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_answers": [ @@ -35,12 +20,27 @@ ], "lesson_attempts": [ { + "correct": 1, "lessonid": 1, "pageid": 1, - "userid": 1, - "correct": 1, + "timeseen": "1731972680", "useranswer": "true", - "timeseen": "1731972680" + "userid": 1 + } + ], + "lesson_pages": [ + { + "contents": "lesson_question_page_contents", + "id": 1, + "lessonid": 1, + "qtype": 2, + "title": "lesson_question_page_title" + } + ], + "modules": [ + { + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/question_answered/truefalse/event.json b/tests/mod_lesson/question_answered/truefalse/event.json index 62695efa7..271cac578 100644 --- a/tests/mod_lesson/question_answered/truefalse/event.json +++ b/tests/mod_lesson/question_answered/truefalse/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_answered" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_answered/truefalse/statements.json b/tests/mod_lesson/question_answered/truefalse/statements.json index 66380cc9d..e862d59b4 100644 --- a/tests/mod_lesson/question_answered/truefalse/statements.json +++ b/tests/mod_lesson/question_answered/truefalse/statements.json @@ -1,109 +1,109 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "name": "test_fullname" }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "choice", - "choices": [ - { - "id": "true", - "description": { - "en": "true" - } - }, + "context": { + "contextActivities": { + "category": [ { - "id": "false", - "description": { - "en": "false" + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" } } ], - "correctResponsesPattern": [ - "true" - ] - }, - "objectType": "Activity" - }, - "result": { - "success": true, - "response": "true" - }, - "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_lesson\\event\\question_answered", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered" - } - }, - "contextActivities": { "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } - ], - "category": [ + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_answered", + "event_name": "\\mod_lesson\\event\\question_answered", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "choices": [ { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } + "description": { + "en": "true" }, - "objectType": "Activity" + "id": "true" + }, + { + "description": { + "en": "false" + }, + "id": "false" } - ] - } + ], + "correctResponsesPattern": [ + "true" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "choice", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "result": { + "response": "true", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_viewed/choice/data.json b/tests/mod_lesson/question_viewed/choice/data.json index f0fb297c5..d763537ea 100644 --- a/tests/mod_lesson/question_viewed/choice/data.json +++ b/tests/mod_lesson/question_viewed/choice/data.json @@ -1,24 +1,9 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" - } - ], - "lesson_pages": [ - { - "id": 1, - "lessonid": 1, - "qtype": 3, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_answers": [ @@ -37,5 +22,20 @@ "response": "c", "score": 0 } + ], + "lesson_pages": [ + { + "contents": "lesson_question_page_contents", + "id": 1, + "lessonid": 1, + "qtype": 3, + "title": "lesson_question_page_title" + } + ], + "modules": [ + { + "id": 1, + "name": "lesson" + } ] } diff --git a/tests/mod_lesson/question_viewed/choice/event.json b/tests/mod_lesson/question_viewed/choice/event.json index cd859e703..53f8b4d24 100644 --- a/tests/mod_lesson/question_viewed/choice/event.json +++ b/tests/mod_lesson/question_viewed/choice/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_viewed" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_viewed/choice/statements.json b/tests/mod_lesson/question_viewed/choice/statements.json index 811f3e491..e66594e15 100644 --- a/tests/mod_lesson/question_viewed/choice/statements.json +++ b/tests/mod_lesson/question_viewed/choice/statements.json @@ -1,111 +1,111 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://id.tincanapi.com/verb/viewed", - "display": { - "en": "Viewed" - } + }, + "name": "test_fullname" }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "choice", - "choices": [ - { - "id": "a", - "description": { - "en": "a" - } - }, - { - "id": "b", - "description": { - "en": "b" - } - }, + "context": { + "contextActivities": { + "category": [ { - "id": "c", - "description": { - "en": "c" + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" } } ], - "correctResponsesPattern": [ - "a[,]b" - ] - }, - "objectType": "Activity" - }, - "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_lesson\\event\\question_viewed", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed" - } - }, - "contextActivities": { "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } - ], - "category": [ + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed", + "event_name": "\\mod_lesson\\event\\question_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "choices": [ { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } + "description": { + "en": "a" }, - "objectType": "Activity" + "id": "a" + }, + { + "description": { + "en": "b" + }, + "id": "b" + }, + { + "description": { + "en": "c" + }, + "id": "c" } - ] - } + ], + "correctResponsesPattern": [ + "a[,]b" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "choice", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/question_viewed/essay/data.json b/tests/mod_lesson/question_viewed/essay/data.json index 569a67f61..86bca8ee7 100644 --- a/tests/mod_lesson/question_viewed/essay/data.json +++ b/tests/mod_lesson/question_viewed/essay/data.json @@ -1,30 +1,30 @@ { - "modules": [ + "lesson": [ { "id": 1, - "name": "lesson" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], - "lesson": [ + "lesson_answers": [ { - "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" + "pageid": 1, + "score": 1 } ], "lesson_pages": [ { + "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, "qtype": 10, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "title": "lesson_question_page_title" } ], - "lesson_answers": [ + "modules": [ { - "pageid": 1, - "score": 1 + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/question_viewed/essay/event.json b/tests/mod_lesson/question_viewed/essay/event.json index cd859e703..53f8b4d24 100644 --- a/tests/mod_lesson/question_viewed/essay/event.json +++ b/tests/mod_lesson/question_viewed/essay/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_viewed" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_viewed/essay/statements.json b/tests/mod_lesson/question_viewed/essay/statements.json index 3e95e8bb0..979a0511f 100644 --- a/tests/mod_lesson/question_viewed/essay/statements.json +++ b/tests/mod_lesson/question_viewed/essay/statements.json @@ -1,88 +1,88 @@ [ { "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/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "long-fill-in" }, - "objectType": "Activity" + "name": "test_fullname" }, "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_lesson\\event\\question_viewed", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed", + "event_name": "\\mod_lesson\\event\\question_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "long-fill-in", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/question_viewed/matching/data.json b/tests/mod_lesson/question_viewed/matching/data.json index ea0736903..cafe6b226 100644 --- a/tests/mod_lesson/question_viewed/matching/data.json +++ b/tests/mod_lesson/question_viewed/matching/data.json @@ -1,38 +1,38 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" - } - ], - "lesson_pages": [ - { - "id": 1, - "lessonid": 1, - "qtype": 5, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_answers": [ { + "answer": "A", "pageid": 1, "response": "Apple", - "answer": "A", "score": 0 }, { + "answer": "B", "pageid": 1, "response": "Banana", - "answer": "B", "score": 0 } + ], + "lesson_pages": [ + { + "contents": "lesson_question_page_contents", + "id": 1, + "lessonid": 1, + "qtype": 5, + "title": "lesson_question_page_title" + } + ], + "modules": [ + { + "id": 1, + "name": "lesson" + } ] } diff --git a/tests/mod_lesson/question_viewed/matching/event.json b/tests/mod_lesson/question_viewed/matching/event.json index cd859e703..53f8b4d24 100644 --- a/tests/mod_lesson/question_viewed/matching/event.json +++ b/tests/mod_lesson/question_viewed/matching/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_viewed" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_viewed/matching/statements.json b/tests/mod_lesson/question_viewed/matching/statements.json index 306f5b916..508932687 100644 --- a/tests/mod_lesson/question_viewed/matching/statements.json +++ b/tests/mod_lesson/question_viewed/matching/statements.json @@ -1,119 +1,119 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } + }, + "name": "test_fullname" }, - "verb": { - "id": "http://id.tincanapi.com/verb/viewed", - "display": { - "en": "Viewed" - } + "context": { + "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { + "name": { + "en": "test_lesson" + }, + "type": "http://adlnet.gov/expapi/activities/lesson" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", + "objectType": "Activity" + }, + { + "definition": { + "name": { + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" + }, + { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + } + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed", + "event_name": "\\mod_lesson\\event\\question_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, + "correctResponsesPattern": [ + "a[.]apple[,]b[.]banana" + ], "description": { "en": "lesson_question_page_contents" }, "interactionType": "matching", + "name": { + "en": "lesson_question_page_title" + }, "source": [ { - "id": "a", "description": { "en": "A" - } + }, + "id": "a" }, { - "id": "b", "description": { "en": "B" - } + }, + "id": "b" } ], "target": [ { - "id": "apple", "description": { "en": "Apple" - } + }, + "id": "apple" }, { - "id": "banana", "description": { "en": "Banana" - } + }, + "id": "banana" } ], - "correctResponsesPattern": [ - "a[.]apple[,]b[.]banana" - ] + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", "objectType": "Activity" }, - "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_lesson\\event\\question_viewed", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed" - } + "verb": { + "display": { + "en": "Viewed" }, - "contextActivities": { - "parent": [ - { - "id": "http://www.example.org/mod/lesson/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", - "name": { - "en": "test_lesson" - } - }, - "objectType": "Activity" - }, - { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", - "definition": { - "name": { - "en": "test_name Section 0" - }, - "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - } - ], - "category": [ - { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - } - ] - } + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/question_viewed/numerical/data.json b/tests/mod_lesson/question_viewed/numerical/data.json index 3c55d7dbd..dbc8a803f 100644 --- a/tests/mod_lesson/question_viewed/numerical/data.json +++ b/tests/mod_lesson/question_viewed/numerical/data.json @@ -1,31 +1,31 @@ { - "modules": [ + "lesson": [ { "id": 1, - "name": "lesson" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], - "lesson": [ + "lesson_answers": [ { - "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" + "pageid": 1, + "response": "23", + "score": 1 } ], "lesson_pages": [ { + "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, "qtype": 8, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "title": "lesson_question_page_title" } ], - "lesson_answers": [ + "modules": [ { - "pageid": 1, - "response": "23", - "score": 1 + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/question_viewed/numerical/event.json b/tests/mod_lesson/question_viewed/numerical/event.json index cd859e703..53f8b4d24 100644 --- a/tests/mod_lesson/question_viewed/numerical/event.json +++ b/tests/mod_lesson/question_viewed/numerical/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_viewed" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_viewed/numerical/statements.json b/tests/mod_lesson/question_viewed/numerical/statements.json index 70ed39ddf..109d7faae 100644 --- a/tests/mod_lesson/question_viewed/numerical/statements.json +++ b/tests/mod_lesson/question_viewed/numerical/statements.json @@ -1,91 +1,91 @@ [ { "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/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "numeric", - "correctResponsesPattern": [ - "23" - ] }, - "objectType": "Activity" + "name": "test_fullname" }, "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_lesson\\event\\question_viewed", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed", + "event_name": "\\mod_lesson\\event\\question_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "correctResponsesPattern": [ + "23" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "numeric", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/question_viewed/shortanswer/data.json b/tests/mod_lesson/question_viewed/shortanswer/data.json index 049d1a6ae..c6d4bb19b 100644 --- a/tests/mod_lesson/question_viewed/shortanswer/data.json +++ b/tests/mod_lesson/question_viewed/shortanswer/data.json @@ -1,31 +1,31 @@ { - "modules": [ + "lesson": [ { "id": 1, - "name": "lesson" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], - "lesson": [ + "lesson_answers": [ { - "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" + "pageid": 1, + "response": "Thing", + "score": 1 } ], "lesson_pages": [ { + "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, "qtype": 1, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "title": "lesson_question_page_title" } ], - "lesson_answers": [ + "modules": [ { - "pageid": 1, - "response": "Thing", - "score": 1 + "id": 1, + "name": "lesson" } ] } diff --git a/tests/mod_lesson/question_viewed/shortanswer/event.json b/tests/mod_lesson/question_viewed/shortanswer/event.json index cd859e703..53f8b4d24 100644 --- a/tests/mod_lesson/question_viewed/shortanswer/event.json +++ b/tests/mod_lesson/question_viewed/shortanswer/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_viewed" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_viewed/shortanswer/statements.json b/tests/mod_lesson/question_viewed/shortanswer/statements.json index 0a9673c48..77a4cc41a 100644 --- a/tests/mod_lesson/question_viewed/shortanswer/statements.json +++ b/tests/mod_lesson/question_viewed/shortanswer/statements.json @@ -1,91 +1,91 @@ [ { "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/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "fill-in", - "correctResponsesPattern": [ - "Thing" - ] }, - "objectType": "Activity" + "name": "test_fullname" }, "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_lesson\\event\\question_viewed", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed", + "event_name": "\\mod_lesson\\event\\question_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "correctResponsesPattern": [ + "Thing" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "fill-in", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/question_viewed/truefalse/data.json b/tests/mod_lesson/question_viewed/truefalse/data.json index 2da72be5b..49e4164de 100644 --- a/tests/mod_lesson/question_viewed/truefalse/data.json +++ b/tests/mod_lesson/question_viewed/truefalse/data.json @@ -1,24 +1,9 @@ { - "modules": [ - { - "id": 1, - "name": "lesson" - } - ], "lesson": [ { "id": 1, - "name": "test_lesson", - "intro": "test_lesson_intro" - } - ], - "lesson_pages": [ - { - "id": 1, - "lessonid": 1, - "qtype": 2, - "title": "lesson_question_page_title", - "contents": "lesson_question_page_contents" + "intro": "test_lesson_intro", + "name": "test_lesson" } ], "lesson_answers": [ @@ -32,5 +17,20 @@ "response": "false", "score": 0 } + ], + "lesson_pages": [ + { + "contents": "lesson_question_page_contents", + "id": 1, + "lessonid": 1, + "qtype": 2, + "title": "lesson_question_page_title" + } + ], + "modules": [ + { + "id": 1, + "name": "lesson" + } ] } diff --git a/tests/mod_lesson/question_viewed/truefalse/event.json b/tests/mod_lesson/question_viewed/truefalse/event.json index cd859e703..53f8b4d24 100644 --- a/tests/mod_lesson/question_viewed/truefalse/event.json +++ b/tests/mod_lesson/question_viewed/truefalse/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "lesson_pages", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_lesson\\event\\question_viewed" + "objecttable": "lesson_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_lesson/question_viewed/truefalse/statements.json b/tests/mod_lesson/question_viewed/truefalse/statements.json index 8da617815..16a8a4599 100644 --- a/tests/mod_lesson/question_viewed/truefalse/statements.json +++ b/tests/mod_lesson/question_viewed/truefalse/statements.json @@ -1,105 +1,105 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://id.tincanapi.com/verb/viewed", - "display": { - "en": "Viewed" - } + }, + "name": "test_fullname" }, - "object": { - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "lesson_question_page_title" - }, - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "choice", - "choices": [ - { - "id": "true", - "description": { - "en": "true" - } - }, + "context": { + "contextActivities": { + "category": [ { - "id": "false", - "description": { - "en": "false" + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" } } ], - "correctResponsesPattern": [ - "true" - ] - }, - "objectType": "Activity" - }, - "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_lesson\\event\\question_viewed", - "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed" - } - }, - "contextActivities": { "parent": [ { - "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/lesson", "name": { "en": "test_lesson" - } + }, + "type": "http://adlnet.gov/expapi/activities/lesson" }, + "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } - ], - "category": [ + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_lesson\\question_viewed", + "event_name": "\\mod_lesson\\event\\question_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "choices": [ { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } + "description": { + "en": "true" }, - "objectType": "Activity" + "id": "true" + }, + { + "description": { + "en": "false" + }, + "id": "false" } - ] - } + ], + "correctResponsesPattern": [ + "true" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "choice", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lti/course_module_viewed/existing_module/data.json b/tests/mod_lti/course_module_viewed/existing_module/data.json index 84b8199cf..abfbe42f1 100644 --- a/tests/mod_lti/course_module_viewed/existing_module/data.json +++ b/tests/mod_lti/course_module_viewed/existing_module/data.json @@ -1,14 +1,14 @@ { - "modules": [ + "lti": [ { "id": 1, - "name": "lti" + "name": "test_name" } ], - "lti": [ + "modules": [ { "id": 1, - "name": "test_name" + "name": "lti" } ] } diff --git a/tests/mod_lti/course_module_viewed/existing_module/event.json b/tests/mod_lti/course_module_viewed/existing_module/event.json index 2fc60107b..2031053e0 100644 --- a/tests/mod_lti/course_module_viewed/existing_module/event.json +++ b/tests/mod_lti/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_lti\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_lti\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_lti/course_module_viewed/existing_module/statements.json b/tests/mod_lti/course_module_viewed/existing_module/statements.json index a1cd74aaa..5c4eb772b 100644 --- a/tests/mod_lti/course_module_viewed/existing_module/statements.json +++ b/tests/mod_lti/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/lti/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/media", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_lti\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_lti\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/media" + }, + "id": "http://www.example.org/mod/lti/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_page/course_module_viewed/existing_module/event.json b/tests/mod_page/course_module_viewed/existing_module/event.json index b687956da..5d19cef90 100644 --- a/tests/mod_page/course_module_viewed/existing_module/event.json +++ b/tests/mod_page/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_page\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_page\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_page/course_module_viewed/existing_module/statements.json b/tests/mod_page/course_module_viewed/existing_module/statements.json index e0d51eeaa..ba42e2f5f 100644 --- a/tests/mod_page/course_module_viewed/existing_module/statements.json +++ b/tests/mod_page/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/page/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/acrossx/activities/page", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_page\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_page\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/acrossx/activities/page" + }, + "id": "http://www.example.org/mod/page/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_questionnaire/all_responses_viewed/event.json b/tests/mod_questionnaire/all_responses_viewed/event.json index 70a087c80..11c69e569 100644 --- a/tests/mod_questionnaire/all_responses_viewed/event.json +++ b/tests/mod_questionnaire/all_responses_viewed/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_questionnaire\\event\\all_responses_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "questionnaire", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_questionnaire\\event\\all_responses_viewed" + "objecttable": "questionnaire", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_questionnaire/all_responses_viewed/statements.json b/tests/mod_questionnaire/all_responses_viewed/statements.json index 0fabe2e14..967cc0323 100644 --- a/tests/mod_questionnaire/all_responses_viewed/statements.json +++ b/tests/mod_questionnaire/all_responses_viewed/statements.json @@ -1,84 +1,84 @@ [ { "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/questionnaire/report.php?instance=1&group=0", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/report", - "name": { - "en": "test_q_name Report" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_questionnaire\\event\\all_responses_viewed", - "event_function": "\\src\\transformer\\events\\mod_questionnaire\\all_responses_viewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/questionnaire/view.php?id=1", "definition": { - "type": "http://id.tincanapi.com/activitytype/survey", "name": { "en": "test_q_name" - } + }, + "type": "http://id.tincanapi.com/activitytype/survey" }, + "id": "http://www.example.org/mod/questionnaire/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_questionnaire\\all_responses_viewed", + "event_name": "\\mod_questionnaire\\event\\all_responses_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_q_name Report" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/report" + }, + "id": "http://www.example.org/mod/questionnaire/report.php?instance=1&group=0", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_questionnaire/attempt_resumed/event.json b/tests/mod_questionnaire/attempt_resumed/event.json index 5bcfc4164..7805c5409 100644 --- a/tests/mod_questionnaire/attempt_resumed/event.json +++ b/tests/mod_questionnaire/attempt_resumed/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_questionnaire\\event\\attempt_resumed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "questionnaire", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_questionnaire\\event\\attempt_resumed" + "objecttable": "questionnaire", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_questionnaire/attempt_resumed/statements.json b/tests/mod_questionnaire/attempt_resumed/statements.json index 5b18d9ae2..cf884fe8d 100644 --- a/tests/mod_questionnaire/attempt_resumed/statements.json +++ b/tests/mod_questionnaire/attempt_resumed/statements.json @@ -1,74 +1,74 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/resumed", - "display": { - "en": "Resumed" - } - }, - "object": { - "id": "http://www.example.org/mod/questionnaire/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/survey", - "name": { - "en": "test_q_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_questionnaire\\event\\attempt_resumed", - "event_function": "\\src\\transformer\\events\\mod_questionnaire\\attempt_resumed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_questionnaire\\attempt_resumed", + "event_name": "\\mod_questionnaire\\event\\attempt_resumed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_q_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "id": "http://www.example.org/mod/questionnaire/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Resumed" + }, + "id": "https://w3id.org/xapi/tla/verbs/resumed" } } ] diff --git a/tests/mod_questionnaire/attempt_saved/event.json b/tests/mod_questionnaire/attempt_saved/event.json index 8f471ebf8..6d1047481 100644 --- a/tests/mod_questionnaire/attempt_saved/event.json +++ b/tests/mod_questionnaire/attempt_saved/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_questionnaire\\event\\attempt_saved", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "questionnaire", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_questionnaire\\event\\attempt_saved" + "objecttable": "questionnaire", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_questionnaire/attempt_saved/statements.json b/tests/mod_questionnaire/attempt_saved/statements.json index 653c1820f..93d9cf541 100644 --- a/tests/mod_questionnaire/attempt_saved/statements.json +++ b/tests/mod_questionnaire/attempt_saved/statements.json @@ -1,74 +1,74 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/suspended", - "display": { - "en": "Suspended" - } - }, - "object": { - "id": "http://www.example.org/mod/questionnaire/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/survey", - "name": { - "en": "test_q_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_questionnaire\\event\\attempt_saved", - "event_function": "\\src\\transformer\\events\\mod_questionnaire\\attempt_saved" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_questionnaire\\attempt_saved", + "event_name": "\\mod_questionnaire\\event\\attempt_saved", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_q_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "id": "http://www.example.org/mod/questionnaire/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Suspended" + }, + "id": "https://w3id.org/xapi/tla/verbs/suspended" } } ] diff --git a/tests/mod_questionnaire/attempt_submitted/event.json b/tests/mod_questionnaire/attempt_submitted/event.json index 16849d603..6dfa7b025 100644 --- a/tests/mod_questionnaire/attempt_submitted/event.json +++ b/tests/mod_questionnaire/attempt_submitted/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_questionnaire\\event\\attempt_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "questionnaire", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_questionnaire\\event\\attempt_submitted" + "objecttable": "questionnaire", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_questionnaire/attempt_submitted/statements.json b/tests/mod_questionnaire/attempt_submitted/statements.json index c8a54cdc2..e8784dcef 100644 --- a/tests/mod_questionnaire/attempt_submitted/statements.json +++ b/tests/mod_questionnaire/attempt_submitted/statements.json @@ -1,74 +1,74 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/questionnaire/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/survey", - "name": { - "en": "test_q_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_questionnaire\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_questionnaire\\attempt_submitted" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_questionnaire\\attempt_submitted", + "event_name": "\\mod_questionnaire\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_q_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "id": "http://www.example.org/mod/questionnaire/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/submit" } } ] diff --git a/tests/mod_questionnaire/course_module_viewed/existing_module/event.json b/tests/mod_questionnaire/course_module_viewed/existing_module/event.json index 7b29608be..12c134980 100644 --- a/tests/mod_questionnaire/course_module_viewed/existing_module/event.json +++ b/tests/mod_questionnaire/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_questionnaire\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_questionnaire\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_questionnaire/course_module_viewed/existing_module/statements.json b/tests/mod_questionnaire/course_module_viewed/existing_module/statements.json index 07389bb3b..dbf5dcf92 100644 --- a/tests/mod_questionnaire/course_module_viewed/existing_module/statements.json +++ b/tests/mod_questionnaire/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/questionnaire/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/survey", - "name": { - "en": "test_q_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_questionnaire\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_questionnaire\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_q_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "id": "http://www.example.org/mod/questionnaire/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_quiz/attempt_becameoverdue/data.json b/tests/mod_quiz/attempt_becameoverdue/data.json index 7156400c7..2f5cf5e5e 100644 --- a/tests/mod_quiz/attempt_becameoverdue/data.json +++ b/tests/mod_quiz/attempt_becameoverdue/data.json @@ -5,20 +5,20 @@ "name": "quiz" } ], + "quiz": [ + { + "id": 1, + "name": "test_quiz_name" + } + ], "quiz_attempts": [ { "id": 1, "quiz": 1, - "sumgrades": 50, "state": "overdue", + "sumgrades": 50, "timefinish": 1, "timestart": 0 } - ], - "quiz": [ - { - "id": 1, - "name": "test_quiz_name" - } ] } diff --git a/tests/mod_quiz/attempt_becameoverdue/event.json b/tests/mod_quiz/attempt_becameoverdue/event.json index 51c6a12a6..e1d2d726c 100644 --- a/tests/mod_quiz/attempt_becameoverdue/event.json +++ b/tests/mod_quiz/attempt_becameoverdue/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_becameoverdue", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "quiz_attempts", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_becameoverdue" + "objecttable": "quiz_attempts", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_becameoverdue/statements.json b/tests/mod_quiz/attempt_becameoverdue/statements.json index d961babba..874771a82 100644 --- a/tests/mod_quiz/attempt_becameoverdue/statements.json +++ b/tests/mod_quiz/attempt_becameoverdue/statements.json @@ -1,84 +1,84 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/exceeded", - "display": { - "en": "Exceeded" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_quiz\\event\\attempt_becameoverdue", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_becameoverdue" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_becameoverdue", + "event_name": "\\mod_quiz\\event\\attempt_becameoverdue", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Exceeded" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/exceeded" } } ] diff --git a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/data.json b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/data.json index 7ec241b71..4c8ed4ca3 100644 --- a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/data.json +++ b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/data.json @@ -1,36 +1,36 @@ { - "user": [ + "modules": [ { "id": 1, - "firstname": "test_instructor_fullname", - "email": "instructor@test.com" - }, - { - "id": 2, - "firstname": "test_learner_fullname", - "email": "learner@test.com" + "name": "quiz" } ], - "modules": [ + "quiz": [ { "id": 1, - "name": "quiz" + "name": "test_quiz_name" } ], "quiz_attempts": [ { "id": 1, "quiz": 1, - "sumgrades": 50, "state": "finished", + "sumgrades": 50, "timefinish": 1, "timestart": 0 } ], - "quiz": [ + "user": [ { - "id": 1, - "name": "test_quiz_name" + "email": "instructor@test.com", + "firstname": "test_instructor_fullname", + "id": 1 + }, + { + "email": "learner@test.com", + "firstname": "test_learner_fullname", + "id": 2 } ] } diff --git a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/event.json b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/event.json index 199ba0c94..e49a9c4b9 100644 --- a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/event.json +++ b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/event.json @@ -1,11 +1,11 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", - "objectid": 1, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_quiz\\event\\attempt_reviewed", - "relateduserid": 2 + "id": 1, + "objectid": 1, + "objecttable": "attempt", + "relateduserid": 2, + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json index 2b88b69eb..fd907ff0f 100644 --- a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json +++ b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json @@ -1,101 +1,101 @@ [ { "actor": { - "name": "test_learner_fullname", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/receive", - "display": { - "en": "Received" - } - }, - "object": { - "id": "http://www.example.org/review.php?attempt=1", - "definition": { - "type": "http://activitystrea.ms/schema/1.0/review", - "name": { - "en": "Review" - } }, - "objectType": "Activity" + "name": "test_learner_fullname" }, "context": { - "instructor": { - "name": "test_instructor_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "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_quiz\\event\\attempt_reviewed", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_reviewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_reviewed", + "event_name": "\\mod_quiz\\event\\attempt_reviewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_instructor_fullname" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "Review" + }, + "type": "http://activitystrea.ms/schema/1.0/review" + }, + "id": "http://www.example.org/review.php?attempt=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Received" + }, + "id": "http://activitystrea.ms/schema/1.0/receive" } } ] diff --git a/tests/mod_quiz/attempt_started/existing_attempt_started/data.json b/tests/mod_quiz/attempt_started/existing_attempt_started/data.json index cbdad7191..4110000b5 100644 --- a/tests/mod_quiz/attempt_started/existing_attempt_started/data.json +++ b/tests/mod_quiz/attempt_started/existing_attempt_started/data.json @@ -5,20 +5,20 @@ "name": "quiz" } ], + "quiz": [ + { + "id": 1, + "name": "test_quiz_name" + } + ], "quiz_attempts": [ { "id": 1, "quiz": 1, - "sumgrades": 50, "state": "finished", + "sumgrades": 50, "timefinish": 1, "timestart": 0 } - ], - "quiz": [ - { - "id": 1, - "name": "test_quiz_name" - } ] } diff --git a/tests/mod_quiz/attempt_started/existing_attempt_started/event.json b/tests/mod_quiz/attempt_started/existing_attempt_started/event.json index 0b7d13ec9..e52fde502 100644 --- a/tests/mod_quiz/attempt_started/existing_attempt_started/event.json +++ b/tests/mod_quiz/attempt_started/existing_attempt_started/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_started", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_started" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json b/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json index 7b332f3e1..b772e0214 100644 --- a/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json +++ b/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json @@ -1,84 +1,84 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/start", - "display": { - "en": "Started" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_quiz\\event\\attempt_started", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_started" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_started", + "event_name": "\\mod_quiz\\event\\attempt_started", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Started" + }, + "id": "http://activitystrea.ms/schema/1.0/start" } } ] diff --git a/tests/mod_quiz/attempt_submitted/essay/data.json b/tests/mod_quiz/attempt_submitted/essay/data.json index 2ace8c900..19f671b99 100644 --- a/tests/mod_quiz/attempt_submitted/essay/data.json +++ b/tests/mod_quiz/attempt_submitted/essay/data.json @@ -1,63 +1,63 @@ { - "modules": [ + "grade_grades": [ { - "id": 1, - "name": "quiz" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], - "quiz_attempts": [ + "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 - } - ], - "question_usages": [ - { - "id": 1 + "iteminstance": 1, + "itemmodule": "quiz" } ], - "quiz": [ + "modules": [ { "id": 1, - "name": "test_quiz_name" + "name": "quiz" } ], - "grade_items": [ + "question": [ { "id": 1, - "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "name": "test_name", + "qtype": "essay", + "questiontext": "test_question" } ], "question_attempts": [ { "id": 1, - "questionusageid": 1, "questionid": 1, + "questionusageid": 1, "responsesummary": "test_answer" } ], - "question": [ + "question_usages": [ + { + "id": 1 + } + ], + "quiz": [ { "id": 1, - "qtype": "essay", - "name": "test_name", - "questiontext": "test_question" + "name": "test_quiz_name" } ], - "grade_grades": [ + "quiz_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/essay/event.json b/tests/mod_quiz/attempt_submitted/essay/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/essay/event.json +++ b/tests/mod_quiz/attempt_submitted/essay/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/essay/statements.json b/tests/mod_quiz/attempt_submitted/essay/statements.json index 6d8d575c3..191ed9ed7 100644 --- a/tests/mod_quiz/attempt_submitted/essay/statements.json +++ b/tests/mod_quiz/attempt_submitted/essay/statements.json @@ -1,195 +1,195 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_name" - }, - "description": { - "en": "test_question" + "en": "test_quiz_name Attempt 1" }, - "interactionType": "long-fill-in" + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { - "response": "test_answer", - "completion": true + "completion": true, + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_question" + }, + "interactionType": "long-fill-in", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "response": "test_answer" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/essay_null_response/data.json b/tests/mod_quiz/attempt_submitted/essay_null_response/data.json index 73ea53c4f..5491b295d 100644 --- a/tests/mod_quiz/attempt_submitted/essay_null_response/data.json +++ b/tests/mod_quiz/attempt_submitted/essay_null_response/data.json @@ -1,63 +1,63 @@ { - "modules": [ + "grade_grades": [ { - "id": 1, - "name": "quiz" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], - "quiz_attempts": [ + "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 - } - ], - "question_usages": [ - { - "id": 1 + "iteminstance": 1, + "itemmodule": "quiz" } ], - "quiz": [ + "modules": [ { "id": 1, - "name": "test_quiz_name" + "name": "quiz" } ], - "grade_items": [ + "question": [ { "id": 1, - "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "name": "test_name", + "qtype": "essay", + "questiontext": "test_question" } ], "question_attempts": [ { "id": 1, - "questionusageid": 1, "questionid": 1, + "questionusageid": 1, "responsesummary": null } ], - "question": [ + "question_usages": [ + { + "id": 1 + } + ], + "quiz": [ { "id": 1, - "qtype": "essay", - "name": "test_name", - "questiontext": "test_question" + "name": "test_quiz_name" } ], - "grade_grades": [ + "quiz_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/essay_null_response/event.json b/tests/mod_quiz/attempt_submitted/essay_null_response/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/essay_null_response/event.json +++ b/tests/mod_quiz/attempt_submitted/essay_null_response/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/essay_null_response/statements.json b/tests/mod_quiz/attempt_submitted/essay_null_response/statements.json index bbf55b548..94ca3bc80 100644 --- a/tests/mod_quiz/attempt_submitted/essay_null_response/statements.json +++ b/tests/mod_quiz/attempt_submitted/essay_null_response/statements.json @@ -1,195 +1,195 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_name" - }, - "description": { - "en": "test_question" + "en": "test_quiz_name Attempt 1" }, - "interactionType": "long-fill-in" + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { - "response": "", - "completion": false + "completion": true, + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_question" + }, + "interactionType": "long-fill-in", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "objectType": "Activity" + }, + "result": { + "completion": false, + "response": "" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/gapselect/data.json b/tests/mod_quiz/attempt_submitted/gapselect/data.json index 7527ed8f5..4d642d39e 100644 --- a/tests/mod_quiz/attempt_submitted/gapselect/data.json +++ b/tests/mod_quiz/attempt_submitted/gapselect/data.json @@ -1,84 +1,84 @@ { - "modules": [ - { - "id": 1, - "name": "quiz" - } - ], - "quiz_attempts": [ - { - "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 - } - ], - "question_usages": [ - { - "id": 1 - } - ], - "quiz": [ + "grade_grades": [ { - "id": 1, - "name": "test_quiz_name" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "itemmodule": "quiz" } ], - "question_attempts": [ + "modules": [ { "id": 1, - "questionusageid": 1, - "questionid": 1, - "rightanswer": "{spicy} {mango} {milkshake}", - "responsesummary": "{spicy} {mango} {milkshake}" + "name": "quiz" } ], "question": [ { "id": 1, - "qtype": "gapselect", "name": "test_name", + "qtype": "gapselect", "questiontext": "

Example [[1]] missing [[2]] words [[3]]

" } ], "question_answers": [ { - "id": 1, - "fraction": 1.0, "answer": "spicy", + "fraction": 1.0, + "id": 1, "question": 1 }, { - "id": 2, - "fraction": 1.0, "answer": "mango", + "fraction": 1.0, + "id": 2, "question": 1 }, { - "id": 3, - "fraction": 1.0, "answer": "milkshake", + "fraction": 1.0, + "id": 3, "question": 1 } ], - "grade_grades": [ + "question_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "questionid": 1, + "questionusageid": 1, + "responsesummary": "{spicy} {mango} {milkshake}", + "rightanswer": "{spicy} {mango} {milkshake}" + } + ], + "question_usages": [ + { + "id": 1 + } + ], + "quiz": [ + { + "id": 1, + "name": "test_quiz_name" + } + ], + "quiz_attempts": [ + { + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/gapselect/event.json b/tests/mod_quiz/attempt_submitted/gapselect/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/gapselect/event.json +++ b/tests/mod_quiz/attempt_submitted/gapselect/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/gapselect/statements.json b/tests/mod_quiz/attempt_submitted/gapselect/statements.json index b41257256..6309bca31 100644 --- a/tests/mod_quiz/attempt_submitted/gapselect/statements.json +++ b/tests/mod_quiz/attempt_submitted/gapselect/statements.json @@ -1,203 +1,203 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_name" - }, - "description": { - "en": "Example [[1]] missing [[2]] words [[3]]" + "en": "test_quiz_name Attempt 1" }, - "interactionType": "sequencing" + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { - "response": "spicy[,]mango[,]milkshake", "completion": true, - "success": true, - "extensions": { - "http://learninglocker.net/xapi/cmi/sequencing/response": [ - "spicy", - "mango", - "milkshake" - ] - } + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "Example [[1]] missing [[2]] words [[3]]" + }, + "interactionType": "sequencing", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "extensions": { + "http://learninglocker.net/xapi/cmi/sequencing/response": [ + "spicy", + "mango", + "milkshake" + ] + }, + "response": "spicy[,]mango[,]milkshake", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/match/data.json b/tests/mod_quiz/attempt_submitted/match/data.json index 564a04052..5612513fe 100644 --- a/tests/mod_quiz/attempt_submitted/match/data.json +++ b/tests/mod_quiz/attempt_submitted/match/data.json @@ -1,84 +1,84 @@ { - "modules": [ + "grade_grades": [ { - "id": 1, - "name": "quiz" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], - "quiz_attempts": [ + "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 + "iteminstance": 1, + "itemmodule": "quiz" } ], - "question_usages": [ + "modules": [ { - "id": 1 + "id": 1, + "name": "quiz" } ], - "quiz": [ + "qtype_match_subquestions": [ { + "answertext": "Green", "id": 1, - "name": "test_quiz_name" + "questionid": 1, + "questiontext": "

Red" + }, + { + "answertext": "Orange", + "id": 2, + "questionid": 1, + "questiontext": "

Blue" + }, + { + "answertext": "White", + "id": 3, + "questionid": 1, + "questiontext": "

Black" } ], - "grade_items": [ + "question": [ { "id": 1, - "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "name": "test_name", + "qtype": "match", + "questiontext": "test_question" } ], "question_attempts": [ { "id": 1, - "questionusageid": 1, "questionid": 1, + "questionusageid": 1, "responsesummary": "Red\n -> Green; Blue\n -> Orange; Black\n -> White", "rightanswer": "Red\n -> Green; Blue\n -> Orange; Black\n -> White" } ], - "question": [ + "question_usages": [ { - "id": 1, - "qtype": "match", - "name": "test_name", - "questiontext": "test_question" + "id": 1 } ], - "qtype_match_subquestions": [ + "quiz": [ { "id": 1, - "questionid": 1, - "questiontext": "

Red", - "answertext": "Green" - }, - { - "id": 2, - "questionid": 1, - "questiontext": "

Blue", - "answertext": "Orange" - }, - { - "id": 3, - "questionid": 1, - "questiontext": "

Black", - "answertext": "White" + "name": "test_quiz_name" } ], - "grade_grades": [ + "quiz_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/match/event.json b/tests/mod_quiz/attempt_submitted/match/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/match/event.json +++ b/tests/mod_quiz/attempt_submitted/match/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/match/statements.json b/tests/mod_quiz/attempt_submitted/match/statements.json index 3f87ee2f7..e79b209db 100644 --- a/tests/mod_quiz/attempt_submitted/match/statements.json +++ b/tests/mod_quiz/attempt_submitted/match/statements.json @@ -1,246 +1,246 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } + }, + "name": "test_fullname" }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } + "context": { + "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { + "name": { + "en": "test_quiz_name" + }, + "type": "http://adlnet.gov/expapi/activities/assessment" + }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", + "objectType": "Activity" + }, + { + "definition": { + "name": { + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" + }, + { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + } + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { + "completion": true, + "duration": "PT1S", "score": { - "raw": 50, - "min": 0, "max": 100, + "min": 0, + "raw": 50, "scaled": 0.0 }, - "completion": true, - "success": true, - "duration": "PT1S" + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" + }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { - "en": "test_quiz_name" - } + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_quiz_name" }, - "type": "http://id.tincanapi.com/activitytype/section" - } + "type": "http://adlnet.gov/expapi/activities/assessment" + }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "test_name" - }, + "correctResponsesPattern": [ + "red[.]green[,]blue[.]orange[,]black[.]white" + ], "description": { "en": "test_question" }, "interactionType": "matching", - "correctResponsesPattern": [ - "red[.]green[,]blue[.]orange[,]black[.]white" - ], + "name": { + "en": "test_name" + }, "source": [ { - "id": "red", "description": { "en": "Red" - } + }, + "id": "red" }, { - "id": "blue", "description": { "en": "Blue" - } + }, + "id": "blue" }, { - "id": "black", "description": { "en": "Black" - } + }, + "id": "black" } ], "target": [ { - "id": "green", "description": { "en": "Green" - } + }, + "id": "green" }, { - "id": "orange", "description": { "en": "Orange" - } + }, + "id": "orange" }, { - "id": "white", "description": { "en": "White" - } + }, + "id": "white" } - ] + ], + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", "objectType": "Activity" }, "result": { - "response": "red[.]green[,]blue[.]orange[,]black[.]white", "completion": true, - "success": true, "extensions": { "http://learninglocker.net/xapi/cmi/matching/response": { - "Red": "Green", + "Black": "White", "Blue": "Orange", - "Black": "White" + "Red": "Green" } - } + }, + "response": "red[.]green[,]blue[.]orange[,]black[.]white", + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Answered" }, - "contextActivities": { - "parent": [ - { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } - }, - "objectType": "Activity" - }, - { - "id": "http://www.example.org/mod/quiz/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", - "name": { - "en": "test_quiz_name" - } - }, - "objectType": "Activity" - }, - { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", - "definition": { - "name": { - "en": "test_name Section 0" - }, - "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - } - ], - "category": [ - { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - } - ] - } + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/multichoice/data.json b/tests/mod_quiz/attempt_submitted/multichoice/data.json index 26f52b325..fca356465 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice/data.json +++ b/tests/mod_quiz/attempt_submitted/multichoice/data.json @@ -1,84 +1,84 @@ { - "modules": [ - { - "id": 1, - "name": "quiz" - } - ], - "quiz_attempts": [ - { - "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 - } - ], - "question_usages": [ - { - "id": 1 - } - ], - "quiz": [ + "grade_grades": [ { - "id": 1, - "name": "test_quiz_name" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "itemmodule": "quiz" } ], - "question_attempts": [ + "modules": [ { "id": 1, - "questionusageid": 1, - "questionid": 1, - "responsesummary": "answer 1", - "rightanswer": "answer 1" + "name": "quiz" } ], "question": [ { "id": 1, - "qtype": "multichoice", "name": "test_name", + "qtype": "multichoice", "questiontext": "test_question" } ], "question_answers": [ { - "id": 1, - "fraction": 1.0, "answer": "answer 1", + "fraction": 1.0, + "id": 1, "question": 1 }, { - "id": 2, - "fraction": 1.0, "answer": "answer 2", + "fraction": 1.0, + "id": 2, "question": 1 }, { - "id": 3, - "fraction": 1.0, "answer": "answer 3", + "fraction": 1.0, + "id": 3, "question": 1 } ], - "grade_grades": [ + "question_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "questionid": 1, + "questionusageid": 1, + "responsesummary": "answer 1", + "rightanswer": "answer 1" + } + ], + "question_usages": [ + { + "id": 1 + } + ], + "quiz": [ + { + "id": 1, + "name": "test_quiz_name" + } + ], + "quiz_attempts": [ + { + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/multichoice/event.json b/tests/mod_quiz/attempt_submitted/multichoice/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice/event.json +++ b/tests/mod_quiz/attempt_submitted/multichoice/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/multichoice/statements.json b/tests/mod_quiz/attempt_submitted/multichoice/statements.json index 40efe2282..cae0c8e86 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice/statements.json +++ b/tests/mod_quiz/attempt_submitted/multichoice/statements.json @@ -1,199 +1,199 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_name" - }, - "description": { - "en": "test_question" + "en": "test_quiz_name Attempt 1" }, - "interactionType": "choice" + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { - "response": "answer-1", - "success": true, "completion": true, - "extensions": { - "http://learninglocker.net/xapi/cmi/choice/response": "answer 1" - } + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_question" + }, + "interactionType": "choice", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "extensions": { + "http://learninglocker.net/xapi/cmi/choice/response": "answer 1" + }, + "response": "answer-1", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/data.json b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/data.json index d6edf04cd..35deeb992 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/data.json +++ b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/data.json @@ -1,72 +1,72 @@ { - "modules": [ + "grade_grades": [ { - "id": 1, - "name": "quiz" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], - "quiz_attempts": [ + "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 + "iteminstance": 1, + "itemmodule": "quiz" } ], - "question_usages": [ + "modules": [ { - "id": 1 + "id": 1, + "name": "quiz" } ], - "quiz": [ + "question": [ { "id": 1, - "name": "test_quiz_name" + "name": "test_name", + "qtype": "multichoice", + "questiontext": "test_question" } ], - "grade_items": [ + "question_answers": [ { + "answer": "answer 1", + "fraction": 1.0, "id": 1, - "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "question": 1 } ], "question_attempts": [ { "id": 1, - "questionusageid": 1, "questionid": 1, + "questionusageid": 1, "responsesummary": "answer 1", "rightanswer": "answer 1" } ], - "question": [ + "question_usages": [ { - "id": 1, - "qtype": "multichoice", - "name": "test_name", - "questiontext": "test_question" + "id": 1 } ], - "question_answers": [ + "quiz": [ { "id": 1, - "fraction": 1.0, - "answer": "answer 1", - "question": 1 + "name": "test_quiz_name" } ], - "grade_grades": [ + "quiz_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/event.json b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/event.json +++ b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/statements.json b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/statements.json index b793122cf..5b46a0ffc 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/statements.json +++ b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/statements.json @@ -1,210 +1,210 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } - }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_name" - }, - "description": { - "en": "test_question" + "en": "test_quiz_name Attempt 1" }, - "interactionType": "choice", - "correctResponsesPattern": [ - "answer-1" - ], - "choices": [ - { - "id": "answer-1", - "description": { - "en": "answer 1" - } - } - ] + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { - "response": "answer-1", - "success": true, "completion": true, - "extensions": { - "http://learninglocker.net/xapi/cmi/choice/response": "answer 1" - } + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" + }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } - ], - "category": [ + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "choices": [ { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } + "description": { + "en": "answer 1" }, - "objectType": "Activity" + "id": "answer-1" } - ] - } + ], + "correctResponsesPattern": [ + "answer-1" + ], + "description": { + "en": "test_question" + }, + "interactionType": "choice", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "extensions": { + "http://learninglocker.net/xapi/cmi/choice/response": "answer 1" + }, + "response": "answer-1", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset/data.json b/tests/mod_quiz/attempt_submitted/multichoiceset/data.json index 0fc560517..84e0dbe7f 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset/data.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset/data.json @@ -1,84 +1,84 @@ { - "modules": [ - { - "id": 1, - "name": "quiz" - } - ], - "quiz_attempts": [ - { - "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 - } - ], - "question_usages": [ - { - "id": 1 - } - ], - "quiz": [ + "grade_grades": [ { - "id": 1, - "name": "test_quiz_name" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "itemmodule": "quiz" } ], - "question_attempts": [ + "modules": [ { "id": 1, - "questionusageid": 1, - "questionid": 1, - "responsesummary": "answer 1; answer 2", - "rightanswer": "answer 1; answer 2" + "name": "quiz" } ], "question": [ { "id": 1, - "qtype": "multichoiceset", "name": "test_name", + "qtype": "multichoiceset", "questiontext": "test_question" } ], "question_answers": [ { - "id": 1, - "fraction": 1.0, "answer": "answer 1", + "fraction": 1.0, + "id": 1, "question": 1 }, { - "id": 2, - "fraction": 1.0, "answer": "answer 2", + "fraction": 1.0, + "id": 2, "question": 1 }, { - "id": 3, - "fraction": 1.0, "answer": "answer 3", + "fraction": 1.0, + "id": 3, "question": 1 } ], - "grade_grades": [ + "question_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "questionid": 1, + "questionusageid": 1, + "responsesummary": "answer 1; answer 2", + "rightanswer": "answer 1; answer 2" + } + ], + "question_usages": [ + { + "id": 1 + } + ], + "quiz": [ + { + "id": 1, + "name": "test_quiz_name" + } + ], + "quiz_attempts": [ + { + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset/event.json b/tests/mod_quiz/attempt_submitted/multichoiceset/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset/event.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset/statements.json b/tests/mod_quiz/attempt_submitted/multichoiceset/statements.json index 93318b4e1..b88802195 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset/statements.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset/statements.json @@ -1,199 +1,199 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_name" - }, - "description": { - "en": "test_question" + "en": "test_quiz_name Attempt 1" }, - "interactionType": "choice" + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { - "response": "answer-1[,]answer-2", - "success": true, "completion": true, - "extensions": { - "http://learninglocker.net/xapi/cmi/choice/response": "answer 1; answer 2" - } + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_question" + }, + "interactionType": "choice", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "extensions": { + "http://learninglocker.net/xapi/cmi/choice/response": "answer 1; answer 2" + }, + "response": "answer-1[,]answer-2", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/data.json b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/data.json index 0fc560517..84e0dbe7f 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/data.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/data.json @@ -1,84 +1,84 @@ { - "modules": [ - { - "id": 1, - "name": "quiz" - } - ], - "quiz_attempts": [ - { - "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 - } - ], - "question_usages": [ - { - "id": 1 - } - ], - "quiz": [ + "grade_grades": [ { - "id": 1, - "name": "test_quiz_name" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "itemmodule": "quiz" } ], - "question_attempts": [ + "modules": [ { "id": 1, - "questionusageid": 1, - "questionid": 1, - "responsesummary": "answer 1; answer 2", - "rightanswer": "answer 1; answer 2" + "name": "quiz" } ], "question": [ { "id": 1, - "qtype": "multichoiceset", "name": "test_name", + "qtype": "multichoiceset", "questiontext": "test_question" } ], "question_answers": [ { - "id": 1, - "fraction": 1.0, "answer": "answer 1", + "fraction": 1.0, + "id": 1, "question": 1 }, { - "id": 2, - "fraction": 1.0, "answer": "answer 2", + "fraction": 1.0, + "id": 2, "question": 1 }, { - "id": 3, - "fraction": 1.0, "answer": "answer 3", + "fraction": 1.0, + "id": 3, "question": 1 } ], - "grade_grades": [ + "question_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "questionid": 1, + "questionusageid": 1, + "responsesummary": "answer 1; answer 2", + "rightanswer": "answer 1; answer 2" + } + ], + "question_usages": [ + { + "id": 1 + } + ], + "quiz": [ + { + "id": 1, + "name": "test_quiz_name" + } + ], + "quiz_attempts": [ + { + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/event.json b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/event.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/statements.json b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/statements.json index 85bca33a6..e991f332d 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/statements.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/statements.json @@ -1,222 +1,222 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_name" - }, - "description": { - "en": "test_question" + "en": "test_quiz_name Attempt 1" }, - "interactionType": "choice", - "correctResponsesPattern": [ - "answer-1[,]answer-2" - ], - "choices": [ - { - "id": "answer-1", - "description": { - "en": "answer 1" - } - }, - { - "id": "answer-2", - "description": { - "en": "answer 2" - } - }, - { - "id": "answer-3", - "description": { - "en": "answer 3" - } - } - ] + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { - "response": "answer-1[,]answer-2", - "success": true, "completion": true, - "extensions": { - "http://learninglocker.net/xapi/cmi/choice/response": "answer 1; answer 2" - } + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } - ], - "category": [ + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "choices": [ { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } + "description": { + "en": "answer 1" }, - "objectType": "Activity" + "id": "answer-1" + }, + { + "description": { + "en": "answer 2" + }, + "id": "answer-2" + }, + { + "description": { + "en": "answer 3" + }, + "id": "answer-3" } - ] - } + ], + "correctResponsesPattern": [ + "answer-1[,]answer-2" + ], + "description": { + "en": "test_question" + }, + "interactionType": "choice", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "extensions": { + "http://learninglocker.net/xapi/cmi/choice/response": "answer 1; answer 2" + }, + "response": "answer-1[,]answer-2", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/no_questions/data.json b/tests/mod_quiz/attempt_submitted/no_questions/data.json index 78b3fe959..b59ccc4e1 100644 --- a/tests/mod_quiz/attempt_submitted/no_questions/data.json +++ b/tests/mod_quiz/attempt_submitted/no_questions/data.json @@ -1,21 +1,29 @@ { - "modules": [ + "grade_grades": [ { + "itemid": 1, + "rawgrade": 50, + "userid": 1 + } + ], + "grade_items": [ + { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, - "name": "quiz" + "iteminstance": 1, + "itemmodule": "quiz" } ], - "quiz_attempts": [ + "modules": [ { "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 + "name": "quiz" } ], + "question": [], + "question_attempts": [], "question_usages": [ { "id": 1 @@ -27,23 +35,15 @@ "name": "test_quiz_name" } ], - "grade_items": [ + "quiz_attempts": [ { "id": 1, - "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 - } - ], - "question_attempts": [], - "question": [], - "grade_grades": [ - { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/no_questions/event.json b/tests/mod_quiz/attempt_submitted/no_questions/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/no_questions/event.json +++ b/tests/mod_quiz/attempt_submitted/no_questions/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/no_questions/statements.json b/tests/mod_quiz/attempt_submitted/no_questions/statements.json index 624e3fb43..749600aed 100644 --- a/tests/mod_quiz/attempt_submitted/no_questions/statements.json +++ b/tests/mod_quiz/attempt_submitted/no_questions/statements.json @@ -1,95 +1,95 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true + }, + "verb": { + "display": { + "en": "Completed" + }, + "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/mod_quiz/attempt_submitted/numerical/data.json b/tests/mod_quiz/attempt_submitted/numerical/data.json index af500f883..d63dd1f8e 100644 --- a/tests/mod_quiz/attempt_submitted/numerical/data.json +++ b/tests/mod_quiz/attempt_submitted/numerical/data.json @@ -1,80 +1,80 @@ { - "modules": [ + "grade_grades": [ { - "id": 1, - "name": "quiz" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], - "quiz_attempts": [ + "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 + "iteminstance": 1, + "itemmodule": "quiz" } ], - "question_usages": [ + "modules": [ { - "id": 1 + "id": 1, + "name": "quiz" } ], - "quiz": [ + "question": [ { "id": 1, - "name": "test_quiz_name" + "name": "test_name", + "qtype": "numerical", + "questiontext": "test_question" } ], - "grade_items": [ + "question_answers": [ { + "answer": 10, + "fraction": 1.0, "id": 1, - "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "question": 1 } ], "question_attempts": [ { "id": 1, - "questionusageid": 1, "questionid": 1, + "questionusageid": 1, "responsesummary": "11", "rightanswer": "10" } ], - "question": [ + "question_numerical": [ { + "answer": 1, "id": 1, - "qtype": "numerical", - "name": "test_name", - "questiontext": "test_question" + "question": 1, + "tolerance": 5 } ], - "question_answers": [ + "question_usages": [ { - "id": 1, - "fraction": 1.0, - "answer": 10, - "question": 1 + "id": 1 } ], - "question_numerical": [ + "quiz": [ { "id": 1, - "tolerance": 5, - "question": 1, - "answer": 1 + "name": "test_quiz_name" } ], - "grade_grades": [ + "quiz_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/numerical/event.json b/tests/mod_quiz/attempt_submitted/numerical/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/numerical/event.json +++ b/tests/mod_quiz/attempt_submitted/numerical/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/numerical/statements.json b/tests/mod_quiz/attempt_submitted/numerical/statements.json index b0130cab9..1bed2f067 100644 --- a/tests/mod_quiz/attempt_submitted/numerical/statements.json +++ b/tests/mod_quiz/attempt_submitted/numerical/statements.json @@ -1,202 +1,202 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_name" - }, - "description": { - "en": "test_question" + "en": "test_quiz_name Attempt 1" }, - "interactionType": "numeric", - "correctResponsesPattern": [ - "5[:]15" - ] + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { - "response": "11", "completion": true, - "success": true, - "extensions": { - "http://learninglocker.net/xapi/cmi/numeric/response": 11 - } + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "correctResponsesPattern": [ + "5[:]15" + ], + "description": { + "en": "test_question" + }, + "interactionType": "numeric", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "extensions": { + "http://learninglocker.net/xapi/cmi/numeric/response": 11 + }, + "response": "11", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/randomsamatch/data.json b/tests/mod_quiz/attempt_submitted/randomsamatch/data.json index 2243b592d..6bd47bd96 100644 --- a/tests/mod_quiz/attempt_submitted/randomsamatch/data.json +++ b/tests/mod_quiz/attempt_submitted/randomsamatch/data.json @@ -1,78 +1,78 @@ { - "modules": [ + "grade_grades": [ { - "id": 1, - "name": "quiz" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], - "quiz_attempts": [ + "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 + "iteminstance": 1, + "itemmodule": "quiz" } ], - "question_usages": [ + "modules": [ { - "id": 1 + "id": 1, + "name": "quiz" } ], - "quiz": [ + "qtype_match_subquestions": [ { + "answertext": "orange", "id": 1, - "name": "test_quiz_name" + "questionid": 1, + "questiontext": "

Example short answer question" + }, + { + "answertext": "Purple", + "id": 2, + "questionid": 1, + "questiontext": "

Testing testing" } ], - "grade_items": [ + "question": [ { "id": 1, - "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "name": "test_name", + "qtype": "randomsamatch", + "questiontext": "

Example Random short-answer matching question

" } ], "question_attempts": [ { "id": 1, - "questionusageid": 1, "questionid": 1, - "rightanswer": "Example short answer question\n -> orange; Testing testing\n -> Purple", - "responsesummary": "Example short answer question\n -> orange; Testing testing\n -> Purple" + "questionusageid": 1, + "responsesummary": "Example short answer question\n -> orange; Testing testing\n -> Purple", + "rightanswer": "Example short answer question\n -> orange; Testing testing\n -> Purple" } ], - "question": [ + "question_usages": [ { - "id": 1, - "qtype": "randomsamatch", - "name": "test_name", - "questiontext": "

Example Random short-answer matching question

" + "id": 1 } ], - "qtype_match_subquestions": [ + "quiz": [ { "id": 1, - "questionid": 1, - "questiontext": "

Example short answer question", - "answertext": "orange" - }, - { - "id": 2, - "questionid": 1, - "questiontext": "

Testing testing", - "answertext": "Purple" + "name": "test_quiz_name" } ], - "grade_grades": [ + "quiz_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/randomsamatch/event.json b/tests/mod_quiz/attempt_submitted/randomsamatch/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/randomsamatch/event.json +++ b/tests/mod_quiz/attempt_submitted/randomsamatch/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json b/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json index 96fa6117d..39872d2ea 100644 --- a/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json +++ b/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json @@ -1,233 +1,233 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } + }, + "name": "test_fullname" }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } + "context": { + "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { + "name": { + "en": "test_quiz_name" + }, + "type": "http://adlnet.gov/expapi/activities/assessment" + }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", + "objectType": "Activity" + }, + { + "definition": { + "name": { + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" + }, + "id": "http://www.example.org/course/section.php?id=1", + "objectType": "Activity" + }, + { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + } + ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { + "completion": true, + "duration": "PT1S", "score": { - "raw": 50, - "min": 0, "max": 100, + "min": 0, + "raw": 50, "scaled": 0.0 }, - "completion": true, - "success": true, - "duration": "PT1S" + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { - "en": "test_quiz_name" - } + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_quiz_name" }, - "type": "http://id.tincanapi.com/activitytype/section" - } + "type": "http://adlnet.gov/expapi/activities/assessment" + }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", + "objectType": "Activity" }, { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", - "name": { - "en": "test_name" - }, + "correctResponsesPattern": [ + "example-short-answer-question[.]orange[,]testing-testing[.]purple" + ], "description": { "en": "Example Random short-answer matching question" }, "interactionType": "matching", - "correctResponsesPattern": [ - "example-short-answer-question[.]orange[,]testing-testing[.]purple" - ], + "name": { + "en": "test_name" + }, "source": [ { - "id": "example-short-answer-question", "description": { "en": "Example short answer question" - } + }, + "id": "example-short-answer-question" }, { - "id": "testing-testing", "description": { "en": "Testing testing" - } + }, + "id": "testing-testing" } ], "target": [ { - "id": "orange", "description": { "en": "orange" - } + }, + "id": "orange" }, { - "id": "purple", "description": { "en": "Purple" - } + }, + "id": "purple" } - ] + ], + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", "objectType": "Activity" }, "result": { - "response": "example-short-answer-question[.]orange[,]testing-testing[.]purple", "completion": true, - "success": true, "extensions": { "http://learninglocker.net/xapi/cmi/matching/response": { "Example short answer question": "orange", "Testing testing": "Purple" } - } + }, + "response": "example-short-answer-question[.]orange[,]testing-testing[.]purple", + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Answered" }, - "contextActivities": { - "parent": [ - { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } - }, - "objectType": "Activity" - }, - { - "id": "http://www.example.org/mod/quiz/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", - "name": { - "en": "test_quiz_name" - } - }, - "objectType": "Activity" - }, - { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", - "definition": { - "name": { - "en": "test_name Section 0" - }, - "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - } - ], - "category": [ - { - "id": "http://www.example.org", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", - "name": { - "en": "test_name" - } - }, - "objectType": "Activity" - } - ] - } + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/shortanswer/data.json b/tests/mod_quiz/attempt_submitted/shortanswer/data.json index 61e655fc0..d3807ef25 100644 --- a/tests/mod_quiz/attempt_submitted/shortanswer/data.json +++ b/tests/mod_quiz/attempt_submitted/shortanswer/data.json @@ -1,63 +1,63 @@ { - "modules": [ + "grade_grades": [ { - "id": 1, - "name": "quiz" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], - "quiz_attempts": [ + "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 - } - ], - "question_usages": [ - { - "id": 1 + "iteminstance": 1, + "itemmodule": "quiz" } ], - "quiz": [ + "modules": [ { "id": 1, - "name": "test_quiz_name" + "name": "quiz" } ], - "grade_items": [ + "question": [ { "id": 1, - "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "name": "test_name", + "qtype": "shortanswer", + "questiontext": "test_question" } ], "question_attempts": [ { "id": 1, - "questionusageid": 1, "questionid": 1, + "questionusageid": 1, "responsesummary": "test_answer" } ], - "question": [ + "question_usages": [ + { + "id": 1 + } + ], + "quiz": [ { "id": 1, - "qtype": "shortanswer", - "name": "test_name", - "questiontext": "test_question" + "name": "test_quiz_name" } ], - "grade_grades": [ + "quiz_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/shortanswer/event.json b/tests/mod_quiz/attempt_submitted/shortanswer/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/shortanswer/event.json +++ b/tests/mod_quiz/attempt_submitted/shortanswer/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/shortanswer/statements.json b/tests/mod_quiz/attempt_submitted/shortanswer/statements.json index 1defe052b..ad18909cb 100644 --- a/tests/mod_quiz/attempt_submitted/shortanswer/statements.json +++ b/tests/mod_quiz/attempt_submitted/shortanswer/statements.json @@ -1,195 +1,195 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_name" - }, - "description": { - "en": "test_question" + "en": "test_quiz_name Attempt 1" }, - "interactionType": "fill-in" + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { - "response": "test_answer", - "completion": true + "completion": true, + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_question" + }, + "interactionType": "fill-in", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "response": "test_answer" + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/truefalse/data.json b/tests/mod_quiz/attempt_submitted/truefalse/data.json index dcc44ad27..3d400c794 100644 --- a/tests/mod_quiz/attempt_submitted/truefalse/data.json +++ b/tests/mod_quiz/attempt_submitted/truefalse/data.json @@ -1,78 +1,78 @@ { - "modules": [ + "grade_grades": [ { - "id": 1, - "name": "quiz" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], - "quiz_attempts": [ + "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 + "iteminstance": 1, + "itemmodule": "quiz" } ], - "question_usages": [ + "modules": [ { - "id": 1 + "id": 1, + "name": "quiz" } ], - "quiz": [ + "question": [ { "id": 1, - "name": "test_quiz_name" + "name": "test_name", + "qtype": "truefalse", + "questiontext": "test_question" } ], - "grade_items": [ + "question_answers": [ { + "answer": "True", + "fraction": 1.0, "id": 1, - "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "question": 1 + }, + { + "answer": "False", + "fraction": 0.0, + "id": 2, + "question": 1 } ], "question_attempts": [ { "id": 1, - "questionusageid": 1, "questionid": 1, + "questionusageid": 1, "responsesummary": "True", "rightanswer": "True" } ], - "question": [ + "question_usages": [ { - "id": 1, - "qtype": "truefalse", - "name": "test_name", - "questiontext": "test_question" + "id": 1 } ], - "question_answers": [ + "quiz": [ { "id": 1, - "fraction": 1.0, - "answer": "True", - "question": 1 - }, - { - "id": 2, - "fraction": 0.0, - "answer": "False", - "question": 1 + "name": "test_quiz_name" } ], - "grade_grades": [ + "quiz_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/truefalse/event.json b/tests/mod_quiz/attempt_submitted/truefalse/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/truefalse/event.json +++ b/tests/mod_quiz/attempt_submitted/truefalse/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/truefalse/statements.json b/tests/mod_quiz/attempt_submitted/truefalse/statements.json index c8a7bc149..49118c157 100644 --- a/tests/mod_quiz/attempt_submitted/truefalse/statements.json +++ b/tests/mod_quiz/attempt_submitted/truefalse/statements.json @@ -1,202 +1,202 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } - } - }, - { - "actor": { - "name": "test_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/answered", - "display": { - "en": "Answered" - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" }, "object": { - "id": "http://www.example.org/question/question.php?cmid=1&id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/cmi.interaction", "name": { - "en": "test_name" - }, - "description": { - "en": "test_question" + "en": "test_quiz_name Attempt 1" }, - "interactionType": "true-false", - "correctResponsesPattern": [ - "true" - ] + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, "result": { - "response": "true", "completion": true, - "success": true, - "extensions": { - "http://learninglocker.net/xapi/cmi/true-false/response": true - } + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true }, - "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } + "verb": { + "display": { + "en": "Completed" }, + "id": "http://adlnet.gov/expapi/verbs/completed" + } + }, + { + "actor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname" + }, + "context": { "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "correctResponsesPattern": [ + "true" + ], + "description": { + "en": "test_question" + }, + "interactionType": "true-false", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "extensions": { + "http://learninglocker.net/xapi/cmi/true-false/response": true + }, + "response": "true", + "success": true + }, + "verb": { + "display": { + "en": "Answered" + }, + "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/unknown_qtype/data.json b/tests/mod_quiz/attempt_submitted/unknown_qtype/data.json index 4fc1c6fe5..bdf289e60 100644 --- a/tests/mod_quiz/attempt_submitted/unknown_qtype/data.json +++ b/tests/mod_quiz/attempt_submitted/unknown_qtype/data.json @@ -1,63 +1,63 @@ { - "modules": [ + "grade_grades": [ { - "id": 1, - "name": "quiz" + "itemid": 1, + "rawgrade": 50, + "userid": 1 } ], - "quiz_attempts": [ + "grade_items": [ { + "grademax": 100, + "grademin": 0, + "gradepass": 50, "id": 1, - "quiz": 1, - "uniqueid": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0 - } - ], - "question_usages": [ - { - "id": 1 + "iteminstance": 1, + "itemmodule": "quiz" } ], - "quiz": [ + "modules": [ { "id": 1, - "name": "test_quiz_name" + "name": "quiz" } ], - "grade_items": [ + "question": [ { "id": 1, - "iteminstance": 1, - "itemmodule": "quiz", - "grademin": 0, - "grademax": 100, - "gradepass": 50 + "name": "test_name", + "qtype": "unknown", + "questiontext": "test_question" } ], "question_attempts": [ { "id": 1, - "questionusageid": 1, "questionid": 1, + "questionusageid": 1, "responsesummary": "test_answer" } ], - "question": [ + "question_usages": [ + { + "id": 1 + } + ], + "quiz": [ { "id": 1, - "qtype": "unknown", - "name": "test_name", - "questiontext": "test_question" + "name": "test_quiz_name" } ], - "grade_grades": [ + "quiz_attempts": [ { - "itemid": 1, - "userid": 1, - "rawgrade": 50 + "id": 1, + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "uniqueid": 1 } ] } diff --git a/tests/mod_quiz/attempt_submitted/unknown_qtype/event.json b/tests/mod_quiz/attempt_submitted/unknown_qtype/event.json index 87f94acf8..106cf346b 100644 --- a/tests/mod_quiz/attempt_submitted/unknown_qtype/event.json +++ b/tests/mod_quiz/attempt_submitted/unknown_qtype/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, - "relateduserid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "attempt", "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_submitted" + "objecttable": "attempt", + "relateduserid": 1, + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/unknown_qtype/statements.json b/tests/mod_quiz/attempt_submitted/unknown_qtype/statements.json index 624e3fb43..749600aed 100644 --- a/tests/mod_quiz/attempt_submitted/unknown_qtype/statements.json +++ b/tests/mod_quiz/attempt_submitted/unknown_qtype/statements.json @@ -1,95 +1,95 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 50, - "min": 0, - "max": 100, - "scaled": 0.0 - }, - "completion": true, - "success": true, - "duration": "PT1S" + "name": "test_fullname" }, "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_quiz\\event\\attempt_submitted", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_submitted\\handler", + "event_name": "\\mod_quiz\\event\\attempt_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "objectType": "Activity" + }, + "result": { + "completion": true, + "duration": "PT1S", + "score": { + "max": 100, + "min": 0, + "raw": 50, + "scaled": 0.0 + }, + "success": true + }, + "verb": { + "display": { + "en": "Completed" + }, + "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/mod_quiz/attempt_viewed/existing_module/data.json b/tests/mod_quiz/attempt_viewed/existing_module/data.json index cbdad7191..4110000b5 100644 --- a/tests/mod_quiz/attempt_viewed/existing_module/data.json +++ b/tests/mod_quiz/attempt_viewed/existing_module/data.json @@ -5,20 +5,20 @@ "name": "quiz" } ], + "quiz": [ + { + "id": 1, + "name": "test_quiz_name" + } + ], "quiz_attempts": [ { "id": 1, "quiz": 1, - "sumgrades": 50, "state": "finished", + "sumgrades": 50, "timefinish": 1, "timestart": 0 } - ], - "quiz": [ - { - "id": 1, - "name": "test_quiz_name" - } ] } diff --git a/tests/mod_quiz/attempt_viewed/existing_module/event.json b/tests/mod_quiz/attempt_viewed/existing_module/event.json index 40b02d227..ccb5741ff 100644 --- a/tests/mod_quiz/attempt_viewed/existing_module/event.json +++ b/tests/mod_quiz/attempt_viewed/existing_module/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\attempt_viewed", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\attempt_viewed" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_quiz/attempt_viewed/existing_module/statements.json b/tests/mod_quiz/attempt_viewed/existing_module/statements.json index 7deeefb43..2d65d871b 100644 --- a/tests/mod_quiz/attempt_viewed/existing_module/statements.json +++ b/tests/mod_quiz/attempt_viewed/existing_module/statements.json @@ -1,84 +1,84 @@ [ { "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/quiz/attempt.php?attempt=1&cmid=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", - "name": { - "en": "test_quiz_name Attempt 1" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_quiz\\event\\attempt_viewed", - "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_viewed" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\attempt_viewed", + "event_name": "\\mod_quiz\\event\\attempt_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_quiz/course_module_viewed/existing_module/event.json b/tests/mod_quiz/course_module_viewed/existing_module/event.json index 192562757..f4875fd02 100644 --- a/tests/mod_quiz/course_module_viewed/existing_module/event.json +++ b/tests/mod_quiz/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_quiz\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_quiz\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_quiz/course_module_viewed/existing_module/statements.json b/tests/mod_quiz/course_module_viewed/existing_module/statements.json index a48b35daa..3c31dd788 100644 --- a/tests/mod_quiz/course_module_viewed/existing_module/statements.json +++ b/tests/mod_quiz/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/quiz/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_quiz\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_quiz\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/assessment" + }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_quiz/question_manually_graded/data.json b/tests/mod_quiz/question_manually_graded/data.json index 24db1113b..977e224f8 100644 --- a/tests/mod_quiz/question_manually_graded/data.json +++ b/tests/mod_quiz/question_manually_graded/data.json @@ -1,31 +1,24 @@ { - "user": [ + "modules": [ { "id": 1, - "firstname": "test_instructor_fullname", - "email": "instructor@test.com" - }, - { - "id": 2, - "firstname": "test_learner_fullname", - "email": "learner@test.com" + "name": "quiz" } ], - "modules": [ + "question_attempt_steps": [ { + "fraction": 0.5, "id": 1, - "name": "quiz" + "questionattemptid": 1, + "sequencenumber": 1 } ], - "quiz_attempts": [ + "question_attempts": [ { "id": 1, - "quiz": 1, - "sumgrades": 50, - "state": "finished", - "timefinish": 1, - "timestart": 0, - "userid": 2 + "maxfraction": 1.0, + "minfraction": 0.0, + "questionusageid": 1 } ], "quiz": [ @@ -34,20 +27,27 @@ "name": "test_quiz_name" } ], - "question_attempts": [ + "quiz_attempts": [ { "id": 1, - "questionusageid": 1, - "minfraction": 0.0, - "maxfraction": 1.0 + "quiz": 1, + "state": "finished", + "sumgrades": 50, + "timefinish": 1, + "timestart": 0, + "userid": 2 } ], - "question_attempt_steps": [ + "user": [ { - "id": 1, - "questionattemptid": 1, - "fraction": 0.5, - "sequencenumber": 1 + "email": "instructor@test.com", + "firstname": "test_instructor_fullname", + "id": 1 + }, + { + "email": "learner@test.com", + "firstname": "test_learner_fullname", + "id": 2 } ] } diff --git a/tests/mod_quiz/question_manually_graded/event.json b/tests/mod_quiz/question_manually_graded/event.json index 74cfdea49..cbe1b527a 100644 --- a/tests/mod_quiz/question_manually_graded/event.json +++ b/tests/mod_quiz/question_manually_graded/event.json @@ -1,12 +1,12 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, - "objecttable": "quiz", - "objectid": 1, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_quiz\\event\\question_manually_graded", + "id": 1, + "objectid": 1, + "objecttable": "quiz", + "other": "a:3:{s:6:\"quizid\";s:1:\"1\";s:9:\"attemptid\";s:1:\"1\";s:4:\"slot\";i:1;}", "relateduserid": null, - "other": "a:3:{s:6:\"quizid\";s:1:\"1\";s:9:\"attemptid\";s:1:\"1\";s:4:\"slot\";i:1;}" + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_quiz/question_manually_graded/statements.json b/tests/mod_quiz/question_manually_graded/statements.json index 1d7c66a0a..a2ddb5536 100644 --- a/tests/mod_quiz/question_manually_graded/statements.json +++ b/tests/mod_quiz/question_manually_graded/statements.json @@ -1,119 +1,119 @@ [ { "actor": { - "name": "test_learner_fullname", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/scored", - "display": { - "en": "Scored" - } - }, - "object": { - "id": "http://www.example.org/review.php?attempt=1&slot=1", - "definition": { - "type": "http://activitystrea.ms/schema/1.0/review#slot", - "name": { - "en": "test_quiz_name Review Slot 1" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "min": 0, - "max": 1, - "raw": 0.5, - "scaled": 0.0 - } + "name": "test_learner_fullname" }, "context": { - "instructor": { - "name": "test_instructor_fullname", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, - "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_quiz\\event\\question_manually_graded", - "event_function": "\\src\\transformer\\events\\mod_quiz\\question_manually_graded" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/review.php?attempt=1", "definition": { - "type": "http://activitystrea.ms/schema/1.0/review", "name": { "en": "Review" - } + }, + "type": "http://activitystrea.ms/schema/1.0/review" }, + "id": "http://www.example.org/review.php?attempt=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/attempt", "name": { "en": "test_quiz_name Attempt 1" - } + }, + "type": "http://adlnet.gov/expapi/activities/attempt" }, + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/assessment", "name": { "en": "test_quiz_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/assessment" }, + "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_quiz\\question_manually_graded", + "event_name": "\\mod_quiz\\event\\question_manually_graded", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_instructor_fullname" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_quiz_name Review Slot 1" + }, + "type": "http://activitystrea.ms/schema/1.0/review#slot" + }, + "id": "http://www.example.org/review.php?attempt=1&slot=1", + "objectType": "Activity" + }, + "result": { + "score": { + "max": 1, + "min": 0, + "raw": 0.5, + "scaled": 0.0 } + }, + "verb": { + "display": { + "en": "Scored" + }, + "id": "https://w3id.org/xapi/tla/verbs/scored" } } ] diff --git a/tests/mod_resource/course_module_viewed/existing_module/event.json b/tests/mod_resource/course_module_viewed/existing_module/event.json index ce6deb9d2..2cd64ec91 100644 --- a/tests/mod_resource/course_module_viewed/existing_module/event.json +++ b/tests/mod_resource/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_resource\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_resource\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_resource/course_module_viewed/existing_module/statements.json b/tests/mod_resource/course_module_viewed/existing_module/statements.json index 36f3c61c6..fe09ddcfe 100644 --- a/tests/mod_resource/course_module_viewed/existing_module/statements.json +++ b/tests/mod_resource/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/resource/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/resource", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_resource\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_resource\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/resource" + }, + "id": "http://www.example.org/mod/resource/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_scorm/course_module_viewed/existing_module/event.json b/tests/mod_scorm/course_module_viewed/existing_module/event.json index 4b6efd2a4..91a603a0b 100644 --- a/tests/mod_scorm/course_module_viewed/existing_module/event.json +++ b/tests/mod_scorm/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_scorm\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_scorm\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_scorm/course_module_viewed/existing_module/statements.json b/tests/mod_scorm/course_module_viewed/existing_module/statements.json index aeb530b53..ec398a84e 100644 --- a/tests/mod_scorm/course_module_viewed/existing_module/statements.json +++ b/tests/mod_scorm/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/scorm/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/module", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_scorm\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_scorm\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/module" + }, + "id": "http://www.example.org/mod/scorm/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_scorm/sco_launched/existing_sco_launched/event.json b/tests/mod_scorm/sco_launched/existing_sco_launched/event.json index 6294bca5d..fb99c6691 100644 --- a/tests/mod_scorm/sco_launched/existing_sco_launched/event.json +++ b/tests/mod_scorm/sco_launched/existing_sco_launched/event.json @@ -1,9 +1,9 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_scorm\\event\\sco_launched", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "eventname": "\\mod_scorm\\event\\sco_launched", - "contextinstanceid": 1 + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json b/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json index df4fcb25d..e06d93f02 100644 --- a/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json +++ b/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json @@ -1,84 +1,84 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/launched", - "display": { - "en": "Launched" - } - }, - "object": { - "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object", - "name": { - "en": "test_name Content" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_scorm\\event\\sco_launched", - "event_function": "\\src\\transformer\\events\\mod_scorm\\sco_launched" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/scorm/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/module", "name": { "en": "test_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/module" }, + "id": "http://www.example.org/mod/scorm/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_scorm\\sco_launched", + "event_name": "\\mod_scorm\\event\\sco_launched", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Content" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object" + }, + "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Launched" + }, + "id": "http://adlnet.gov/expapi/verbs/launched" } } ] diff --git a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/data.json b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/data.json index 7123dcfaa..be567957d 100644 --- a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/data.json +++ b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/data.json @@ -13,30 +13,30 @@ ], "scorm_scoes_track": [ { - "id": 1, - "userid": 1, - "scormid": 1, - "scoid": 1, "attempt": 1, "element": "cmi.core.lesson_status", + "id": 1, + "scoid": 1, + "scormid": 1, + "userid": 1, "value": "completed" }, { - "id": 2, - "userid": 1, - "scormid": 1, - "scoid": 1, "attempt": 1, "element": "cmi.core.score.min", + "id": 2, + "scoid": 1, + "scormid": 1, + "userid": 1, "value": 0 }, { - "id": 3, - "userid": 1, - "scormid": 1, - "scoid": 1, "attempt": 1, "element": "cmi.core.score.max", + "id": 3, + "scoid": 1, + "scormid": 1, + "userid": 1, "value": 100 } ] diff --git a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/event.json b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/event.json index 74f9f5ff1..1334c98d6 100644 --- a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/event.json +++ b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_scorm\\event\\scoreraw_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "eventname": "\\mod_scorm\\event\\scoreraw_submitted", "other": "a:2:{s:8:\"cmivalue\";i:100;s:9:\"attemptid\";i:1;}", - "contextinstanceid": 1 + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json index 0a6dcb00b..bc14f7767 100644 --- a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json +++ b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json @@ -1,92 +1,92 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object", - "name": { - "en": "test_name Content" - } }, - "objectType": "Activity" - }, - "result": { - "score": { - "raw": 100, - "min": 0, - "max": 100, - "scaled": 1 - } + "name": "test_fullname" }, "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_scorm\\event\\scoreraw_submitted", - "event_function": "\\src\\transformer\\events\\mod_scorm\\scoreraw_submitted" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/scorm/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/module", "name": { "en": "test_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/module" }, + "id": "http://www.example.org/mod/scorm/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_scorm\\scoreraw_submitted", + "event_name": "\\mod_scorm\\event\\scoreraw_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Content" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object" + }, + "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", + "objectType": "Activity" + }, + "result": { + "score": { + "max": 100, + "min": 0, + "raw": 100, + "scaled": 1 } + }, + "verb": { + "display": { + "en": "Completed" + }, + "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/mod_scorm/status_submitted/existing_status_submitted/data.json b/tests/mod_scorm/status_submitted/existing_status_submitted/data.json index 29006b340..0ef88aa2e 100644 --- a/tests/mod_scorm/status_submitted/existing_status_submitted/data.json +++ b/tests/mod_scorm/status_submitted/existing_status_submitted/data.json @@ -13,12 +13,12 @@ ], "scorm_scoes_track": [ { - "id": 1, - "userid": 1, - "scormid": 1, - "scoid": 1, "attempt": 1, "element": "cmi.core.lesson_status", + "id": 1, + "scoid": 1, + "scormid": 1, + "userid": 1, "value": "completed" } ] diff --git a/tests/mod_scorm/status_submitted/existing_status_submitted/event.json b/tests/mod_scorm/status_submitted/existing_status_submitted/event.json index a0a67f3d7..019de7644 100644 --- a/tests/mod_scorm/status_submitted/existing_status_submitted/event.json +++ b/tests/mod_scorm/status_submitted/existing_status_submitted/event.json @@ -1,10 +1,10 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_scorm\\event\\status_submitted", "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "objectid": 1, - "eventname": "\\mod_scorm\\event\\status_submitted", "other": "a:1:{s:9:\"attemptid\";i:1;}", - "contextinstanceid": 1 + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json b/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json index 8b333dcf8..e51ff4d48 100644 --- a/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json +++ b/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json @@ -1,84 +1,84 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/completed", - "display": { - "en": "Completed" - } - }, - "object": { - "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object", - "name": { - "en": "test_name Content" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_scorm\\event\\status_submitted", - "event_function": "\\src\\transformer\\events\\mod_scorm\\status_submitted" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/scorm/view.php?id=1", "definition": { - "type": "http://adlnet.gov/expapi/activities/module", "name": { "en": "test_name" - } + }, + "type": "http://adlnet.gov/expapi/activities/module" }, + "id": "http://www.example.org/mod/scorm/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_scorm\\status_submitted", + "event_name": "\\mod_scorm\\event\\status_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Content" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object" + }, + "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Completed" + }, + "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/mod_survey/course_module_viewed/existing_module/data.json b/tests/mod_survey/course_module_viewed/existing_module/data.json index b48c217eb..0b924e115 100644 --- a/tests/mod_survey/course_module_viewed/existing_module/data.json +++ b/tests/mod_survey/course_module_viewed/existing_module/data.json @@ -8,8 +8,8 @@ "survey": [ { "id": 1, - "name": "test_name", - "intro": "

test_intro

" + "intro": "

test_intro

", + "name": "test_name" } ] } diff --git a/tests/mod_survey/course_module_viewed/existing_module/event.json b/tests/mod_survey/course_module_viewed/existing_module/event.json index 534febc89..06b304ea8 100644 --- a/tests/mod_survey/course_module_viewed/existing_module/event.json +++ b/tests/mod_survey/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_survey\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_survey\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_survey/course_module_viewed/existing_module/statements.json b/tests/mod_survey/course_module_viewed/existing_module/statements.json index 6da1afba6..cc2e83115 100644 --- a/tests/mod_survey/course_module_viewed/existing_module/statements.json +++ b/tests/mod_survey/course_module_viewed/existing_module/statements.json @@ -1,77 +1,77 @@ [ { "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/survey/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/survey", - "name": { - "en": "test_name" - }, - "description": { - "en": "test_intro" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_survey\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_survey\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_intro" + }, + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "id": "http://www.example.org/mod/survey/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_survey/report_viewed/data.json b/tests/mod_survey/report_viewed/data.json index b48c217eb..0b924e115 100644 --- a/tests/mod_survey/report_viewed/data.json +++ b/tests/mod_survey/report_viewed/data.json @@ -8,8 +8,8 @@ "survey": [ { "id": 1, - "name": "test_name", - "intro": "

test_intro

" + "intro": "

test_intro

", + "name": "test_name" } ] } diff --git a/tests/mod_survey/report_viewed/event.json b/tests/mod_survey/report_viewed/event.json index 83b6f7e6b..388b9a2a8 100644 --- a/tests/mod_survey/report_viewed/event.json +++ b/tests/mod_survey/report_viewed/event.json @@ -1,12 +1,11 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_survey\\event\\report_viewed", + "id": 1, "objectid": 1, - "contextinstanceid": 1, "objecttable": "survey", - "other": "a:2:{s:6:\"action\";s:7:\"summary\";s:7:\"groupid\";i:0;}" + "other": "a:2:{s:6:\"action\";s:7:\"summary\";s:7:\"groupid\";i:0;}", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_survey/report_viewed/statements.json b/tests/mod_survey/report_viewed/statements.json index ab8843042..83ae8fd47 100644 --- a/tests/mod_survey/report_viewed/statements.json +++ b/tests/mod_survey/report_viewed/statements.json @@ -1,87 +1,87 @@ [ { "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/survey/report.php?id=1&action=summary", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/report", - "name": { - "en": "test_name Report: Summary" - } - } + }, + "name": "test_fullname" }, "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_survey\\event\\report_viewed", - "event_function": "\\src\\transformer\\events\\mod_survey\\report_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/mod/survey/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/survey", "name": { - "en": "test_name" + "en": "test_site_fullname" }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { "description": { "en": "test_intro" - } + }, + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" }, + "id": "http://www.example.org/mod/survey/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_survey\\report_viewed", + "event_name": "\\mod_survey\\event\\report_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name Report: Summary" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/report" + }, + "id": "http://www.example.org/mod/survey/report.php?id=1&action=summary", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_survey/response_submitted/data.json b/tests/mod_survey/response_submitted/data.json index b48c217eb..0b924e115 100644 --- a/tests/mod_survey/response_submitted/data.json +++ b/tests/mod_survey/response_submitted/data.json @@ -8,8 +8,8 @@ "survey": [ { "id": 1, - "name": "test_name", - "intro": "

test_intro

" + "intro": "

test_intro

", + "name": "test_name" } ] } diff --git a/tests/mod_survey/response_submitted/event.json b/tests/mod_survey/response_submitted/event.json index 846da2424..29c9b7f17 100644 --- a/tests/mod_survey/response_submitted/event.json +++ b/tests/mod_survey/response_submitted/event.json @@ -1,12 +1,11 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_survey\\event\\response_submitted", + "id": 1, "objectid": null, - "contextinstanceid": 1, "objecttable": null, - "other": "a:1:{s:8:\"surveyid\";s:1:\"1\";}" + "other": "a:1:{s:8:\"surveyid\";s:1:\"1\";}", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_survey/response_submitted/statements.json b/tests/mod_survey/response_submitted/statements.json index ee8396a17..1185ddbc7 100644 --- a/tests/mod_survey/response_submitted/statements.json +++ b/tests/mod_survey/response_submitted/statements.json @@ -1,77 +1,77 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/submit", - "display": { - "en": "Submitted" - } - }, - "object": { - "id": "http://www.example.org/mod/survey/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/survey", - "name": { - "en": "test_name" - }, - "description": { - "en": "test_intro" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_survey\\event\\response_submitted", - "event_function": "\\src\\transformer\\events\\mod_survey\\response_submitted" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_survey\\response_submitted", + "event_name": "\\mod_survey\\event\\response_submitted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_intro" + }, + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "id": "http://www.example.org/mod/survey/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Submitted" + }, + "id": "http://activitystrea.ms/submit" } } ] diff --git a/tests/mod_url/course_module_viewed/existing_module/event.json b/tests/mod_url/course_module_viewed/existing_module/event.json index a53aebe10..894442364 100644 --- a/tests/mod_url/course_module_viewed/existing_module/event.json +++ b/tests/mod_url/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_url\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_url\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_url/course_module_viewed/existing_module/statements.json b/tests/mod_url/course_module_viewed/existing_module/statements.json index edf9d3e4d..3e79c6ca1 100644 --- a/tests/mod_url/course_module_viewed/existing_module/statements.json +++ b/tests/mod_url/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/url/view.php?id=1", - "definition": { - "type": "http://adlnet.gov/expapi/activities/link", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_url\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_url\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/link" + }, + "id": "http://www.example.org/mod/url/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_wiki/comment_created/data.json b/tests/mod_wiki/comment_created/data.json index 3a53fc490..0db9e2a02 100644 --- a/tests/mod_wiki/comment_created/data.json +++ b/tests/mod_wiki/comment_created/data.json @@ -1,36 +1,36 @@ { - "modules": [ + "comments": [ { + "content": "

test_content

", "id": 1, - "name": "wiki" + "itemid": 1 } ], - "wiki": [ + "modules": [ { "id": 1, - "name": "test_name", - "intro": "

test_intro

" + "name": "wiki" } ], - "wiki_subwikis": [ + "wiki": [ { "id": 1, - "wikiid": 1 + "intro": "

test_intro

", + "name": "test_name" } ], "wiki_pages": [ { + "cachedcontent": "

test_content

", "id": 1, "subwikiid": 1, - "title": "test_page_title", - "cachedcontent": "

test_content

" + "title": "test_page_title" } ], - "comments": [ + "wiki_subwikis": [ { "id": 1, - "content": "

test_content

", - "itemid": 1 + "wikiid": 1 } ] } diff --git a/tests/mod_wiki/comment_created/event.json b/tests/mod_wiki/comment_created/event.json index 4dc8129a5..ffe628105 100644 --- a/tests/mod_wiki/comment_created/event.json +++ b/tests/mod_wiki/comment_created/event.json @@ -1,10 +1,10 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_wiki\\event\\comment_created", + "id": 1, "objectid": 1, - "objecttable": "comments" + "objecttable": "comments", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_wiki/comment_created/statements.json b/tests/mod_wiki/comment_created/statements.json index 69d2126ee..8519504ad 100644 --- a/tests/mod_wiki/comment_created/statements.json +++ b/tests/mod_wiki/comment_created/statements.json @@ -1,103 +1,103 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://adlnet.gov/expapi/verbs/commented", - "display": { - "en": "Commented" - } - }, - "object": { - "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/discussion", - "name": { - "en": "test_page_title Discussion" - } }, - "objectType": "Activity" - }, - "result": { - "response": "test_content" + "name": "test_fullname" }, "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_wiki\\event\\comment_created", - "event_function": "\\src\\transformer\\events\\mod_wiki\\comment_created" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/mod/wiki/view.php?pageid=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page", "name": { - "en": "test_page_title" + "en": "test_site_fullname" }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { "description": { "en": "test_content" - } + }, + "name": { + "en": "test_page_title" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page" }, + "id": "http://www.example.org/mod/wiki/view.php?pageid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/wiki/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki", + "description": { + "en": "test_intro" + }, "name": { "en": "test_name" }, - "description": { - "en": "test_intro" - } + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" }, + "id": "http://www.example.org/mod/wiki/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_wiki\\comment_created", + "event_name": "\\mod_wiki\\event\\comment_created", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_page_title Discussion" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", + "objectType": "Activity" + }, + "result": { + "response": "test_content" + }, + "verb": { + "display": { + "en": "Commented" + }, + "id": "http://adlnet.gov/expapi/verbs/commented" } } ] diff --git a/tests/mod_wiki/comment_deleted/data.json b/tests/mod_wiki/comment_deleted/data.json index 8b4744ede..954b8baf4 100644 --- a/tests/mod_wiki/comment_deleted/data.json +++ b/tests/mod_wiki/comment_deleted/data.json @@ -8,22 +8,22 @@ "wiki": [ { "id": 1, - "name": "test_name", - "intro": "

test_intro

" + "intro": "

test_intro

", + "name": "test_name" } ], - "wiki_subwikis": [ + "wiki_pages": [ { + "cachedcontent": "

test_content

", "id": 1, - "wikiid": 1 + "subwikiid": 1, + "title": "test_page_title" } ], - "wiki_pages": [ + "wiki_subwikis": [ { "id": 1, - "subwikiid": 1, - "title": "test_page_title", - "cachedcontent": "

test_content

" + "wikiid": 1 } ] } diff --git a/tests/mod_wiki/comment_deleted/event.json b/tests/mod_wiki/comment_deleted/event.json index 472af2f3b..07cf0ce1a 100644 --- a/tests/mod_wiki/comment_deleted/event.json +++ b/tests/mod_wiki/comment_deleted/event.json @@ -1,11 +1,11 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_wiki\\event\\comment_deleted", + "id": 1, "objectid": 1, "objecttable": "comments", - "other": "a:1:{s:6:\"itemid\";s:1:\"1\";}" + "other": "a:1:{s:6:\"itemid\";s:1:\"1\";}", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_wiki/comment_deleted/statements.json b/tests/mod_wiki/comment_deleted/statements.json index 497d01450..c0b020198 100644 --- a/tests/mod_wiki/comment_deleted/statements.json +++ b/tests/mod_wiki/comment_deleted/statements.json @@ -1,110 +1,110 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/delete", - "display": { - "en": "Deleted" - } - }, - "object": { - "id": "http://www.example.org/mod/wiki/instancecomments.php?commentid=1&pageid=1", - "objectType": "Activity", - "definition": { - "type": "http://activitystrea.ms/comment", - "name": { - "en": "Comment" - } - } + }, + "name": "test_fullname" }, "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_wiki\\event\\comment_deleted", - "event_function": "\\src\\transformer\\events\\mod_wiki\\comment_deleted" - } - }, "contextActivities": { + "category": [ + { + "id": "http://www.example.org", + "objectType": "Activity", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], "parent": [ { - "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", "definition": { - "type": "http://id.tincanapi.com/activitytype/discussion", "name": { "en": "test_page_title Discussion" - } + }, + "type": "http://id.tincanapi.com/activitytype/discussion" }, + "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/wiki/view.php?pageid=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page", + "description": { + "en": "test_content" + }, "name": { "en": "test_page_title" }, - "description": { - "en": "test_content" - } + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page" }, + "id": "http://www.example.org/mod/wiki/view.php?pageid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/wiki/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki", + "description": { + "en": "test_intro" + }, "name": { "en": "test_name" }, - "description": { - "en": "test_intro" - } + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" }, + "id": "http://www.example.org/mod/wiki/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_wiki\\comment_deleted", + "event_name": "\\mod_wiki\\event\\comment_deleted", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "Comment" + }, + "type": "http://activitystrea.ms/comment" + }, + "id": "http://www.example.org/mod/wiki/instancecomments.php?commentid=1&pageid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Deleted" + }, + "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/mod_wiki/comments_viewed/data.json b/tests/mod_wiki/comments_viewed/data.json index 3a53fc490..0db9e2a02 100644 --- a/tests/mod_wiki/comments_viewed/data.json +++ b/tests/mod_wiki/comments_viewed/data.json @@ -1,36 +1,36 @@ { - "modules": [ + "comments": [ { + "content": "

test_content

", "id": 1, - "name": "wiki" + "itemid": 1 } ], - "wiki": [ + "modules": [ { "id": 1, - "name": "test_name", - "intro": "

test_intro

" + "name": "wiki" } ], - "wiki_subwikis": [ + "wiki": [ { "id": 1, - "wikiid": 1 + "intro": "

test_intro

", + "name": "test_name" } ], "wiki_pages": [ { + "cachedcontent": "

test_content

", "id": 1, "subwikiid": 1, - "title": "test_page_title", - "cachedcontent": "

test_content

" + "title": "test_page_title" } ], - "comments": [ + "wiki_subwikis": [ { "id": 1, - "content": "

test_content

", - "itemid": 1 + "wikiid": 1 } ] } diff --git a/tests/mod_wiki/comments_viewed/event.json b/tests/mod_wiki/comments_viewed/event.json index 5cbabc265..3d43bfdb8 100644 --- a/tests/mod_wiki/comments_viewed/event.json +++ b/tests/mod_wiki/comments_viewed/event.json @@ -1,10 +1,10 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_wiki\\event\\comments_viewed", + "id": 1, "objectid": 1, - "objecttable": "wiki_pages" + "objecttable": "wiki_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_wiki/comments_viewed/statements.json b/tests/mod_wiki/comments_viewed/statements.json index 632ef0b23..7043e1f5c 100644 --- a/tests/mod_wiki/comments_viewed/statements.json +++ b/tests/mod_wiki/comments_viewed/statements.json @@ -1,100 +1,100 @@ [ { "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/wiki/comments.php?pageid=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/discussion", - "name": { - "en": "test_page_title Discussion" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_wiki\\event\\comments_viewed", - "event_function": "\\src\\transformer\\events\\mod_wiki\\comments_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/mod/wiki/view.php?pageid=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page", "name": { - "en": "test_page_title" + "en": "test_site_fullname" }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { "description": { "en": "test_content" - } + }, + "name": { + "en": "test_page_title" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page" }, + "id": "http://www.example.org/mod/wiki/view.php?pageid=1", "objectType": "Activity" }, { - "id": "http://www.example.org/mod/wiki/view.php?id=1", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki", + "description": { + "en": "test_intro" + }, "name": { "en": "test_name" }, - "description": { - "en": "test_intro" - } + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" }, + "id": "http://www.example.org/mod/wiki/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_wiki\\comments_viewed", + "event_name": "\\mod_wiki\\event\\comments_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_page_title Discussion" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_wiki/course_module_viewed/existing_module/data.json b/tests/mod_wiki/course_module_viewed/existing_module/data.json index 4edf54c26..25a80fee2 100644 --- a/tests/mod_wiki/course_module_viewed/existing_module/data.json +++ b/tests/mod_wiki/course_module_viewed/existing_module/data.json @@ -8,8 +8,8 @@ "wiki": [ { "id": 1, - "name": "test_name", - "intro": "

test_intro

" + "intro": "

test_intro

", + "name": "test_name" } ] } diff --git a/tests/mod_wiki/course_module_viewed/existing_module/event.json b/tests/mod_wiki/course_module_viewed/existing_module/event.json index b749dda29..cd9e3e059 100644 --- a/tests/mod_wiki/course_module_viewed/existing_module/event.json +++ b/tests/mod_wiki/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_wiki\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_wiki\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_wiki/course_module_viewed/existing_module/statements.json b/tests/mod_wiki/course_module_viewed/existing_module/statements.json index ec418db94..ab899145b 100644 --- a/tests/mod_wiki/course_module_viewed/existing_module/statements.json +++ b/tests/mod_wiki/course_module_viewed/existing_module/statements.json @@ -1,77 +1,77 @@ [ { "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/wiki/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki", - "name": { - "en": "test_name" - }, - "description": { - "en": "test_intro" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_wiki\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_wiki\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_intro" + }, + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" + }, + "id": "http://www.example.org/mod/wiki/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_wiki/page_viewed/data.json b/tests/mod_wiki/page_viewed/data.json index 8b4744ede..954b8baf4 100644 --- a/tests/mod_wiki/page_viewed/data.json +++ b/tests/mod_wiki/page_viewed/data.json @@ -8,22 +8,22 @@ "wiki": [ { "id": 1, - "name": "test_name", - "intro": "

test_intro

" + "intro": "

test_intro

", + "name": "test_name" } ], - "wiki_subwikis": [ + "wiki_pages": [ { + "cachedcontent": "

test_content

", "id": 1, - "wikiid": 1 + "subwikiid": 1, + "title": "test_page_title" } ], - "wiki_pages": [ + "wiki_subwikis": [ { "id": 1, - "subwikiid": 1, - "title": "test_page_title", - "cachedcontent": "

test_content

" + "wikiid": 1 } ] } diff --git a/tests/mod_wiki/page_viewed/event.json b/tests/mod_wiki/page_viewed/event.json index 56870143d..10c5fa852 100644 --- a/tests/mod_wiki/page_viewed/event.json +++ b/tests/mod_wiki/page_viewed/event.json @@ -1,10 +1,10 @@ { - "id": 1, - "userid": 1, - "courseid": 1, - "timecreated": 1433946701, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\mod_wiki\\event\\page_viewed", + "id": 1, "objectid": 1, - "objecttable": "wiki_pages" + "objecttable": "wiki_pages", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/mod_wiki/page_viewed/statements.json b/tests/mod_wiki/page_viewed/statements.json index 3dee541a6..77b63cede 100644 --- a/tests/mod_wiki/page_viewed/statements.json +++ b/tests/mod_wiki/page_viewed/statements.json @@ -1,90 +1,90 @@ [ { "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/wiki/view.php?pageid=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page", - "name": { - "en": "test_page_title" - }, - "description": { - "en": "test_content" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_wiki\\event\\page_viewed", - "event_function": "\\src\\transformer\\events\\mod_wiki\\page_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/mod/wiki/view.php?id=1", + "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki", "name": { - "en": "test_name" + "en": "test_site_fullname" }, + "type": "http://id.tincanapi.com/activitytype/lms" + } + } + ], + "parent": [ + { + "definition": { "description": { "en": "test_intro" - } + }, + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" }, + "id": "http://www.example.org/mod/wiki/view.php?id=1", "objectType": "Activity" }, { - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" - } - }, - { - "id": "http://www.example.org/course/view.php?id=1", - "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", - "name": { - "en": "test_name" - } }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\mod_wiki\\page_viewed", + "event_name": "\\mod_wiki\\event\\page_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "description": { + "en": "test_content" + }, + "name": { + "en": "test_page_title" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page" + }, + "id": "http://www.example.org/mod/wiki/view.php?pageid=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_workshop/course_module_viewed/existing_module/event.json b/tests/mod_workshop/course_module_viewed/existing_module/event.json index b07a2e3a4..1bf11ef45 100644 --- a/tests/mod_workshop/course_module_viewed/existing_module/event.json +++ b/tests/mod_workshop/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { + "contextinstanceid": 1, + "courseid": 2, + "eventname": "\\mod_workshop\\event\\course_module_viewed", "id": 1, - "userid": 1, - "courseid": 1, "timecreated": 1433946701, - "contextinstanceid": 1, - "eventname": "\\mod_workshop\\event\\course_module_viewed" + "userid": 1 } diff --git a/tests/mod_workshop/course_module_viewed/existing_module/statements.json b/tests/mod_workshop/course_module_viewed/existing_module/statements.json index 465d455f9..08d551fda 100644 --- a/tests/mod_workshop/course_module_viewed/existing_module/statements.json +++ b/tests/mod_workshop/course_module_viewed/existing_module/statements.json @@ -1,74 +1,74 @@ [ { "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/workshop/view.php?id=1", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/workshop", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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_workshop\\event\\course_module_viewed", - "event_function": "\\src\\transformer\\events\\all\\course_module_viewed" - } - }, "contextActivities": { - "parent": [ + "category": [ { - "id": "http://www.example.org/course/section.php?id=1", + "id": "http://www.example.org", "objectType": "Activity", "definition": { "name": { - "en": "test_name Section 0" + "en": "test_site_fullname" }, - "type": "http://id.tincanapi.com/activitytype/section" + "type": "http://id.tincanapi.com/activitytype/lms" } - }, + } + ], + "parent": [ { - "id": "http://www.example.org/course/view.php?id=1", "definition": { - "type": "https://w3id.org/xapi/cmi5/activitytype/course", "name": { - "en": "test_name" - } + "en": "test_name Section 0" + }, + "type": "http://id.tincanapi.com/activitytype/section" }, + "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" - } - ], - "category": [ + }, { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, + "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\all\\course_module_viewed", + "event_name": "\\mod_workshop\\event\\course_module_viewed", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/workshop" + }, + "id": "http://www.example.org/mod/workshop/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Viewed" + }, + "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/tool_certificate/certificate_issued/data.json b/tests/tool_certificate/certificate_issued/data.json index 5be7b1663..b348eb8ae 100644 --- a/tests/tool_certificate/certificate_issued/data.json +++ b/tests/tool_certificate/certificate_issued/data.json @@ -1,21 +1,21 @@ { + "tool_certificate_issues": [ + { + "code": "4303209428AU", + "courseid": null, + "id": 1 + } + ], "user": [ { - "id": 1, + "email": "test1@test.com", "firstname": "test_fullname1", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "test_fullname2", - "email": "test2@test.com" - } - ], - "tool_certificate_issues": [ - { - "id": 1, - "code": "4303209428AU", - "courseid": null + "id": 2 } ] } diff --git a/tests/tool_certificate/certificate_issued/event.json b/tests/tool_certificate/certificate_issued/event.json index f64f3b1e1..7e852aee0 100644 --- a/tests/tool_certificate/certificate_issued/event.json +++ b/tests/tool_certificate/certificate_issued/event.json @@ -1,11 +1,11 @@ { - "id": 1, - "eventname": "\\tool_certificate\\event\\certificate_issued", - "timecreated": 1433946701, - "userid": 1, - "relateduserid": 2, "courseid": 0, - "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", + "eventname": "\\tool_certificate\\event\\certificate_issued", + "id": 1, + "objectid": 1, "objecttable": "tool_certificate_issues", - "objectid": 1 + "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", + "relateduserid": 2, + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/tool_certificate/certificate_issued/statements.json b/tests/tool_certificate/certificate_issued/statements.json index bedfb1fb8..8d8608567 100644 --- a/tests/tool_certificate/certificate_issued/statements.json +++ b/tests/tool_certificate/certificate_issued/statements.json @@ -1,59 +1,59 @@ [ { "actor": { - "name": "test_fullname2", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/achieved", - "display": { - "en": "Achieved" - } - }, - "object": { - "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate", - "name": { - "en": "Certificate 4303209428AU" - } - } + }, + "name": "test_fullname2" }, "context": { - "language": "en", - "instructor": { - "name": "test_fullname1", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "objectType": "Activity" + } } ] }, "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_function": "\\src\\transformer\\events\\tool_certificate\\certificate_issued", "event_name": "\\tool_certificate\\event\\certificate_issued", - "event_function": "\\src\\transformer\\events\\tool_certificate\\certificate_issued" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } - } + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname1" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "Certificate 4303209428AU" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate" + }, + "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Achieved" + }, + "id": "https://w3id.org/xapi/tla/verbs/achieved" } } ] diff --git a/tests/tool_certificate/certificate_revoked/data.json b/tests/tool_certificate/certificate_revoked/data.json index 0b0e7b25a..2f6b7f08a 100644 --- a/tests/tool_certificate/certificate_revoked/data.json +++ b/tests/tool_certificate/certificate_revoked/data.json @@ -1,14 +1,14 @@ { "user": [ { - "id": 1, + "email": "test1@test.com", "firstname": "test_fullname1", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "test_fullname2", - "email": "test2@test.com" + "id": 2 } ] } diff --git a/tests/tool_certificate/certificate_revoked/event.json b/tests/tool_certificate/certificate_revoked/event.json index a328df74f..002108ec4 100644 --- a/tests/tool_certificate/certificate_revoked/event.json +++ b/tests/tool_certificate/certificate_revoked/event.json @@ -1,11 +1,11 @@ { - "id": 1, - "eventname": "\\tool_certificate\\event\\certificate_revoked", - "timecreated": 1433946701, - "userid": 1, - "relateduserid": 2, "courseid": 0, - "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", + "eventname": "\\tool_certificate\\event\\certificate_revoked", + "id": 1, + "objectid": 1, "objecttable": "tool_certificate_issues", - "objectid": 1 + "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", + "relateduserid": 2, + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/tool_certificate/certificate_revoked/statements.json b/tests/tool_certificate/certificate_revoked/statements.json index 3a43a2b54..96f174f71 100644 --- a/tests/tool_certificate/certificate_revoked/statements.json +++ b/tests/tool_certificate/certificate_revoked/statements.json @@ -1,59 +1,59 @@ [ { "actor": { - "name": "test_fullname2", "account": { "homePage": "http://www.example.org", "name": "2" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/forfeited", - "display": { - "en": "Forfeited" - } - }, - "object": { - "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate", - "name": { - "en": "Certificate 4303209428AU" - } - } + }, + "name": "test_fullname2" }, "context": { - "language": "en", - "instructor": { - "name": "test_fullname1", - "account": { - "homePage": "http://www.example.org", - "name": "1" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "objectType": "Activity" + } } ] }, "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_function": "\\src\\transformer\\events\\tool_certificate\\certificate_revoked", "event_name": "\\tool_certificate\\event\\certificate_revoked", - "event_function": "\\src\\transformer\\events\\tool_certificate\\certificate_revoked" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } - } + }, + "instructor": { + "account": { + "homePage": "http://www.example.org", + "name": "1" + }, + "name": "test_fullname1" + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "Certificate 4303209428AU" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate" + }, + "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Forfeited" + }, + "id": "https://w3id.org/xapi/tla/verbs/forfeited" } } ] diff --git a/tests/tool_certificate/certificate_verified/data.json b/tests/tool_certificate/certificate_verified/data.json index 5be7b1663..b348eb8ae 100644 --- a/tests/tool_certificate/certificate_verified/data.json +++ b/tests/tool_certificate/certificate_verified/data.json @@ -1,21 +1,21 @@ { + "tool_certificate_issues": [ + { + "code": "4303209428AU", + "courseid": null, + "id": 1 + } + ], "user": [ { - "id": 1, + "email": "test1@test.com", "firstname": "test_fullname1", - "email": "test1@test.com" + "id": 1 }, { - "id": 2, + "email": "test2@test.com", "firstname": "test_fullname2", - "email": "test2@test.com" - } - ], - "tool_certificate_issues": [ - { - "id": 1, - "code": "4303209428AU", - "courseid": null + "id": 2 } ] } diff --git a/tests/tool_certificate/certificate_verified/event.json b/tests/tool_certificate/certificate_verified/event.json index 50298d6a6..c5d417602 100644 --- a/tests/tool_certificate/certificate_verified/event.json +++ b/tests/tool_certificate/certificate_verified/event.json @@ -1,11 +1,11 @@ { - "id": 1, + "courseid": 2, "eventname": "\\tool_certificate\\event\\certificate_verified", - "timecreated": 1433946701, - "userid": 1, - "relateduserid": 2, - "courseid": 1, - "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", + "id": 1, + "objectid": 1, "objecttable": "tool_certificate_issues", - "objectid": 1 + "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", + "relateduserid": 2, + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/tool_certificate/certificate_verified/statements.json b/tests/tool_certificate/certificate_verified/statements.json index 27dc11a0d..43d511081 100644 --- a/tests/tool_certificate/certificate_verified/statements.json +++ b/tests/tool_certificate/certificate_verified/statements.json @@ -1,52 +1,52 @@ [ { "actor": { - "name": "test_fullname1", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://w3id.org/xapi/tla/verbs/verified", - "display": { - "en": "Verified" - } - }, - "object": { - "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", - "objectType": "Activity", - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate", - "name": { - "en": "Certificate 4303209428AU" - } - } + }, + "name": "test_fullname1" }, "context": { - "language": "en", "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { "name": { - "en": "test_name" + "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "objectType": "Activity" + } } ] }, "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_function": "\\src\\transformer\\events\\tool_certificate\\certificate_verified", "event_name": "\\tool_certificate\\event\\certificate_verified", - "event_function": "\\src\\transformer\\events\\tool_certificate\\certificate_verified" + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } - } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "Certificate 4303209428AU" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate" + }, + "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Verified" + }, + "id": "https://w3id.org/xapi/tla/verbs/verified" } } ] diff --git a/tests/tool_usertours/tour_ended/event.json b/tests/tool_usertours/tour_ended/event.json index 5ebeb055e..e4d27421c 100644 --- a/tests/tool_usertours/tour_ended/event.json +++ b/tests/tool_usertours/tour_ended/event.json @@ -1,9 +1,9 @@ { - "id": 1, - "userid": 1, - "timecreated": 1433946701, - "courseid": 1, "contextinstanceid": 1, + "courseid": 2, "eventname": "\\tool_usertours\\event\\tour_ended", - "other": "a:3:{s:7:\"pageurl\";s:42:\"http://localhost:8000/course/view.php?id=1\";s:6:\"stepid\";i:7;s:9:\"stepindex\";i:2;}" + "id": 1, + "other": "a:3:{s:7:\"pageurl\";s:42:\"http://localhost:8000/course/view.php?id=1\";s:6:\"stepid\";i:7;s:9:\"stepindex\";i:2;}", + "timecreated": 1433946701, + "userid": 1 } diff --git a/tests/tool_usertours/tour_ended/statements.json b/tests/tool_usertours/tour_ended/statements.json index 61e0f5fb2..0b18bfee1 100644 --- a/tests/tool_usertours/tour_ended/statements.json +++ b/tests/tool_usertours/tour_ended/statements.json @@ -1,45 +1,45 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/toured", - "display": { - "en": "Toured" - } - }, - "object": { - "id": "http://www.example.org/course/view.php?id=1", - "objectType": "Activity" + }, + "name": "test_fullname" }, "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": "\\tool_usertours\\event\\tour_ended", - "event_function": "\\src\\transformer\\events\\tool_usertours\\tour_ended" - } - }, "contextActivities": { "category": [ { - "id": "http://www.example.org", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "test_name" - } - } + }, + "type": "http://id.tincanapi.com/activitytype/lms" + }, + "id": "http://www.example.org" } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\tool_usertours\\tour_ended", + "event_name": "\\tool_usertours\\event\\tour_ended", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "Toured" + }, + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/toured" } } ] diff --git a/tests/totara_program/program_assigned/existing_program/data.json b/tests/totara_program/program_assigned/existing_program/data.json index 72b7a58c6..4c97dfdd6 100644 --- a/tests/totara_program/program_assigned/existing_program/data.json +++ b/tests/totara_program/program_assigned/existing_program/data.json @@ -1,8 +1,8 @@ { "prog": [ { - "id": 1, - "fullname": "test_name" + "fullname": "test_name", + "id": 1 } ] } diff --git a/tests/totara_program/program_assigned/existing_program/event.json b/tests/totara_program/program_assigned/existing_program/event.json index 7449c5968..79aa0b88f 100644 --- a/tests/totara_program/program_assigned/existing_program/event.json +++ b/tests/totara_program/program_assigned/existing_program/event.json @@ -1,8 +1,8 @@ { + "eventname": "\\totara_program\\event\\program_assigned", "id": 1, - "userid": 1, - "timecreated": 1560399491, - "objecttable": "prog_assignment", "objectid": 1, - "eventname": "\\totara_program\\event\\program_assigned" + "objecttable": "prog_assignment", + "timecreated": 1560399491, + "userid": 1 } diff --git a/tests/totara_program/program_assigned/existing_program/statements.json b/tests/totara_program/program_assigned/existing_program/statements.json index 553daccd6..351224572 100644 --- a/tests/totara_program/program_assigned/existing_program/statements.json +++ b/tests/totara_program/program_assigned/existing_program/statements.json @@ -1,52 +1,52 @@ [ { "actor": { - "name": "test_fullname", "account": { "homePage": "http://www.example.org", "name": "1" - } - }, - "verb": { - "id": "http://activitystrea.ms/schema/1.0/assign", - "display": { - "en": "assigned" - } - }, - "object": { - "id": "http://www.example.org/totara/program/view.php?id=1", - "definition": { - "type": "http://id.tincanapi.com/activitytype/lms/program", - "name": { - "en": "test_name" - } }, - "objectType": "Activity" + "name": "test_fullname" }, "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": "\\totara_program\\event\\program_assigned", - "event_function": "\\src\\transformer\\events\\totara_program\\program_assigned" - } - }, "contextActivities": { "category": [ { "id": "http://www.example.org", + "objectType": "Activity", "definition": { - "type": "http://id.tincanapi.com/activitytype/lms", "name": { - "en": "test_name" - } - }, - "objectType": "Activity" + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + } } ] - } + }, + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\totara_program\\program_assigned", + "event_name": "\\totara_program\\event\\program_assigned", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } + }, + "language": "en" + }, + "object": { + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/lms/program" + }, + "id": "http://www.example.org/totara/program/view.php?id=1", + "objectType": "Activity" + }, + "verb": { + "display": { + "en": "assigned" + }, + "id": "http://activitystrea.ms/schema/1.0/assign" } } ] From 9cce89e468ed24d6091a21797a224de330329a08 Mon Sep 17 00:00:00 2001 From: Milton Reder Date: Thu, 6 Feb 2025 16:44:20 -0500 Subject: [PATCH 5/5] semantically order all json keys since they got sorted anyhow --- tests/common/data.json | 12 +- .../user_achieved_badge/data.json | 20 +- .../user_achieved_badge/event.json | 4 +- .../user_achieved_badge/statements.json | 50 ++--- .../user_forfeited_badge/data.json | 16 +- .../user_forfeited_badge/event.json | 8 +- .../user_forfeited_badge/statements.json | 48 ++--- tests/core/badge_updated/data.json | 4 +- tests/core/badge_updated/event.json | 8 +- tests/core/badge_updated/statements.json | 52 ++--- .../badge_viewed/user_viewed_badge/data.json | 2 +- .../badge_viewed/user_viewed_badge/event.json | 6 +- .../user_viewed_badge/statements.json | 52 ++--- .../user_created_calendar_event/data.json | 10 +- .../user_created_calendar_event/event.json | 6 +- .../statements.json | 36 ++-- .../user_deleted_calendar_event/data.json | 10 +- .../user_deleted_calendar_event/event.json | 6 +- .../statements.json | 36 ++-- .../user_updated_calendar_event/data.json | 10 +- .../user_updated_calendar_event/event.json | 6 +- .../statements.json | 36 ++-- .../event.json | 6 +- .../statements.json | 40 ++-- .../event.json | 8 +- .../statements.json | 32 ++-- .../event.json | 6 +- .../statements.json | 40 ++-- tests/core/course_category_created/data.json | 10 +- tests/core/course_category_created/event.json | 6 +- .../course_category_created/statements.json | 44 ++--- .../completing_existing_course/data.json | 4 +- .../completing_existing_course/event.json | 4 +- .../statements.json | 36 ++-- .../course_completed/send_jisc_data/data.json | 12 +- .../send_jisc_data/event.json | 6 +- .../send_jisc_data/statements.json | 36 ++-- .../core/course_completion_updated/data.json | 4 +- .../core/course_completion_updated/event.json | 6 +- .../course_completion_updated/statements.json | 38 ++-- .../creating_new_course/data.json | 4 +- .../creating_new_course/event.json | 6 +- .../creating_new_course/statements.json | 36 ++-- .../completing_existing_module/event.json | 4 +- .../statements.json | 40 ++-- .../uncompleting_existing_module/event.json | 4 +- .../statements.json | 40 ++-- .../creating_new_course_module/event.json | 6 +- .../statements.json | 40 ++-- .../data.json | 4 +- .../event.json | 6 +- .../statements.json | 38 ++-- .../new_course_section_created/data.json | 8 +- .../new_course_section_created/event.json | 6 +- .../statements.json | 38 ++-- .../updating_existing_course/data.json | 4 +- .../updating_existing_course/event.json | 6 +- .../updating_existing_course/statements.json | 36 ++-- .../viewing_existing_course/data.json | 4 +- .../viewing_existing_course/event.json | 6 +- .../viewing_existing_course/statements.json | 36 ++-- .../creating_new_group/event.json | 6 +- .../creating_new_group/statements.json | 38 ++-- .../existing_group_deleted/event.json | 6 +- .../existing_group_deleted/statements.json | 32 ++-- .../new_group_member_added/data.json | 8 +- .../new_group_member_added/event.json | 8 +- .../new_group_member_added/statements.json | 38 ++-- .../existing_group_member_removed/data.json | 8 +- .../existing_group_member_removed/event.json | 8 +- .../statements.json | 38 ++-- .../new_group_message_sent/data.json | 2 +- .../new_group_message_sent/event.json | 6 +- .../new_group_message_sent/statements.json | 46 ++--- .../message_sent/user_sent_message/data.json | 14 +- .../message_sent/user_sent_message/event.json | 8 +- .../user_sent_message/statements.json | 44 ++--- .../user_viewed_message/data.json | 14 +- .../user_viewed_message/event.json | 8 +- .../user_viewed_message/statements.json | 44 ++--- .../note_created/user_created_note/data.json | 14 +- .../note_created/user_created_note/event.json | 8 +- .../user_created_note/statements.json | 64 +++---- .../note_updated/user_updated_note/data.json | 14 +- .../note_updated/user_updated_note/event.json | 8 +- .../user_updated_note/statements.json | 64 +++---- .../notes_viewed/user_viewed_notes/data.json | 12 +- .../notes_viewed/user_viewed_notes/event.json | 8 +- .../user_viewed_notes/statements.json | 56 +++--- .../new_question_created/data.json | 4 +- .../new_question_created/event.json | 6 +- .../new_question_created/statements.json | 58 +++--- .../new_questions_imported/event.json | 6 +- .../new_questions_imported/statements.json | 38 ++-- .../user_viewed_search_results/event.json | 6 +- .../statements.json | 36 ++-- .../existing_user_created/data.json | 4 +- .../existing_user_created/event.json | 4 +- .../existing_user_created/statements.json | 36 ++-- .../user_created/send_jisc_data/data.json | 12 +- .../user_created/send_jisc_data/event.json | 6 +- .../send_jisc_data/statements.json | 36 ++-- .../existing_user_enrolled/data.json | 8 +- .../existing_user_enrolled/event.json | 8 +- .../existing_user_enrolled/statements.json | 36 ++-- .../existing_user_enrolment_deleted/data.json | 8 +- .../event.json | 8 +- .../statements.json | 36 ++-- .../user_resumed_course/data.json | 8 +- .../user_resumed_course/event.json | 8 +- .../user_resumed_course/statements.json | 36 ++-- .../user_suspended_course/data.json | 8 +- .../user_suspended_course/event.json | 8 +- .../user_suspended_course/statements.json | 36 ++-- .../existing_user_loggedin/data.json | 4 +- .../existing_user_loggedin/event.json | 8 +- .../existing_user_loggedin/statements.json | 32 ++-- .../existing_user_loggedinas/data.json | 8 +- .../existing_user_loggedinas/event.json | 8 +- .../existing_user_loggedinas/statements.json | 32 ++-- .../existing_user_loggedout/data.json | 4 +- .../existing_user_loggedout/event.json | 6 +- .../existing_user_loggedout/statements.json | 32 ++-- .../core_h5p/course_module_viewed/event.json | 6 +- .../course_module_viewed/statements.json | 40 ++-- .../data.json | 20 +- .../event.json | 6 +- .../statements.json | 42 ++-- .../data.json | 16 +- .../event.json | 6 +- .../statements.json | 42 ++-- .../existing_assignment_submitted/data.json | 4 +- .../existing_assignment_submitted/event.json | 6 +- .../statements.json | 42 ++-- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../user_viewed_feedback/data.json | 12 +- .../user_viewed_feedback/event.json | 6 +- .../user_viewed_feedback/statements.json | 42 ++-- tests/mod_assign/submission_locked/data.json | 12 +- tests/mod_assign/submission_locked/event.json | 10 +- .../submission_locked/statements.json | 42 ++-- .../mod_assign/submission_unlocked/data.json | 12 +- .../mod_assign/submission_unlocked/event.json | 10 +- .../submission_unlocked/statements.json | 42 ++-- tests/mod_assign/submission_viewed/data.json | 12 +- tests/mod_assign/submission_viewed/event.json | 8 +- .../submission_viewed/statements.json | 42 ++-- .../activity_management_viewed/event.json | 6 +- .../statements.json | 40 ++-- .../live_session/event.json | 6 +- .../live_session/statements.json | 40 ++-- .../meeting_created/event.json | 6 +- .../meeting_created/statements.json | 40 ++-- .../meeting_ended/event.json | 6 +- .../meeting_ended/statements.json | 40 ++-- .../meeting_joined/event.json | 6 +- .../meeting_joined/statements.json | 40 ++-- .../meeting_left/event.json | 6 +- .../meeting_left/statements.json | 40 ++-- .../recording_deleted/event.json | 6 +- .../recording_deleted/statements.json | 40 ++-- .../recording_edited/event.json | 6 +- .../recording_edited/statements.json | 40 ++-- .../recording_imported/event.json | 6 +- .../recording_imported/statements.json | 40 ++-- .../recording_protected/event.json | 6 +- .../recording_protected/statements.json | 40 ++-- .../recording_published/event.json | 6 +- .../recording_published/statements.json | 40 ++-- .../recording_unprotected/event.json | 6 +- .../recording_unprotected/statements.json | 40 ++-- .../recording_unpublished/event.json | 6 +- .../recording_unpublished/statements.json | 40 ++-- .../recording_viewed/event.json | 6 +- .../recording_viewed/statements.json | 40 ++-- tests/mod_book/chapter_created/data.json | 2 +- tests/mod_book/chapter_created/event.json | 6 +- .../mod_book/chapter_created/statements.json | 48 ++--- .../data.json | 4 +- .../event.json | 6 +- .../statements.json | 50 ++--- .../data.json | 2 +- .../event.json | 6 +- .../statements.json | 48 ++--- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- tests/mod_choice/answer_created/data.json | 4 +- tests/mod_choice/answer_created/event.json | 6 +- .../mod_choice/answer_created/statements.json | 82 ++++---- .../existing_module/data.json | 4 +- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 82 ++++---- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../existing_booking_cancelled/event.json | 6 +- .../statements.json | 40 ++-- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../existing_signup_success/event.json | 6 +- .../existing_signup_success/statements.json | 40 ++-- .../existing_attendance_taken/data.json | 12 +- .../existing_attendance_taken/event.json | 6 +- .../existing_attendance_taken/statements.json | 40 ++-- .../viewing_feedback/event.json | 6 +- .../viewing_feedback/statements.json | 40 ++-- .../response_submitted/multichoice/data.json | 8 +- .../response_submitted/multichoice/event.json | 6 +- .../multichoice/statements.json | 130 ++++++------- .../multichoicerated/data.json | 8 +- .../multichoicerated/event.json | 6 +- .../multichoicerated/statements.json | 130 ++++++------- .../response_submitted/no_items/data.json | 4 +- .../response_submitted/no_items/event.json | 6 +- .../no_items/statements.json | 40 ++-- .../response_submitted/numerical/data.json | 8 +- .../response_submitted/numerical/event.json | 6 +- .../numerical/statements.json | 90 ++++----- .../response_submitted/textarea/data.json | 8 +- .../response_submitted/textarea/event.json | 6 +- .../textarea/statements.json | 84 ++++---- .../textarea_anon/data.json | 8 +- .../textarea_anon/event.json | 6 +- .../textarea_anon/statements.json | 84 ++++---- .../response_submitted/textfield/data.json | 8 +- .../response_submitted/textfield/event.json | 6 +- .../textfield/statements.json | 84 ++++---- .../response_submitted/unknown_typ/data.json | 8 +- .../response_submitted/unknown_typ/event.json | 6 +- .../unknown_typ/statements.json | 40 ++-- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- tests/mod_forum/discussion_created/event.json | 6 +- .../discussion_created/statements.json | 42 ++-- .../discussion_subcription_created/event.json | 6 +- .../statements.json | 42 ++-- .../discussion_subcription_deleted/event.json | 6 +- .../statements.json | 42 ++-- .../existing_discussion_viewed/event.json | 6 +- .../statements.json | 42 ++-- tests/mod_forum/post_created/data.json | 2 +- tests/mod_forum/post_created/event.json | 6 +- tests/mod_forum/post_created/statements.json | 50 ++--- tests/mod_forum/post_deleted/data.json | 2 +- tests/mod_forum/post_deleted/event.json | 6 +- tests/mod_forum/post_deleted/statements.json | 38 ++-- tests/mod_forum/post_updated/data.json | 2 +- tests/mod_forum/post_updated/event.json | 6 +- tests/mod_forum/post_updated/statements.json | 50 ++--- .../mod_forum/subscription_created/event.json | 6 +- .../subscription_created/statements.json | 40 ++-- .../mod_forum/subscription_deleted/event.json | 6 +- .../subscription_deleted/statements.json | 40 ++-- .../existing_report_viewed/data.json | 8 +- .../existing_report_viewed/event.json | 8 +- .../existing_report_viewed/statements.json | 46 ++--- .../data.json | 8 +- .../event.json | 8 +- .../statements.json | 42 ++-- tests/mod_glossary/comment_created/data.json | 10 +- tests/mod_glossary/comment_created/event.json | 6 +- .../comment_created/statements.json | 50 ++--- tests/mod_glossary/comment_deleted/data.json | 6 +- tests/mod_glossary/comment_deleted/event.json | 6 +- .../comment_deleted/statements.json | 44 ++--- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- tests/mod_glossary/entry_viewed/data.json | 6 +- tests/mod_glossary/entry_viewed/event.json | 6 +- .../mod_glossary/entry_viewed/statements.json | 48 ++--- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../mod_lesson/content_page_viewed/data.json | 4 +- .../mod_lesson/content_page_viewed/event.json | 6 +- .../content_page_viewed/statements.json | 42 ++-- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- tests/mod_lesson/essay_assessed/data.json | 12 +- tests/mod_lesson/essay_assessed/event.json | 6 +- .../mod_lesson/essay_assessed/statements.json | 50 ++--- tests/mod_lesson/lesson_ended/data.json | 10 +- tests/mod_lesson/lesson_ended/event.json | 6 +- tests/mod_lesson/lesson_ended/statements.json | 48 ++--- tests/mod_lesson/lesson_restarted/data.json | 4 +- tests/mod_lesson/lesson_restarted/event.json | 6 +- .../lesson_restarted/statements.json | 48 ++--- tests/mod_lesson/lesson_resumed/data.json | 4 +- tests/mod_lesson/lesson_resumed/event.json | 6 +- .../mod_lesson/lesson_resumed/statements.json | 48 ++--- tests/mod_lesson/lesson_started/data.json | 4 +- tests/mod_lesson/lesson_started/event.json | 6 +- .../mod_lesson/lesson_started/statements.json | 48 ++--- .../question_answered/choice/data.json | 12 +- .../question_answered/choice/event.json | 6 +- .../question_answered/choice/statements.json | 96 +++++----- .../question_answered/essay/data.json | 12 +- .../question_answered/essay/event.json | 6 +- .../question_answered/essay/statements.json | 50 ++--- .../question_answered/matching/data.json | 16 +- .../question_answered/matching/event.json | 6 +- .../matching/statements.json | 112 +++++------ .../question_answered/numerical/data.json | 12 +- .../question_answered/numerical/event.json | 6 +- .../numerical/statements.json | 56 +++--- .../question_answered/shortanswer/data.json | 12 +- .../question_answered/shortanswer/event.json | 6 +- .../shortanswer/statements.json | 56 +++--- .../question_answered/truefalse/data.json | 12 +- .../question_answered/truefalse/event.json | 6 +- .../truefalse/statements.json | 84 ++++---- .../question_viewed/choice/data.json | 6 +- .../question_viewed/choice/event.json | 6 +- .../question_viewed/choice/statements.json | 96 +++++----- .../question_viewed/essay/data.json | 6 +- .../question_viewed/essay/event.json | 6 +- .../question_viewed/essay/statements.json | 50 ++--- .../question_viewed/matching/data.json | 10 +- .../question_viewed/matching/event.json | 6 +- .../question_viewed/matching/statements.json | 112 +++++------ .../question_viewed/numerical/data.json | 6 +- .../question_viewed/numerical/event.json | 6 +- .../question_viewed/numerical/statements.json | 56 +++--- .../question_viewed/shortanswer/data.json | 6 +- .../question_viewed/shortanswer/event.json | 6 +- .../shortanswer/statements.json | 56 +++--- .../question_viewed/truefalse/data.json | 6 +- .../question_viewed/truefalse/event.json | 6 +- .../question_viewed/truefalse/statements.json | 84 ++++---- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../all_responses_viewed/event.json | 6 +- .../all_responses_viewed/statements.json | 42 ++-- .../attempt_resumed/event.json | 6 +- .../attempt_resumed/statements.json | 40 ++-- .../attempt_saved/event.json | 6 +- .../attempt_saved/statements.json | 40 ++-- .../attempt_submitted/event.json | 6 +- .../attempt_submitted/statements.json | 40 ++-- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../mod_quiz/attempt_becameoverdue/event.json | 4 +- .../attempt_becameoverdue/statements.json | 42 ++-- .../existing_attempt_reviewed/data.json | 8 +- .../existing_attempt_reviewed/event.json | 8 +- .../existing_attempt_reviewed/statements.json | 44 ++--- .../existing_attempt_started/event.json | 4 +- .../existing_attempt_started/statements.json | 42 ++-- .../attempt_submitted/essay/data.json | 10 +- .../attempt_submitted/essay/event.json | 4 +- .../attempt_submitted/essay/statements.json | 94 ++++----- .../essay_null_response/data.json | 10 +- .../essay_null_response/event.json | 4 +- .../essay_null_response/statements.json | 94 ++++----- .../attempt_submitted/gapselect/data.json | 16 +- .../attempt_submitted/gapselect/event.json | 4 +- .../gapselect/statements.json | 94 ++++----- .../attempt_submitted/match/data.json | 16 +- .../attempt_submitted/match/event.json | 4 +- .../attempt_submitted/match/statements.json | 180 +++++++++--------- .../attempt_submitted/multichoice/data.json | 16 +- .../attempt_submitted/multichoice/event.json | 4 +- .../multichoice/statements.json | 94 ++++----- .../multichoice_withchoices/data.json | 12 +- .../multichoice_withchoices/event.json | 4 +- .../multichoice_withchoices/statements.json | 116 +++++------ .../multichoiceset/data.json | 16 +- .../multichoiceset/event.json | 4 +- .../multichoiceset/statements.json | 94 ++++----- .../multichoiceset_withchoices/data.json | 16 +- .../multichoiceset_withchoices/event.json | 4 +- .../statements.json | 140 +++++++------- .../attempt_submitted/no_questions/data.json | 10 +- .../attempt_submitted/no_questions/event.json | 4 +- .../no_questions/statements.json | 42 ++-- .../attempt_submitted/numerical/data.json | 14 +- .../attempt_submitted/numerical/event.json | 4 +- .../numerical/statements.json | 100 +++++----- .../attempt_submitted/randomsamatch/data.json | 14 +- .../randomsamatch/event.json | 4 +- .../randomsamatch/statements.json | 156 +++++++-------- .../attempt_submitted/shortanswer/data.json | 10 +- .../attempt_submitted/shortanswer/event.json | 4 +- .../shortanswer/statements.json | 94 ++++----- .../attempt_submitted/truefalse/data.json | 14 +- .../attempt_submitted/truefalse/event.json | 4 +- .../truefalse/statements.json | 100 +++++----- .../attempt_submitted/unknown_qtype/data.json | 10 +- .../unknown_qtype/event.json | 4 +- .../unknown_qtype/statements.json | 42 ++-- .../attempt_viewed/existing_module/event.json | 6 +- .../existing_module/statements.json | 42 ++-- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../question_manually_graded/data.json | 18 +- .../question_manually_graded/event.json | 8 +- .../question_manually_graded/statements.json | 46 ++--- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../existing_sco_launched/event.json | 6 +- .../existing_sco_launched/statements.json | 42 ++-- .../existing_scoreraw_submitted/data.json | 12 +- .../existing_scoreraw_submitted/event.json | 6 +- .../statements.json | 42 ++-- .../existing_status_submitted/data.json | 4 +- .../existing_status_submitted/event.json | 6 +- .../existing_status_submitted/statements.json | 42 ++-- .../existing_module/data.json | 4 +- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 46 ++--- tests/mod_survey/report_viewed/data.json | 4 +- tests/mod_survey/report_viewed/event.json | 6 +- .../mod_survey/report_viewed/statements.json | 42 ++-- tests/mod_survey/response_submitted/data.json | 4 +- .../mod_survey/response_submitted/event.json | 6 +- .../response_submitted/statements.json | 46 ++--- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- tests/mod_wiki/comment_created/data.json | 10 +- tests/mod_wiki/comment_created/event.json | 6 +- .../mod_wiki/comment_created/statements.json | 44 ++--- tests/mod_wiki/comment_deleted/data.json | 6 +- tests/mod_wiki/comment_deleted/event.json | 6 +- .../mod_wiki/comment_deleted/statements.json | 46 ++--- tests/mod_wiki/comments_viewed/data.json | 10 +- tests/mod_wiki/comments_viewed/event.json | 6 +- .../mod_wiki/comments_viewed/statements.json | 44 ++--- .../existing_module/data.json | 4 +- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 46 ++--- tests/mod_wiki/page_viewed/data.json | 6 +- tests/mod_wiki/page_viewed/event.json | 6 +- tests/mod_wiki/page_viewed/statements.json | 48 ++--- .../existing_module/event.json | 6 +- .../existing_module/statements.json | 40 ++-- .../certificate_issued/data.json | 12 +- .../certificate_issued/event.json | 8 +- .../certificate_issued/statements.json | 36 ++-- .../certificate_revoked/data.json | 8 +- .../certificate_revoked/event.json | 8 +- .../certificate_revoked/statements.json | 36 ++-- .../certificate_verified/data.json | 12 +- .../certificate_verified/event.json | 8 +- .../certificate_verified/statements.json | 36 ++-- tests/tool_usertours/tour_ended/event.json | 6 +- .../tool_usertours/tour_ended/statements.json | 24 +-- .../existing_program/data.json | 4 +- .../existing_program/event.json | 6 +- .../existing_program/statements.json | 36 ++-- 456 files changed, 5429 insertions(+), 5429 deletions(-) diff --git a/tests/common/data.json b/tests/common/data.json index 29b955bfd..728a53c93 100644 --- a/tests/common/data.json +++ b/tests/common/data.json @@ -1,20 +1,20 @@ { "course": [ { - "fullname": "test_site_fullname", "id": 1, + "fullname": "test_site_fullname", "lang": "en" }, { - "fullname": "test_name", "id": 2, + "fullname": "test_name", "lang": "en" } ], "course_modules": [ { - "course": 2, "id": 1, + "course": 2, "instance": 1, "module": 1, "section": 1 @@ -22,16 +22,16 @@ ], "course_sections": [ { - "course": 2, "id": 1, + "course": 2, "section": 0 } ], "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/badge_awarded/user_achieved_badge/data.json b/tests/core/badge_awarded/user_achieved_badge/data.json index aec542a0b..a3116a0d1 100644 --- a/tests/core/badge_awarded/user_achieved_badge/data.json +++ b/tests/core/badge_awarded/user_achieved_badge/data.json @@ -2,10 +2,10 @@ "badge": [ { "courseid": 2, - "description": "test badge description", "id": 1, - "message": "you got the test badge!", "name": "test_badgename", + "description": "test badge description", + "message": "you got the test badge!", "type": 2, "version": "1.0" } @@ -18,31 +18,31 @@ ], "course": [ { - "fullname": "test_site_fullname", "id": 1, + "fullname": "test_site_fullname", "lang": "en" }, { - "fullname": "test_name", "id": 2, + "fullname": "test_name", "lang": "en", "summary": "test_summary" } ], "user": [ { - "email": "recipient@test.com", - "firstname": "test_recipient_firstname", "id": 1, + "firstname": "test_recipient_firstname", "lastname": "test_recipient_lastname", - "username": "recipient" + "username": "recipient", + "email": "recipient@test.com" }, { - "email": "awarder@test.com", - "firstname": "test_awarder_firstname", "id": 2, + "firstname": "test_awarder_firstname", "lastname": "test_awarder_lastname", - "username": "awarder" + "username": "awarder", + "email": "awarder@test.com" } ] } diff --git a/tests/core/badge_awarded/user_achieved_badge/event.json b/tests/core/badge_awarded/user_achieved_badge/event.json index aa852e57f..e67f86888 100644 --- a/tests/core/badge_awarded/user_achieved_badge/event.json +++ b/tests/core/badge_awarded/user_achieved_badge/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\badge_awarded", "id": 1, "objectid": 1, + "relateduserid": 1, + "eventname": "\\core\\event\\badge_awarded", "objecttable": "badge", "other": "a:1:{s:13:\"badgeissuedid\";i:2;}", - "relateduserid": 1, "timecreated": 1433946701 } diff --git a/tests/core/badge_awarded/user_achieved_badge/statements.json b/tests/core/badge_awarded/user_achieved_badge/statements.json index 239731607..6e54239e5 100644 --- a/tests/core/badge_awarded/user_achieved_badge/statements.json +++ b/tests/core/badge_awarded/user_achieved_badge/statements.json @@ -7,22 +7,46 @@ }, "name": "test_recipient_firstname test_recipient_lastname" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/achieved", + "display": { + "en": "Achieved" + } + }, + "object": { + "id": "http://www.example.org/badges/overview.php?id=1", + "definition": { + "description": { + "en": "test badge description" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Course", + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" + }, + "name": { + "en": "test_badgename" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" }, - "id": "http://www.example.org", "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "description": { "en": "test_summary" @@ -32,7 +56,6 @@ }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -55,31 +78,8 @@ }, "language": "en" }, - "object": { - "definition": { - "description": { - "en": "test badge description" - }, - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Course", - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" - }, - "name": { - "en": "test_badgename" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" - }, - "id": "http://www.example.org/badges/overview.php?id=1", - "objectType": "Activity" - }, "result": { "response": "you got the test badge!" - }, - "verb": { - "display": { - "en": "Achieved" - }, - "id": "https://w3id.org/xapi/tla/verbs/achieved" } } ] diff --git a/tests/core/badge_revoked/user_forfeited_badge/data.json b/tests/core/badge_revoked/user_forfeited_badge/data.json index 18fd0b7de..a69942c11 100644 --- a/tests/core/badge_revoked/user_forfeited_badge/data.json +++ b/tests/core/badge_revoked/user_forfeited_badge/data.json @@ -2,28 +2,28 @@ "badge": [ { "courseid": null, - "description": "test badge description", "id": 1, - "message": "you got the test badge!", "name": "test_badgename", + "description": "test badge description", + "message": "you got the test badge!", "type": 1, "version": "1.0" } ], "user": [ { - "email": "revoker@test.com", - "firstname": "test_revoker_firstname", "id": 1, + "firstname": "test_revoker_firstname", "lastname": "test_revoker_lastname", - "username": "revoker" + "username": "revoker", + "email": "revoker@test.com" }, { - "email": "recipient@test.com", - "firstname": "test_recipient_firstname", "id": 2, + "firstname": "test_recipient_firstname", "lastname": "test_recipient_lastname", - "username": "recipient" + "username": "recipient", + "email": "recipient@test.com" } ] } diff --git a/tests/core/badge_revoked/user_forfeited_badge/event.json b/tests/core/badge_revoked/user_forfeited_badge/event.json index 33a0c4672..cfe2eb3d3 100644 --- a/tests/core/badge_revoked/user_forfeited_badge/event.json +++ b/tests/core/badge_revoked/user_forfeited_badge/event.json @@ -1,9 +1,9 @@ { - "eventname": "\\core\\event\\badge_revoked", "id": 1, "objectid": 1, - "objecttable": "badge", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core\\event\\badge_revoked", + "objecttable": "badge", + "timecreated": 1433946701 } diff --git a/tests/core/badge_revoked/user_forfeited_badge/statements.json b/tests/core/badge_revoked/user_forfeited_badge/statements.json index 1b8fe2ad0..3a6b048d7 100644 --- a/tests/core/badge_revoked/user_forfeited_badge/statements.json +++ b/tests/core/badge_revoked/user_forfeited_badge/statements.json @@ -7,17 +7,40 @@ }, "name": "test_recipient_firstname test_recipient_lastname" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/forfeited", + "display": { + "en": "Forfeited" + } + }, + "object": { + "id": "http://www.example.org/badges/overview.php?id=1", + "definition": { + "description": { + "en": "test badge description" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Global", + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" + }, + "name": { + "en": "test_badgename" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" }, - "id": "http://www.example.org", "objectType": "Activity" } ] @@ -39,29 +62,6 @@ "name": "test_revoker_firstname test_revoker_lastname" }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test badge description" - }, - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Global", - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" - }, - "name": { - "en": "test_badgename" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" - }, - "id": "http://www.example.org/badges/overview.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Forfeited" - }, - "id": "https://w3id.org/xapi/tla/verbs/forfeited" } } ] diff --git a/tests/core/badge_updated/data.json b/tests/core/badge_updated/data.json index 5c771013e..7fd2b7845 100644 --- a/tests/core/badge_updated/data.json +++ b/tests/core/badge_updated/data.json @@ -2,10 +2,10 @@ "badge": [ { "courseid": 2, - "description": "test badge description", "id": 1, - "message": "you got the test badge!", "name": "test_badgename", + "description": "test badge description", + "message": "you got the test badge!", "type": 2, "version": "1.0" } diff --git a/tests/core/badge_updated/event.json b/tests/core/badge_updated/event.json index 4497ad698..d7035af65 100644 --- a/tests/core/badge_updated/event.json +++ b/tests/core/badge_updated/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\badge_updated", "id": 1, "objectid": 1, - "objecttable": "badge", "relateduserid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core\\event\\badge_updated", + "objecttable": "badge", + "timecreated": 1433946701 } diff --git a/tests/core/badge_updated/statements.json b/tests/core/badge_updated/statements.json index d76928667..c2f16eb68 100644 --- a/tests/core/badge_updated/statements.json +++ b/tests/core/badge_updated/statements.json @@ -7,29 +7,52 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/acrossx/verbs/edited", + "display": { + "en": "Edited" + } + }, + "object": { + "id": "http://www.example.org/badges/overview.php?id=1", + "definition": { + "description": { + "en": "test badge description" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Course", + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" + }, + "name": { + "en": "test_badgename" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -43,29 +66,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test badge description" - }, - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Course", - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" - }, - "name": { - "en": "test_badgename" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" - }, - "id": "http://www.example.org/badges/overview.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Edited" - }, - "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/core/badge_viewed/user_viewed_badge/data.json b/tests/core/badge_viewed/user_viewed_badge/data.json index 72b214fd1..cee0bb4fb 100644 --- a/tests/core/badge_viewed/user_viewed_badge/data.json +++ b/tests/core/badge_viewed/user_viewed_badge/data.json @@ -1,9 +1,9 @@ { "badge": [ { - "description": "badge description", "id": 1, "name": "testbadge", + "description": "badge description", "type": 1, "version": "1.0" } diff --git a/tests/core/badge_viewed/user_viewed_badge/event.json b/tests/core/badge_viewed/user_viewed_badge/event.json index d1f541071..9de9f62c2 100644 --- a/tests/core/badge_viewed/user_viewed_badge/event.json +++ b/tests/core/badge_viewed/user_viewed_badge/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\badge_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\badge_viewed", "objecttable": "badge", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/badge_viewed/user_viewed_badge/statements.json b/tests/core/badge_viewed/user_viewed_badge/statements.json index 13934fdf1..2caa40127 100644 --- a/tests/core/badge_viewed/user_viewed_badge/statements.json +++ b/tests/core/badge_viewed/user_viewed_badge/statements.json @@ -7,29 +7,52 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/badges/overview.php?id=1", + "definition": { + "description": { + "en": "badge description" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Global", + "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" + }, + "name": { + "en": "testbadge" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -43,29 +66,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "badge description" - }, - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-type": "Global", - "https://xapi.edlm/profiles/edlm-lms/v1/concepts/activity-extensions/badge-version": "1.0" - }, - "name": { - "en": "testbadge" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/badge" - }, - "id": "http://www.example.org/badges/overview.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/core/calendar_event_created/user_created_calendar_event/data.json b/tests/core/calendar_event_created/user_created_calendar_event/data.json index bbdae1c88..5a7f98ee4 100644 --- a/tests/core/calendar_event_created/user_created_calendar_event/data.json +++ b/tests/core/calendar_event_created/user_created_calendar_event/data.json @@ -1,13 +1,13 @@ { "course": [ { - "fullname": "test_site_fullname", "id": 1, + "fullname": "test_site_fullname", "lang": "en" }, { - "fullname": "test_name", "id": 2, + "fullname": "test_name", "lang": "en", "summary": "test_summary" } @@ -20,11 +20,11 @@ ], "user": [ { - "email": "creator@test.com", - "firstname": "event_creator_firstname", "id": 1, + "firstname": "event_creator_firstname", "lastname": "event_creator_lastname", - "username": "creator" + "username": "creator", + "email": "creator@test.com" } ] } diff --git a/tests/core/calendar_event_created/user_created_calendar_event/event.json b/tests/core/calendar_event_created/user_created_calendar_event/event.json index bc7b3b6d4..e16052507 100644 --- a/tests/core/calendar_event_created/user_created_calendar_event/event.json +++ b/tests/core/calendar_event_created/user_created_calendar_event/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\calendar_event_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\calendar_event_created", "objecttable": "event", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/calendar_event_created/user_created_calendar_event/statements.json b/tests/core/calendar_event_created/user_created_calendar_event/statements.json index 04ba9833e..1f6126646 100644 --- a/tests/core/calendar_event_created/user_created_calendar_event/statements.json +++ b/tests/core/calendar_event_created/user_created_calendar_event/statements.json @@ -7,29 +7,45 @@ }, "name": "event_creator_firstname event_creator_lastname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/calendar/view.php?id=1", + "definition": { + "name": { + "en": "test event" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-event" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" }, - "id": "http://www.example.org", "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -42,22 +58,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "name": { - "en": "test event" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-event" - }, - "id": "http://www.example.org/calendar/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/calendar_event_deleted/user_deleted_calendar_event/data.json b/tests/core/calendar_event_deleted/user_deleted_calendar_event/data.json index 587e91f23..b2348a24b 100644 --- a/tests/core/calendar_event_deleted/user_deleted_calendar_event/data.json +++ b/tests/core/calendar_event_deleted/user_deleted_calendar_event/data.json @@ -1,13 +1,13 @@ { "course": [ { - "fullname": "test_site_fullname", "id": 1, + "fullname": "test_site_fullname", "lang": "en" }, { - "fullname": "test_name", "id": 2, + "fullname": "test_name", "lang": "en", "summary": "test_summary" } @@ -15,10 +15,10 @@ "event": [], "user": [ { - "email": "deleter@test.com", - "firstname": "event_deleter_firstname", "id": 1, - "lastname": "event_deleter_lastname" + "firstname": "event_deleter_firstname", + "lastname": "event_deleter_lastname", + "email": "deleter@test.com" } ] } diff --git a/tests/core/calendar_event_deleted/user_deleted_calendar_event/event.json b/tests/core/calendar_event_deleted/user_deleted_calendar_event/event.json index 781831fc6..7dda95a86 100644 --- a/tests/core/calendar_event_deleted/user_deleted_calendar_event/event.json +++ b/tests/core/calendar_event_deleted/user_deleted_calendar_event/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\calendar_event_deleted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\calendar_event_deleted", "objecttable": "event", "other": "a:1:{s:4:\"name\";s:10:\"test event\";}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/calendar_event_deleted/user_deleted_calendar_event/statements.json b/tests/core/calendar_event_deleted/user_deleted_calendar_event/statements.json index 6867d1399..e7b13411c 100644 --- a/tests/core/calendar_event_deleted/user_deleted_calendar_event/statements.json +++ b/tests/core/calendar_event_deleted/user_deleted_calendar_event/statements.json @@ -7,29 +7,45 @@ }, "name": "event_deleter_firstname event_deleter_lastname" }, + "verb": { + "id": "http://activitystrea.ms/delete", + "display": { + "en": "Deleted" + } + }, + "object": { + "id": "http://www.example.org/calendar/view.php?id=1", + "definition": { + "name": { + "en": "test event" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-event" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" }, - "id": "http://www.example.org", "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -43,22 +59,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test event" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-event" - }, - "id": "http://www.example.org/calendar/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Deleted" - }, - "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/core/calendar_event_updated/user_updated_calendar_event/data.json b/tests/core/calendar_event_updated/user_updated_calendar_event/data.json index b48fa05be..0da8c3a2b 100644 --- a/tests/core/calendar_event_updated/user_updated_calendar_event/data.json +++ b/tests/core/calendar_event_updated/user_updated_calendar_event/data.json @@ -1,13 +1,13 @@ { "course": [ { - "fullname": "test_site_fullname", "id": 1, + "fullname": "test_site_fullname", "lang": "en" }, { - "fullname": "test_name", "id": 2, + "fullname": "test_name", "lang": "en", "summary": "test_summary" } @@ -20,11 +20,11 @@ ], "user": [ { - "email": "updater@test.com", - "firstname": "event_updater_firstname", "id": 1, + "firstname": "event_updater_firstname", "lastname": "event_updater_lastname", - "username": "updater" + "username": "updater", + "email": "updater@test.com" } ] } diff --git a/tests/core/calendar_event_updated/user_updated_calendar_event/event.json b/tests/core/calendar_event_updated/user_updated_calendar_event/event.json index b4196a555..0fd5759b0 100644 --- a/tests/core/calendar_event_updated/user_updated_calendar_event/event.json +++ b/tests/core/calendar_event_updated/user_updated_calendar_event/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\calendar_event_updated", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\calendar_event_updated", "objecttable": "event", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/calendar_event_updated/user_updated_calendar_event/statements.json b/tests/core/calendar_event_updated/user_updated_calendar_event/statements.json index 7e514082a..7991a83fd 100644 --- a/tests/core/calendar_event_updated/user_updated_calendar_event/statements.json +++ b/tests/core/calendar_event_updated/user_updated_calendar_event/statements.json @@ -7,29 +7,45 @@ }, "name": "event_updater_firstname event_updater_lastname" }, + "verb": { + "id": "https://w3id.org/xapi/acrossx/verbs/edited", + "display": { + "en": "Edited" + } + }, + "object": { + "id": "http://www.example.org/calendar/view.php?id=1", + "definition": { + "name": { + "en": "test event" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-event" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" }, - "id": "http://www.example.org", "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -42,22 +58,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "name": { - "en": "test event" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-event" - }, - "id": "http://www.example.org/calendar/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Edited" - }, - "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/core/calendar_subscription_created/user_created_calendar_subscription/event.json b/tests/core/calendar_subscription_created/user_created_calendar_subscription/event.json index 362d91129..b85048615 100644 --- a/tests/core/calendar_subscription_created/user_created_calendar_subscription/event.json +++ b/tests/core/calendar_subscription_created/user_created_calendar_subscription/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\calendar_subscription_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\calendar_subscription_created", "objecttable": "event_subscriptions", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/calendar_subscription_created/user_created_calendar_subscription/statements.json b/tests/core/calendar_subscription_created/user_created_calendar_subscription/statements.json index ce7fef6ef..d642af50b 100644 --- a/tests/core/calendar_subscription_created/user_created_calendar_subscription/statements.json +++ b/tests/core/calendar_subscription_created/user_created_calendar_subscription/statements.json @@ -7,41 +7,57 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/calendar/subscription?id=1", + "definition": { + "name": { + "en": "example calendar subscription" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "other": [ { + "id": "http://example-cal.com/HASH", "definition": { "name": { "en": "Web Calendar" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar" }, - "id": "http://example-cal.com/HASH", "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -55,22 +71,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "example calendar subscription" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" - }, - "id": "http://www.example.org/calendar/subscription?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/event.json b/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/event.json index 74c73ec88..c3e1d1416 100644 --- a/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/event.json +++ b/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/event.json @@ -1,10 +1,10 @@ { - "action": "deleted", "courseid": 2, - "eventname": "\\core\\event\\calendar_subscription_deleted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\calendar_subscription_deleted", + "action": "deleted", "objecttable": "event_subscriptions", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/statements.json b/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/statements.json index 106796afe..82b83f1a9 100644 --- a/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/statements.json +++ b/tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/statements.json @@ -7,29 +7,42 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/delete", + "display": { + "en": "Deleted" + } + }, + "object": { + "id": "http://www.example.org/calendar/subscription?id=1", + "definition": { + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -43,19 +56,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" - }, - "id": "http://www.example.org/calendar/subscription?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Deleted" - }, - "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/event.json b/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/event.json index 508fd467d..25c3edf61 100644 --- a/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/event.json +++ b/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\calendar_subscription_updated", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\calendar_subscription_updated", "objecttable": "event_subscriptions", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/statements.json b/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/statements.json index d36983d85..5abac976c 100644 --- a/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/statements.json +++ b/tests/core/calendar_subscription_updated/user_updated_calendar_subscription/statements.json @@ -7,41 +7,57 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/acrossx/verbs/edited", + "display": { + "en": "Edited" + } + }, + "object": { + "id": "http://www.example.org/calendar/subscription?id=1", + "definition": { + "name": { + "en": "example calendar subscription" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "other": [ { + "id": "http://example-cal.com/HASH", "definition": { "name": { "en": "Web Calendar" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar" }, - "id": "http://example-cal.com/HASH", "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -55,22 +71,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "example calendar subscription" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/calendar-subscription" - }, - "id": "http://www.example.org/calendar/subscription?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Edited" - }, - "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/core/course_category_created/data.json b/tests/core/course_category_created/data.json index 9aa4e7764..cdc9eb132 100644 --- a/tests/core/course_category_created/data.json +++ b/tests/core/course_category_created/data.json @@ -1,22 +1,22 @@ { "course_categories": [ { - "description": "Default Moodle Course Category", "id": 2, - "name": "Base Category" + "name": "Base Category", + "description": "Default Moodle Course Category" }, { - "description": "Moodle Course Sub-Category", "id": 3, "name": "Sub Category", + "description": "Moodle Course Sub-Category", "parent": 2 } ], "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/course_category_created/event.json b/tests/core/course_category_created/event.json index d9625e3c9..54b294531 100644 --- a/tests/core/course_category_created/event.json +++ b/tests/core/course_category_created/event.json @@ -1,8 +1,8 @@ { - "eventname": "\\core\\event\\course_category_created", "id": 1, "objectid": 3, + "userid": 1, + "eventname": "\\core\\event\\course_category_created", "objecttable": "course_categories", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/course_category_created/statements.json b/tests/core/course_category_created/statements.json index bc513ad73..086f00906 100644 --- a/tests/core/course_category_created/statements.json +++ b/tests/core/course_category_created/statements.json @@ -7,22 +7,42 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/course/management.php?categoryid=3", + "definition": { + "description": { + "en": "Moodle Course Sub-Category" + }, + "name": { + "en": "Sub Category" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-category" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/management.php?categoryid=2", "definition": { "description": { "en": "Default Moodle Course Category" @@ -32,7 +52,6 @@ }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-category" }, - "id": "http://www.example.org/course/management.php?categoryid=2", "objectType": "Activity" } ] @@ -45,25 +64,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "description": { - "en": "Moodle Course Sub-Category" - }, - "name": { - "en": "Sub Category" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-category" - }, - "id": "http://www.example.org/course/management.php?categoryid=3", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/course_completed/completing_existing_course/data.json b/tests/core/course_completed/completing_existing_course/data.json index 4e1f072a1..13de62cac 100644 --- a/tests/core/course_completed/completing_existing_course/data.json +++ b/tests/core/course_completed/completing_existing_course/data.json @@ -1,9 +1,9 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/course_completed/completing_existing_course/event.json b/tests/core/course_completed/completing_existing_course/event.json index 743ecb553..61d8387ab 100644 --- a/tests/core/course_completed/completing_existing_course/event.json +++ b/tests/core/course_completed/completing_existing_course/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\course_completed", "id": 1, "objectid": 2, - "objecttable": "course", "relateduserid": 1, + "eventname": "\\core\\event\\course_completed", + "objecttable": "course", "timecreated": 1433946701 } diff --git a/tests/core/course_completed/completing_existing_course/statements.json b/tests/core/course_completed/completing_existing_course/statements.json index a809823bb..75977d34b 100644 --- a/tests/core/course_completed/completing_existing_course/statements.json +++ b/tests/core/course_completed/completing_existing_course/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -31,22 +47,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/cmi5/activitytype/course" - }, - "id": "http://www.example.org/course/view.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/core/course_completed/send_jisc_data/data.json b/tests/core/course_completed/send_jisc_data/data.json index f7cb90a10..7c5c6f863 100644 --- a/tests/core/course_completed/send_jisc_data/data.json +++ b/tests/core/course_completed/send_jisc_data/data.json @@ -1,22 +1,22 @@ { "course": [ { - "fullname": "test_site_fullname", "id": 1, + "fullname": "test_site_fullname", "lang": "en" }, { - "fullname": "test_name", "id": 2, - "lang": "en", - "shortname": "test_course_short_name" + "fullname": "test_name", + "shortname": "test_course_short_name", + "lang": "en" } ], "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/course_completed/send_jisc_data/event.json b/tests/core/course_completed/send_jisc_data/event.json index f5dd5e3c1..0d1935be2 100644 --- a/tests/core/course_completed/send_jisc_data/event.json +++ b/tests/core/course_completed/send_jisc_data/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\course_completed", "id": 1, - "ip": "127.0.0.1", "objectid": 2, - "objecttable": "course", "relateduserid": 1, + "eventname": "\\core\\event\\course_completed", + "ip": "127.0.0.1", + "objecttable": "course", "timecreated": 1433946701 } diff --git a/tests/core/course_completed/send_jisc_data/statements.json b/tests/core/course_completed/send_jisc_data/statements.json index ccae20e5e..27fd087d2 100644 --- a/tests/core/course_completed/send_jisc_data/statements.json +++ b/tests/core/course_completed/send_jisc_data/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -37,22 +53,6 @@ "http://xapi.jisc.ac.uk/statementCat": "VLE" }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/cmi5/activitytype/course" - }, - "id": "http://www.example.org/course/view.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/core/course_completion_updated/data.json b/tests/core/course_completion_updated/data.json index 4e1f072a1..13de62cac 100644 --- a/tests/core/course_completion_updated/data.json +++ b/tests/core/course_completion_updated/data.json @@ -1,9 +1,9 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/course_completion_updated/event.json b/tests/core/course_completion_updated/event.json index dba69aec5..e54a20a3c 100644 --- a/tests/core/course_completion_updated/event.json +++ b/tests/core/course_completion_updated/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\course_completion_updated", "id": 1, "objectid": null, + "userid": 1, + "eventname": "\\core\\event\\course_completion_updated", "objecttable": null, - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/course_completion_updated/statements.json b/tests/core/course_completion_updated/statements.json index 3152d28ca..15dd64039 100644 --- a/tests/core/course_completion_updated/statements.json +++ b/tests/core/course_completion_updated/statements.json @@ -7,29 +7,45 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/acrossx/verbs/edited", + "display": { + "en": "Edited" + } + }, + "object": { + "id": "http://www.example.org/course/completion.php?id=2", + "definition": { + "name": { + "en": "test_name Completion Criteria" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-completion-criteria" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -42,22 +58,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "name": { - "en": "test_name Completion Criteria" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/course-completion-criteria" - }, - "id": "http://www.example.org/course/completion.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Edited" - }, - "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/core/course_created/creating_new_course/data.json b/tests/core/course_created/creating_new_course/data.json index 4e1f072a1..13de62cac 100644 --- a/tests/core/course_created/creating_new_course/data.json +++ b/tests/core/course_created/creating_new_course/data.json @@ -1,9 +1,9 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/course_created/creating_new_course/event.json b/tests/core/course_created/creating_new_course/event.json index 3760e2066..77e7803ac 100644 --- a/tests/core/course_created/creating_new_course/event.json +++ b/tests/core/course_created/creating_new_course/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\course_created", "id": 1, "objectid": 2, + "userid": 1, + "eventname": "\\core\\event\\course_created", "objecttable": "course", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/course_created/creating_new_course/statements.json b/tests/core/course_created/creating_new_course/statements.json index b1e1a2f9f..de12cb9af 100644 --- a/tests/core/course_created/creating_new_course/statements.json +++ b/tests/core/course_created/creating_new_course/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -30,22 +46,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/cmi5/activitytype/course" - }, - "id": "http://www.example.org/course/view.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/course_module_completion_update/completing_existing_module/event.json b/tests/core/course_module_completion_update/completing_existing_module/event.json index 7d55e1302..afa5d2e6e 100644 --- a/tests/core/course_module_completion_update/completing_existing_module/event.json +++ b/tests/core/course_module_completion_update/completing_existing_module/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\core\\event\\course_module_completion_updated", "id": 1, - "other": "a:3:{s:13:\"relateduserid\";i:1;s:10:\"overrideby\";N;s:15:\"completionstate\";i:2;}", "relateduserid": 1, + "eventname": "\\core\\event\\course_module_completion_updated", + "other": "a:3:{s:13:\"relateduserid\";i:1;s:10:\"overrideby\";N;s:15:\"completionstate\";i:2;}", "timecreated": 1433946701 } 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 9b07b4e51..63e36fcdf 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 @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/book/view.php?id=1", + "definition": { + "name": { + "en": "test_book_name" + }, + "type": "http://id.tincanapi.com/activitytype/book" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -54,25 +70,9 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_book_name" - }, - "type": "http://id.tincanapi.com/activitytype/book" - }, - "id": "http://www.example.org/mod/book/view.php?id=1", - "objectType": "Activity" - }, "result": { "completion": true, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/core/course_module_completion_update/uncompleting_existing_module/event.json b/tests/core/course_module_completion_update/uncompleting_existing_module/event.json index 2ec9a9469..6902b9600 100644 --- a/tests/core/course_module_completion_update/uncompleting_existing_module/event.json +++ b/tests/core/course_module_completion_update/uncompleting_existing_module/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\core\\event\\course_module_completion_updated", "id": 1, - "other": "a:3:{s:13:\"relateduserid\";i:1;s:10:\"overrideby\";N;s:15:\"completionstate\";i:0;}", "relateduserid": 1, + "eventname": "\\core\\event\\course_module_completion_updated", + "other": "a:3:{s:13:\"relateduserid\";i:1;s:10:\"overrideby\";N;s:15:\"completionstate\";i:0;}", "timecreated": 1433946701 } diff --git a/tests/core/course_module_completion_update/uncompleting_existing_module/statements.json b/tests/core/course_module_completion_update/uncompleting_existing_module/statements.json index 80aa7f84f..e5b43c53f 100644 --- a/tests/core/course_module_completion_update/uncompleting_existing_module/statements.json +++ b/tests/core/course_module_completion_update/uncompleting_existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/uncompleted", + "display": { + "en": "Uncompleted" + } + }, + "object": { + "id": "http://www.example.org/mod/book/view.php?id=1", + "definition": { + "name": { + "en": "test_book_name" + }, + "type": "http://id.tincanapi.com/activitytype/book" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_book_name" - }, - "type": "http://id.tincanapi.com/activitytype/book" - }, - "id": "http://www.example.org/mod/book/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Uncompleted" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/uncompleted" } } ] diff --git a/tests/core/course_module_created/creating_new_course_module/event.json b/tests/core/course_module_created/creating_new_course_module/event.json index dce86210e..7d41ce454 100644 --- a/tests/core/course_module_created/creating_new_course_module/event.json +++ b/tests/core/course_module_created/creating_new_course_module/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\core\\event\\course_module_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\course_module_created", "objecttable": "course_modules", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/course_module_created/creating_new_course_module/statements.json b/tests/core/course_module_created/creating_new_course_module/statements.json index 2e32d0042..d147c9036 100644 --- a/tests/core/course_module_created/creating_new_course_module/statements.json +++ b/tests/core/course_module_created/creating_new_course_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/mod/book/view.php?id=1", + "definition": { + "name": { + "en": "test_book_name" + }, + "type": "http://id.tincanapi.com/activitytype/book" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -52,22 +68,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "name": { - "en": "test_book_name" - }, - "type": "http://id.tincanapi.com/activitytype/book" - }, - "id": "http://www.example.org/mod/book/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/data.json b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/data.json index 4e1f072a1..13de62cac 100644 --- a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/data.json +++ b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/data.json @@ -1,9 +1,9 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/event.json b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/event.json index 89553a1b3..3822de300 100644 --- a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/event.json +++ b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\course_resources_list_viewed", "id": 1, "objectid": null, + "userid": 1, + "eventname": "\\core\\event\\course_resources_list_viewed", "objecttable": null, - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/statements.json b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/statements.json index 5c1fca0b9..2688f6ccb 100644 --- a/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/statements.json +++ b/tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/statements.json @@ -7,29 +7,45 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/course/resources.php?id=2", + "definition": { + "name": { + "en": "test_name Resources" + }, + "type": "https://w3id.org/xapi/acrossx/activities/webpage" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -43,22 +59,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name Resources" - }, - "type": "https://w3id.org/xapi/acrossx/activities/webpage" - }, - "id": "http://www.example.org/course/resources.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/core/course_section_created/new_course_section_created/data.json b/tests/core/course_section_created/new_course_section_created/data.json index 74233d1fa..380365ced 100644 --- a/tests/core/course_section_created/new_course_section_created/data.json +++ b/tests/core/course_section_created/new_course_section_created/data.json @@ -1,24 +1,24 @@ { "course": [ { - "fullname": "test_name", "id": 1, + "fullname": "test_name", "lang": "en" } ], "course_sections": [ { - "course": 2, "id": 1, "name": null, + "course": 2, "section": 5 } ], "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/course_section_created/new_course_section_created/event.json b/tests/core/course_section_created/new_course_section_created/event.json index cb6077a59..aa648a469 100644 --- a/tests/core/course_section_created/new_course_section_created/event.json +++ b/tests/core/course_section_created/new_course_section_created/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\course_section_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\course_section_created", "objecttable": "course_sections", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/course_section_created/new_course_section_created/statements.json b/tests/core/course_section_created/new_course_section_created/statements.json index 3ea9bcbf5..950f18a66 100644 --- a/tests/core/course_section_created/new_course_section_created/statements.json +++ b/tests/core/course_section_created/new_course_section_created/statements.json @@ -7,29 +7,45 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/course/section.php?id=1", + "definition": { + "name": { + "en": "test_name Section 5" + }, + "type": "http://id.tincanapi.com/activitytype/section" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -42,22 +58,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "name": { - "en": "test_name Section 5" - }, - "type": "http://id.tincanapi.com/activitytype/section" - }, - "id": "http://www.example.org/course/section.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/course_updated/updating_existing_course/data.json b/tests/core/course_updated/updating_existing_course/data.json index 4e1f072a1..13de62cac 100644 --- a/tests/core/course_updated/updating_existing_course/data.json +++ b/tests/core/course_updated/updating_existing_course/data.json @@ -1,9 +1,9 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/course_updated/updating_existing_course/event.json b/tests/core/course_updated/updating_existing_course/event.json index 8a7f0c918..b66d28bed 100644 --- a/tests/core/course_updated/updating_existing_course/event.json +++ b/tests/core/course_updated/updating_existing_course/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\course_updated", "id": 1, "objectid": 2, + "userid": 1, + "eventname": "\\core\\event\\course_updated", "objecttable": "course", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/course_updated/updating_existing_course/statements.json b/tests/core/course_updated/updating_existing_course/statements.json index 8eb03cbe3..4600737d5 100644 --- a/tests/core/course_updated/updating_existing_course/statements.json +++ b/tests/core/course_updated/updating_existing_course/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/acrossx/verbs/edited", + "display": { + "en": "Edited" + } + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -30,22 +46,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/cmi5/activitytype/course" - }, - "id": "http://www.example.org/course/view.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Edited" - }, - "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/core/course_viewed/viewing_existing_course/data.json b/tests/core/course_viewed/viewing_existing_course/data.json index 4e1f072a1..13de62cac 100644 --- a/tests/core/course_viewed/viewing_existing_course/data.json +++ b/tests/core/course_viewed/viewing_existing_course/data.json @@ -1,9 +1,9 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/course_viewed/viewing_existing_course/event.json b/tests/core/course_viewed/viewing_existing_course/event.json index 7e8831a99..a25eec68e 100644 --- a/tests/core/course_viewed/viewing_existing_course/event.json +++ b/tests/core/course_viewed/viewing_existing_course/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\course_viewed", "id": 1, "objectid": 2, + "userid": 1, + "eventname": "\\core\\event\\course_viewed", "objecttable": "course", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/course_viewed/viewing_existing_course/statements.json b/tests/core/course_viewed/viewing_existing_course/statements.json index a26b87e8a..e6ccd8246 100644 --- a/tests/core/course_viewed/viewing_existing_course/statements.json +++ b/tests/core/course_viewed/viewing_existing_course/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -31,22 +47,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/cmi5/activitytype/course" - }, - "id": "http://www.example.org/course/view.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/core/group_created/creating_new_group/event.json b/tests/core/group_created/creating_new_group/event.json index a6b5eee47..97659e06f 100644 --- a/tests/core/group_created/creating_new_group/event.json +++ b/tests/core/group_created/creating_new_group/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\group_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\group_created", "objecttable": "groups", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/group_created/creating_new_group/statements.json b/tests/core/group_created/creating_new_group/statements.json index a63ec3531..0da6c845e 100644 --- a/tests/core/group_created/creating_new_group/statements.json +++ b/tests/core/group_created/creating_new_group/statements.json @@ -7,29 +7,45 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/group/index.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -42,22 +58,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" - }, - "id": "http://www.example.org/group/index.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/group_deleted/existing_group_deleted/event.json b/tests/core/group_deleted/existing_group_deleted/event.json index 6b17ff298..6e13005be 100644 --- a/tests/core/group_deleted/existing_group_deleted/event.json +++ b/tests/core/group_deleted/existing_group_deleted/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\group_deleted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\group_deleted", "objecttable": "groups", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/group_deleted/existing_group_deleted/statements.json b/tests/core/group_deleted/existing_group_deleted/statements.json index e1d3b6553..1fadbedf1 100644 --- a/tests/core/group_deleted/existing_group_deleted/statements.json +++ b/tests/core/group_deleted/existing_group_deleted/statements.json @@ -7,29 +7,42 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/delete", + "display": { + "en": "Deleted" + } + }, + "object": { + "id": "http://www.example.org/group/index.php?id=1", + "definition": { + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -42,19 +55,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" - }, - "id": "http://www.example.org/group/index.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Deleted" - }, - "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/core/group_member_added/new_group_member_added/data.json b/tests/core/group_member_added/new_group_member_added/data.json index 423f4a1c1..07a4c2718 100644 --- a/tests/core/group_member_added/new_group_member_added/data.json +++ b/tests/core/group_member_added/new_group_member_added/data.json @@ -7,14 +7,14 @@ ], "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/core/group_member_added/new_group_member_added/event.json b/tests/core/group_member_added/new_group_member_added/event.json index ae1926017..a15fd631d 100644 --- a/tests/core/group_member_added/new_group_member_added/event.json +++ b/tests/core/group_member_added/new_group_member_added/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\group_member_added", "id": 1, "objectid": 1, - "objecttable": "groups", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core\\event\\group_member_added", + "objecttable": "groups", + "timecreated": 1433946701 } diff --git a/tests/core/group_member_added/new_group_member_added/statements.json b/tests/core/group_member_added/new_group_member_added/statements.json index 0400d310e..101a40fe6 100644 --- a/tests/core/group_member_added/new_group_member_added/statements.json +++ b/tests/core/group_member_added/new_group_member_added/statements.json @@ -7,29 +7,45 @@ }, "name": "test_fullname2" }, + "verb": { + "id": "http://activitystrea.ms/join", + "display": { + "en": "Joined" + } + }, + "object": { + "id": "http://www.example.org/group/index.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -49,22 +65,6 @@ }, "name": "test_fullname1" } - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" - }, - "id": "http://www.example.org/group/index.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Joined" - }, - "id": "http://activitystrea.ms/join" } } ] diff --git a/tests/core/group_member_removed/existing_group_member_removed/data.json b/tests/core/group_member_removed/existing_group_member_removed/data.json index 423f4a1c1..07a4c2718 100644 --- a/tests/core/group_member_removed/existing_group_member_removed/data.json +++ b/tests/core/group_member_removed/existing_group_member_removed/data.json @@ -7,14 +7,14 @@ ], "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/core/group_member_removed/existing_group_member_removed/event.json b/tests/core/group_member_removed/existing_group_member_removed/event.json index c5b5595b3..8bebc5d5e 100644 --- a/tests/core/group_member_removed/existing_group_member_removed/event.json +++ b/tests/core/group_member_removed/existing_group_member_removed/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\group_member_removed", "id": 1, "objectid": 1, - "objecttable": "groups", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core\\event\\group_member_removed", + "objecttable": "groups", + "timecreated": 1433946701 } diff --git a/tests/core/group_member_removed/existing_group_member_removed/statements.json b/tests/core/group_member_removed/existing_group_member_removed/statements.json index 59845d419..e758c06ff 100644 --- a/tests/core/group_member_removed/existing_group_member_removed/statements.json +++ b/tests/core/group_member_removed/existing_group_member_removed/statements.json @@ -7,29 +7,45 @@ }, "name": "test_fullname2" }, + "verb": { + "id": "http://activitystrea.ms/leave", + "display": { + "en": "Left" + } + }, + "object": { + "id": "http://www.example.org/group/index.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -49,22 +65,6 @@ }, "name": "test_fullname1" } - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" - }, - "id": "http://www.example.org/group/index.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Left" - }, - "id": "http://activitystrea.ms/leave" } } ] diff --git a/tests/core/group_message_sent/new_group_message_sent/data.json b/tests/core/group_message_sent/new_group_message_sent/data.json index 6f311bcd2..a0c061fb2 100644 --- a/tests/core/group_message_sent/new_group_message_sent/data.json +++ b/tests/core/group_message_sent/new_group_message_sent/data.json @@ -21,8 +21,8 @@ "messages": [ { "conversationid": 1, - "fullmessage": "test_message_body", "id": 1, + "fullmessage": "test_message_body", "subject": "test_message_subject" } ] diff --git a/tests/core/group_message_sent/new_group_message_sent/event.json b/tests/core/group_message_sent/new_group_message_sent/event.json index 280ba5b4f..56da1ecd6 100644 --- a/tests/core/group_message_sent/new_group_message_sent/event.json +++ b/tests/core/group_message_sent/new_group_message_sent/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\group_message_sent", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\group_message_sent", "objecttable": "messages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/group_message_sent/new_group_message_sent/statements.json b/tests/core/group_message_sent/new_group_message_sent/statements.json index dc460dd72..da101aff3 100644 --- a/tests/core/group_message_sent/new_group_message_sent/statements.json +++ b/tests/core/group_message_sent/new_group_message_sent/statements.json @@ -7,41 +7,60 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/send", + "display": { + "en": "Sent" + } + }, + "object": { + "id": "http://www.example.org/message?id=1", + "definition": { + "description": { + "en": "test_message_body" + }, + "name": { + "en": "test_message_subject" + }, + "type": "http://id.tincanapi.com/activitytype/chat-message" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "grouping": [ { + "id": "http://www.example.org/group/index.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/group" }, - "id": "http://www.example.org/group/index.php?id=1", "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -67,25 +86,6 @@ "objectType": "Group" } } - }, - "object": { - "definition": { - "description": { - "en": "test_message_body" - }, - "name": { - "en": "test_message_subject" - }, - "type": "http://id.tincanapi.com/activitytype/chat-message" - }, - "id": "http://www.example.org/message?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Sent" - }, - "id": "http://activitystrea.ms/send" } } ] diff --git a/tests/core/message_sent/user_sent_message/data.json b/tests/core/message_sent/user_sent_message/data.json index 695565b39..6b4938d87 100644 --- a/tests/core/message_sent/user_sent_message/data.json +++ b/tests/core/message_sent/user_sent_message/data.json @@ -1,25 +1,25 @@ { "messages": [ { - "fullmessage": "hi there!(messagetext)", "id": 1, + "fullmessage": "hi there!(messagetext)", "subject": "hi there(subject)" } ], "user": [ { - "email": "sender@example.com", - "firstname": "sender", "id": 1, + "firstname": "sender", "lastname": "senderson", - "username": "sender" + "username": "sender", + "email": "sender@example.com" }, { - "email": "receiver@example.com", - "firstname": "receiver", "id": 2, + "firstname": "receiver", "lastname": "receiverson", - "username": "receiver" + "username": "receiver", + "email": "receiver@example.com" } ] } diff --git a/tests/core/message_sent/user_sent_message/event.json b/tests/core/message_sent/user_sent_message/event.json index b0b420713..fa489c6cb 100644 --- a/tests/core/message_sent/user_sent_message/event.json +++ b/tests/core/message_sent/user_sent_message/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\message_sent", "id": 1, "objectid": 1, - "objecttable": "messages", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core\\event\\message_sent", + "objecttable": "messages", + "timecreated": 1433946701 } diff --git a/tests/core/message_sent/user_sent_message/statements.json b/tests/core/message_sent/user_sent_message/statements.json index 5df39342c..63cc48ea9 100644 --- a/tests/core/message_sent/user_sent_message/statements.json +++ b/tests/core/message_sent/user_sent_message/statements.json @@ -7,29 +7,48 @@ }, "name": "sender senderson" }, + "verb": { + "id": "http://activitystrea.ms/send", + "display": { + "en": "Sent" + } + }, + "object": { + "id": "http://www.example.org/message?id=1", + "definition": { + "description": { + "en": "hi there!(messagetext)" + }, + "name": { + "en": "hi there(subject)" + }, + "type": "http://id.tincanapi.com/activitytype/chat-message" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -50,25 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "hi there!(messagetext)" - }, - "name": { - "en": "hi there(subject)" - }, - "type": "http://id.tincanapi.com/activitytype/chat-message" - }, - "id": "http://www.example.org/message?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Sent" - }, - "id": "http://activitystrea.ms/send" } } ] diff --git a/tests/core/message_viewed/user_viewed_message/data.json b/tests/core/message_viewed/user_viewed_message/data.json index 695565b39..6b4938d87 100644 --- a/tests/core/message_viewed/user_viewed_message/data.json +++ b/tests/core/message_viewed/user_viewed_message/data.json @@ -1,25 +1,25 @@ { "messages": [ { - "fullmessage": "hi there!(messagetext)", "id": 1, + "fullmessage": "hi there!(messagetext)", "subject": "hi there(subject)" } ], "user": [ { - "email": "sender@example.com", - "firstname": "sender", "id": 1, + "firstname": "sender", "lastname": "senderson", - "username": "sender" + "username": "sender", + "email": "sender@example.com" }, { - "email": "receiver@example.com", - "firstname": "receiver", "id": 2, + "firstname": "receiver", "lastname": "receiverson", - "username": "receiver" + "username": "receiver", + "email": "receiver@example.com" } ] } diff --git a/tests/core/message_viewed/user_viewed_message/event.json b/tests/core/message_viewed/user_viewed_message/event.json index faa6ed6dd..0d712a3ad 100644 --- a/tests/core/message_viewed/user_viewed_message/event.json +++ b/tests/core/message_viewed/user_viewed_message/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\message_viewed", "id": 1, "objectid": 1, - "objecttable": "messages", "relateduserid": 1, - "timecreated": 1433946701, - "userid": 2 + "userid": 2, + "eventname": "\\core\\event\\message_viewed", + "objecttable": "messages", + "timecreated": 1433946701 } diff --git a/tests/core/message_viewed/user_viewed_message/statements.json b/tests/core/message_viewed/user_viewed_message/statements.json index 7ebf449d6..573458cad 100644 --- a/tests/core/message_viewed/user_viewed_message/statements.json +++ b/tests/core/message_viewed/user_viewed_message/statements.json @@ -7,29 +7,48 @@ }, "name": "receiver receiverson" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/message?id=1", + "definition": { + "description": { + "en": "hi there!(messagetext)" + }, + "name": { + "en": "hi there(subject)" + }, + "type": "http://id.tincanapi.com/activitytype/chat-message" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -50,25 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "hi there!(messagetext)" - }, - "name": { - "en": "hi there(subject)" - }, - "type": "http://id.tincanapi.com/activitytype/chat-message" - }, - "id": "http://www.example.org/message?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/core/note_created/user_created_note/data.json b/tests/core/note_created/user_created_note/data.json index c850d99c3..0abd3de7d 100644 --- a/tests/core/note_created/user_created_note/data.json +++ b/tests/core/note_created/user_created_note/data.json @@ -1,23 +1,23 @@ { "post": [ { - "content": "here is a note", "id": 1, + "content": "here is a note", "subject": "no subject" } ], "user": [ { - "email": "author@test.com", - "firstname": "note_author_firstname", "id": 1, - "lastname": "note_author_lastname" + "firstname": "note_author_firstname", + "lastname": "note_author_lastname", + "email": "author@test.com" }, { - "email": "subject@test.com", - "firstname": "note_subject_firstname", "id": 2, - "lastname": "note_subject_lastname" + "firstname": "note_subject_firstname", + "lastname": "note_subject_lastname", + "email": "subject@test.com" } ] } diff --git a/tests/core/note_created/user_created_note/event.json b/tests/core/note_created/user_created_note/event.json index 534c585c7..0bb255d00 100644 --- a/tests/core/note_created/user_created_note/event.json +++ b/tests/core/note_created/user_created_note/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\note_created", "id": 1, "objectid": 1, - "objecttable": "post", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core\\event\\note_created", + "objecttable": "post", + "timecreated": 1433946701 } diff --git a/tests/core/note_created/user_created_note/statements.json b/tests/core/note_created/user_created_note/statements.json index 9ae7d0e90..b58b70769 100644 --- a/tests/core/note_created/user_created_note/statements.json +++ b/tests/core/note_created/user_created_note/statements.json @@ -7,29 +7,58 @@ }, "name": "note_author_firstname note_author_lastname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/notes/view.php?id=1", + "definition": { + "description": { + "en": "here is a note" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "note_subject_firstname note_subject_lastname" + }, + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-type": "course" + }, + "name": { + "en": "no subject" + }, + "type": "http://activitystrea.ms/note" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -43,35 +72,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "here is a note" - }, - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { - "account": { - "homePage": "http://www.example.org", - "name": "2" - }, - "name": "note_subject_firstname note_subject_lastname" - }, - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-type": "course" - }, - "name": { - "en": "no subject" - }, - "type": "http://activitystrea.ms/note" - }, - "id": "http://www.example.org/notes/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/note_updated/user_updated_note/data.json b/tests/core/note_updated/user_updated_note/data.json index b0074ce49..989d161b9 100644 --- a/tests/core/note_updated/user_updated_note/data.json +++ b/tests/core/note_updated/user_updated_note/data.json @@ -1,23 +1,23 @@ { "post": [ { - "content": "contents of a note", "id": 1, + "content": "contents of a note", "subject": "a note title" } ], "user": [ { - "email": "editor@test.com", - "firstname": "note_editor_firstname", "id": 1, - "lastname": "note_editor_lastname" + "firstname": "note_editor_firstname", + "lastname": "note_editor_lastname", + "email": "editor@test.com" }, { - "email": "editor@test.com", - "firstname": "note_subject_firstname", "id": 2, - "lastname": "note_subject_lastname" + "firstname": "note_subject_firstname", + "lastname": "note_subject_lastname", + "email": "editor@test.com" } ] } diff --git a/tests/core/note_updated/user_updated_note/event.json b/tests/core/note_updated/user_updated_note/event.json index 9da56573a..ec8617560 100644 --- a/tests/core/note_updated/user_updated_note/event.json +++ b/tests/core/note_updated/user_updated_note/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\note_updated", "id": 1, "objectid": 1, - "objecttable": "post", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core\\event\\note_updated", + "objecttable": "post", + "timecreated": 1433946701 } diff --git a/tests/core/note_updated/user_updated_note/statements.json b/tests/core/note_updated/user_updated_note/statements.json index 6c74ac064..f00e462e6 100644 --- a/tests/core/note_updated/user_updated_note/statements.json +++ b/tests/core/note_updated/user_updated_note/statements.json @@ -7,29 +7,58 @@ }, "name": "note_editor_firstname note_editor_lastname" }, + "verb": { + "id": "http://activitystrea.ms/update", + "display": { + "en": "Updated" + } + }, + "object": { + "id": "http://www.example.org/notes/view.php?id=1", + "definition": { + "description": { + "en": "contents of a note" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "note_subject_firstname note_subject_lastname" + }, + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-type": "course" + }, + "name": { + "en": "a note title" + }, + "type": "http://activitystrea.ms/note" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -43,35 +72,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "contents of a note" - }, - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { - "account": { - "homePage": "http://www.example.org", - "name": "2" - }, - "name": "note_subject_firstname note_subject_lastname" - }, - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-type": "course" - }, - "name": { - "en": "a note title" - }, - "type": "http://activitystrea.ms/note" - }, - "id": "http://www.example.org/notes/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Updated" - }, - "id": "http://activitystrea.ms/update" } } ] diff --git a/tests/core/notes_viewed/user_viewed_notes/data.json b/tests/core/notes_viewed/user_viewed_notes/data.json index ecf3fa4c5..542e4e2ed 100644 --- a/tests/core/notes_viewed/user_viewed_notes/data.json +++ b/tests/core/notes_viewed/user_viewed_notes/data.json @@ -1,16 +1,16 @@ { "user": [ { - "email": "viewer@test.com", - "firstname": "notes_viewer_firstname", "id": 1, - "lastname": "notes_viewer_lastname" + "firstname": "notes_viewer_firstname", + "lastname": "notes_viewer_lastname", + "email": "viewer@test.com" }, { - "email": "subject@test.com", - "firstname": "notes_subject_firstname", "id": 2, - "lastname": "notes_subject_lastname" + "firstname": "notes_subject_firstname", + "lastname": "notes_subject_lastname", + "email": "subject@test.com" } ] } diff --git a/tests/core/notes_viewed/user_viewed_notes/event.json b/tests/core/notes_viewed/user_viewed_notes/event.json index 77194cb9b..ded2466b6 100644 --- a/tests/core/notes_viewed/user_viewed_notes/event.json +++ b/tests/core/notes_viewed/user_viewed_notes/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\notes_viewed", "id": 1, "objectid": 1, - "objecttable": "post", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core\\event\\notes_viewed", + "objecttable": "post", + "timecreated": 1433946701 } diff --git a/tests/core/notes_viewed/user_viewed_notes/statements.json b/tests/core/notes_viewed/user_viewed_notes/statements.json index 15a4e840e..e5430fbac 100644 --- a/tests/core/notes_viewed/user_viewed_notes/statements.json +++ b/tests/core/notes_viewed/user_viewed_notes/statements.json @@ -7,29 +7,54 @@ }, "name": "notes_viewer_firstname notes_viewer_lastname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/notes/index.php", + "definition": { + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { + "account": { + "homePage": "http://www.example.org", + "name": "2" + }, + "name": "notes_subject_firstname notes_subject_lastname" + } + }, + "name": { + "en": "Notes" + }, + "type": "https://w3id.org/xapi/acrossx/activities/webpage" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -50,31 +75,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/note-subject": { - "account": { - "homePage": "http://www.example.org", - "name": "2" - }, - "name": "notes_subject_firstname notes_subject_lastname" - } - }, - "name": { - "en": "Notes" - }, - "type": "https://w3id.org/xapi/acrossx/activities/webpage" - }, - "id": "http://www.example.org/notes/index.php", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/core/question_created/new_question_created/data.json b/tests/core/question_created/new_question_created/data.json index 2aff646b1..a3cb0c423 100644 --- a/tests/core/question_created/new_question_created/data.json +++ b/tests/core/question_created/new_question_created/data.json @@ -9,15 +9,15 @@ ], "question_answers": [ { + "id": 1, "answer": "True", "fraction": 1.0, - "id": 1, "question": 1 }, { + "id": 2, "answer": "False", "fraction": 0.0, - "id": 2, "question": 1 } ] diff --git a/tests/core/question_created/new_question_created/event.json b/tests/core/question_created/new_question_created/event.json index 78460573c..ed747adb8 100644 --- a/tests/core/question_created/new_question_created/event.json +++ b/tests/core/question_created/new_question_created/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\question_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\question_created", "objecttable": "question", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/question_created/new_question_created/statements.json b/tests/core/question_created/new_question_created/statements.json index 2316b4be8..597a5ae35 100644 --- a/tests/core/question_created/new_question_created/statements.json +++ b/tests/core/question_created/new_question_created/statements.json @@ -7,29 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/question?id=1", + "definition": { + "correctResponsesPattern": [ + "true" + ], + "description": { + "en": "Is the sky blue?" + }, + "extensions": { + "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/moodle-question-type": "truefalse" + }, + "interactionType": "true-false", + "name": { + "en": "True or False?" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -42,32 +68,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "correctResponsesPattern": [ - "true" - ], - "description": { - "en": "Is the sky blue?" - }, - "extensions": { - "https://xapi.edlm/profiles/edlm-lms/concepts/activity-extensions/moodle-question-type": "truefalse" - }, - "interactionType": "true-false", - "name": { - "en": "True or False?" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/core/questions_imported/new_questions_imported/event.json b/tests/core/questions_imported/new_questions_imported/event.json index 0582ad6e6..e85765f5e 100644 --- a/tests/core/questions_imported/new_questions_imported/event.json +++ b/tests/core/questions_imported/new_questions_imported/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\questions_imported", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\questions_imported", "objecttable": null, "other": "a:2:{s:6:\"format\";s:3:\"xml\";s:10:\"categoryid\";s:2:\"10\";}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/questions_imported/new_questions_imported/statements.json b/tests/core/questions_imported/new_questions_imported/statements.json index 2923a9c59..0e80c8462 100644 --- a/tests/core/questions_imported/new_questions_imported/statements.json +++ b/tests/core/questions_imported/new_questions_imported/statements.json @@ -7,29 +7,45 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/imported", + "display": { + "en": "Imported" + } + }, + "object": { + "id": "http://www.example.org/question/bank/importquestions/import.php", + "definition": { + "name": { + "en": "Questions in xml format" + }, + "type": "http://adlnet.gov/expapi/activities/file" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -42,22 +58,6 @@ "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" } } - }, - "object": { - "definition": { - "name": { - "en": "Questions in xml format" - }, - "type": "http://adlnet.gov/expapi/activities/file" - }, - "id": "http://www.example.org/question/bank/importquestions/import.php", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Imported" - }, - "id": "http://adlnet.gov/expapi/verbs/imported" } } ] diff --git a/tests/core/search_results_viewed/user_viewed_search_results/event.json b/tests/core/search_results_viewed/user_viewed_search_results/event.json index 6a3ca12f7..429aabdb2 100644 --- a/tests/core/search_results_viewed/user_viewed_search_results/event.json +++ b/tests/core/search_results_viewed/user_viewed_search_results/event.json @@ -1,10 +1,10 @@ { "courseid": null, - "eventname": "\\core\\event\\search_results_viewed", "id": 1, "objectid": null, + "userid": 1, + "eventname": "\\core\\event\\search_results_viewed", "objecttable": null, "other": "a:7:{s:1:\"q\";s:5:\"query\";s:4:\"page\";i:0;s:5:\"title\";s:0:\"\";s:7:\"areaids\";a:0:{}s:9:\"courseids\";a:0:{}s:9:\"timestart\";i:0;s:7:\"timeend\";i:0;}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/search_results_viewed/user_viewed_search_results/statements.json b/tests/core/search_results_viewed/user_viewed_search_results/statements.json index a5567e629..618b6756d 100644 --- a/tests/core/search_results_viewed/user_viewed_search_results/statements.json +++ b/tests/core/search_results_viewed/user_viewed_search_results/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/acrossx/verbs/searched", + "display": { + "en": "Searched" + } + }, + "object": { + "id": "http://www.example.org/search/index.php", + "definition": { + "name": { + "en": "Global Search" + }, + "type": "https://w3id.org/xapi/acrossx/activities/webpage" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -31,24 +47,8 @@ } } }, - "object": { - "definition": { - "name": { - "en": "Global Search" - }, - "type": "https://w3id.org/xapi/acrossx/activities/webpage" - }, - "id": "http://www.example.org/search/index.php", - "objectType": "Activity" - }, "result": { "response": "query" - }, - "verb": { - "display": { - "en": "Searched" - }, - "id": "https://w3id.org/xapi/acrossx/verbs/searched" } } ] diff --git a/tests/core/user_created/existing_user_created/data.json b/tests/core/user_created/existing_user_created/data.json index 4e1f072a1..13de62cac 100644 --- a/tests/core/user_created/existing_user_created/data.json +++ b/tests/core/user_created/existing_user_created/data.json @@ -1,9 +1,9 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/user_created/existing_user_created/event.json b/tests/core/user_created/existing_user_created/event.json index f3135b292..01df2a120 100644 --- a/tests/core/user_created/existing_user_created/event.json +++ b/tests/core/user_created/existing_user_created/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\user_created", "id": 1, "objectid": 1, - "objecttable": "user", "relateduserid": 1, + "eventname": "\\core\\event\\user_created", + "objecttable": "user", "timecreated": 1433946701 } diff --git a/tests/core/user_created/existing_user_created/statements.json b/tests/core/user_created/existing_user_created/statements.json index 188f7d063..d5ae29467 100644 --- a/tests/core/user_created/existing_user_created/statements.json +++ b/tests/core/user_created/existing_user_created/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/registered", + "display": { + "en": "Registered" + } + }, + "object": { + "id": "http://www.example.org", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -31,22 +47,6 @@ } }, "language": "en" - }, - "object": { - "id": "http://www.example.org", - "objectType": "Activity", - "definition": { - "name": { - "en": "test_site_fullname" - }, - "type": "http://id.tincanapi.com/activitytype/lms" - } - }, - "verb": { - "display": { - "en": "Registered" - }, - "id": "http://adlnet.gov/expapi/verbs/registered" } } ] diff --git a/tests/core/user_created/send_jisc_data/data.json b/tests/core/user_created/send_jisc_data/data.json index f7cb90a10..7c5c6f863 100644 --- a/tests/core/user_created/send_jisc_data/data.json +++ b/tests/core/user_created/send_jisc_data/data.json @@ -1,22 +1,22 @@ { "course": [ { - "fullname": "test_site_fullname", "id": 1, + "fullname": "test_site_fullname", "lang": "en" }, { - "fullname": "test_name", "id": 2, - "lang": "en", - "shortname": "test_course_short_name" + "fullname": "test_name", + "shortname": "test_course_short_name", + "lang": "en" } ], "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/user_created/send_jisc_data/event.json b/tests/core/user_created/send_jisc_data/event.json index 78a08fd8c..20d79e8b5 100644 --- a/tests/core/user_created/send_jisc_data/event.json +++ b/tests/core/user_created/send_jisc_data/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\user_created", "id": 1, - "ip": "127.0.0.1", "objectid": 1, - "objecttable": "user", "relateduserid": 1, + "eventname": "\\core\\event\\user_created", + "ip": "127.0.0.1", + "objecttable": "user", "timecreated": 1433946701 } diff --git a/tests/core/user_created/send_jisc_data/statements.json b/tests/core/user_created/send_jisc_data/statements.json index 0181f5369..e6123cd90 100644 --- a/tests/core/user_created/send_jisc_data/statements.json +++ b/tests/core/user_created/send_jisc_data/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/registered", + "display": { + "en": "Registered" + } + }, + "object": { + "id": "http://www.example.org", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -34,22 +50,6 @@ "http://xapi.jisc.ac.uk/statementCat": "VLE" }, "language": "en" - }, - "object": { - "id": "http://www.example.org", - "objectType": "Activity", - "definition": { - "name": { - "en": "test_site_fullname" - }, - "type": "http://id.tincanapi.com/activitytype/lms" - } - }, - "verb": { - "display": { - "en": "Registered" - }, - "id": "http://adlnet.gov/expapi/verbs/registered" } } ] diff --git a/tests/core/user_enrolment_created/existing_user_enrolled/data.json b/tests/core/user_enrolment_created/existing_user_enrolled/data.json index 91d9ed16d..65f4262d0 100644 --- a/tests/core/user_enrolment_created/existing_user_enrolled/data.json +++ b/tests/core/user_enrolment_created/existing_user_enrolled/data.json @@ -1,14 +1,14 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test@test.com" }, { - "email": "test@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test@test.com" } ] } diff --git a/tests/core/user_enrolment_created/existing_user_enrolled/event.json b/tests/core/user_enrolment_created/existing_user_enrolled/event.json index f7a81d0b8..60455090f 100644 --- a/tests/core/user_enrolment_created/existing_user_enrolled/event.json +++ b/tests/core/user_enrolment_created/existing_user_enrolled/event.json @@ -1,11 +1,11 @@ { "courseid": 2, - "eventname": "\\core\\event\\user_enrolment_created", "id": 1, "objectid": 1, + "relateduserid": 2, + "userid": 1, + "eventname": "\\core\\event\\user_enrolment_created", "objecttable": "user_enrolments", "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", - "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/user_enrolment_created/existing_user_enrolled/statements.json b/tests/core/user_enrolment_created/existing_user_enrolled/statements.json index 8fc5077b5..600391d18 100644 --- a/tests/core/user_enrolment_created/existing_user_enrolled/statements.json +++ b/tests/core/user_enrolment_created/existing_user_enrolled/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname2" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/enrolled", + "display": { + "en": "Enrolled" + } + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -39,22 +55,6 @@ "name": "test_fullname1" }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/cmi5/activitytype/course" - }, - "id": "http://www.example.org/course/view.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Enrolled" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/enrolled" } } ] diff --git a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/data.json b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/data.json index 91d9ed16d..65f4262d0 100644 --- a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/data.json +++ b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/data.json @@ -1,14 +1,14 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test@test.com" }, { - "email": "test@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test@test.com" } ] } diff --git a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/event.json b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/event.json index 04dcaac47..c14e52840 100644 --- a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/event.json +++ b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/event.json @@ -1,11 +1,11 @@ { "courseid": 2, - "eventname": "\\core\\event\\user_enrolment_deleted", "id": 1, "objectid": 1, + "relateduserid": 2, + "userid": 1, + "eventname": "\\core\\event\\user_enrolment_deleted", "objecttable": "user_enrolments", "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", - "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/statements.json b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/statements.json index 052e63f06..b622c6ad0 100644 --- a/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/statements.json +++ b/tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname2" }, + "verb": { + "id": "http://activitystrea.ms/leave", + "display": { + "en": "Left" + } + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -39,22 +55,6 @@ "name": "test_fullname1" }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/cmi5/activitytype/course" - }, - "id": "http://www.example.org/course/view.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Left" - }, - "id": "http://activitystrea.ms/leave" } } ] diff --git a/tests/core/user_enrolment_updated/user_resumed_course/data.json b/tests/core/user_enrolment_updated/user_resumed_course/data.json index 90a2668e9..487c142dc 100644 --- a/tests/core/user_enrolment_updated/user_resumed_course/data.json +++ b/tests/core/user_enrolment_updated/user_resumed_course/data.json @@ -1,14 +1,14 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test@test.com" }, { - "email": "test@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test@test.com" } ], "user_enrolments": [ diff --git a/tests/core/user_enrolment_updated/user_resumed_course/event.json b/tests/core/user_enrolment_updated/user_resumed_course/event.json index 5066f24f9..adaf0a751 100644 --- a/tests/core/user_enrolment_updated/user_resumed_course/event.json +++ b/tests/core/user_enrolment_updated/user_resumed_course/event.json @@ -1,11 +1,11 @@ { "courseid": 2, - "eventname": "\\core\\event\\user_enrolment_updated", "id": 1, "objectid": 1, + "relateduserid": 2, + "userid": 1, + "eventname": "\\core\\event\\user_enrolment_updated", "objecttable": "user_enrolments", "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", - "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/user_enrolment_updated/user_resumed_course/statements.json b/tests/core/user_enrolment_updated/user_resumed_course/statements.json index a86b83016..1d9da704c 100644 --- a/tests/core/user_enrolment_updated/user_resumed_course/statements.json +++ b/tests/core/user_enrolment_updated/user_resumed_course/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname2" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/resumed", + "display": { + "en": "Resumed" + } + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -39,22 +55,6 @@ "name": "test_fullname1" }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/cmi5/activitytype/course" - }, - "id": "http://www.example.org/course/view.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Resumed" - }, - "id": "https://w3id.org/xapi/tla/verbs/resumed" } } ] diff --git a/tests/core/user_enrolment_updated/user_suspended_course/data.json b/tests/core/user_enrolment_updated/user_suspended_course/data.json index 67afa3580..aa1811f1f 100644 --- a/tests/core/user_enrolment_updated/user_suspended_course/data.json +++ b/tests/core/user_enrolment_updated/user_suspended_course/data.json @@ -1,14 +1,14 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test@test.com" }, { - "email": "test@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test@test.com" } ], "user_enrolments": [ diff --git a/tests/core/user_enrolment_updated/user_suspended_course/event.json b/tests/core/user_enrolment_updated/user_suspended_course/event.json index 5066f24f9..adaf0a751 100644 --- a/tests/core/user_enrolment_updated/user_suspended_course/event.json +++ b/tests/core/user_enrolment_updated/user_suspended_course/event.json @@ -1,11 +1,11 @@ { "courseid": 2, - "eventname": "\\core\\event\\user_enrolment_updated", "id": 1, "objectid": 1, + "relateduserid": 2, + "userid": 1, + "eventname": "\\core\\event\\user_enrolment_updated", "objecttable": "user_enrolments", "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", - "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/user_enrolment_updated/user_suspended_course/statements.json b/tests/core/user_enrolment_updated/user_suspended_course/statements.json index a1d87a7db..cecce8493 100644 --- a/tests/core/user_enrolment_updated/user_suspended_course/statements.json +++ b/tests/core/user_enrolment_updated/user_suspended_course/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname2" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/suspended", + "display": { + "en": "Suspended" + } + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -39,22 +55,6 @@ "name": "test_fullname1" }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/cmi5/activitytype/course" - }, - "id": "http://www.example.org/course/view.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Suspended" - }, - "id": "https://w3id.org/xapi/tla/verbs/suspended" } } ] diff --git a/tests/core/user_loggedin/existing_user_loggedin/data.json b/tests/core/user_loggedin/existing_user_loggedin/data.json index 4e1f072a1..13de62cac 100644 --- a/tests/core/user_loggedin/existing_user_loggedin/data.json +++ b/tests/core/user_loggedin/existing_user_loggedin/data.json @@ -1,9 +1,9 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/user_loggedin/existing_user_loggedin/event.json b/tests/core/user_loggedin/existing_user_loggedin/event.json index 9285ca419..64731b18f 100644 --- a/tests/core/user_loggedin/existing_user_loggedin/event.json +++ b/tests/core/user_loggedin/existing_user_loggedin/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\user_loggedin", "id": 1, "objectid": 1, - "objecttable": "course", "relateduserid": null, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core\\event\\user_loggedin", + "objecttable": "course", + "timecreated": 1433946701 } diff --git a/tests/core/user_loggedin/existing_user_loggedin/statements.json b/tests/core/user_loggedin/existing_user_loggedin/statements.json index 450809461..6bee27375 100644 --- a/tests/core/user_loggedin/existing_user_loggedin/statements.json +++ b/tests/core/user_loggedin/existing_user_loggedin/statements.json @@ -7,32 +7,32 @@ }, "name": "test_fullname" }, - "context": { - "extensions": { - "http://lrs.learninglocker.net/define/extensions/info": { - "event_function": "\\src\\transformer\\events\\core\\user_loggedin", - "event_name": "\\core\\event\\user_loggedin", - "http://moodle.org": "1.0.0", - "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" - } - }, - "language": "en" + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/login", + "display": { + "en": "Logged In" + } }, "object": { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" }, - "verb": { - "display": { - "en": "Logged In" + "context": { + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\user_loggedin", + "event_name": "\\core\\event\\user_loggedin", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/login" + "language": "en" } } ] diff --git a/tests/core/user_loggedinas/existing_user_loggedinas/data.json b/tests/core/user_loggedinas/existing_user_loggedinas/data.json index 2f6b7f08a..0b0e7b25a 100644 --- a/tests/core/user_loggedinas/existing_user_loggedinas/data.json +++ b/tests/core/user_loggedinas/existing_user_loggedinas/data.json @@ -1,14 +1,14 @@ { "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/core/user_loggedinas/existing_user_loggedinas/event.json b/tests/core/user_loggedinas/existing_user_loggedinas/event.json index 0c86cc0c4..8b28bec13 100644 --- a/tests/core/user_loggedinas/existing_user_loggedinas/event.json +++ b/tests/core/user_loggedinas/existing_user_loggedinas/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\core\\event\\user_loggedinas", "id": 1, "objectid": 1, - "objecttable": "user", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core\\event\\user_loggedinas", + "objecttable": "user", + "timecreated": 1433946701 } diff --git a/tests/core/user_loggedinas/existing_user_loggedinas/statements.json b/tests/core/user_loggedinas/existing_user_loggedinas/statements.json index b7cba7d4f..611fde06e 100644 --- a/tests/core/user_loggedinas/existing_user_loggedinas/statements.json +++ b/tests/core/user_loggedinas/existing_user_loggedinas/statements.json @@ -7,6 +7,22 @@ }, "name": "test_fullname1" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/login", + "display": { + "en": "Logged In" + } + }, + "object": { + "id": "http://www.example.org", + "definition": { + "name": { + "en": "test_site_fullname" + }, + "type": "http://id.tincanapi.com/activitytype/lms" + }, + "objectType": "Activity" + }, "context": { "extensions": { "http://lrs.learninglocker.net/define/extensions/info": { @@ -24,22 +40,6 @@ } }, "language": "en" - }, - "object": { - "id": "http://www.example.org", - "objectType": "Activity", - "definition": { - "name": { - "en": "test_site_fullname" - }, - "type": "http://id.tincanapi.com/activitytype/lms" - } - }, - "verb": { - "display": { - "en": "Logged In" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/login" } } ] diff --git a/tests/core/user_loggedout/existing_user_loggedout/data.json b/tests/core/user_loggedout/existing_user_loggedout/data.json index 4e1f072a1..13de62cac 100644 --- a/tests/core/user_loggedout/existing_user_loggedout/data.json +++ b/tests/core/user_loggedout/existing_user_loggedout/data.json @@ -1,9 +1,9 @@ { "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" } ] } diff --git a/tests/core/user_loggedout/existing_user_loggedout/event.json b/tests/core/user_loggedout/existing_user_loggedout/event.json index 6c7f4eb4a..96f2b5fa7 100644 --- a/tests/core/user_loggedout/existing_user_loggedout/event.json +++ b/tests/core/user_loggedout/existing_user_loggedout/event.json @@ -1,9 +1,9 @@ { "courseid": 2, - "eventname": "\\core\\event\\user_loggedout", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\core\\event\\user_loggedout", "objecttable": "course", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/core/user_loggedout/existing_user_loggedout/statements.json b/tests/core/user_loggedout/existing_user_loggedout/statements.json index e45488bba..c870c60a8 100644 --- a/tests/core/user_loggedout/existing_user_loggedout/statements.json +++ b/tests/core/user_loggedout/existing_user_loggedout/statements.json @@ -7,32 +7,32 @@ }, "name": "test_fullname" }, - "context": { - "extensions": { - "http://lrs.learninglocker.net/define/extensions/info": { - "event_function": "\\src\\transformer\\events\\core\\user_loggedout", - "event_name": "\\core\\event\\user_loggedout", - "http://moodle.org": "1.0.0", - "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" - } - }, - "language": "en" + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/logout", + "display": { + "en": "Logged Out" + } }, "object": { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" }, - "verb": { - "display": { - "en": "Logged Out" + "context": { + "extensions": { + "http://lrs.learninglocker.net/define/extensions/info": { + "event_function": "\\src\\transformer\\events\\core\\user_loggedout", + "event_name": "\\core\\event\\user_loggedout", + "http://moodle.org": "1.0.0", + "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" + } }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/logout" + "language": "en" } } ] diff --git a/tests/core_h5p/course_module_viewed/event.json b/tests/core_h5p/course_module_viewed/event.json index 570211e2c..6f9f8e44f 100644 --- a/tests/core_h5p/course_module_viewed/event.json +++ b/tests/core_h5p/course_module_viewed/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\core_h5p\\event\\h5p_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\core_h5p\\event\\h5p_viewed", + "timecreated": 1433946701 } diff --git a/tests/core_h5p/course_module_viewed/statements.json b/tests/core_h5p/course_module_viewed/statements.json index a9fdac3f8..53e6bbd2d 100644 --- a/tests/core_h5p/course_module_viewed/statements.json +++ b/tests/core_h5p/course_module_viewed/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/h5pactivity/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/media" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/media" - }, - "id": "http://www.example.org/mod/h5pactivity/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/data.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/data.json index cbd7edb43..9bc612ee4 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/data.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/data.json @@ -7,26 +7,26 @@ ], "assignfeedback_comments": [ { + "id": 1, "assignment": 1, "commenttext": "test_comment_text", - "grade": 1, - "id": 1 + "grade": 1 } ], "grade": [ { - "assignment": 1, - "grade": 1, "id": 1, - "userid": 2 + "userid": 2, + "assignment": 1, + "grade": 1 } ], "grade_items": [ { + "id": 1, "grademax": 2, "grademin": 0, "gradepass": 1, - "id": 1, "iteminstance": 1, "itemmodule": "assign" } @@ -39,14 +39,14 @@ ], "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test2_fullname", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/event.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/event.json index e3fb81e0d..796142c50 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/event.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_assign\\event\\submission_graded", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_assign\\event\\submission_graded", "objecttable": "grade", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/statements.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/statements.json index 780fc1f56..167da1b65 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/statements.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_comment/statements.json @@ -7,49 +7,65 @@ }, "name": "test2_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/scored", + "display": { + "en": "Scored" + } + }, + "object": { + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, - "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -71,16 +87,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_name Submission" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" - }, - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity" - }, "result": { "response": "test_comment_text", "score": { @@ -90,12 +96,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Scored" - }, - "id": "https://w3id.org/xapi/tla/verbs/scored" } } ] diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/data.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/data.json index db220b29d..d6c898277 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/data.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/data.json @@ -8,18 +8,18 @@ "assignfeedback_comments": [], "grade": [ { - "assignment": 1, - "grade": 1, "id": 1, - "userid": 2 + "userid": 2, + "assignment": 1, + "grade": 1 } ], "grade_items": [ { + "id": 1, "grademax": 2, "grademin": 0, "gradepass": 1, - "id": 1, "iteminstance": 1, "itemmodule": "assign" } @@ -32,14 +32,14 @@ ], "user": [ { - "email": "test@test.com", + "id": 1, "firstname": "test_fullname", - "id": 1 + "email": "test@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test2_fullname", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/event.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/event.json index e3fb81e0d..796142c50 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/event.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_assign\\event\\submission_graded", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_assign\\event\\submission_graded", "objecttable": "grade", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/statements.json b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/statements.json index 8f7ba207d..4de786634 100644 --- a/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/statements.json +++ b/tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/statements.json @@ -7,49 +7,65 @@ }, "name": "test2_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/scored", + "display": { + "en": "Scored" + } + }, + "object": { + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, - "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -71,16 +87,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_name Submission" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" - }, - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity" - }, "result": { "score": { "max": 2.0, @@ -89,12 +95,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Scored" - }, - "id": "https://w3id.org/xapi/tla/verbs/scored" } } ] diff --git a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/data.json b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/data.json index b2a562763..3edbed4fe 100644 --- a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/data.json +++ b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/data.json @@ -7,8 +7,8 @@ ], "assign_submission": [ { - "assignment": 1, - "id": 1 + "id": 1, + "assignment": 1 } ], "modules": [ diff --git a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/event.json b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/event.json index 210e992b8..1d3272f19 100644 --- a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/event.json +++ b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_assign\\event\\assessable_submitted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_assign\\event\\assessable_submitted", "objecttable": "assignment_submissions", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json index 3d7188b85..c62b64b71 100644 --- a/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json +++ b/tests/mod_assign/assignment_submitted/existing_assignment_submitted/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, - "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name Submission" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" - }, - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/schema/1.0/submit" } } ] diff --git a/tests/mod_assign/course_module_viewed/existing_module/event.json b/tests/mod_assign/course_module_viewed/existing_module/event.json index 308305f8c..0e7b877b3 100644 --- a/tests/mod_assign/course_module_viewed/existing_module/event.json +++ b/tests/mod_assign/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_assign\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_assign\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_assign/course_module_viewed/existing_module/statements.json b/tests/mod_assign/course_module_viewed/existing_module/statements.json index a1068ed7a..96efabad3 100644 --- a/tests/mod_assign/course_module_viewed/existing_module/statements.json +++ b/tests/mod_assign/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/assign/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" - }, - "id": "http://www.example.org/mod/assign/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_assign/feedback_viewed/user_viewed_feedback/data.json b/tests/mod_assign/feedback_viewed/user_viewed_feedback/data.json index c11238ba7..7166e0342 100644 --- a/tests/mod_assign/feedback_viewed/user_viewed_feedback/data.json +++ b/tests/mod_assign/feedback_viewed/user_viewed_feedback/data.json @@ -7,8 +7,8 @@ ], "assign_grades": [ { - "grader": 2, - "id": 1 + "id": 1, + "grader": 2 } ], "modules": [ @@ -19,14 +19,14 @@ ], "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/mod_assign/feedback_viewed/user_viewed_feedback/event.json b/tests/mod_assign/feedback_viewed/user_viewed_feedback/event.json index 6f1b7bf75..288c9dd12 100644 --- a/tests/mod_assign/feedback_viewed/user_viewed_feedback/event.json +++ b/tests/mod_assign/feedback_viewed/user_viewed_feedback/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_assign\\event\\feedback_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_assign\\event\\feedback_viewed", "objecttable": "assign_grades", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_assign/feedback_viewed/user_viewed_feedback/statements.json b/tests/mod_assign/feedback_viewed/user_viewed_feedback/statements.json index d63426d05..5a6c712d5 100644 --- a/tests/mod_assign/feedback_viewed/user_viewed_feedback/statements.json +++ b/tests/mod_assign/feedback_viewed/user_viewed_feedback/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname1" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/assign/view.php?id=1#feedback", + "definition": { + "name": { + "en": "test_name Feedback" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, - "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -70,22 +86,6 @@ "name": "test_fullname2" }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name Feedback" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" - }, - "id": "http://www.example.org/mod/assign/view.php?id=1#feedback", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_assign/submission_locked/data.json b/tests/mod_assign/submission_locked/data.json index 7bac6385b..28115c02f 100644 --- a/tests/mod_assign/submission_locked/data.json +++ b/tests/mod_assign/submission_locked/data.json @@ -7,8 +7,8 @@ ], "assign_submission": [ { - "assignment": 1, - "id": 1 + "id": 1, + "assignment": 1 } ], "modules": [ @@ -19,14 +19,14 @@ ], "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/mod_assign/submission_locked/event.json b/tests/mod_assign/submission_locked/event.json index 0a597d2af..18dac8800 100644 --- a/tests/mod_assign/submission_locked/event.json +++ b/tests/mod_assign/submission_locked/event.json @@ -1,12 +1,12 @@ { - "action": "locked", "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_assign\\event\\submission_locked", "id": 1, "objectid": 1, - "objecttable": "assign", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_assign\\event\\submission_locked", + "action": "locked", + "objecttable": "assign", + "timecreated": 1433946701 } diff --git a/tests/mod_assign/submission_locked/statements.json b/tests/mod_assign/submission_locked/statements.json index 4c21278ab..7d2cba7f6 100644 --- a/tests/mod_assign/submission_locked/statements.json +++ b/tests/mod_assign/submission_locked/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname1" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/locked", + "display": { + "en": "Locked" + } + }, + "object": { + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, - "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -70,22 +86,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name Submission" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" - }, - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Locked" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/locked" } } ] diff --git a/tests/mod_assign/submission_unlocked/data.json b/tests/mod_assign/submission_unlocked/data.json index 7bac6385b..28115c02f 100644 --- a/tests/mod_assign/submission_unlocked/data.json +++ b/tests/mod_assign/submission_unlocked/data.json @@ -7,8 +7,8 @@ ], "assign_submission": [ { - "assignment": 1, - "id": 1 + "id": 1, + "assignment": 1 } ], "modules": [ @@ -19,14 +19,14 @@ ], "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/mod_assign/submission_unlocked/event.json b/tests/mod_assign/submission_unlocked/event.json index 66ea7adf0..47ec8487b 100644 --- a/tests/mod_assign/submission_unlocked/event.json +++ b/tests/mod_assign/submission_unlocked/event.json @@ -1,12 +1,12 @@ { - "action": "unlocked", "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_assign\\event\\submission_unlocked", "id": 1, "objectid": 1, - "objecttable": "assign", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_assign\\event\\submission_unlocked", + "action": "unlocked", + "objecttable": "assign", + "timecreated": 1433946701 } diff --git a/tests/mod_assign/submission_unlocked/statements.json b/tests/mod_assign/submission_unlocked/statements.json index 38ff094c7..adb939c5f 100644 --- a/tests/mod_assign/submission_unlocked/statements.json +++ b/tests/mod_assign/submission_unlocked/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname1" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unlocked", + "display": { + "en": "Unocked" + } + }, + "object": { + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, - "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -70,22 +86,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name Submission" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" - }, - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Unocked" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unlocked" } } ] diff --git a/tests/mod_assign/submission_viewed/data.json b/tests/mod_assign/submission_viewed/data.json index 7bac6385b..28115c02f 100644 --- a/tests/mod_assign/submission_viewed/data.json +++ b/tests/mod_assign/submission_viewed/data.json @@ -7,8 +7,8 @@ ], "assign_submission": [ { - "assignment": 1, - "id": 1 + "id": 1, + "assignment": 1 } ], "modules": [ @@ -19,14 +19,14 @@ ], "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/mod_assign/submission_viewed/event.json b/tests/mod_assign/submission_viewed/event.json index dc89af31a..43181bcab 100644 --- a/tests/mod_assign/submission_viewed/event.json +++ b/tests/mod_assign/submission_viewed/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_assign\\event\\submission_viewed", "id": 1, "objectid": 1, - "objecttable": "assign", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_assign\\event\\submission_viewed", + "objecttable": "assign", + "timecreated": 1433946701 } diff --git a/tests/mod_assign/submission_viewed/statements.json b/tests/mod_assign/submission_viewed/statements.json index db780b89b..4bbebe2af 100644 --- a/tests/mod_assign/submission_viewed/statements.json +++ b/tests/mod_assign/submission_viewed/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname1" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/assign/view.php?id=1#submission", + "definition": { + "name": { + "en": "test_name Submission" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/assign/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/assignment" }, - "id": "http://www.example.org/mod/assign/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -70,22 +86,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name Submission" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/submission" - }, - "id": "http://www.example.org/mod/assign/view.php?id=1#submission", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_bigbluebuttonbn/activity_management_viewed/event.json b/tests/mod_bigbluebuttonbn/activity_management_viewed/event.json index 78ab44a1a..57972e8d8 100644 --- a/tests/mod_bigbluebuttonbn/activity_management_viewed/event.json +++ b/tests/mod_bigbluebuttonbn/activity_management_viewed/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\activity_management_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\activity_management_viewed", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/activity_management_viewed/statements.json b/tests/mod_bigbluebuttonbn/activity_management_viewed/statements.json index d447f6051..74f6f8817 100644 --- a/tests/mod_bigbluebuttonbn/activity_management_viewed/statements.json +++ b/tests/mod_bigbluebuttonbn/activity_management_viewed/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_bigbluebuttonbn/live_session/event.json b/tests/mod_bigbluebuttonbn/live_session/event.json index 5828a3013..480235824 100644 --- a/tests/mod_bigbluebuttonbn/live_session/event.json +++ b/tests/mod_bigbluebuttonbn/live_session/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\live_session_event", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\live_session_event", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/live_session/statements.json b/tests/mod_bigbluebuttonbn/live_session/statements.json index 3bfd38da3..5abb78fc3 100644 --- a/tests/mod_bigbluebuttonbn/live_session/statements.json +++ b/tests/mod_bigbluebuttonbn/live_session/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/live", + "display": { + "en": "Live" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Live" - }, - "id": "http://id.tincanapi.com/verb/live" } } ] diff --git a/tests/mod_bigbluebuttonbn/meeting_created/event.json b/tests/mod_bigbluebuttonbn/meeting_created/event.json index 381262a2f..3ddfd97fd 100644 --- a/tests/mod_bigbluebuttonbn/meeting_created/event.json +++ b/tests/mod_bigbluebuttonbn/meeting_created/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_created", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/meeting_created/statements.json b/tests/mod_bigbluebuttonbn/meeting_created/statements.json index f7956e698..bbe4bab04 100644 --- a/tests/mod_bigbluebuttonbn/meeting_created/statements.json +++ b/tests/mod_bigbluebuttonbn/meeting_created/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/schema/1.0/create" } } ] diff --git a/tests/mod_bigbluebuttonbn/meeting_ended/event.json b/tests/mod_bigbluebuttonbn/meeting_ended/event.json index 361e7cf26..0d4795786 100644 --- a/tests/mod_bigbluebuttonbn/meeting_ended/event.json +++ b/tests/mod_bigbluebuttonbn/meeting_ended/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_ended", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_ended", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/meeting_ended/statements.json b/tests/mod_bigbluebuttonbn/meeting_ended/statements.json index c05326bfb..53068b4d4 100644 --- a/tests/mod_bigbluebuttonbn/meeting_ended/statements.json +++ b/tests/mod_bigbluebuttonbn/meeting_ended/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/adjourned", + "display": { + "en": "Adjourned" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Adjourned" - }, - "id": "http://id.tincanapi.com/verb/adjourned" } } ] diff --git a/tests/mod_bigbluebuttonbn/meeting_joined/event.json b/tests/mod_bigbluebuttonbn/meeting_joined/event.json index eda0e5679..e65d3acfc 100644 --- a/tests/mod_bigbluebuttonbn/meeting_joined/event.json +++ b/tests/mod_bigbluebuttonbn/meeting_joined/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_joined", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_joined", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/meeting_joined/statements.json b/tests/mod_bigbluebuttonbn/meeting_joined/statements.json index 01e45dc87..ad6eb6038 100644 --- a/tests/mod_bigbluebuttonbn/meeting_joined/statements.json +++ b/tests/mod_bigbluebuttonbn/meeting_joined/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/join", + "display": { + "en": "Joined" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Joined" - }, - "id": "http://activitystrea.ms/schema/1.0/join" } } ] diff --git a/tests/mod_bigbluebuttonbn/meeting_left/event.json b/tests/mod_bigbluebuttonbn/meeting_left/event.json index 425abb5ce..9fcad42f2 100644 --- a/tests/mod_bigbluebuttonbn/meeting_left/event.json +++ b/tests/mod_bigbluebuttonbn/meeting_left/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_left", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_left", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/meeting_left/statements.json b/tests/mod_bigbluebuttonbn/meeting_left/statements.json index 002d5e221..c8c9480d6 100644 --- a/tests/mod_bigbluebuttonbn/meeting_left/statements.json +++ b/tests/mod_bigbluebuttonbn/meeting_left/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/leave", + "display": { + "en": "Left" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Left" - }, - "id": "http://activitystrea.ms/schema/1.0/leave" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_deleted/event.json b/tests/mod_bigbluebuttonbn/recording_deleted/event.json index 6773c866a..935b5f031 100644 --- a/tests/mod_bigbluebuttonbn/recording_deleted/event.json +++ b/tests/mod_bigbluebuttonbn/recording_deleted/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_deleted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_deleted", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/recording_deleted/statements.json b/tests/mod_bigbluebuttonbn/recording_deleted/statements.json index 366416258..b763e3166 100644 --- a/tests/mod_bigbluebuttonbn/recording_deleted/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_deleted/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/dod-isd/verbs/deleted", + "display": { + "en": "Deleted" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Deleted" - }, - "id": "https://w3id.org/xapi/dod-isd/verbs/deleted" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_edited/event.json b/tests/mod_bigbluebuttonbn/recording_edited/event.json index 6773c866a..935b5f031 100644 --- a/tests/mod_bigbluebuttonbn/recording_edited/event.json +++ b/tests/mod_bigbluebuttonbn/recording_edited/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_deleted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_deleted", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/recording_edited/statements.json b/tests/mod_bigbluebuttonbn/recording_edited/statements.json index 366416258..b763e3166 100644 --- a/tests/mod_bigbluebuttonbn/recording_edited/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_edited/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/dod-isd/verbs/deleted", + "display": { + "en": "Deleted" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Deleted" - }, - "id": "https://w3id.org/xapi/dod-isd/verbs/deleted" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_imported/event.json b/tests/mod_bigbluebuttonbn/recording_imported/event.json index 5aacc2661..9b8fb14fb 100644 --- a/tests/mod_bigbluebuttonbn/recording_imported/event.json +++ b/tests/mod_bigbluebuttonbn/recording_imported/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_imported", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_imported", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/recording_imported/statements.json b/tests/mod_bigbluebuttonbn/recording_imported/statements.json index 378ad655d..b36959d59 100644 --- a/tests/mod_bigbluebuttonbn/recording_imported/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_imported/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/imported", + "display": { + "en": "Imported" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Imported" - }, - "id": "http://adlnet.gov/expapi/verbs/imported" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_protected/event.json b/tests/mod_bigbluebuttonbn/recording_protected/event.json index 7ff06f774..e4bca90bb 100644 --- a/tests/mod_bigbluebuttonbn/recording_protected/event.json +++ b/tests/mod_bigbluebuttonbn/recording_protected/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_protected", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_protected", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/recording_protected/statements.json b/tests/mod_bigbluebuttonbn/recording_protected/statements.json index 4913ae36f..e5625ed94 100644 --- a/tests/mod_bigbluebuttonbn/recording_protected/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_protected/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/secured", + "display": { + "en": "Secured" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Secured" - }, - "id": "http://id.tincanapi.com/verb/secured" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_published/event.json b/tests/mod_bigbluebuttonbn/recording_published/event.json index 812859d75..1634a44dc 100644 --- a/tests/mod_bigbluebuttonbn/recording_published/event.json +++ b/tests/mod_bigbluebuttonbn/recording_published/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_published", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_published", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/recording_published/statements.json b/tests/mod_bigbluebuttonbn/recording_published/statements.json index 7a7f2eee4..32b3fe11f 100644 --- a/tests/mod_bigbluebuttonbn/recording_published/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_published/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/dod-isd/verbs/published", + "display": { + "en": "Published" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Published" - }, - "id": "https://w3id.org/xapi/dod-isd/verbs/published" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_unprotected/event.json b/tests/mod_bigbluebuttonbn/recording_unprotected/event.json index 29a0a17bc..efba7e5c9 100644 --- a/tests/mod_bigbluebuttonbn/recording_unprotected/event.json +++ b/tests/mod_bigbluebuttonbn/recording_unprotected/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_unprotected", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_unprotected", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json b/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json index 5f4830b39..425cb43f4 100644 --- a/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_unprotected/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/unsecured", + "display": { + "en": "Unsecured" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Unsecured" - }, - "id": "http://id.tincanapi.com/verb/unsecured" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_unpublished/event.json b/tests/mod_bigbluebuttonbn/recording_unpublished/event.json index b81e86968..2b5f8422f 100644 --- a/tests/mod_bigbluebuttonbn/recording_unpublished/event.json +++ b/tests/mod_bigbluebuttonbn/recording_unpublished/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_unpublished", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_unpublished", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json b/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json index 781f7a147..eb987749c 100644 --- a/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_unpublished/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/retract", + "display": { + "en": "Retracted" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Retracted" - }, - "id": "http://activitystrea.ms/schema/1.0/retract" } } ] diff --git a/tests/mod_bigbluebuttonbn/recording_viewed/event.json b/tests/mod_bigbluebuttonbn/recording_viewed/event.json index cbf5cec5b..9f0e1aa5f 100644 --- a/tests/mod_bigbluebuttonbn/recording_viewed/event.json +++ b/tests/mod_bigbluebuttonbn/recording_viewed/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_bigbluebuttonbn\\event\\recording_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_bigbluebuttonbn\\event\\recording_viewed", "objecttable": "bigbluebuttonbn", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_bigbluebuttonbn/recording_viewed/statements.json b/tests/mod_bigbluebuttonbn/recording_viewed/statements.json index 6c243a133..7a091cb8e 100644 --- a/tests/mod_bigbluebuttonbn/recording_viewed/statements.json +++ b/tests/mod_bigbluebuttonbn/recording_viewed/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", + "definition": { + "name": { + "en": "test_bigbluebuttonbn_name" + }, + "type": "http://adlnet.gov/expapi/activities/meeting" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_bigbluebuttonbn_name" - }, - "type": "http://adlnet.gov/expapi/activities/meeting" - }, - "id": "http://www.example.org/mod/bigbluebuttonbn/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_book/chapter_created/data.json b/tests/mod_book/chapter_created/data.json index cf73c42eb..046e4ff7b 100644 --- a/tests/mod_book/chapter_created/data.json +++ b/tests/mod_book/chapter_created/data.json @@ -8,8 +8,8 @@ "book_chapters": [ { "bookid": "1", - "content": "

test_book_chapter_content

", "id": 1, + "content": "

test_book_chapter_content

", "pagenum": "1", "subchapter": "0", "title": "test_book_chapter_title" diff --git a/tests/mod_book/chapter_created/event.json b/tests/mod_book/chapter_created/event.json index a882d1bb1..64d3ce76d 100644 --- a/tests/mod_book/chapter_created/event.json +++ b/tests/mod_book/chapter_created/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_book\\event\\chapter_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_book\\event\\chapter_created", "objecttable": "book_chapters", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_book/chapter_created/statements.json b/tests/mod_book/chapter_created/statements.json index 7b23f1df8..617d21dee 100644 --- a/tests/mod_book/chapter_created/statements.json +++ b/tests/mod_book/chapter_created/statements.json @@ -7,49 +7,68 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", + "definition": { + "description": { + "en": "test_book_chapter_content" + }, + "name": { + "en": "test_book_chapter_title" + }, + "type": "http://id.tincanapi.com/activitytype/chapter" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/book/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "http://id.tincanapi.com/activitytype/book" }, - "id": "http://www.example.org/mod/book/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,25 +82,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_book_chapter_content" - }, - "name": { - "en": "test_book_chapter_title" - }, - "type": "http://id.tincanapi.com/activitytype/chapter" - }, - "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/data.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/data.json index ff34002e7..7134a5429 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/data.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/data.json @@ -8,16 +8,16 @@ "book_chapters": [ { "bookid": 1, - "content": "

test_parent_content

", "id": 1, + "content": "

test_parent_content

", "pagenum": 1, "subchapter": 0, "title": "test_parent_name" }, { "bookid": 1, - "content": "

test_book_chapter_content

", "id": 2, + "content": "

test_book_chapter_content

", "pagenum": 2, "subchapter": 1, "title": "test_book_chapter_title" diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/event.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/event.json index 4c7e5dcd0..c88eb6fe7 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/event.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_book\\event\\chapter_viewed", "id": 1, "objectid": 2, + "userid": 1, + "eventname": "\\mod_book\\event\\chapter_viewed", "objecttable": "book_chapters", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/statements.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/statements.json index 80d88a431..d56e5c0cf 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/statements.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/statements.json @@ -7,22 +7,42 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=2", + "definition": { + "description": { + "en": "test_book_chapter_content" + }, + "name": { + "en": "test_book_chapter_title" + }, + "type": "http://id.tincanapi.com/activitytype/chapter" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", "definition": { "description": { "en": "test_parent_content" @@ -32,37 +52,36 @@ }, "type": "http://id.tincanapi.com/activitytype/chapter" }, - "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/book/view.php?id=1", "definition": { "name": { "en": "test_book_name" }, "type": "http://id.tincanapi.com/activitytype/book" }, - "id": "http://www.example.org/mod/book/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -76,25 +95,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_book_chapter_content" - }, - "name": { - "en": "test_book_chapter_title" - }, - "type": "http://id.tincanapi.com/activitytype/chapter" - }, - "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/data.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/data.json index d9b9e5a9c..be2e4ee6d 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/data.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/data.json @@ -8,8 +8,8 @@ "book_chapters": [ { "bookid": "1", - "content": "

test_book_chapter_content

", "id": 1, + "content": "

test_book_chapter_content

", "pagenum": "1", "subchapter": "0", "title": "test_book_chapter_title" diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/event.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/event.json index fb5d4a0f4..d2436d94b 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/event.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_book\\event\\chapter_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_book\\event\\chapter_viewed", "objecttable": "book_chapters", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/statements.json b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/statements.json index c8d6c3cac..f4de8aa46 100644 --- a/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/statements.json +++ b/tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/statements.json @@ -7,49 +7,68 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", + "definition": { + "description": { + "en": "test_book_chapter_content" + }, + "name": { + "en": "test_book_chapter_title" + }, + "type": "http://id.tincanapi.com/activitytype/chapter" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/book/view.php?id=1", "definition": { "name": { "en": "test_book_name" }, "type": "http://id.tincanapi.com/activitytype/book" }, - "id": "http://www.example.org/mod/book/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,25 +82,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_book_chapter_content" - }, - "name": { - "en": "test_book_chapter_title" - }, - "type": "http://id.tincanapi.com/activitytype/chapter" - }, - "id": "http://www.example.org/mod/book/view.php?id=1&chapterid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_book/course_module_viewed/existing_module/event.json b/tests/mod_book/course_module_viewed/existing_module/event.json index fcd6e6702..387061150 100644 --- a/tests/mod_book/course_module_viewed/existing_module/event.json +++ b/tests/mod_book/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_book\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_book\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_book/course_module_viewed/existing_module/statements.json b/tests/mod_book/course_module_viewed/existing_module/statements.json index 577e3f529..60f386b4b 100644 --- a/tests/mod_book/course_module_viewed/existing_module/statements.json +++ b/tests/mod_book/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/book/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/book" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://id.tincanapi.com/activitytype/book" - }, - "id": "http://www.example.org/mod/book/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_chat/course_module_viewed/existing_module/event.json b/tests/mod_chat/course_module_viewed/existing_module/event.json index 7c3d0e362..21fe64aed 100644 --- a/tests/mod_chat/course_module_viewed/existing_module/event.json +++ b/tests/mod_chat/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_chat\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_chat\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_chat/course_module_viewed/existing_module/statements.json b/tests/mod_chat/course_module_viewed/existing_module/statements.json index 1c54b7fd3..40f921d73 100644 --- a/tests/mod_chat/course_module_viewed/existing_module/statements.json +++ b/tests/mod_chat/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/chat/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/chat-channel" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://id.tincanapi.com/activitytype/chat-channel" - }, - "id": "http://www.example.org/mod/chat/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_choice/answer_created/data.json b/tests/mod_choice/answer_created/data.json index 16c29ff50..9baaa0eca 100644 --- a/tests/mod_choice/answer_created/data.json +++ b/tests/mod_choice/answer_created/data.json @@ -2,8 +2,8 @@ "choice": [ { "id": 1, - "intro": "

That is the question.

", - "name": "To be or not to be?" + "name": "To be or not to be?", + "intro": "

That is the question.

" } ], "choice_answers": [ diff --git a/tests/mod_choice/answer_created/event.json b/tests/mod_choice/answer_created/event.json index 02544bc32..fbe7dea65 100644 --- a/tests/mod_choice/answer_created/event.json +++ b/tests/mod_choice/answer_created/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_choice\\event\\answer_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_choice\\event\\answer_created", "objecttable": "choice_answers", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_choice/answer_created/statements.json b/tests/mod_choice/answer_created/statements.json index 24aee77d4..2f45bcab1 100644 --- a/tests/mod_choice/answer_created/statements.json +++ b/tests/mod_choice/answer_created/statements.json @@ -7,39 +7,76 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/choice/view.php?id=1", + "definition": { + "choices": [ + { + "id": "to-be", + "description": { + "en": "To be" + } + }, + { + "id": "not-to-be", + "description": { + "en": "Not to be" + } + } + ], + "correctResponsesPattern": [ + "to-be[,]not-to-be" + ], + "description": { + "en": "That is the question." + }, + "interactionType": "choice", + "name": { + "en": "To be or not to be?" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -54,45 +91,8 @@ }, "language": "en" }, - "object": { - "definition": { - "choices": [ - { - "description": { - "en": "To be" - }, - "id": "to-be" - }, - { - "description": { - "en": "Not to be" - }, - "id": "not-to-be" - } - ], - "correctResponsesPattern": [ - "to-be[,]not-to-be" - ], - "description": { - "en": "That is the question." - }, - "interactionType": "choice", - "name": { - "en": "To be or not to be?" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/choice/view.php?id=1", - "objectType": "Activity" - }, "result": { "response": "To be" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_choice/course_module_viewed/existing_module/data.json b/tests/mod_choice/course_module_viewed/existing_module/data.json index c04d3a8d3..fc6db066a 100644 --- a/tests/mod_choice/course_module_viewed/existing_module/data.json +++ b/tests/mod_choice/course_module_viewed/existing_module/data.json @@ -2,8 +2,8 @@ "choice": [ { "id": 1, - "intro": "

That is the question.

", - "name": "To be or not to be?" + "name": "To be or not to be?", + "intro": "

That is the question.

" } ], "choice_answers": [ diff --git a/tests/mod_choice/course_module_viewed/existing_module/event.json b/tests/mod_choice/course_module_viewed/existing_module/event.json index 4563e814e..06f6c0389 100644 --- a/tests/mod_choice/course_module_viewed/existing_module/event.json +++ b/tests/mod_choice/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_choice\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_choice\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_choice/course_module_viewed/existing_module/statements.json b/tests/mod_choice/course_module_viewed/existing_module/statements.json index 393364c65..b8e1a94d2 100644 --- a/tests/mod_choice/course_module_viewed/existing_module/statements.json +++ b/tests/mod_choice/course_module_viewed/existing_module/statements.json @@ -7,39 +7,76 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/choice/view.php?id=1", + "definition": { + "choices": [ + { + "id": "to-be", + "description": { + "en": "To be" + } + }, + { + "id": "not-to-be", + "description": { + "en": "Not to be" + } + } + ], + "correctResponsesPattern": [ + "to-be[,]not-to-be" + ], + "description": { + "en": "That is the question." + }, + "interactionType": "choice", + "name": { + "en": "To be or not to be?" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,43 +90,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "choices": [ - { - "description": { - "en": "To be" - }, - "id": "to-be" - }, - { - "description": { - "en": "Not to be" - }, - "id": "not-to-be" - } - ], - "correctResponsesPattern": [ - "to-be[,]not-to-be" - ], - "description": { - "en": "That is the question." - }, - "interactionType": "choice", - "name": { - "en": "To be or not to be?" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/choice/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_data/course_module_viewed/existing_module/event.json b/tests/mod_data/course_module_viewed/existing_module/event.json index 078dcd9a8..78379e47c 100644 --- a/tests/mod_data/course_module_viewed/existing_module/event.json +++ b/tests/mod_data/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_data\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_data\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_data/course_module_viewed/existing_module/statements.json b/tests/mod_data/course_module_viewed/existing_module/statements.json index bfe19a6d3..612eb052c 100644 --- a/tests/mod_data/course_module_viewed/existing_module/statements.json +++ b/tests/mod_data/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/data/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://xapi.org.au/contentprofile/activitytype/database" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://xapi.org.au/contentprofile/activitytype/database" - }, - "id": "http://www.example.org/mod/data/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/event.json b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/event.json index 913d66095..8fa817ecc 100644 --- a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/event.json +++ b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_facetoface\\event\\cancel_booking", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_facetoface\\event\\cancel_booking", "objecttable": "facetoface", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json index 1be3e09b0..bd73e7d09 100644 --- a/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json +++ b/tests/mod_facetoface/cancel_booking/existing_booking_cancelled/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/unregistered", + "display": { + "en": "Unregistered" + } + }, + "object": { + "id": "http://www.example.org/mod/facetoface/view.php?id=1", + "definition": { + "name": { + "en": "test_facetoface_name" + }, + "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_facetoface_name" - }, - "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" - }, - "id": "http://www.example.org/mod/facetoface/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Unregistered" - }, - "id": "http://id.tincanapi.com/verb/unregistered" } } ] diff --git a/tests/mod_facetoface/course_module_viewed/existing_module/event.json b/tests/mod_facetoface/course_module_viewed/existing_module/event.json index b2560b333..16e1cccdf 100644 --- a/tests/mod_facetoface/course_module_viewed/existing_module/event.json +++ b/tests/mod_facetoface/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_facetoface\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_facetoface\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_facetoface/course_module_viewed/existing_module/statements.json b/tests/mod_facetoface/course_module_viewed/existing_module/statements.json index bfe06d0d4..e9684e50b 100644 --- a/tests/mod_facetoface/course_module_viewed/existing_module/statements.json +++ b/tests/mod_facetoface/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/facetoface/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" - }, - "id": "http://www.example.org/mod/facetoface/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_facetoface/signup_success/existing_signup_success/event.json b/tests/mod_facetoface/signup_success/existing_signup_success/event.json index 2865e4b7d..5336a1d1a 100644 --- a/tests/mod_facetoface/signup_success/existing_signup_success/event.json +++ b/tests/mod_facetoface/signup_success/existing_signup_success/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_facetoface\\event\\signup_success", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_facetoface\\event\\signup_success", "objecttable": "facetoface", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_facetoface/signup_success/existing_signup_success/statements.json b/tests/mod_facetoface/signup_success/existing_signup_success/statements.json index 2eaf3e514..3e2958e4e 100644 --- a/tests/mod_facetoface/signup_success/existing_signup_success/statements.json +++ b/tests/mod_facetoface/signup_success/existing_signup_success/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/registered", + "display": { + "en": "Registered" + } + }, + "object": { + "id": "http://www.example.org/mod/facetoface/view.php?id=1", + "definition": { + "name": { + "en": "test_facetoface_name" + }, + "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_facetoface_name" - }, - "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" - }, - "id": "http://www.example.org/mod/facetoface/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Registered" - }, - "id": "http://adlnet.gov/expapi/verbs/registered" } } ] diff --git a/tests/mod_facetoface/take_attendance/existing_attendance_taken/data.json b/tests/mod_facetoface/take_attendance/existing_attendance_taken/data.json index 93d0b234e..30d31b9a6 100644 --- a/tests/mod_facetoface/take_attendance/existing_attendance_taken/data.json +++ b/tests/mod_facetoface/take_attendance/existing_attendance_taken/data.json @@ -7,8 +7,8 @@ ], "facetoface_sessions": [ { - "facetoface": 1, - "id": 1 + "id": 1, + "facetoface": 1 } ], "facetoface_sessions_dates": [ @@ -42,14 +42,14 @@ ], "user": [ { - "email": "instructor@test.com", + "id": 1, "firstname": "test_instructor_name", - "id": 1 + "email": "instructor@test.com" }, { - "email": "attendee@test.com", + "id": 2, "firstname": "test_attendee_name", - "id": 2 + "email": "attendee@test.com" } ] } diff --git a/tests/mod_facetoface/take_attendance/existing_attendance_taken/event.json b/tests/mod_facetoface/take_attendance/existing_attendance_taken/event.json index 662b51719..06ae28217 100644 --- a/tests/mod_facetoface/take_attendance/existing_attendance_taken/event.json +++ b/tests/mod_facetoface/take_attendance/existing_attendance_taken/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_facetoface\\event\\take_attendance", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_facetoface\\event\\take_attendance", "objecttable": "facetoface", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json b/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json index 531f33f6e..ca1746e79 100644 --- a/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json +++ b/tests/mod_facetoface/take_attendance/existing_attendance_taken/statements.json @@ -7,39 +7,55 @@ }, "name": "test_attendee_name" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/attended", + "display": { + "en": "Attended" + } + }, + "object": { + "id": "http://www.example.org/mod/facetoface/view.php?id=1", + "definition": { + "name": { + "en": "test_facetoface_name" + }, + "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -61,25 +77,9 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_facetoface_name" - }, - "type": "https://w3id.org/xapi/acrossx/activities/face-to-face-discussion" - }, - "id": "http://www.example.org/mod/facetoface/view.php?id=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT0S" - }, - "verb": { - "display": { - "en": "Attended" - }, - "id": "http://adlnet.gov/expapi/verbs/attended" } } ] diff --git a/tests/mod_feedback/course_module_viewed/viewing_feedback/event.json b/tests/mod_feedback/course_module_viewed/viewing_feedback/event.json index 3a9da48a3..cce9860e6 100644 --- a/tests/mod_feedback/course_module_viewed/viewing_feedback/event.json +++ b/tests/mod_feedback/course_module_viewed/viewing_feedback/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_feedback\\event\\course_module_viewed", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_feedback\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_feedback/course_module_viewed/viewing_feedback/statements.json b/tests/mod_feedback/course_module_viewed/viewing_feedback/statements.json index 9e9737deb..f261582cc 100644 --- a/tests/mod_feedback/course_module_viewed/viewing_feedback/statements.json +++ b/tests/mod_feedback/course_module_viewed/viewing_feedback/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" - }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_feedback/response_submitted/multichoice/data.json b/tests/mod_feedback/response_submitted/multichoice/data.json index bbf94b5ce..2343e6842 100644 --- a/tests/mod_feedback/response_submitted/multichoice/data.json +++ b/tests/mod_feedback/response_submitted/multichoice/data.json @@ -7,24 +7,24 @@ ], "feedback_completed": [ { + "id": 1, "anonymous_response": 0, - "feedback": 1, - "id": 1 + "feedback": 1 } ], "feedback_item": [ { - "feedback": 1, "id": 1, "name": "test_feedback_item", + "feedback": 1, "presentation": "r>>>>>test_choice_1\n|test_choice_2\n|test_choice_3", "typ": "multichoice" } ], "feedback_value": [ { - "completed": 1, "id": 1, + "completed": 1, "item": 1, "value": "2" } diff --git a/tests/mod_feedback/response_submitted/multichoice/event.json b/tests/mod_feedback/response_submitted/multichoice/event.json index b0ba554b4..f91fa58b4 100644 --- a/tests/mod_feedback/response_submitted/multichoice/event.json +++ b/tests/mod_feedback/response_submitted/multichoice/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_feedback\\event\\response_submitted", + "timecreated": 1433946701 } diff --git a/tests/mod_feedback/response_submitted/multichoice/statements.json b/tests/mod_feedback/response_submitted/multichoice/statements.json index 13a5b3df8..bba6fca04 100644 --- a/tests/mod_feedback/response_submitted/multichoice/statements.json +++ b/tests/mod_feedback/response_submitted/multichoice/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "definition": { + "name": { + "en": "test_feedback_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_feedback_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" - }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/schema/1.0/submit" } }, { @@ -79,49 +79,89 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "definition": { + "choices": [ + { + "id": "test-choice-1", + "description": { + "en": "test_choice_1" + } + }, + { + "id": "test-choice-2", + "description": { + "en": "test_choice_2" + } + }, + { + "id": "test-choice-3", + "description": { + "en": "test_choice_3" + } + } + ], + "correctResponsesPattern": [ + "test-choice-1[,]test-choice-2[,]test-choice-3" + ], + "interactionType": "choice", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { "name": { "en": "test_feedback_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -136,52 +176,12 @@ }, "language": "en" }, - "object": { - "definition": { - "choices": [ - { - "description": { - "en": "test_choice_1" - }, - "id": "test-choice-1" - }, - { - "description": { - "en": "test_choice_2" - }, - "id": "test-choice-2" - }, - { - "description": { - "en": "test_choice_3" - }, - "id": "test-choice-3" - } - ], - "correctResponsesPattern": [ - "test-choice-1[,]test-choice-2[,]test-choice-3" - ], - "interactionType": "choice", - "name": { - "en": "test_feedback_item" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { "http://learninglocker.net/xapi/cmi/choice/response": "test_choice_2" }, "response": "test_choice_2" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/multichoicerated/data.json b/tests/mod_feedback/response_submitted/multichoicerated/data.json index 56856b841..a90f9027d 100644 --- a/tests/mod_feedback/response_submitted/multichoicerated/data.json +++ b/tests/mod_feedback/response_submitted/multichoicerated/data.json @@ -7,24 +7,24 @@ ], "feedback_completed": [ { + "id": 1, "anonymous_response": 0, - "feedback": 1, - "id": 1 + "feedback": 1 } ], "feedback_item": [ { - "feedback": 1, "id": 1, "name": "test_feedback_item", + "feedback": 1, "presentation": "r>>>>>3####test_choice_1|2####test_choice_2|1####test_choice_3", "typ": "multichoicerated" } ], "feedback_value": [ { - "completed": 1, "id": 1, + "completed": 1, "item": 1, "value": "3" } diff --git a/tests/mod_feedback/response_submitted/multichoicerated/event.json b/tests/mod_feedback/response_submitted/multichoicerated/event.json index b0ba554b4..f91fa58b4 100644 --- a/tests/mod_feedback/response_submitted/multichoicerated/event.json +++ b/tests/mod_feedback/response_submitted/multichoicerated/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_feedback\\event\\response_submitted", + "timecreated": 1433946701 } diff --git a/tests/mod_feedback/response_submitted/multichoicerated/statements.json b/tests/mod_feedback/response_submitted/multichoicerated/statements.json index 2889baf6f..d1214b601 100644 --- a/tests/mod_feedback/response_submitted/multichoicerated/statements.json +++ b/tests/mod_feedback/response_submitted/multichoicerated/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "definition": { + "name": { + "en": "test_feedback_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_feedback_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" - }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/schema/1.0/submit" } }, { @@ -79,49 +79,89 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "definition": { + "choices": [ + { + "id": "test-choice-1", + "description": { + "en": "test_choice_1" + } + }, + { + "id": "test-choice-2", + "description": { + "en": "test_choice_2" + } + }, + { + "id": "test-choice-3", + "description": { + "en": "test_choice_3" + } + } + ], + "correctResponsesPattern": [ + "test-choice-1[,]test-choice-2[,]test-choice-3" + ], + "interactionType": "choice", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { "name": { "en": "test_feedback_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -136,40 +176,6 @@ }, "language": "en" }, - "object": { - "definition": { - "choices": [ - { - "description": { - "en": "test_choice_1" - }, - "id": "test-choice-1" - }, - { - "description": { - "en": "test_choice_2" - }, - "id": "test-choice-2" - }, - { - "description": { - "en": "test_choice_3" - }, - "id": "test-choice-3" - } - ], - "correctResponsesPattern": [ - "test-choice-1[,]test-choice-2[,]test-choice-3" - ], - "interactionType": "choice", - "name": { - "en": "test_feedback_item" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { @@ -177,12 +183,6 @@ "http://learninglocker.net/xapi/moodle/feedback_item_rating": 1 }, "response": "test_choice_3" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/no_items/data.json b/tests/mod_feedback/response_submitted/no_items/data.json index 1262c2a5b..6e5c60fef 100644 --- a/tests/mod_feedback/response_submitted/no_items/data.json +++ b/tests/mod_feedback/response_submitted/no_items/data.json @@ -7,9 +7,9 @@ ], "feedback_completed": [ { + "id": 1, "anonymous_response": 0, - "feedback": 1, - "id": 1 + "feedback": 1 } ], "feedback_value": [], diff --git a/tests/mod_feedback/response_submitted/no_items/event.json b/tests/mod_feedback/response_submitted/no_items/event.json index b0ba554b4..f91fa58b4 100644 --- a/tests/mod_feedback/response_submitted/no_items/event.json +++ b/tests/mod_feedback/response_submitted/no_items/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_feedback\\event\\response_submitted", + "timecreated": 1433946701 } diff --git a/tests/mod_feedback/response_submitted/no_items/statements.json b/tests/mod_feedback/response_submitted/no_items/statements.json index b7906d0bd..3c251372f 100644 --- a/tests/mod_feedback/response_submitted/no_items/statements.json +++ b/tests/mod_feedback/response_submitted/no_items/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "definition": { + "name": { + "en": "test_feedback_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_feedback_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" - }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/schema/1.0/submit" } } ] diff --git a/tests/mod_feedback/response_submitted/numerical/data.json b/tests/mod_feedback/response_submitted/numerical/data.json index c43a35397..b530b4eca 100644 --- a/tests/mod_feedback/response_submitted/numerical/data.json +++ b/tests/mod_feedback/response_submitted/numerical/data.json @@ -7,24 +7,24 @@ ], "feedback_completed": [ { + "id": 1, "anonymous_response": 0, - "feedback": 1, - "id": 1 + "feedback": 1 } ], "feedback_item": [ { - "feedback": 1, "id": 1, "name": "test_feedback_item", + "feedback": 1, "presentation": "0|10", "typ": "numeric" } ], "feedback_value": [ { - "completed": 1, "id": 1, + "completed": 1, "item": 1, "value": "3" } diff --git a/tests/mod_feedback/response_submitted/numerical/event.json b/tests/mod_feedback/response_submitted/numerical/event.json index b0ba554b4..f91fa58b4 100644 --- a/tests/mod_feedback/response_submitted/numerical/event.json +++ b/tests/mod_feedback/response_submitted/numerical/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_feedback\\event\\response_submitted", + "timecreated": 1433946701 } diff --git a/tests/mod_feedback/response_submitted/numerical/statements.json b/tests/mod_feedback/response_submitted/numerical/statements.json index 2765ecc2c..6aacca587 100644 --- a/tests/mod_feedback/response_submitted/numerical/statements.json +++ b/tests/mod_feedback/response_submitted/numerical/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "definition": { + "name": { + "en": "test_feedback_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_feedback_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" - }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/schema/1.0/submit" } }, { @@ -79,49 +79,69 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "definition": { + "correctResponsesPattern": [ + "0[:]10" + ], + "interactionType": "numeric", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { "name": { "en": "test_feedback_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -136,32 +156,12 @@ }, "language": "en" }, - "object": { - "definition": { - "correctResponsesPattern": [ - "0[:]10" - ], - "interactionType": "numeric", - "name": { - "en": "test_feedback_item" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { "http://learninglocker.net/xapi/cmi/numeric/response": 3 }, "response": "3" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/textarea/data.json b/tests/mod_feedback/response_submitted/textarea/data.json index 0e4a678e3..a1d99e353 100644 --- a/tests/mod_feedback/response_submitted/textarea/data.json +++ b/tests/mod_feedback/response_submitted/textarea/data.json @@ -7,23 +7,23 @@ ], "feedback_completed": [ { + "id": 1, "anonymous_response": 0, - "feedback": 1, - "id": 1 + "feedback": 1 } ], "feedback_item": [ { - "feedback": 1, "id": 1, "name": "test_feedback_item", + "feedback": 1, "typ": "textarea" } ], "feedback_value": [ { - "completed": 1, "id": 1, + "completed": 1, "item": 1, "value": "test_long_text_answer" } diff --git a/tests/mod_feedback/response_submitted/textarea/event.json b/tests/mod_feedback/response_submitted/textarea/event.json index b0ba554b4..f91fa58b4 100644 --- a/tests/mod_feedback/response_submitted/textarea/event.json +++ b/tests/mod_feedback/response_submitted/textarea/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_feedback\\event\\response_submitted", + "timecreated": 1433946701 } diff --git a/tests/mod_feedback/response_submitted/textarea/statements.json b/tests/mod_feedback/response_submitted/textarea/statements.json index 20d5c2784..85d74ef83 100644 --- a/tests/mod_feedback/response_submitted/textarea/statements.json +++ b/tests/mod_feedback/response_submitted/textarea/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "definition": { + "name": { + "en": "test_feedback_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_feedback_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" - }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/schema/1.0/submit" } }, { @@ -79,49 +79,66 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "definition": { + "interactionType": "long-fill-in", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { "name": { "en": "test_feedback_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -136,26 +153,9 @@ }, "language": "en" }, - "object": { - "definition": { - "interactionType": "long-fill-in", - "name": { - "en": "test_feedback_item" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", - "objectType": "Activity" - }, "result": { "completion": true, "response": "test_long_text_answer" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/textarea_anon/data.json b/tests/mod_feedback/response_submitted/textarea_anon/data.json index 2f5d8d285..01ac31ab5 100644 --- a/tests/mod_feedback/response_submitted/textarea_anon/data.json +++ b/tests/mod_feedback/response_submitted/textarea_anon/data.json @@ -7,23 +7,23 @@ ], "feedback_completed": [ { + "id": 1, "anonymous_response": 1, - "feedback": 1, - "id": 1 + "feedback": 1 } ], "feedback_item": [ { - "feedback": 1, "id": 1, "name": "test_feedback_item", + "feedback": 1, "typ": "textarea" } ], "feedback_value": [ { - "completed": 1, "id": 1, + "completed": 1, "item": 1, "value": "test_long_text_answer" } diff --git a/tests/mod_feedback/response_submitted/textarea_anon/event.json b/tests/mod_feedback/response_submitted/textarea_anon/event.json index b0ba554b4..f91fa58b4 100644 --- a/tests/mod_feedback/response_submitted/textarea_anon/event.json +++ b/tests/mod_feedback/response_submitted/textarea_anon/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_feedback\\event\\response_submitted", + "timecreated": 1433946701 } diff --git a/tests/mod_feedback/response_submitted/textarea_anon/statements.json b/tests/mod_feedback/response_submitted/textarea_anon/statements.json index eb2c3228f..76cedc2af 100644 --- a/tests/mod_feedback/response_submitted/textarea_anon/statements.json +++ b/tests/mod_feedback/response_submitted/textarea_anon/statements.json @@ -7,39 +7,55 @@ }, "name": "Anonymous Course Participant" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "definition": { + "name": { + "en": "test_feedback_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_feedback_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" - }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/schema/1.0/submit" } }, { @@ -79,49 +79,66 @@ }, "name": "Anonymous Course Participant" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "definition": { + "interactionType": "long-fill-in", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { "name": { "en": "test_feedback_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -136,26 +153,9 @@ }, "language": "en" }, - "object": { - "definition": { - "interactionType": "long-fill-in", - "name": { - "en": "test_feedback_item" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", - "objectType": "Activity" - }, "result": { "completion": true, "response": "test_long_text_answer" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/textfield/data.json b/tests/mod_feedback/response_submitted/textfield/data.json index b889726f6..cd71aae3f 100644 --- a/tests/mod_feedback/response_submitted/textfield/data.json +++ b/tests/mod_feedback/response_submitted/textfield/data.json @@ -7,23 +7,23 @@ ], "feedback_completed": [ { + "id": 1, "anonymous_response": 0, - "feedback": 1, - "id": 1 + "feedback": 1 } ], "feedback_item": [ { - "feedback": 1, "id": 1, "name": "test_feedback_item", + "feedback": 1, "typ": "textfield" } ], "feedback_value": [ { - "completed": 1, "id": 1, + "completed": 1, "item": 1, "value": "test_short_text_answer" } diff --git a/tests/mod_feedback/response_submitted/textfield/event.json b/tests/mod_feedback/response_submitted/textfield/event.json index b0ba554b4..f91fa58b4 100644 --- a/tests/mod_feedback/response_submitted/textfield/event.json +++ b/tests/mod_feedback/response_submitted/textfield/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_feedback\\event\\response_submitted", + "timecreated": 1433946701 } diff --git a/tests/mod_feedback/response_submitted/textfield/statements.json b/tests/mod_feedback/response_submitted/textfield/statements.json index 592d115dd..37835b9b4 100644 --- a/tests/mod_feedback/response_submitted/textfield/statements.json +++ b/tests/mod_feedback/response_submitted/textfield/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "definition": { + "name": { + "en": "test_feedback_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_feedback_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" - }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/schema/1.0/submit" } }, { @@ -79,49 +79,66 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", + "definition": { + "interactionType": "fill-in", + "name": { + "en": "test_feedback_item" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/feedback/view.php?id=1", "definition": { "name": { "en": "test_feedback_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -136,26 +153,9 @@ }, "language": "en" }, - "object": { - "definition": { - "interactionType": "fill-in", - "name": { - "en": "test_feedback_item" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/feedback/edit_item.php?id=1", - "objectType": "Activity" - }, "result": { "completion": true, "response": "test_short_text_answer" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_feedback/response_submitted/unknown_typ/data.json b/tests/mod_feedback/response_submitted/unknown_typ/data.json index 2b371f1a3..756958564 100644 --- a/tests/mod_feedback/response_submitted/unknown_typ/data.json +++ b/tests/mod_feedback/response_submitted/unknown_typ/data.json @@ -7,23 +7,23 @@ ], "feedback_completed": [ { + "id": 1, "anonymous_response": 0, - "feedback": 1, - "id": 1 + "feedback": 1 } ], "feedback_item": [ { - "feedback": 1, "id": 1, "name": "test_feedback_item", + "feedback": 1, "typ": "unknown" } ], "feedback_value": [ { - "completed": 1, "id": 1, + "completed": 1, "item": 1 } ], diff --git a/tests/mod_feedback/response_submitted/unknown_typ/event.json b/tests/mod_feedback/response_submitted/unknown_typ/event.json index b0ba554b4..f91fa58b4 100644 --- a/tests/mod_feedback/response_submitted/unknown_typ/event.json +++ b/tests/mod_feedback/response_submitted/unknown_typ/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_feedback\\event\\response_submitted", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_feedback\\event\\response_submitted", + "timecreated": 1433946701 } diff --git a/tests/mod_feedback/response_submitted/unknown_typ/statements.json b/tests/mod_feedback/response_submitted/unknown_typ/statements.json index b7906d0bd..3c251372f 100644 --- a/tests/mod_feedback/response_submitted/unknown_typ/statements.json +++ b/tests/mod_feedback/response_submitted/unknown_typ/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/feedback/view.php?id=1", + "definition": { + "name": { + "en": "test_feedback_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_feedback_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/feedback" - }, - "id": "http://www.example.org/mod/feedback/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/schema/1.0/submit" } } ] diff --git a/tests/mod_folder/course_module_viewed/existing_module/event.json b/tests/mod_folder/course_module_viewed/existing_module/event.json index 4a9bee08a..309e3fdcd 100644 --- a/tests/mod_folder/course_module_viewed/existing_module/event.json +++ b/tests/mod_folder/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_folder\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_folder\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_folder/course_module_viewed/existing_module/statements.json b/tests/mod_folder/course_module_viewed/existing_module/statements.json index 27128be8d..cbb79ccd2 100644 --- a/tests/mod_folder/course_module_viewed/existing_module/statements.json +++ b/tests/mod_folder/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/folder/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://activitystrea.ms/collection" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://activitystrea.ms/collection" - }, - "id": "http://www.example.org/mod/folder/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_forum/course_module_viewed/existing_module/event.json b/tests/mod_forum/course_module_viewed/existing_module/event.json index b14384d02..74102e9c6 100644 --- a/tests/mod_forum/course_module_viewed/existing_module/event.json +++ b/tests/mod_forum/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_forum\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_forum\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_forum/course_module_viewed/existing_module/statements.json b/tests/mod_forum/course_module_viewed/existing_module/statements.json index 9de0b2cca..583e5317e 100644 --- a/tests/mod_forum/course_module_viewed/existing_module/statements.json +++ b/tests/mod_forum/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" - }, - "id": "http://www.example.org/mod/forum/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_forum/discussion_created/event.json b/tests/mod_forum/discussion_created/event.json index 01ce99cdc..e7eea34ea 100644 --- a/tests/mod_forum/discussion_created/event.json +++ b/tests/mod_forum/discussion_created/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_forum\\event\\discussion_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_forum\\event\\discussion_created", "objecttable": "forum", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_forum/discussion_created/statements.json b/tests/mod_forum/discussion_created/statements.json index 546e23787..90cf4fb15 100644 --- a/tests/mod_forum/discussion_created/statements.json +++ b/tests/mod_forum/discussion_created/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/create", + "display": { + "en": "Created" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/discuss.php?d=1", + "definition": { + "name": { + "en": "test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { "name": { "en": "test_forum_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, - "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_forum_discussion_name" - }, - "type": "http://id.tincanapi.com/activitytype/discussion" - }, - "id": "http://www.example.org/mod/forum/discuss.php?d=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Created" - }, - "id": "http://activitystrea.ms/create" } } ] diff --git a/tests/mod_forum/discussion_subcription_created/event.json b/tests/mod_forum/discussion_subcription_created/event.json index eb49d42ad..43c961f0e 100644 --- a/tests/mod_forum/discussion_subcription_created/event.json +++ b/tests/mod_forum/discussion_subcription_created/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_forum\\event\\discussion_subscription_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_forum\\event\\discussion_subscription_created", "objecttable": "forum", "other": "a:2:{s:10:\"discussion\";i:1;s:7:\"forumid\";i:1;}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_forum/discussion_subcription_created/statements.json b/tests/mod_forum/discussion_subcription_created/statements.json index 6c21a32f7..1e72f3dc1 100644 --- a/tests/mod_forum/discussion_subcription_created/statements.json +++ b/tests/mod_forum/discussion_subcription_created/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/subscribed", + "display": { + "en": "Subscribed" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/discuss.php?d=1", + "definition": { + "name": { + "en": "test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { "name": { "en": "test_forum_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, - "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_forum_discussion_name" - }, - "type": "http://id.tincanapi.com/activitytype/discussion" - }, - "id": "http://www.example.org/mod/forum/discuss.php?d=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Subscribed" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/subscribed" } } ] diff --git a/tests/mod_forum/discussion_subcription_deleted/event.json b/tests/mod_forum/discussion_subcription_deleted/event.json index 439f91f0f..e2c1d838d 100644 --- a/tests/mod_forum/discussion_subcription_deleted/event.json +++ b/tests/mod_forum/discussion_subcription_deleted/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_forum\\event\\discussion_subscription_deleted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_forum\\event\\discussion_subscription_deleted", "objecttable": "forum", "other": "a:2:{s:10:\"discussion\";i:1;s:7:\"forumid\";i:1;}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_forum/discussion_subcription_deleted/statements.json b/tests/mod_forum/discussion_subcription_deleted/statements.json index e6646722f..134968060 100644 --- a/tests/mod_forum/discussion_subcription_deleted/statements.json +++ b/tests/mod_forum/discussion_subcription_deleted/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unsubscribed", + "display": { + "en": "Unsubscribed" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/discuss.php?d=1", + "definition": { + "name": { + "en": "test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { "name": { "en": "test_forum_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, - "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_forum_discussion_name" - }, - "type": "http://id.tincanapi.com/activitytype/discussion" - }, - "id": "http://www.example.org/mod/forum/discuss.php?d=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Unsubscribed" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unsubscribed" } } ] diff --git a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/event.json b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/event.json index 014092504..c75fc7b1f 100644 --- a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/event.json +++ b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_forum\\event\\discussion_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_forum\\event\\discussion_viewed", "objecttable": "forum", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json index be23bed7d..91518dca3 100644 --- a/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json +++ b/tests/mod_forum/discussion_viewed/existing_discussion_viewed/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/discuss.php?d=1", + "definition": { + "name": { + "en": "test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { "name": { "en": "test_forum_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, - "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_forum_discussion_name" - }, - "type": "http://id.tincanapi.com/activitytype/discussion" - }, - "id": "http://www.example.org/mod/forum/discuss.php?d=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_forum/post_created/data.json b/tests/mod_forum/post_created/data.json index 31dea7255..9f4275456 100644 --- a/tests/mod_forum/post_created/data.json +++ b/tests/mod_forum/post_created/data.json @@ -13,8 +13,8 @@ ], "forum_posts": [ { - "discussion": 1, "id": 1, + "discussion": 1, "message": "
test_response_text
", "subject": "Re: test_forum_discussion_name" } diff --git a/tests/mod_forum/post_created/event.json b/tests/mod_forum/post_created/event.json index f136ae314..1b733605b 100644 --- a/tests/mod_forum/post_created/event.json +++ b/tests/mod_forum/post_created/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_forum\\event\\post_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_forum\\event\\post_created", "objecttable": "forum", "other": "a:3:{s:12:\"discussionid\";i:1;s:7:\"forumid\";i:2;s:9:\"forumtype\";s:7:\"general\";}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_forum/post_created/statements.json b/tests/mod_forum/post_created/statements.json index 1f340bd6b..991da93cd 100644 --- a/tests/mod_forum/post_created/statements.json +++ b/tests/mod_forum/post_created/statements.json @@ -7,59 +7,78 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/replied", + "display": { + "en": "Replied" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", + "definition": { + "description": { + "en": "test_response_text" + }, + "name": { + "en": "Re: test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/forum-reply" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/forum/discuss.php?d=1", "definition": { "name": { "en": "test_forum_discussion_name" }, "type": "http://id.tincanapi.com/activitytype/discussion" }, - "id": "http://www.example.org/mod/forum/discuss.php?d=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { "name": { "en": "test_forum_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, - "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -73,25 +92,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_response_text" - }, - "name": { - "en": "Re: test_forum_discussion_name" - }, - "type": "http://id.tincanapi.com/activitytype/forum-reply" - }, - "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Replied" - }, - "id": "http://id.tincanapi.com/verb/replied" } } ] diff --git a/tests/mod_forum/post_deleted/data.json b/tests/mod_forum/post_deleted/data.json index 31dea7255..9f4275456 100644 --- a/tests/mod_forum/post_deleted/data.json +++ b/tests/mod_forum/post_deleted/data.json @@ -13,8 +13,8 @@ ], "forum_posts": [ { - "discussion": 1, "id": 1, + "discussion": 1, "message": "
test_response_text
", "subject": "Re: test_forum_discussion_name" } diff --git a/tests/mod_forum/post_deleted/event.json b/tests/mod_forum/post_deleted/event.json index e8ee43efa..6ac84e424 100644 --- a/tests/mod_forum/post_deleted/event.json +++ b/tests/mod_forum/post_deleted/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_forum\\event\\post_deleted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_forum\\event\\post_deleted", "objecttable": "forum", "other": "a:3:{s:12:\"discussionid\";i:1;s:7:\"forumid\";i:2;s:9:\"forumtype\";s:7:\"general\";}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_forum/post_deleted/statements.json b/tests/mod_forum/post_deleted/statements.json index 56af68796..a61a410fb 100644 --- a/tests/mod_forum/post_deleted/statements.json +++ b/tests/mod_forum/post_deleted/statements.json @@ -7,59 +7,72 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/delete", + "display": { + "en": "Deleted" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", + "definition": { + "type": "http://id.tincanapi.com/activitytype/forum-reply" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/forum/discuss.php?d=1", "definition": { "name": { "en": "test_forum_discussion_name" }, "type": "http://id.tincanapi.com/activitytype/discussion" }, - "id": "http://www.example.org/mod/forum/discuss.php?d=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { "name": { "en": "test_forum_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, - "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -73,19 +86,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "type": "http://id.tincanapi.com/activitytype/forum-reply" - }, - "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Deleted" - }, - "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/mod_forum/post_updated/data.json b/tests/mod_forum/post_updated/data.json index 31dea7255..9f4275456 100644 --- a/tests/mod_forum/post_updated/data.json +++ b/tests/mod_forum/post_updated/data.json @@ -13,8 +13,8 @@ ], "forum_posts": [ { - "discussion": 1, "id": 1, + "discussion": 1, "message": "
test_response_text
", "subject": "Re: test_forum_discussion_name" } diff --git a/tests/mod_forum/post_updated/event.json b/tests/mod_forum/post_updated/event.json index 825c1fe8c..1720f6d7c 100644 --- a/tests/mod_forum/post_updated/event.json +++ b/tests/mod_forum/post_updated/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_forum\\event\\post_updated", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_forum\\event\\post_updated", "objecttable": "forum", "other": "a:3:{s:12:\"discussionid\";i:1;s:7:\"forumid\";i:2;s:9:\"forumtype\";s:7:\"general\";}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_forum/post_updated/statements.json b/tests/mod_forum/post_updated/statements.json index 021dd353b..a55a2e232 100644 --- a/tests/mod_forum/post_updated/statements.json +++ b/tests/mod_forum/post_updated/statements.json @@ -7,59 +7,78 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/acrossx/verbs/edited", + "display": { + "en": "Edited" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", + "definition": { + "description": { + "en": "test_response_text" + }, + "name": { + "en": "Re: test_forum_discussion_name" + }, + "type": "http://id.tincanapi.com/activitytype/forum-reply" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/forum/discuss.php?d=1", "definition": { "name": { "en": "test_forum_discussion_name" }, "type": "http://id.tincanapi.com/activitytype/discussion" }, - "id": "http://www.example.org/mod/forum/discuss.php?d=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/forum/view.php?id=1", "definition": { "name": { "en": "test_forum_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" }, - "id": "http://www.example.org/mod/forum/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -73,25 +92,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_response_text" - }, - "name": { - "en": "Re: test_forum_discussion_name" - }, - "type": "http://id.tincanapi.com/activitytype/forum-reply" - }, - "id": "http://www.example.org/mod/forum/discuss.php?d=1#p1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Edited" - }, - "id": "https://w3id.org/xapi/acrossx/verbs/edited" } } ] diff --git a/tests/mod_forum/subscription_created/event.json b/tests/mod_forum/subscription_created/event.json index f74022bc7..fb1a5df6c 100644 --- a/tests/mod_forum/subscription_created/event.json +++ b/tests/mod_forum/subscription_created/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_forum\\event\\subscription_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_forum\\event\\subscription_created", "objecttable": "forum", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_forum/subscription_created/statements.json b/tests/mod_forum/subscription_created/statements.json index 748814115..9705cbe43 100644 --- a/tests/mod_forum/subscription_created/statements.json +++ b/tests/mod_forum/subscription_created/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/subscribed", + "display": { + "en": "Subscribed" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/view.php?id=1", + "definition": { + "name": { + "en": "test_forum_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_forum_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" - }, - "id": "http://www.example.org/mod/forum/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Subscribed" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/subscribed" } } ] diff --git a/tests/mod_forum/subscription_deleted/event.json b/tests/mod_forum/subscription_deleted/event.json index 74b5fd687..a918f49c7 100644 --- a/tests/mod_forum/subscription_deleted/event.json +++ b/tests/mod_forum/subscription_deleted/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_forum\\event\\subscription_deleted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_forum\\event\\subscription_deleted", "objecttable": "forum", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_forum/subscription_deleted/statements.json b/tests/mod_forum/subscription_deleted/statements.json index 0150de999..d1a0d47ce 100644 --- a/tests/mod_forum/subscription_deleted/statements.json +++ b/tests/mod_forum/subscription_deleted/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unsubscribed", + "display": { + "en": "Unsubscribed" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/view.php?id=1", + "definition": { + "name": { + "en": "test_forum_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_forum_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/forum" - }, - "id": "http://www.example.org/mod/forum/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Unsubscribed" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/unsubscribed" } } ] diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed/data.json b/tests/mod_forum/user_report_viewed/existing_report_viewed/data.json index a57c8314e..2a27a4b2d 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed/data.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed/data.json @@ -1,14 +1,14 @@ { "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "loggedin_user_firstname", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "viewed_user_firstname", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed/event.json b/tests/mod_forum/user_report_viewed/existing_report_viewed/event.json index fab9d0a56..da2305ee7 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed/event.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed/event.json @@ -1,10 +1,10 @@ { "courseid": 2, - "eventname": "\\mod_forum\\event\\user_report_viewed", "id": 1, "objectid": null, - "objecttable": null, "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_forum\\event\\user_report_viewed", + "objecttable": null, + "timecreated": 1433946701 } diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json b/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json index 5b3032327..fed8db7ea 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed/statements.json @@ -7,29 +7,49 @@ }, "name": "loggedin_user_firstname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/user.php?id=2&course=2", + "definition": { + "extensions": { + "https://moodle.org/xapi/extensions/course_id": 2, + "https://moodle.org/xapi/extensions/user_id": 2 + }, + "name": { + "en": "forum posts of viewed_user_firstname" + }, + "type": "http://id.tincanapi.com/activitytype/user-profile" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -43,26 +63,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "extensions": { - "https://moodle.org/xapi/extensions/course_id": 2, - "https://moodle.org/xapi/extensions/user_id": 2 - }, - "name": { - "en": "forum posts of viewed_user_firstname" - }, - "type": "http://id.tincanapi.com/activitytype/user-profile" - }, - "id": "http://www.example.org/mod/forum/user.php?id=2&course=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/data.json b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/data.json index a57c8314e..2a27a4b2d 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/data.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/data.json @@ -1,14 +1,14 @@ { "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "loggedin_user_firstname", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "viewed_user_firstname", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/event.json b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/event.json index b6dca7dd1..14f278977 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/event.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/event.json @@ -1,10 +1,10 @@ { "courseid": 0, - "eventname": "\\mod_forum\\event\\user_report_viewed", "id": 1, "objectid": null, - "objecttable": null, "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_forum\\event\\user_report_viewed", + "objecttable": null, + "timecreated": 1433946701 } diff --git a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/statements.json b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/statements.json index 604faf6ad..ad223f15b 100644 --- a/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/statements.json +++ b/tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/statements.json @@ -7,18 +7,37 @@ }, "name": "loggedin_user_firstname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/forum/user.php?id=2", + "definition": { + "extensions": { + "https://moodle.org/xapi/extensions/user_id": 2 + }, + "name": { + "en": "forum posts of viewed_user_firstname" + }, + "type": "http://id.tincanapi.com/activitytype/user-profile" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -31,25 +50,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "extensions": { - "https://moodle.org/xapi/extensions/user_id": 2 - }, - "name": { - "en": "forum posts of viewed_user_firstname" - }, - "type": "http://id.tincanapi.com/activitytype/user-profile" - }, - "id": "http://www.example.org/mod/forum/user.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_glossary/comment_created/data.json b/tests/mod_glossary/comment_created/data.json index 748ee0eb3..8c9fe3d6b 100644 --- a/tests/mod_glossary/comment_created/data.json +++ b/tests/mod_glossary/comment_created/data.json @@ -1,9 +1,9 @@ { "comments": [ { - "content": "test_glossary_entry_comment_content", "id": 1, - "itemid": 1 + "itemid": 1, + "content": "test_glossary_entry_comment_content" } ], "glossary": [ @@ -14,10 +14,10 @@ ], "glossary_entries": [ { - "concept": "test_glossary_entry_name", - "definition": "test_glossary_entry_description", "glossaryid": 1, - "id": 1 + "id": 1, + "concept": "test_glossary_entry_name", + "definition": "test_glossary_entry_description" } ], "modules": [ diff --git a/tests/mod_glossary/comment_created/event.json b/tests/mod_glossary/comment_created/event.json index f1d287516..1d8233e59 100644 --- a/tests/mod_glossary/comment_created/event.json +++ b/tests/mod_glossary/comment_created/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_glossary\\event\\comment_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_glossary\\event\\comment_created", "objecttable": "comments", "other": "a:1:{s:6:\"itemid\";i:1;}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_glossary/comment_created/statements.json b/tests/mod_glossary/comment_created/statements.json index 2c9240fef..5778690ab 100644 --- a/tests/mod_glossary/comment_created/statements.json +++ b/tests/mod_glossary/comment_created/statements.json @@ -7,22 +7,42 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/commented", + "display": { + "en": "Commented" + } + }, + "object": { + "id": "http://www.example.org/mod/glossary/showentry.php?eid=1#c1", + "definition": { + "description": { + "en": "test_glossary_entry_comment_content" + }, + "name": { + "en": "RE: test_glossary_entry_name" + }, + "type": "http://activitystrea.ms/comment" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", "definition": { "description": { "en": "test_glossary_entry_description" @@ -32,37 +52,36 @@ }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary-entry" }, - "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/glossary/view.php?id=1", "definition": { "name": { "en": "test_glossary_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary" }, - "id": "http://www.example.org/mod/glossary/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -76,25 +95,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_glossary_entry_comment_content" - }, - "name": { - "en": "RE: test_glossary_entry_name" - }, - "type": "http://activitystrea.ms/comment" - }, - "id": "http://www.example.org/mod/glossary/showentry.php?eid=1#c1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Commented" - }, - "id": "http://adlnet.gov/expapi/verbs/commented" } } ] diff --git a/tests/mod_glossary/comment_deleted/data.json b/tests/mod_glossary/comment_deleted/data.json index df9a779a0..b72f386d5 100644 --- a/tests/mod_glossary/comment_deleted/data.json +++ b/tests/mod_glossary/comment_deleted/data.json @@ -7,10 +7,10 @@ ], "glossary_entries": [ { - "concept": "test_glossary_entry_name", - "definition": "test_glossary_entry_description", "glossaryid": 1, - "id": 1 + "id": 1, + "concept": "test_glossary_entry_name", + "definition": "test_glossary_entry_description" } ], "modules": [ diff --git a/tests/mod_glossary/comment_deleted/event.json b/tests/mod_glossary/comment_deleted/event.json index 18b25834f..0f53965b9 100644 --- a/tests/mod_glossary/comment_deleted/event.json +++ b/tests/mod_glossary/comment_deleted/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_glossary\\event\\comment_deleted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_glossary\\event\\comment_deleted", "objecttable": "comments", "other": "a:1:{s:6:\"itemid\";i:1;}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_glossary/comment_deleted/statements.json b/tests/mod_glossary/comment_deleted/statements.json index 65f71df32..43b2941ae 100644 --- a/tests/mod_glossary/comment_deleted/statements.json +++ b/tests/mod_glossary/comment_deleted/statements.json @@ -7,22 +7,39 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/delete", + "display": { + "en": "Deleted" + } + }, + "object": { + "id": "http://www.example.org/mod/glossary/showentry.php?eid=1#c1", + "definition": { + "name": { + "en": "RE: test_glossary_entry_name" + }, + "type": "http://activitystrea.ms/comment" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", "definition": { "description": { "en": "test_glossary_entry_description" @@ -32,37 +49,36 @@ }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary-entry" }, - "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/glossary/view.php?id=1", "definition": { "name": { "en": "test_glossary_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary" }, - "id": "http://www.example.org/mod/glossary/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -76,22 +92,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "RE: test_glossary_entry_name" - }, - "type": "http://activitystrea.ms/comment" - }, - "id": "http://www.example.org/mod/glossary/showentry.php?eid=1#c1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Deleted" - }, - "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/mod_glossary/course_module_viewed/existing_module/event.json b/tests/mod_glossary/course_module_viewed/existing_module/event.json index 89642b72a..264e49a98 100644 --- a/tests/mod_glossary/course_module_viewed/existing_module/event.json +++ b/tests/mod_glossary/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_glossary\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_glossary\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_glossary/course_module_viewed/existing_module/statements.json b/tests/mod_glossary/course_module_viewed/existing_module/statements.json index 2b6559ad3..b2377803c 100644 --- a/tests/mod_glossary/course_module_viewed/existing_module/statements.json +++ b/tests/mod_glossary/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/glossary/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary" - }, - "id": "http://www.example.org/mod/glossary/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_glossary/entry_viewed/data.json b/tests/mod_glossary/entry_viewed/data.json index df9a779a0..b72f386d5 100644 --- a/tests/mod_glossary/entry_viewed/data.json +++ b/tests/mod_glossary/entry_viewed/data.json @@ -7,10 +7,10 @@ ], "glossary_entries": [ { - "concept": "test_glossary_entry_name", - "definition": "test_glossary_entry_description", "glossaryid": 1, - "id": 1 + "id": 1, + "concept": "test_glossary_entry_name", + "definition": "test_glossary_entry_description" } ], "modules": [ diff --git a/tests/mod_glossary/entry_viewed/event.json b/tests/mod_glossary/entry_viewed/event.json index 623e3b83d..3db62d890 100644 --- a/tests/mod_glossary/entry_viewed/event.json +++ b/tests/mod_glossary/entry_viewed/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_glossary\\event\\entry_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_glossary\\event\\entry_viewed", "objecttable": "glossary_entries", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_glossary/entry_viewed/statements.json b/tests/mod_glossary/entry_viewed/statements.json index 3e4289f19..367c3dd84 100644 --- a/tests/mod_glossary/entry_viewed/statements.json +++ b/tests/mod_glossary/entry_viewed/statements.json @@ -7,49 +7,68 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", + "definition": { + "description": { + "en": "test_glossary_entry_description" + }, + "name": { + "en": "test_glossary_entry_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary-entry" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/glossary/view.php?id=1", "definition": { "name": { "en": "test_glossary_name" }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary" }, - "id": "http://www.example.org/mod/glossary/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,25 +82,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_glossary_entry_description" - }, - "name": { - "en": "test_glossary_entry_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/glossary-entry" - }, - "id": "http://www.example.org/mod/glossary/showentry.php?eid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_imscp/course_module_viewed/existing_module/event.json b/tests/mod_imscp/course_module_viewed/existing_module/event.json index b5d77f168..aca4e215a 100644 --- a/tests/mod_imscp/course_module_viewed/existing_module/event.json +++ b/tests/mod_imscp/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_imscp\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_imscp\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_imscp/course_module_viewed/existing_module/statements.json b/tests/mod_imscp/course_module_viewed/existing_module/statements.json index 88543b109..d9d3b7baa 100644 --- a/tests/mod_imscp/course_module_viewed/existing_module/statements.json +++ b/tests/mod_imscp/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/imscp/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/cmi5/activitytype/course" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/cmi5/activitytype/course" - }, - "id": "http://www.example.org/mod/imscp/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/content_page_viewed/data.json b/tests/mod_lesson/content_page_viewed/data.json index 418d6a7e6..239bcba0a 100644 --- a/tests/mod_lesson/content_page_viewed/data.json +++ b/tests/mod_lesson/content_page_viewed/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_pages": [ diff --git a/tests/mod_lesson/content_page_viewed/event.json b/tests/mod_lesson/content_page_viewed/event.json index 43ebe95f3..67fdfa01f 100644 --- a/tests/mod_lesson/content_page_viewed/event.json +++ b/tests/mod_lesson/content_page_viewed/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\content_page_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\content_page_viewed", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/content_page_viewed/statements.json b/tests/mod_lesson/content_page_viewed/statements.json index 872fb624d..5a98ed375 100644 --- a/tests/mod_lesson/content_page_viewed/statements.json +++ b/tests/mod_lesson/content_page_viewed/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "name": { + "en": "lesson_content_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/lesson-content-page" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "lesson_content_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/lesson-content-page" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/course_module_viewed/existing_module/event.json b/tests/mod_lesson/course_module_viewed/existing_module/event.json index 2a061b9a3..341d1e657 100644 --- a/tests/mod_lesson/course_module_viewed/existing_module/event.json +++ b/tests/mod_lesson/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_lesson\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/course_module_viewed/existing_module/statements.json b/tests/mod_lesson/course_module_viewed/existing_module/statements.json index f0920200b..eb4aded5a 100644 --- a/tests/mod_lesson/course_module_viewed/existing_module/statements.json +++ b/tests/mod_lesson/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/lesson" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/lesson" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/essay_assessed/data.json b/tests/mod_lesson/essay_assessed/data.json index a64d9edaa..630011565 100644 --- a/tests/mod_lesson/essay_assessed/data.json +++ b/tests/mod_lesson/essay_assessed/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -14,20 +14,20 @@ ], "lesson_attempts": [ { - "correct": 1, "id": 1, "lessonid": 1, "pageid": 1, + "userid": 1, + "correct": 1, "timeseen": "1731972680", - "useranswer": "O:8:\"stdClass\":7:{s:4:\"sent\";i:0;s:6:\"graded\";i:0;s:5:\"score\";i:1;s:6:\"answer\";s:30:\"lesson_question_essay_response\";s:12:\"answerformat\";s:1:\"1\";s:8:\"response\";s:20:\"essay_grade_response\";s:14:\"responseformat\";s:1:\"1\";}", - "userid": 1 + "useranswer": "O:8:\"stdClass\":7:{s:4:\"sent\";i:0;s:6:\"graded\";i:0;s:5:\"score\";i:1;s:6:\"answer\";s:30:\"lesson_question_essay_response\";s:12:\"answerformat\";s:1:\"1\";s:8:\"response\";s:20:\"essay_grade_response\";s:14:\"responseformat\";s:1:\"1\";}" } ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 10, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/essay_assessed/event.json b/tests/mod_lesson/essay_assessed/event.json index 2fed34ab2..8444d7c2f 100644 --- a/tests/mod_lesson/essay_assessed/event.json +++ b/tests/mod_lesson/essay_assessed/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\essay_assessed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\essay_assessed", "objecttable": "lesson_pages", "other": "a:2:{s:8:\"lessonid\";s:1:\"1\";s:9:\"attemptid\";i:1;}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/essay_assessed/statements.json b/tests/mod_lesson/essay_assessed/statements.json index 36d7bd491..819f50aa4 100644 --- a/tests/mod_lesson/essay_assessed/statements.json +++ b/tests/mod_lesson/essay_assessed/statements.json @@ -7,49 +7,69 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/dod-isd/verbs/assessed", + "display": { + "en": "Assessed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "long-fill-in", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -71,20 +91,6 @@ }, "language": "en" }, - "object": { - "definition": { - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "long-fill-in", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, "result": { "response": "essay_grade_response", "score": { @@ -93,12 +99,6 @@ "raw": 1, "scaled": 1 } - }, - "verb": { - "display": { - "en": "Assessed" - }, - "id": "https://w3id.org/xapi/dod-isd/verbs/assessed" } } ] diff --git a/tests/mod_lesson/lesson_ended/data.json b/tests/mod_lesson/lesson_ended/data.json index 4ba2480e9..abe2ba610 100644 --- a/tests/mod_lesson/lesson_ended/data.json +++ b/tests/mod_lesson/lesson_ended/data.json @@ -2,17 +2,17 @@ "grade_grades": [ { "itemid": 1, + "userid": 1, "rawgrade": 75, "rawgrademax": 100, "rawgrademin": 0, - "timemodified": 1731595610, - "userid": 1 + "timemodified": 1731595610 } ], "grade_items": [ { - "gradepass": 50, "id": 1, + "gradepass": 50, "iteminstance": 1, "itemmodule": "lesson" } @@ -20,8 +20,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "modules": [ diff --git a/tests/mod_lesson/lesson_ended/event.json b/tests/mod_lesson/lesson_ended/event.json index 50ae19c1c..3e1748f8a 100644 --- a/tests/mod_lesson/lesson_ended/event.json +++ b/tests/mod_lesson/lesson_ended/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\lesson_ended", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\lesson_ended", "objecttable": "lesson", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/lesson_ended/statements.json b/tests/mod_lesson/lesson_ended/statements.json index 481c6d3f1..9675b825b 100644 --- a/tests/mod_lesson/lesson_ended/statements.json +++ b/tests/mod_lesson/lesson_ended/statements.json @@ -7,49 +7,68 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", + "definition": { + "description": { + "en": "test_lesson_intro" + }, + "name": { + "en": "test_lesson" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,19 +83,6 @@ }, "language": "en" }, - "object": { - "definition": { - "description": { - "en": "test_lesson_intro" - }, - "name": { - "en": "test_lesson" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", - "objectType": "Activity" - }, "result": { "completion": true, "score": { @@ -86,12 +92,6 @@ "scaled": 0.5 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/mod_lesson/lesson_restarted/data.json b/tests/mod_lesson/lesson_restarted/data.json index b48b3684c..e0b000366 100644 --- a/tests/mod_lesson/lesson_restarted/data.json +++ b/tests/mod_lesson/lesson_restarted/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "modules": [ diff --git a/tests/mod_lesson/lesson_restarted/event.json b/tests/mod_lesson/lesson_restarted/event.json index 38568c06d..0870550c8 100644 --- a/tests/mod_lesson/lesson_restarted/event.json +++ b/tests/mod_lesson/lesson_restarted/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\lesson_restarted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\lesson_restarted", "objecttable": "lesson", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/lesson_restarted/statements.json b/tests/mod_lesson/lesson_restarted/statements.json index 20620200b..52721010c 100644 --- a/tests/mod_lesson/lesson_restarted/statements.json +++ b/tests/mod_lesson/lesson_restarted/statements.json @@ -7,49 +7,68 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/restarted", + "display": { + "en": "Restarted" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", + "definition": { + "description": { + "en": "test_lesson_intro" + }, + "name": { + "en": "test_lesson" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,25 +82,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_lesson_intro" - }, - "name": { - "en": "test_lesson" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Restarted" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/restarted" } } ] diff --git a/tests/mod_lesson/lesson_resumed/data.json b/tests/mod_lesson/lesson_resumed/data.json index b48b3684c..e0b000366 100644 --- a/tests/mod_lesson/lesson_resumed/data.json +++ b/tests/mod_lesson/lesson_resumed/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "modules": [ diff --git a/tests/mod_lesson/lesson_resumed/event.json b/tests/mod_lesson/lesson_resumed/event.json index 5172e3c2b..8d5739603 100644 --- a/tests/mod_lesson/lesson_resumed/event.json +++ b/tests/mod_lesson/lesson_resumed/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\lesson_resumed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\lesson_resumed", "objecttable": "lesson", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/lesson_resumed/statements.json b/tests/mod_lesson/lesson_resumed/statements.json index 101eaa406..75fe4c5cb 100644 --- a/tests/mod_lesson/lesson_resumed/statements.json +++ b/tests/mod_lesson/lesson_resumed/statements.json @@ -7,49 +7,68 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/resumed", + "display": { + "en": "Resumed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", + "definition": { + "description": { + "en": "test_lesson_intro" + }, + "name": { + "en": "test_lesson" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,25 +82,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_lesson_intro" - }, - "name": { - "en": "test_lesson" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Resumed" - }, - "id": "https://w3id.org/xapi/tla/verbs/resumed" } } ] diff --git a/tests/mod_lesson/lesson_started/data.json b/tests/mod_lesson/lesson_started/data.json index b48b3684c..e0b000366 100644 --- a/tests/mod_lesson/lesson_started/data.json +++ b/tests/mod_lesson/lesson_started/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "modules": [ diff --git a/tests/mod_lesson/lesson_started/event.json b/tests/mod_lesson/lesson_started/event.json index 11fef0471..3f54532ef 100644 --- a/tests/mod_lesson/lesson_started/event.json +++ b/tests/mod_lesson/lesson_started/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\lesson_started", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\lesson_started", "objecttable": "lesson", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/lesson_started/statements.json b/tests/mod_lesson/lesson_started/statements.json index 18d10342d..c8049c480 100644 --- a/tests/mod_lesson/lesson_started/statements.json +++ b/tests/mod_lesson/lesson_started/statements.json @@ -7,49 +7,68 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/start", + "display": { + "en": "Started" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", + "definition": { + "description": { + "en": "test_lesson_intro" + }, + "name": { + "en": "test_lesson" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,25 +82,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_lesson_intro" - }, - "name": { - "en": "test_lesson" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/lesson-session" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1#lesson", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Started" - }, - "id": "http://activitystrea.ms/start" } } ] diff --git a/tests/mod_lesson/question_answered/choice/data.json b/tests/mod_lesson/question_answered/choice/data.json index b1c259478..a6b6b5e03 100644 --- a/tests/mod_lesson/question_answered/choice/data.json +++ b/tests/mod_lesson/question_answered/choice/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -25,19 +25,19 @@ ], "lesson_attempts": [ { - "correct": 1, "lessonid": 1, "pageid": 1, + "userid": 1, + "correct": 1, "timeseen": "1731972680", - "useranswer": "a", - "userid": 1 + "useranswer": "a" } ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 3, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_answered/choice/event.json b/tests/mod_lesson/question_answered/choice/event.json index 271cac578..c29507c29 100644 --- a/tests/mod_lesson/question_answered/choice/event.json +++ b/tests/mod_lesson/question_answered/choice/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_answered", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_answered/choice/statements.json b/tests/mod_lesson/question_answered/choice/statements.json index 426595f6b..c9ef9a667 100644 --- a/tests/mod_lesson/question_answered/choice/statements.json +++ b/tests/mod_lesson/question_answered/choice/statements.json @@ -7,49 +7,92 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "choices": [ + { + "id": "a", + "description": { + "en": "a" + } + }, + { + "id": "b", + "description": { + "en": "b" + } + }, + { + "id": "c", + "description": { + "en": "c" + } + } + ], + "correctResponsesPattern": [ + "a[,]b" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "choice", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,52 +107,9 @@ }, "language": "en" }, - "object": { - "definition": { - "choices": [ - { - "description": { - "en": "a" - }, - "id": "a" - }, - { - "description": { - "en": "b" - }, - "id": "b" - }, - { - "description": { - "en": "c" - }, - "id": "c" - } - ], - "correctResponsesPattern": [ - "a[,]b" - ], - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "choice", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, "result": { "response": "a", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_answered/essay/data.json b/tests/mod_lesson/question_answered/essay/data.json index b408a1256..6a0a9ecf1 100644 --- a/tests/mod_lesson/question_answered/essay/data.json +++ b/tests/mod_lesson/question_answered/essay/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -14,19 +14,19 @@ ], "lesson_attempts": [ { - "correct": 0, "lessonid": 1, "pageid": 1, + "userid": 1, + "correct": 0, "timeseen": "1731972680", - "useranswer": "O:8:\"stdClass\":7:{s:4:\"sent\";i:0;s:6:\"graded\";i:0;s:5:\"score\";i:0;s:6:\"answer\";s:30:\"lesson_question_essay_response\";s:12:\"answerformat\";s:1:\"1\";s:8:\"response\";s:0:\"\";s:14:\"responseformat\";s:1:\"1\";}", - "userid": 1 + "useranswer": "O:8:\"stdClass\":7:{s:4:\"sent\";i:0;s:6:\"graded\";i:0;s:5:\"score\";i:0;s:6:\"answer\";s:30:\"lesson_question_essay_response\";s:12:\"answerformat\";s:1:\"1\";s:8:\"response\";s:0:\"\";s:14:\"responseformat\";s:1:\"1\";}" } ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 10, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_answered/essay/event.json b/tests/mod_lesson/question_answered/essay/event.json index 271cac578..c29507c29 100644 --- a/tests/mod_lesson/question_answered/essay/event.json +++ b/tests/mod_lesson/question_answered/essay/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_answered", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_answered/essay/statements.json b/tests/mod_lesson/question_answered/essay/statements.json index 07f1119d9..46227fa9c 100644 --- a/tests/mod_lesson/question_answered/essay/statements.json +++ b/tests/mod_lesson/question_answered/essay/statements.json @@ -7,49 +7,69 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "long-fill-in", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,28 +84,8 @@ }, "language": "en" }, - "object": { - "definition": { - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "long-fill-in", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, "result": { "response": "lesson_question_essay_response" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_answered/matching/data.json b/tests/mod_lesson/question_answered/matching/data.json index bdf172eea..7ca0d74b0 100644 --- a/tests/mod_lesson/question_answered/matching/data.json +++ b/tests/mod_lesson/question_answered/matching/data.json @@ -2,41 +2,41 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ { - "answer": "A", "id": 1, "pageid": 1, + "answer": "A", "response": "Apple", "score": 0 }, { - "answer": "B", "id": 2, "pageid": 1, + "answer": "B", "response": "Banana", "score": 0 } ], "lesson_attempts": [ { - "correct": 1, "lessonid": 1, "pageid": 1, + "userid": 1, + "correct": 1, "timeseen": "1731972680", - "useranswer": "Apple,Banana", - "userid": 1 + "useranswer": "Apple,Banana" } ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 5, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_answered/matching/event.json b/tests/mod_lesson/question_answered/matching/event.json index 271cac578..c29507c29 100644 --- a/tests/mod_lesson/question_answered/matching/event.json +++ b/tests/mod_lesson/question_answered/matching/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_answered", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_answered/matching/statements.json b/tests/mod_lesson/question_answered/matching/statements.json index c99d567fb..f63328c7b 100644 --- a/tests/mod_lesson/question_answered/matching/statements.json +++ b/tests/mod_lesson/question_answered/matching/statements.json @@ -7,49 +7,100 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "correctResponsesPattern": [ + "a[.]apple[,]b[.]banana" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "matching", + "name": { + "en": "lesson_question_page_title" + }, + "source": [ + { + "id": "a", + "description": { + "en": "A" + } + }, + { + "id": "b", + "description": { + "en": "B" + } + } + ], + "target": [ + { + "id": "apple", + "description": { + "en": "Apple" + } + }, + { + "id": "banana", + "description": { + "en": "Banana" + } + } + ], + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,60 +115,9 @@ }, "language": "en" }, - "object": { - "definition": { - "correctResponsesPattern": [ - "a[.]apple[,]b[.]banana" - ], - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "matching", - "name": { - "en": "lesson_question_page_title" - }, - "source": [ - { - "description": { - "en": "A" - }, - "id": "a" - }, - { - "description": { - "en": "B" - }, - "id": "b" - } - ], - "target": [ - { - "description": { - "en": "Apple" - }, - "id": "apple" - }, - { - "description": { - "en": "Banana" - }, - "id": "banana" - } - ], - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, "result": { "response": "a[.]apple[,]b[.]banana", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_answered/numerical/data.json b/tests/mod_lesson/question_answered/numerical/data.json index 593ed6ede..07b7f5484 100644 --- a/tests/mod_lesson/question_answered/numerical/data.json +++ b/tests/mod_lesson/question_answered/numerical/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -15,19 +15,19 @@ ], "lesson_attempts": [ { - "correct": 1, "lessonid": 1, "pageid": 1, + "userid": 1, + "correct": 1, "timeseen": "1731972680", - "useranswer": "23", - "userid": 1 + "useranswer": "23" } ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 8, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_answered/numerical/event.json b/tests/mod_lesson/question_answered/numerical/event.json index 271cac578..c29507c29 100644 --- a/tests/mod_lesson/question_answered/numerical/event.json +++ b/tests/mod_lesson/question_answered/numerical/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_answered", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_answered/numerical/statements.json b/tests/mod_lesson/question_answered/numerical/statements.json index 4bec641a4..9bf91a03d 100644 --- a/tests/mod_lesson/question_answered/numerical/statements.json +++ b/tests/mod_lesson/question_answered/numerical/statements.json @@ -7,49 +7,72 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "correctResponsesPattern": [ + "23" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "numeric", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,32 +87,9 @@ }, "language": "en" }, - "object": { - "definition": { - "correctResponsesPattern": [ - "23" - ], - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "numeric", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, "result": { "response": "23", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_answered/shortanswer/data.json b/tests/mod_lesson/question_answered/shortanswer/data.json index fb15e40fa..db97bdcbb 100644 --- a/tests/mod_lesson/question_answered/shortanswer/data.json +++ b/tests/mod_lesson/question_answered/shortanswer/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -15,19 +15,19 @@ ], "lesson_attempts": [ { - "correct": 1, "lessonid": 1, "pageid": 1, + "userid": 1, + "correct": 1, "timeseen": "1731972680", - "useranswer": "Thing", - "userid": 1 + "useranswer": "Thing" } ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 1, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_answered/shortanswer/event.json b/tests/mod_lesson/question_answered/shortanswer/event.json index 271cac578..c29507c29 100644 --- a/tests/mod_lesson/question_answered/shortanswer/event.json +++ b/tests/mod_lesson/question_answered/shortanswer/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_answered", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_answered/shortanswer/statements.json b/tests/mod_lesson/question_answered/shortanswer/statements.json index 4ada4fe4b..cb209ed52 100644 --- a/tests/mod_lesson/question_answered/shortanswer/statements.json +++ b/tests/mod_lesson/question_answered/shortanswer/statements.json @@ -7,49 +7,72 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "correctResponsesPattern": [ + "Thing" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "fill-in", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,32 +87,9 @@ }, "language": "en" }, - "object": { - "definition": { - "correctResponsesPattern": [ - "Thing" - ], - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "fill-in", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, "result": { "response": "Thing", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_answered/truefalse/data.json b/tests/mod_lesson/question_answered/truefalse/data.json index d9b8bbc6a..949c23cb5 100644 --- a/tests/mod_lesson/question_answered/truefalse/data.json +++ b/tests/mod_lesson/question_answered/truefalse/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -20,19 +20,19 @@ ], "lesson_attempts": [ { - "correct": 1, "lessonid": 1, "pageid": 1, + "userid": 1, + "correct": 1, "timeseen": "1731972680", - "useranswer": "true", - "userid": 1 + "useranswer": "true" } ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 2, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_answered/truefalse/event.json b/tests/mod_lesson/question_answered/truefalse/event.json index 271cac578..c29507c29 100644 --- a/tests/mod_lesson/question_answered/truefalse/event.json +++ b/tests/mod_lesson/question_answered/truefalse/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_answered", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_answered", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_answered/truefalse/statements.json b/tests/mod_lesson/question_answered/truefalse/statements.json index e862d59b4..800bb990c 100644 --- a/tests/mod_lesson/question_answered/truefalse/statements.json +++ b/tests/mod_lesson/question_answered/truefalse/statements.json @@ -7,49 +7,86 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "choices": [ + { + "id": "true", + "description": { + "en": "true" + } + }, + { + "id": "false", + "description": { + "en": "false" + } + } + ], + "correctResponsesPattern": [ + "true" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "choice", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,46 +101,9 @@ }, "language": "en" }, - "object": { - "definition": { - "choices": [ - { - "description": { - "en": "true" - }, - "id": "true" - }, - { - "description": { - "en": "false" - }, - "id": "false" - } - ], - "correctResponsesPattern": [ - "true" - ], - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "choice", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, "result": { "response": "true", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_lesson/question_viewed/choice/data.json b/tests/mod_lesson/question_viewed/choice/data.json index d763537ea..53420cf54 100644 --- a/tests/mod_lesson/question_viewed/choice/data.json +++ b/tests/mod_lesson/question_viewed/choice/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -25,9 +25,9 @@ ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 3, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_viewed/choice/event.json b/tests/mod_lesson/question_viewed/choice/event.json index 53f8b4d24..8e20c3c18 100644 --- a/tests/mod_lesson/question_viewed/choice/event.json +++ b/tests/mod_lesson/question_viewed/choice/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_viewed", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_viewed/choice/statements.json b/tests/mod_lesson/question_viewed/choice/statements.json index e66594e15..2d040f712 100644 --- a/tests/mod_lesson/question_viewed/choice/statements.json +++ b/tests/mod_lesson/question_viewed/choice/statements.json @@ -7,49 +7,92 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "choices": [ + { + "id": "a", + "description": { + "en": "a" + } + }, + { + "id": "b", + "description": { + "en": "b" + } + }, + { + "id": "c", + "description": { + "en": "c" + } + } + ], + "correctResponsesPattern": [ + "a[,]b" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "choice", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,49 +106,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "choices": [ - { - "description": { - "en": "a" - }, - "id": "a" - }, - { - "description": { - "en": "b" - }, - "id": "b" - }, - { - "description": { - "en": "c" - }, - "id": "c" - } - ], - "correctResponsesPattern": [ - "a[,]b" - ], - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "choice", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/question_viewed/essay/data.json b/tests/mod_lesson/question_viewed/essay/data.json index 86bca8ee7..8c7012fb2 100644 --- a/tests/mod_lesson/question_viewed/essay/data.json +++ b/tests/mod_lesson/question_viewed/essay/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -14,9 +14,9 @@ ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 10, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_viewed/essay/event.json b/tests/mod_lesson/question_viewed/essay/event.json index 53f8b4d24..8e20c3c18 100644 --- a/tests/mod_lesson/question_viewed/essay/event.json +++ b/tests/mod_lesson/question_viewed/essay/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_viewed", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_viewed/essay/statements.json b/tests/mod_lesson/question_viewed/essay/statements.json index 979a0511f..26b7a7a3f 100644 --- a/tests/mod_lesson/question_viewed/essay/statements.json +++ b/tests/mod_lesson/question_viewed/essay/statements.json @@ -7,49 +7,69 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "long-fill-in", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,26 +83,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "long-fill-in", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/question_viewed/matching/data.json b/tests/mod_lesson/question_viewed/matching/data.json index cafe6b226..1a9e6ec6e 100644 --- a/tests/mod_lesson/question_viewed/matching/data.json +++ b/tests/mod_lesson/question_viewed/matching/data.json @@ -2,29 +2,29 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ { - "answer": "A", "pageid": 1, + "answer": "A", "response": "Apple", "score": 0 }, { - "answer": "B", "pageid": 1, + "answer": "B", "response": "Banana", "score": 0 } ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 5, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_viewed/matching/event.json b/tests/mod_lesson/question_viewed/matching/event.json index 53f8b4d24..8e20c3c18 100644 --- a/tests/mod_lesson/question_viewed/matching/event.json +++ b/tests/mod_lesson/question_viewed/matching/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_viewed", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_viewed/matching/statements.json b/tests/mod_lesson/question_viewed/matching/statements.json index 508932687..1b2520f35 100644 --- a/tests/mod_lesson/question_viewed/matching/statements.json +++ b/tests/mod_lesson/question_viewed/matching/statements.json @@ -7,49 +7,100 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "correctResponsesPattern": [ + "a[.]apple[,]b[.]banana" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "matching", + "name": { + "en": "lesson_question_page_title" + }, + "source": [ + { + "id": "a", + "description": { + "en": "A" + } + }, + { + "id": "b", + "description": { + "en": "B" + } + } + ], + "target": [ + { + "id": "apple", + "description": { + "en": "Apple" + } + }, + { + "id": "banana", + "description": { + "en": "Banana" + } + } + ], + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,57 +114,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "correctResponsesPattern": [ - "a[.]apple[,]b[.]banana" - ], - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "matching", - "name": { - "en": "lesson_question_page_title" - }, - "source": [ - { - "description": { - "en": "A" - }, - "id": "a" - }, - { - "description": { - "en": "B" - }, - "id": "b" - } - ], - "target": [ - { - "description": { - "en": "Apple" - }, - "id": "apple" - }, - { - "description": { - "en": "Banana" - }, - "id": "banana" - } - ], - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/question_viewed/numerical/data.json b/tests/mod_lesson/question_viewed/numerical/data.json index dbc8a803f..6c12f16d0 100644 --- a/tests/mod_lesson/question_viewed/numerical/data.json +++ b/tests/mod_lesson/question_viewed/numerical/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -15,9 +15,9 @@ ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 8, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_viewed/numerical/event.json b/tests/mod_lesson/question_viewed/numerical/event.json index 53f8b4d24..8e20c3c18 100644 --- a/tests/mod_lesson/question_viewed/numerical/event.json +++ b/tests/mod_lesson/question_viewed/numerical/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_viewed", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_viewed/numerical/statements.json b/tests/mod_lesson/question_viewed/numerical/statements.json index 109d7faae..9da704361 100644 --- a/tests/mod_lesson/question_viewed/numerical/statements.json +++ b/tests/mod_lesson/question_viewed/numerical/statements.json @@ -7,49 +7,72 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "correctResponsesPattern": [ + "23" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "numeric", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,29 +86,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "correctResponsesPattern": [ - "23" - ], - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "numeric", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/question_viewed/shortanswer/data.json b/tests/mod_lesson/question_viewed/shortanswer/data.json index c6d4bb19b..cd081273d 100644 --- a/tests/mod_lesson/question_viewed/shortanswer/data.json +++ b/tests/mod_lesson/question_viewed/shortanswer/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -15,9 +15,9 @@ ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 1, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_viewed/shortanswer/event.json b/tests/mod_lesson/question_viewed/shortanswer/event.json index 53f8b4d24..8e20c3c18 100644 --- a/tests/mod_lesson/question_viewed/shortanswer/event.json +++ b/tests/mod_lesson/question_viewed/shortanswer/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_viewed", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_viewed/shortanswer/statements.json b/tests/mod_lesson/question_viewed/shortanswer/statements.json index 77a4cc41a..0da8ef5c9 100644 --- a/tests/mod_lesson/question_viewed/shortanswer/statements.json +++ b/tests/mod_lesson/question_viewed/shortanswer/statements.json @@ -7,49 +7,72 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "correctResponsesPattern": [ + "Thing" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "fill-in", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,29 +86,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "correctResponsesPattern": [ - "Thing" - ], - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "fill-in", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lesson/question_viewed/truefalse/data.json b/tests/mod_lesson/question_viewed/truefalse/data.json index 49e4164de..b420f888f 100644 --- a/tests/mod_lesson/question_viewed/truefalse/data.json +++ b/tests/mod_lesson/question_viewed/truefalse/data.json @@ -2,8 +2,8 @@ "lesson": [ { "id": 1, - "intro": "test_lesson_intro", - "name": "test_lesson" + "name": "test_lesson", + "intro": "test_lesson_intro" } ], "lesson_answers": [ @@ -20,9 +20,9 @@ ], "lesson_pages": [ { - "contents": "lesson_question_page_contents", "id": 1, "lessonid": 1, + "contents": "lesson_question_page_contents", "qtype": 2, "title": "lesson_question_page_title" } diff --git a/tests/mod_lesson/question_viewed/truefalse/event.json b/tests/mod_lesson/question_viewed/truefalse/event.json index 53f8b4d24..8e20c3c18 100644 --- a/tests/mod_lesson/question_viewed/truefalse/event.json +++ b/tests/mod_lesson/question_viewed/truefalse/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lesson\\event\\question_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_lesson\\event\\question_viewed", "objecttable": "lesson_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_lesson/question_viewed/truefalse/statements.json b/tests/mod_lesson/question_viewed/truefalse/statements.json index 16a8a4599..307132158 100644 --- a/tests/mod_lesson/question_viewed/truefalse/statements.json +++ b/tests/mod_lesson/question_viewed/truefalse/statements.json @@ -7,49 +7,86 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", + "definition": { + "choices": [ + { + "id": "true", + "description": { + "en": "true" + } + }, + { + "id": "false", + "description": { + "en": "false" + } + } + ], + "correctResponsesPattern": [ + "true" + ], + "description": { + "en": "lesson_question_page_contents" + }, + "interactionType": "choice", + "name": { + "en": "lesson_question_page_title" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/lesson/view.php?id=1", "definition": { "name": { "en": "test_lesson" }, "type": "http://adlnet.gov/expapi/activities/lesson" }, - "id": "http://www.example.org/mod/lesson/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,43 +100,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "choices": [ - { - "description": { - "en": "true" - }, - "id": "true" - }, - { - "description": { - "en": "false" - }, - "id": "false" - } - ], - "correctResponsesPattern": [ - "true" - ], - "description": { - "en": "lesson_question_page_contents" - }, - "interactionType": "choice", - "name": { - "en": "lesson_question_page_title" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/mod/lesson/view.php?id=1&pageid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_lti/course_module_viewed/existing_module/event.json b/tests/mod_lti/course_module_viewed/existing_module/event.json index 2031053e0..7591894e8 100644 --- a/tests/mod_lti/course_module_viewed/existing_module/event.json +++ b/tests/mod_lti/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_lti\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_lti\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_lti/course_module_viewed/existing_module/statements.json b/tests/mod_lti/course_module_viewed/existing_module/statements.json index 5c4eb772b..036e56a9c 100644 --- a/tests/mod_lti/course_module_viewed/existing_module/statements.json +++ b/tests/mod_lti/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/lti/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/media" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/media" - }, - "id": "http://www.example.org/mod/lti/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_page/course_module_viewed/existing_module/event.json b/tests/mod_page/course_module_viewed/existing_module/event.json index 5d19cef90..d9e5b194f 100644 --- a/tests/mod_page/course_module_viewed/existing_module/event.json +++ b/tests/mod_page/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_page\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_page\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_page/course_module_viewed/existing_module/statements.json b/tests/mod_page/course_module_viewed/existing_module/statements.json index ba42e2f5f..cfa74f27e 100644 --- a/tests/mod_page/course_module_viewed/existing_module/statements.json +++ b/tests/mod_page/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/page/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://w3id.org/xapi/acrossx/activities/page" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://w3id.org/xapi/acrossx/activities/page" - }, - "id": "http://www.example.org/mod/page/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_questionnaire/all_responses_viewed/event.json b/tests/mod_questionnaire/all_responses_viewed/event.json index 11c69e569..183fc6b9d 100644 --- a/tests/mod_questionnaire/all_responses_viewed/event.json +++ b/tests/mod_questionnaire/all_responses_viewed/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_questionnaire\\event\\all_responses_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_questionnaire\\event\\all_responses_viewed", "objecttable": "questionnaire", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_questionnaire/all_responses_viewed/statements.json b/tests/mod_questionnaire/all_responses_viewed/statements.json index 967cc0323..2288e9b1d 100644 --- a/tests/mod_questionnaire/all_responses_viewed/statements.json +++ b/tests/mod_questionnaire/all_responses_viewed/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/questionnaire/report.php?instance=1&group=0", + "definition": { + "name": { + "en": "test_q_name Report" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/report" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/questionnaire/view.php?id=1", "definition": { "name": { "en": "test_q_name" }, "type": "http://id.tincanapi.com/activitytype/survey" }, - "id": "http://www.example.org/mod/questionnaire/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_q_name Report" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/report" - }, - "id": "http://www.example.org/mod/questionnaire/report.php?instance=1&group=0", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_questionnaire/attempt_resumed/event.json b/tests/mod_questionnaire/attempt_resumed/event.json index 7805c5409..2fcdb3588 100644 --- a/tests/mod_questionnaire/attempt_resumed/event.json +++ b/tests/mod_questionnaire/attempt_resumed/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_questionnaire\\event\\attempt_resumed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_questionnaire\\event\\attempt_resumed", "objecttable": "questionnaire", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_questionnaire/attempt_resumed/statements.json b/tests/mod_questionnaire/attempt_resumed/statements.json index cf884fe8d..3320635da 100644 --- a/tests/mod_questionnaire/attempt_resumed/statements.json +++ b/tests/mod_questionnaire/attempt_resumed/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/resumed", + "display": { + "en": "Resumed" + } + }, + "object": { + "id": "http://www.example.org/mod/questionnaire/view.php?id=1", + "definition": { + "name": { + "en": "test_q_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_q_name" - }, - "type": "http://id.tincanapi.com/activitytype/survey" - }, - "id": "http://www.example.org/mod/questionnaire/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Resumed" - }, - "id": "https://w3id.org/xapi/tla/verbs/resumed" } } ] diff --git a/tests/mod_questionnaire/attempt_saved/event.json b/tests/mod_questionnaire/attempt_saved/event.json index 6d1047481..88ebad0ea 100644 --- a/tests/mod_questionnaire/attempt_saved/event.json +++ b/tests/mod_questionnaire/attempt_saved/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_questionnaire\\event\\attempt_saved", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_questionnaire\\event\\attempt_saved", "objecttable": "questionnaire", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_questionnaire/attempt_saved/statements.json b/tests/mod_questionnaire/attempt_saved/statements.json index 93d9cf541..b74dfdbad 100644 --- a/tests/mod_questionnaire/attempt_saved/statements.json +++ b/tests/mod_questionnaire/attempt_saved/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/suspended", + "display": { + "en": "Suspended" + } + }, + "object": { + "id": "http://www.example.org/mod/questionnaire/view.php?id=1", + "definition": { + "name": { + "en": "test_q_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_q_name" - }, - "type": "http://id.tincanapi.com/activitytype/survey" - }, - "id": "http://www.example.org/mod/questionnaire/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Suspended" - }, - "id": "https://w3id.org/xapi/tla/verbs/suspended" } } ] diff --git a/tests/mod_questionnaire/attempt_submitted/event.json b/tests/mod_questionnaire/attempt_submitted/event.json index 6dfa7b025..2c7d38181 100644 --- a/tests/mod_questionnaire/attempt_submitted/event.json +++ b/tests/mod_questionnaire/attempt_submitted/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_questionnaire\\event\\attempt_submitted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_questionnaire\\event\\attempt_submitted", "objecttable": "questionnaire", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_questionnaire/attempt_submitted/statements.json b/tests/mod_questionnaire/attempt_submitted/statements.json index e8784dcef..ddf6433cd 100644 --- a/tests/mod_questionnaire/attempt_submitted/statements.json +++ b/tests/mod_questionnaire/attempt_submitted/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/questionnaire/view.php?id=1", + "definition": { + "name": { + "en": "test_q_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_q_name" - }, - "type": "http://id.tincanapi.com/activitytype/survey" - }, - "id": "http://www.example.org/mod/questionnaire/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/submit" } } ] diff --git a/tests/mod_questionnaire/course_module_viewed/existing_module/event.json b/tests/mod_questionnaire/course_module_viewed/existing_module/event.json index 12c134980..231fb2f5e 100644 --- a/tests/mod_questionnaire/course_module_viewed/existing_module/event.json +++ b/tests/mod_questionnaire/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_questionnaire\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_questionnaire\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_questionnaire/course_module_viewed/existing_module/statements.json b/tests/mod_questionnaire/course_module_viewed/existing_module/statements.json index dbf5dcf92..1ca1d60cd 100644 --- a/tests/mod_questionnaire/course_module_viewed/existing_module/statements.json +++ b/tests/mod_questionnaire/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/questionnaire/view.php?id=1", + "definition": { + "name": { + "en": "test_q_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_q_name" - }, - "type": "http://id.tincanapi.com/activitytype/survey" - }, - "id": "http://www.example.org/mod/questionnaire/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_quiz/attempt_becameoverdue/event.json b/tests/mod_quiz/attempt_becameoverdue/event.json index e1d2d726c..b7945aabd 100644 --- a/tests/mod_quiz/attempt_becameoverdue/event.json +++ b/tests/mod_quiz/attempt_becameoverdue/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_becameoverdue", "id": 1, "objectid": 1, - "objecttable": "quiz_attempts", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_becameoverdue", + "objecttable": "quiz_attempts", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_becameoverdue/statements.json b/tests/mod_quiz/attempt_becameoverdue/statements.json index 874771a82..7fb98cdab 100644 --- a/tests/mod_quiz/attempt_becameoverdue/statements.json +++ b/tests/mod_quiz/attempt_becameoverdue/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/exceeded", + "display": { + "en": "Exceeded" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Exceeded" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/exceeded" } } ] diff --git a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/data.json b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/data.json index 4c8ed4ca3..761d1531e 100644 --- a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/data.json +++ b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/data.json @@ -23,14 +23,14 @@ ], "user": [ { - "email": "instructor@test.com", + "id": 1, "firstname": "test_instructor_fullname", - "id": 1 + "email": "instructor@test.com" }, { - "email": "learner@test.com", + "id": 2, "firstname": "test_learner_fullname", - "id": 2 + "email": "learner@test.com" } ] } diff --git a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/event.json b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/event.json index e49a9c4b9..779c67870 100644 --- a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/event.json +++ b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_reviewed", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_quiz\\event\\attempt_reviewed", + "objecttable": "attempt", + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json index fd907ff0f..cfe75f88d 100644 --- a/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json +++ b/tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/statements.json @@ -7,59 +7,75 @@ }, "name": "test_learner_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/receive", + "display": { + "en": "Received" + } + }, + "object": { + "id": "http://www.example.org/review.php?attempt=1", + "definition": { + "name": { + "en": "Review" + }, + "type": "http://activitystrea.ms/schema/1.0/review" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -80,22 +96,6 @@ "name": "test_instructor_fullname" }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "Review" - }, - "type": "http://activitystrea.ms/schema/1.0/review" - }, - "id": "http://www.example.org/review.php?attempt=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Received" - }, - "id": "http://activitystrea.ms/schema/1.0/receive" } } ] diff --git a/tests/mod_quiz/attempt_started/existing_attempt_started/event.json b/tests/mod_quiz/attempt_started/existing_attempt_started/event.json index e52fde502..b38f241fc 100644 --- a/tests/mod_quiz/attempt_started/existing_attempt_started/event.json +++ b/tests/mod_quiz/attempt_started/existing_attempt_started/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_started", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_started", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json b/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json index b772e0214..abd7ade35 100644 --- a/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json +++ b/tests/mod_quiz/attempt_started/existing_attempt_started/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/start", + "display": { + "en": "Started" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Started" - }, - "id": "http://activitystrea.ms/schema/1.0/start" } } ] diff --git a/tests/mod_quiz/attempt_submitted/essay/data.json b/tests/mod_quiz/attempt_submitted/essay/data.json index 19f671b99..6747e7f43 100644 --- a/tests/mod_quiz/attempt_submitted/essay/data.json +++ b/tests/mod_quiz/attempt_submitted/essay/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -52,12 +52,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/essay/event.json b/tests/mod_quiz/attempt_submitted/essay/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/essay/event.json +++ b/tests/mod_quiz/attempt_submitted/essay/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/essay/statements.json b/tests/mod_quiz/attempt_submitted/essay/statements.json index 191ed9ed7..7e5ca244b 100644 --- a/tests/mod_quiz/attempt_submitted/essay/statements.json +++ b/tests/mod_quiz/attempt_submitted/essay/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,79 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "description": { + "en": "test_question" + }, + "interactionType": "long-fill-in", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,29 +187,9 @@ }, "language": "en" }, - "object": { - "definition": { - "description": { - "en": "test_question" - }, - "interactionType": "long-fill-in", - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "response": "test_answer" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/essay_null_response/data.json b/tests/mod_quiz/attempt_submitted/essay_null_response/data.json index 5491b295d..f660d3a31 100644 --- a/tests/mod_quiz/attempt_submitted/essay_null_response/data.json +++ b/tests/mod_quiz/attempt_submitted/essay_null_response/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -52,12 +52,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/essay_null_response/event.json b/tests/mod_quiz/attempt_submitted/essay_null_response/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/essay_null_response/event.json +++ b/tests/mod_quiz/attempt_submitted/essay_null_response/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/essay_null_response/statements.json b/tests/mod_quiz/attempt_submitted/essay_null_response/statements.json index 94ca3bc80..d4af20e40 100644 --- a/tests/mod_quiz/attempt_submitted/essay_null_response/statements.json +++ b/tests/mod_quiz/attempt_submitted/essay_null_response/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,79 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "description": { + "en": "test_question" + }, + "interactionType": "long-fill-in", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,29 +187,9 @@ }, "language": "en" }, - "object": { - "definition": { - "description": { - "en": "test_question" - }, - "interactionType": "long-fill-in", - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": false, "response": "" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/gapselect/data.json b/tests/mod_quiz/attempt_submitted/gapselect/data.json index 4d642d39e..a7ccbdfe8 100644 --- a/tests/mod_quiz/attempt_submitted/gapselect/data.json +++ b/tests/mod_quiz/attempt_submitted/gapselect/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -32,21 +32,21 @@ ], "question_answers": [ { + "id": 1, "answer": "spicy", "fraction": 1.0, - "id": 1, "question": 1 }, { + "id": 2, "answer": "mango", "fraction": 1.0, - "id": 2, "question": 1 }, { + "id": 3, "answer": "milkshake", "fraction": 1.0, - "id": 3, "question": 1 } ], @@ -73,12 +73,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/gapselect/event.json b/tests/mod_quiz/attempt_submitted/gapselect/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/gapselect/event.json +++ b/tests/mod_quiz/attempt_submitted/gapselect/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/gapselect/statements.json b/tests/mod_quiz/attempt_submitted/gapselect/statements.json index 6309bca31..39fd3d9de 100644 --- a/tests/mod_quiz/attempt_submitted/gapselect/statements.json +++ b/tests/mod_quiz/attempt_submitted/gapselect/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,79 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "description": { + "en": "Example [[1]] missing [[2]] words [[3]]" + }, + "interactionType": "sequencing", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,20 +187,6 @@ }, "language": "en" }, - "object": { - "definition": { - "description": { - "en": "Example [[1]] missing [[2]] words [[3]]" - }, - "interactionType": "sequencing", - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { @@ -192,12 +198,6 @@ }, "response": "spicy[,]mango[,]milkshake", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/match/data.json b/tests/mod_quiz/attempt_submitted/match/data.json index 5612513fe..c8382f94a 100644 --- a/tests/mod_quiz/attempt_submitted/match/data.json +++ b/tests/mod_quiz/attempt_submitted/match/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -24,21 +24,21 @@ ], "qtype_match_subquestions": [ { - "answertext": "Green", "id": 1, "questionid": 1, + "answertext": "Green", "questiontext": "

Red" }, { - "answertext": "Orange", "id": 2, "questionid": 1, + "answertext": "Orange", "questiontext": "

Blue" }, { - "answertext": "White", "id": 3, "questionid": 1, + "answertext": "White", "questiontext": "

Black" } ], @@ -73,12 +73,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/match/event.json b/tests/mod_quiz/attempt_submitted/match/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/match/event.json +++ b/tests/mod_quiz/attempt_submitted/match/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/match/statements.json b/tests/mod_quiz/attempt_submitted/match/statements.json index e79b209db..a0da96964 100644 --- a/tests/mod_quiz/attempt_submitted/match/statements.json +++ b/tests/mod_quiz/attempt_submitted/match/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,122 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "correctResponsesPattern": [ + "red[.]green[,]blue[.]orange[,]black[.]white" + ], + "description": { + "en": "test_question" + }, + "interactionType": "matching", + "name": { + "en": "test_name" + }, + "source": [ + { + "id": "red", + "description": { + "en": "Red" + } + }, + { + "id": "blue", + "description": { + "en": "Blue" + } + }, + { + "id": "black", + "description": { + "en": "Black" + } + } + ], + "target": [ + { + "id": "green", + "description": { + "en": "Green" + } + }, + { + "id": "orange", + "description": { + "en": "Orange" + } + }, + { + "id": "white", + "description": { + "en": "White" + } + } + ], + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,63 +230,6 @@ }, "language": "en" }, - "object": { - "definition": { - "correctResponsesPattern": [ - "red[.]green[,]blue[.]orange[,]black[.]white" - ], - "description": { - "en": "test_question" - }, - "interactionType": "matching", - "name": { - "en": "test_name" - }, - "source": [ - { - "description": { - "en": "Red" - }, - "id": "red" - }, - { - "description": { - "en": "Blue" - }, - "id": "blue" - }, - { - "description": { - "en": "Black" - }, - "id": "black" - } - ], - "target": [ - { - "description": { - "en": "Green" - }, - "id": "green" - }, - { - "description": { - "en": "Orange" - }, - "id": "orange" - }, - { - "description": { - "en": "White" - }, - "id": "white" - } - ], - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { @@ -235,12 +241,6 @@ }, "response": "red[.]green[,]blue[.]orange[,]black[.]white", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/multichoice/data.json b/tests/mod_quiz/attempt_submitted/multichoice/data.json index fca356465..15475d97b 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice/data.json +++ b/tests/mod_quiz/attempt_submitted/multichoice/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -32,21 +32,21 @@ ], "question_answers": [ { + "id": 1, "answer": "answer 1", "fraction": 1.0, - "id": 1, "question": 1 }, { + "id": 2, "answer": "answer 2", "fraction": 1.0, - "id": 2, "question": 1 }, { + "id": 3, "answer": "answer 3", "fraction": 1.0, - "id": 3, "question": 1 } ], @@ -73,12 +73,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/multichoice/event.json b/tests/mod_quiz/attempt_submitted/multichoice/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice/event.json +++ b/tests/mod_quiz/attempt_submitted/multichoice/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/multichoice/statements.json b/tests/mod_quiz/attempt_submitted/multichoice/statements.json index cae0c8e86..a560b5ded 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice/statements.json +++ b/tests/mod_quiz/attempt_submitted/multichoice/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,79 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "description": { + "en": "test_question" + }, + "interactionType": "choice", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,20 +187,6 @@ }, "language": "en" }, - "object": { - "definition": { - "description": { - "en": "test_question" - }, - "interactionType": "choice", - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { @@ -188,12 +194,6 @@ }, "response": "answer-1", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/data.json b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/data.json index 35deeb992..7434a7683 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/data.json +++ b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -32,9 +32,9 @@ ], "question_answers": [ { + "id": 1, "answer": "answer 1", "fraction": 1.0, - "id": 1, "question": 1 } ], @@ -61,12 +61,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/event.json b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/event.json +++ b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/statements.json b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/statements.json index 5b46a0ffc..28d7419b4 100644 --- a/tests/mod_quiz/attempt_submitted/multichoice_withchoices/statements.json +++ b/tests/mod_quiz/attempt_submitted/multichoice_withchoices/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,90 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "choices": [ + { + "id": "answer-1", + "description": { + "en": "answer 1" + } + } + ], + "correctResponsesPattern": [ + "answer-1" + ], + "description": { + "en": "test_question" + }, + "interactionType": "choice", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,31 +198,6 @@ }, "language": "en" }, - "object": { - "definition": { - "choices": [ - { - "description": { - "en": "answer 1" - }, - "id": "answer-1" - } - ], - "correctResponsesPattern": [ - "answer-1" - ], - "description": { - "en": "test_question" - }, - "interactionType": "choice", - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { @@ -199,12 +205,6 @@ }, "response": "answer-1", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset/data.json b/tests/mod_quiz/attempt_submitted/multichoiceset/data.json index 84e0dbe7f..94b0f028e 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset/data.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -32,21 +32,21 @@ ], "question_answers": [ { + "id": 1, "answer": "answer 1", "fraction": 1.0, - "id": 1, "question": 1 }, { + "id": 2, "answer": "answer 2", "fraction": 1.0, - "id": 2, "question": 1 }, { + "id": 3, "answer": "answer 3", "fraction": 1.0, - "id": 3, "question": 1 } ], @@ -73,12 +73,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset/event.json b/tests/mod_quiz/attempt_submitted/multichoiceset/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset/event.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset/statements.json b/tests/mod_quiz/attempt_submitted/multichoiceset/statements.json index b88802195..e979f7c45 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset/statements.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,79 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "description": { + "en": "test_question" + }, + "interactionType": "choice", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,20 +187,6 @@ }, "language": "en" }, - "object": { - "definition": { - "description": { - "en": "test_question" - }, - "interactionType": "choice", - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { @@ -188,12 +194,6 @@ }, "response": "answer-1[,]answer-2", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/data.json b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/data.json index 84e0dbe7f..94b0f028e 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/data.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -32,21 +32,21 @@ ], "question_answers": [ { + "id": 1, "answer": "answer 1", "fraction": 1.0, - "id": 1, "question": 1 }, { + "id": 2, "answer": "answer 2", "fraction": 1.0, - "id": 2, "question": 1 }, { + "id": 3, "answer": "answer 3", "fraction": 1.0, - "id": 3, "question": 1 } ], @@ -73,12 +73,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/event.json b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/event.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/statements.json b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/statements.json index e991f332d..7c7195a93 100644 --- a/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/statements.json +++ b/tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,102 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "choices": [ + { + "id": "answer-1", + "description": { + "en": "answer 1" + } + }, + { + "id": "answer-2", + "description": { + "en": "answer 2" + } + }, + { + "id": "answer-3", + "description": { + "en": "answer 3" + } + } + ], + "correctResponsesPattern": [ + "answer-1[,]answer-2" + ], + "description": { + "en": "test_question" + }, + "interactionType": "choice", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,43 +210,6 @@ }, "language": "en" }, - "object": { - "definition": { - "choices": [ - { - "description": { - "en": "answer 1" - }, - "id": "answer-1" - }, - { - "description": { - "en": "answer 2" - }, - "id": "answer-2" - }, - { - "description": { - "en": "answer 3" - }, - "id": "answer-3" - } - ], - "correctResponsesPattern": [ - "answer-1[,]answer-2" - ], - "description": { - "en": "test_question" - }, - "interactionType": "choice", - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { @@ -211,12 +217,6 @@ }, "response": "answer-1[,]answer-2", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/no_questions/data.json b/tests/mod_quiz/attempt_submitted/no_questions/data.json index b59ccc4e1..e1a7ef703 100644 --- a/tests/mod_quiz/attempt_submitted/no_questions/data.json +++ b/tests/mod_quiz/attempt_submitted/no_questions/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -38,12 +38,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/no_questions/event.json b/tests/mod_quiz/attempt_submitted/no_questions/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/no_questions/event.json +++ b/tests/mod_quiz/attempt_submitted/no_questions/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/no_questions/statements.json b/tests/mod_quiz/attempt_submitted/no_questions/statements.json index 749600aed..32f97d50b 100644 --- a/tests/mod_quiz/attempt_submitted/no_questions/statements.json +++ b/tests/mod_quiz/attempt_submitted/no_questions/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/mod_quiz/attempt_submitted/numerical/data.json b/tests/mod_quiz/attempt_submitted/numerical/data.json index d63dd1f8e..f8f4b4c24 100644 --- a/tests/mod_quiz/attempt_submitted/numerical/data.json +++ b/tests/mod_quiz/attempt_submitted/numerical/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -32,9 +32,9 @@ ], "question_answers": [ { + "id": 1, "answer": 10, "fraction": 1.0, - "id": 1, "question": 1 } ], @@ -49,8 +49,8 @@ ], "question_numerical": [ { - "answer": 1, "id": 1, + "answer": 1, "question": 1, "tolerance": 5 } @@ -69,12 +69,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/numerical/event.json b/tests/mod_quiz/attempt_submitted/numerical/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/numerical/event.json +++ b/tests/mod_quiz/attempt_submitted/numerical/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/numerical/statements.json b/tests/mod_quiz/attempt_submitted/numerical/statements.json index 1bed2f067..f21926fbe 100644 --- a/tests/mod_quiz/attempt_submitted/numerical/statements.json +++ b/tests/mod_quiz/attempt_submitted/numerical/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,82 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "correctResponsesPattern": [ + "5[:]15" + ], + "description": { + "en": "test_question" + }, + "interactionType": "numeric", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,23 +190,6 @@ }, "language": "en" }, - "object": { - "definition": { - "correctResponsesPattern": [ - "5[:]15" - ], - "description": { - "en": "test_question" - }, - "interactionType": "numeric", - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { @@ -191,12 +197,6 @@ }, "response": "11", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/randomsamatch/data.json b/tests/mod_quiz/attempt_submitted/randomsamatch/data.json index 6bd47bd96..c93b23dcc 100644 --- a/tests/mod_quiz/attempt_submitted/randomsamatch/data.json +++ b/tests/mod_quiz/attempt_submitted/randomsamatch/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -24,15 +24,15 @@ ], "qtype_match_subquestions": [ { - "answertext": "orange", "id": 1, "questionid": 1, + "answertext": "orange", "questiontext": "

Example short answer question" }, { - "answertext": "Purple", "id": 2, "questionid": 1, + "answertext": "Purple", "questiontext": "

Testing testing" } ], @@ -67,12 +67,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/randomsamatch/event.json b/tests/mod_quiz/attempt_submitted/randomsamatch/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/randomsamatch/event.json +++ b/tests/mod_quiz/attempt_submitted/randomsamatch/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json b/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json index 39872d2ea..f0dee6fb7 100644 --- a/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json +++ b/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,110 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "correctResponsesPattern": [ + "example-short-answer-question[.]orange[,]testing-testing[.]purple" + ], + "description": { + "en": "Example Random short-answer matching question" + }, + "interactionType": "matching", + "name": { + "en": "test_name" + }, + "source": [ + { + "id": "example-short-answer-question", + "description": { + "en": "Example short answer question" + } + }, + { + "id": "testing-testing", + "description": { + "en": "Testing testing" + } + } + ], + "target": [ + { + "id": "orange", + "description": { + "en": "orange" + } + }, + { + "id": "purple", + "description": { + "en": "Purple" + } + } + ], + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,51 +218,6 @@ }, "language": "en" }, - "object": { - "definition": { - "correctResponsesPattern": [ - "example-short-answer-question[.]orange[,]testing-testing[.]purple" - ], - "description": { - "en": "Example Random short-answer matching question" - }, - "interactionType": "matching", - "name": { - "en": "test_name" - }, - "source": [ - { - "description": { - "en": "Example short answer question" - }, - "id": "example-short-answer-question" - }, - { - "description": { - "en": "Testing testing" - }, - "id": "testing-testing" - } - ], - "target": [ - { - "description": { - "en": "orange" - }, - "id": "orange" - }, - { - "description": { - "en": "Purple" - }, - "id": "purple" - } - ], - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { @@ -222,12 +228,6 @@ }, "response": "example-short-answer-question[.]orange[,]testing-testing[.]purple", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/shortanswer/data.json b/tests/mod_quiz/attempt_submitted/shortanswer/data.json index d3807ef25..280cf7cae 100644 --- a/tests/mod_quiz/attempt_submitted/shortanswer/data.json +++ b/tests/mod_quiz/attempt_submitted/shortanswer/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -52,12 +52,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/shortanswer/event.json b/tests/mod_quiz/attempt_submitted/shortanswer/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/shortanswer/event.json +++ b/tests/mod_quiz/attempt_submitted/shortanswer/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/shortanswer/statements.json b/tests/mod_quiz/attempt_submitted/shortanswer/statements.json index ad18909cb..49ba89e54 100644 --- a/tests/mod_quiz/attempt_submitted/shortanswer/statements.json +++ b/tests/mod_quiz/attempt_submitted/shortanswer/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,79 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "description": { + "en": "test_question" + }, + "interactionType": "fill-in", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,29 +187,9 @@ }, "language": "en" }, - "object": { - "definition": { - "description": { - "en": "test_question" - }, - "interactionType": "fill-in", - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "response": "test_answer" - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/truefalse/data.json b/tests/mod_quiz/attempt_submitted/truefalse/data.json index 3d400c794..59dfa2eee 100644 --- a/tests/mod_quiz/attempt_submitted/truefalse/data.json +++ b/tests/mod_quiz/attempt_submitted/truefalse/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -32,15 +32,15 @@ ], "question_answers": [ { + "id": 1, "answer": "True", "fraction": 1.0, - "id": 1, "question": 1 }, { + "id": 2, "answer": "False", "fraction": 0.0, - "id": 2, "question": 1 } ], @@ -67,12 +67,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/truefalse/event.json b/tests/mod_quiz/attempt_submitted/truefalse/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/truefalse/event.json +++ b/tests/mod_quiz/attempt_submitted/truefalse/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/truefalse/statements.json b/tests/mod_quiz/attempt_submitted/truefalse/statements.json index 49118c157..7976472f8 100644 --- a/tests/mod_quiz/attempt_submitted/truefalse/statements.json +++ b/tests/mod_quiz/attempt_submitted/truefalse/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } }, { @@ -100,59 +100,82 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/answered", + "display": { + "en": "Answered" + } + }, + "object": { + "id": "http://www.example.org/question/question.php?cmid=1&id=1", + "definition": { + "correctResponsesPattern": [ + "true" + ], + "description": { + "en": "test_question" + }, + "interactionType": "true-false", + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/cmi.interaction" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -167,23 +190,6 @@ }, "language": "en" }, - "object": { - "definition": { - "correctResponsesPattern": [ - "true" - ], - "description": { - "en": "test_question" - }, - "interactionType": "true-false", - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/cmi.interaction" - }, - "id": "http://www.example.org/question/question.php?cmid=1&id=1", - "objectType": "Activity" - }, "result": { "completion": true, "extensions": { @@ -191,12 +197,6 @@ }, "response": "true", "success": true - }, - "verb": { - "display": { - "en": "Answered" - }, - "id": "http://adlnet.gov/expapi/verbs/answered" } } ] diff --git a/tests/mod_quiz/attempt_submitted/unknown_qtype/data.json b/tests/mod_quiz/attempt_submitted/unknown_qtype/data.json index bdf289e60..80591a1d5 100644 --- a/tests/mod_quiz/attempt_submitted/unknown_qtype/data.json +++ b/tests/mod_quiz/attempt_submitted/unknown_qtype/data.json @@ -2,16 +2,16 @@ "grade_grades": [ { "itemid": 1, - "rawgrade": 50, - "userid": 1 + "userid": 1, + "rawgrade": 50 } ], "grade_items": [ { + "id": 1, "grademax": 100, "grademin": 0, "gradepass": 50, - "id": 1, "iteminstance": 1, "itemmodule": "quiz" } @@ -52,12 +52,12 @@ "quiz_attempts": [ { "id": 1, + "uniqueid": 1, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "uniqueid": 1 + "timestart": 0 } ] } diff --git a/tests/mod_quiz/attempt_submitted/unknown_qtype/event.json b/tests/mod_quiz/attempt_submitted/unknown_qtype/event.json index 106cf346b..4f15fb522 100644 --- a/tests/mod_quiz/attempt_submitted/unknown_qtype/event.json +++ b/tests/mod_quiz/attempt_submitted/unknown_qtype/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_submitted", "id": 1, "objectid": 1, - "objecttable": "attempt", "relateduserid": 1, + "eventname": "\\mod_quiz\\event\\attempt_submitted", + "objecttable": "attempt", "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_submitted/unknown_qtype/statements.json b/tests/mod_quiz/attempt_submitted/unknown_qtype/statements.json index 749600aed..32f97d50b 100644 --- a/tests/mod_quiz/attempt_submitted/unknown_qtype/statements.json +++ b/tests/mod_quiz/attempt_submitted/unknown_qtype/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, "result": { "completion": true, "duration": "PT1S", @@ -84,12 +90,6 @@ "scaled": 0.0 }, "success": true - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/mod_quiz/attempt_viewed/existing_module/event.json b/tests/mod_quiz/attempt_viewed/existing_module/event.json index ccb5741ff..548b784e1 100644 --- a/tests/mod_quiz/attempt_viewed/existing_module/event.json +++ b/tests/mod_quiz/attempt_viewed/existing_module/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\attempt_viewed", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_quiz\\event\\attempt_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/attempt_viewed/existing_module/statements.json b/tests/mod_quiz/attempt_viewed/existing_module/statements.json index 2d65d871b..f0d01decc 100644 --- a/tests/mod_quiz/attempt_viewed/existing_module/statements.json +++ b/tests/mod_quiz/attempt_viewed/existing_module/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", + "definition": { + "name": { + "en": "test_quiz_name Attempt 1" + }, + "type": "http://adlnet.gov/expapi/activities/attempt" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Attempt 1" - }, - "type": "http://adlnet.gov/expapi/activities/attempt" - }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_quiz/course_module_viewed/existing_module/event.json b/tests/mod_quiz/course_module_viewed/existing_module/event.json index f4875fd02..deea0a769 100644 --- a/tests/mod_quiz/course_module_viewed/existing_module/event.json +++ b/tests/mod_quiz/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_quiz\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/course_module_viewed/existing_module/statements.json b/tests/mod_quiz/course_module_viewed/existing_module/statements.json index 3c31dd788..03b0bff60 100644 --- a/tests/mod_quiz/course_module_viewed/existing_module/statements.json +++ b/tests/mod_quiz/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/quiz/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/assessment" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/assessment" - }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_quiz/question_manually_graded/data.json b/tests/mod_quiz/question_manually_graded/data.json index 977e224f8..a49ddec95 100644 --- a/tests/mod_quiz/question_manually_graded/data.json +++ b/tests/mod_quiz/question_manually_graded/data.json @@ -7,18 +7,18 @@ ], "question_attempt_steps": [ { - "fraction": 0.5, "id": 1, "questionattemptid": 1, + "fraction": 0.5, "sequencenumber": 1 } ], "question_attempts": [ { "id": 1, + "questionusageid": 1, "maxfraction": 1.0, - "minfraction": 0.0, - "questionusageid": 1 + "minfraction": 0.0 } ], "quiz": [ @@ -30,24 +30,24 @@ "quiz_attempts": [ { "id": 1, + "userid": 2, "quiz": 1, "state": "finished", "sumgrades": 50, "timefinish": 1, - "timestart": 0, - "userid": 2 + "timestart": 0 } ], "user": [ { - "email": "instructor@test.com", + "id": 1, "firstname": "test_instructor_fullname", - "id": 1 + "email": "instructor@test.com" }, { - "email": "learner@test.com", + "id": 2, "firstname": "test_learner_fullname", - "id": 2 + "email": "learner@test.com" } ] } diff --git a/tests/mod_quiz/question_manually_graded/event.json b/tests/mod_quiz/question_manually_graded/event.json index cbe1b527a..0cc7f4227 100644 --- a/tests/mod_quiz/question_manually_graded/event.json +++ b/tests/mod_quiz/question_manually_graded/event.json @@ -1,12 +1,12 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_quiz\\event\\question_manually_graded", "id": 1, "objectid": 1, + "relateduserid": null, + "userid": 1, + "eventname": "\\mod_quiz\\event\\question_manually_graded", "objecttable": "quiz", "other": "a:3:{s:6:\"quizid\";s:1:\"1\";s:9:\"attemptid\";s:1:\"1\";s:4:\"slot\";i:1;}", - "relateduserid": null, - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_quiz/question_manually_graded/statements.json b/tests/mod_quiz/question_manually_graded/statements.json index a2ddb5536..340d06b7c 100644 --- a/tests/mod_quiz/question_manually_graded/statements.json +++ b/tests/mod_quiz/question_manually_graded/statements.json @@ -7,69 +7,85 @@ }, "name": "test_learner_fullname" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/scored", + "display": { + "en": "Scored" + } + }, + "object": { + "id": "http://www.example.org/review.php?attempt=1&slot=1", + "definition": { + "name": { + "en": "test_quiz_name Review Slot 1" + }, + "type": "http://activitystrea.ms/schema/1.0/review#slot" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/review.php?attempt=1", "definition": { "name": { "en": "Review" }, "type": "http://activitystrea.ms/schema/1.0/review" }, - "id": "http://www.example.org/review.php?attempt=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "definition": { "name": { "en": "test_quiz_name Attempt 1" }, "type": "http://adlnet.gov/expapi/activities/attempt" }, - "id": "http://www.example.org/mod/quiz/attempt.php?attempt=1&cmid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/quiz/view.php?id=1", "definition": { "name": { "en": "test_quiz_name" }, "type": "http://adlnet.gov/expapi/activities/assessment" }, - "id": "http://www.example.org/mod/quiz/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -91,16 +107,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_quiz_name Review Slot 1" - }, - "type": "http://activitystrea.ms/schema/1.0/review#slot" - }, - "id": "http://www.example.org/review.php?attempt=1&slot=1", - "objectType": "Activity" - }, "result": { "score": { "max": 1, @@ -108,12 +114,6 @@ "raw": 0.5, "scaled": 0.0 } - }, - "verb": { - "display": { - "en": "Scored" - }, - "id": "https://w3id.org/xapi/tla/verbs/scored" } } ] diff --git a/tests/mod_resource/course_module_viewed/existing_module/event.json b/tests/mod_resource/course_module_viewed/existing_module/event.json index 2cd64ec91..d50d9599e 100644 --- a/tests/mod_resource/course_module_viewed/existing_module/event.json +++ b/tests/mod_resource/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_resource\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_resource\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_resource/course_module_viewed/existing_module/statements.json b/tests/mod_resource/course_module_viewed/existing_module/statements.json index fe09ddcfe..2c8a9c200 100644 --- a/tests/mod_resource/course_module_viewed/existing_module/statements.json +++ b/tests/mod_resource/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/resource/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/resource" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://id.tincanapi.com/activitytype/resource" - }, - "id": "http://www.example.org/mod/resource/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_scorm/course_module_viewed/existing_module/event.json b/tests/mod_scorm/course_module_viewed/existing_module/event.json index 91a603a0b..5ed94e78c 100644 --- a/tests/mod_scorm/course_module_viewed/existing_module/event.json +++ b/tests/mod_scorm/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_scorm\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_scorm\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_scorm/course_module_viewed/existing_module/statements.json b/tests/mod_scorm/course_module_viewed/existing_module/statements.json index ec398a84e..33fc81fa9 100644 --- a/tests/mod_scorm/course_module_viewed/existing_module/statements.json +++ b/tests/mod_scorm/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/scorm/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/module" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/module" - }, - "id": "http://www.example.org/mod/scorm/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_scorm/sco_launched/existing_sco_launched/event.json b/tests/mod_scorm/sco_launched/existing_sco_launched/event.json index fb99c6691..d57bfefac 100644 --- a/tests/mod_scorm/sco_launched/existing_sco_launched/event.json +++ b/tests/mod_scorm/sco_launched/existing_sco_launched/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_scorm\\event\\sco_launched", "id": 1, "objectid": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_scorm\\event\\sco_launched", + "timecreated": 1433946701 } diff --git a/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json b/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json index e06d93f02..c3157ae45 100644 --- a/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json +++ b/tests/mod_scorm/sco_launched/existing_sco_launched/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/launched", + "display": { + "en": "Launched" + } + }, + "object": { + "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", + "definition": { + "name": { + "en": "test_name Content" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/scorm/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "http://adlnet.gov/expapi/activities/module" }, - "id": "http://www.example.org/mod/scorm/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name Content" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object" - }, - "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Launched" - }, - "id": "http://adlnet.gov/expapi/verbs/launched" } } ] diff --git a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/data.json b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/data.json index be567957d..41ed38df7 100644 --- a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/data.json +++ b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/data.json @@ -13,30 +13,30 @@ ], "scorm_scoes_track": [ { - "attempt": 1, - "element": "cmi.core.lesson_status", "id": 1, "scoid": 1, "scormid": 1, "userid": 1, + "attempt": 1, + "element": "cmi.core.lesson_status", "value": "completed" }, { - "attempt": 1, - "element": "cmi.core.score.min", "id": 2, "scoid": 1, "scormid": 1, "userid": 1, + "attempt": 1, + "element": "cmi.core.score.min", "value": 0 }, { - "attempt": 1, - "element": "cmi.core.score.max", "id": 3, "scoid": 1, "scormid": 1, "userid": 1, + "attempt": 1, + "element": "cmi.core.score.max", "value": 100 } ] diff --git a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/event.json b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/event.json index 1334c98d6..eb6d52639 100644 --- a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/event.json +++ b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_scorm\\event\\scoreraw_submitted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_scorm\\event\\scoreraw_submitted", "other": "a:2:{s:8:\"cmivalue\";i:100;s:9:\"attemptid\";i:1;}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json index bc14f7767..5f78d48df 100644 --- a/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json +++ b/tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", + "definition": { + "name": { + "en": "test_name Content" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/scorm/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "http://adlnet.gov/expapi/activities/module" }, - "id": "http://www.example.org/mod/scorm/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -64,16 +80,6 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_name Content" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object" - }, - "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", - "objectType": "Activity" - }, "result": { "score": { "max": 100, @@ -81,12 +87,6 @@ "raw": 100, "scaled": 1 } - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/mod_scorm/status_submitted/existing_status_submitted/data.json b/tests/mod_scorm/status_submitted/existing_status_submitted/data.json index 0ef88aa2e..83a49eb12 100644 --- a/tests/mod_scorm/status_submitted/existing_status_submitted/data.json +++ b/tests/mod_scorm/status_submitted/existing_status_submitted/data.json @@ -13,12 +13,12 @@ ], "scorm_scoes_track": [ { - "attempt": 1, - "element": "cmi.core.lesson_status", "id": 1, "scoid": 1, "scormid": 1, "userid": 1, + "attempt": 1, + "element": "cmi.core.lesson_status", "value": "completed" } ] diff --git a/tests/mod_scorm/status_submitted/existing_status_submitted/event.json b/tests/mod_scorm/status_submitted/existing_status_submitted/event.json index 019de7644..09e99e1f9 100644 --- a/tests/mod_scorm/status_submitted/existing_status_submitted/event.json +++ b/tests/mod_scorm/status_submitted/existing_status_submitted/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_scorm\\event\\status_submitted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_scorm\\event\\status_submitted", "other": "a:1:{s:9:\"attemptid\";i:1;}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json b/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json index e51ff4d48..3e617b944 100644 --- a/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json +++ b/tests/mod_scorm/status_submitted/existing_status_submitted/statements.json @@ -7,49 +7,65 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/completed", + "display": { + "en": "Completed" + } + }, + "object": { + "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", + "definition": { + "name": { + "en": "test_name Content" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/scorm/view.php?id=1", "definition": { "name": { "en": "test_name" }, "type": "http://adlnet.gov/expapi/activities/module" }, - "id": "http://www.example.org/mod/scorm/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -63,22 +79,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name Content" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/scorm-content-object" - }, - "id": "http://www.example.org/mod/scorm/view.php?id=1#sco", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Completed" - }, - "id": "http://adlnet.gov/expapi/verbs/completed" } } ] diff --git a/tests/mod_survey/course_module_viewed/existing_module/data.json b/tests/mod_survey/course_module_viewed/existing_module/data.json index 0b924e115..b48c217eb 100644 --- a/tests/mod_survey/course_module_viewed/existing_module/data.json +++ b/tests/mod_survey/course_module_viewed/existing_module/data.json @@ -8,8 +8,8 @@ "survey": [ { "id": 1, - "intro": "

test_intro

", - "name": "test_name" + "name": "test_name", + "intro": "

test_intro

" } ] } diff --git a/tests/mod_survey/course_module_viewed/existing_module/event.json b/tests/mod_survey/course_module_viewed/existing_module/event.json index 06b304ea8..a4dd5547a 100644 --- a/tests/mod_survey/course_module_viewed/existing_module/event.json +++ b/tests/mod_survey/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_survey\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_survey\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_survey/course_module_viewed/existing_module/statements.json b/tests/mod_survey/course_module_viewed/existing_module/statements.json index cc2e83115..89058abe5 100644 --- a/tests/mod_survey/course_module_viewed/existing_module/statements.json +++ b/tests/mod_survey/course_module_viewed/existing_module/statements.json @@ -7,39 +7,58 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/survey/view.php?id=1", + "definition": { + "description": { + "en": "test_intro" + }, + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,25 +72,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_intro" - }, - "name": { - "en": "test_name" - }, - "type": "http://id.tincanapi.com/activitytype/survey" - }, - "id": "http://www.example.org/mod/survey/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_survey/report_viewed/data.json b/tests/mod_survey/report_viewed/data.json index 0b924e115..b48c217eb 100644 --- a/tests/mod_survey/report_viewed/data.json +++ b/tests/mod_survey/report_viewed/data.json @@ -8,8 +8,8 @@ "survey": [ { "id": 1, - "intro": "

test_intro

", - "name": "test_name" + "name": "test_name", + "intro": "

test_intro

" } ] } diff --git a/tests/mod_survey/report_viewed/event.json b/tests/mod_survey/report_viewed/event.json index 388b9a2a8..46d0101bc 100644 --- a/tests/mod_survey/report_viewed/event.json +++ b/tests/mod_survey/report_viewed/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_survey\\event\\report_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_survey\\event\\report_viewed", "objecttable": "survey", "other": "a:2:{s:6:\"action\";s:7:\"summary\";s:7:\"groupid\";i:0;}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_survey/report_viewed/statements.json b/tests/mod_survey/report_viewed/statements.json index 83ae8fd47..334387dfe 100644 --- a/tests/mod_survey/report_viewed/statements.json +++ b/tests/mod_survey/report_viewed/statements.json @@ -7,22 +7,39 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/survey/report.php?id=1&action=summary", + "definition": { + "name": { + "en": "test_name Report: Summary" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/report" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/survey/view.php?id=1", "definition": { "description": { "en": "test_intro" @@ -32,27 +49,26 @@ }, "type": "http://id.tincanapi.com/activitytype/survey" }, - "id": "http://www.example.org/mod/survey/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -66,22 +82,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name Report: Summary" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/report" - }, - "id": "http://www.example.org/mod/survey/report.php?id=1&action=summary", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_survey/response_submitted/data.json b/tests/mod_survey/response_submitted/data.json index 0b924e115..b48c217eb 100644 --- a/tests/mod_survey/response_submitted/data.json +++ b/tests/mod_survey/response_submitted/data.json @@ -8,8 +8,8 @@ "survey": [ { "id": 1, - "intro": "

test_intro

", - "name": "test_name" + "name": "test_name", + "intro": "

test_intro

" } ] } diff --git a/tests/mod_survey/response_submitted/event.json b/tests/mod_survey/response_submitted/event.json index 29c9b7f17..e1ce8b1e8 100644 --- a/tests/mod_survey/response_submitted/event.json +++ b/tests/mod_survey/response_submitted/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_survey\\event\\response_submitted", "id": 1, "objectid": null, + "userid": 1, + "eventname": "\\mod_survey\\event\\response_submitted", "objecttable": null, "other": "a:1:{s:8:\"surveyid\";s:1:\"1\";}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_survey/response_submitted/statements.json b/tests/mod_survey/response_submitted/statements.json index 1185ddbc7..3081edcbf 100644 --- a/tests/mod_survey/response_submitted/statements.json +++ b/tests/mod_survey/response_submitted/statements.json @@ -7,39 +7,58 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/submit", + "display": { + "en": "Submitted" + } + }, + "object": { + "id": "http://www.example.org/mod/survey/view.php?id=1", + "definition": { + "description": { + "en": "test_intro" + }, + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/survey" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,25 +72,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_intro" - }, - "name": { - "en": "test_name" - }, - "type": "http://id.tincanapi.com/activitytype/survey" - }, - "id": "http://www.example.org/mod/survey/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Submitted" - }, - "id": "http://activitystrea.ms/submit" } } ] diff --git a/tests/mod_url/course_module_viewed/existing_module/event.json b/tests/mod_url/course_module_viewed/existing_module/event.json index 894442364..60ba8c7a1 100644 --- a/tests/mod_url/course_module_viewed/existing_module/event.json +++ b/tests/mod_url/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_url\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_url\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_url/course_module_viewed/existing_module/statements.json b/tests/mod_url/course_module_viewed/existing_module/statements.json index 3e79c6ca1..72f46a962 100644 --- a/tests/mod_url/course_module_viewed/existing_module/statements.json +++ b/tests/mod_url/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/url/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://adlnet.gov/expapi/activities/link" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://adlnet.gov/expapi/activities/link" - }, - "id": "http://www.example.org/mod/url/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_wiki/comment_created/data.json b/tests/mod_wiki/comment_created/data.json index 0db9e2a02..e4c3ec844 100644 --- a/tests/mod_wiki/comment_created/data.json +++ b/tests/mod_wiki/comment_created/data.json @@ -1,9 +1,9 @@ { "comments": [ { - "content": "

test_content

", "id": 1, - "itemid": 1 + "itemid": 1, + "content": "

test_content

" } ], "modules": [ @@ -15,15 +15,15 @@ "wiki": [ { "id": 1, - "intro": "

test_intro

", - "name": "test_name" + "name": "test_name", + "intro": "

test_intro

" } ], "wiki_pages": [ { - "cachedcontent": "

test_content

", "id": 1, "subwikiid": 1, + "cachedcontent": "

test_content

", "title": "test_page_title" } ], diff --git a/tests/mod_wiki/comment_created/event.json b/tests/mod_wiki/comment_created/event.json index ffe628105..682c3e710 100644 --- a/tests/mod_wiki/comment_created/event.json +++ b/tests/mod_wiki/comment_created/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_wiki\\event\\comment_created", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_wiki\\event\\comment_created", "objecttable": "comments", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_wiki/comment_created/statements.json b/tests/mod_wiki/comment_created/statements.json index 8519504ad..d84ad33ef 100644 --- a/tests/mod_wiki/comment_created/statements.json +++ b/tests/mod_wiki/comment_created/statements.json @@ -7,22 +7,39 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://adlnet.gov/expapi/verbs/commented", + "display": { + "en": "Commented" + } + }, + "object": { + "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", + "definition": { + "name": { + "en": "test_page_title Discussion" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/wiki/view.php?pageid=1", "definition": { "description": { "en": "test_content" @@ -32,10 +49,10 @@ }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page" }, - "id": "http://www.example.org/mod/wiki/view.php?pageid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/wiki/view.php?id=1", "definition": { "description": { "en": "test_intro" @@ -45,27 +62,26 @@ }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" }, - "id": "http://www.example.org/mod/wiki/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -80,24 +96,8 @@ }, "language": "en" }, - "object": { - "definition": { - "name": { - "en": "test_page_title Discussion" - }, - "type": "http://id.tincanapi.com/activitytype/discussion" - }, - "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", - "objectType": "Activity" - }, "result": { "response": "test_content" - }, - "verb": { - "display": { - "en": "Commented" - }, - "id": "http://adlnet.gov/expapi/verbs/commented" } } ] diff --git a/tests/mod_wiki/comment_deleted/data.json b/tests/mod_wiki/comment_deleted/data.json index 954b8baf4..96308b078 100644 --- a/tests/mod_wiki/comment_deleted/data.json +++ b/tests/mod_wiki/comment_deleted/data.json @@ -8,15 +8,15 @@ "wiki": [ { "id": 1, - "intro": "

test_intro

", - "name": "test_name" + "name": "test_name", + "intro": "

test_intro

" } ], "wiki_pages": [ { - "cachedcontent": "

test_content

", "id": 1, "subwikiid": 1, + "cachedcontent": "

test_content

", "title": "test_page_title" } ], diff --git a/tests/mod_wiki/comment_deleted/event.json b/tests/mod_wiki/comment_deleted/event.json index 07cf0ce1a..39b61d38c 100644 --- a/tests/mod_wiki/comment_deleted/event.json +++ b/tests/mod_wiki/comment_deleted/event.json @@ -1,11 +1,11 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_wiki\\event\\comment_deleted", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_wiki\\event\\comment_deleted", "objecttable": "comments", "other": "a:1:{s:6:\"itemid\";s:1:\"1\";}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_wiki/comment_deleted/statements.json b/tests/mod_wiki/comment_deleted/statements.json index c0b020198..8d804e5dd 100644 --- a/tests/mod_wiki/comment_deleted/statements.json +++ b/tests/mod_wiki/comment_deleted/statements.json @@ -7,32 +7,49 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/delete", + "display": { + "en": "Deleted" + } + }, + "object": { + "id": "http://www.example.org/mod/wiki/instancecomments.php?commentid=1&pageid=1", + "definition": { + "name": { + "en": "Comment" + }, + "type": "http://activitystrea.ms/comment" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", "definition": { "name": { "en": "test_page_title Discussion" }, "type": "http://id.tincanapi.com/activitytype/discussion" }, - "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/wiki/view.php?pageid=1", "definition": { "description": { "en": "test_content" @@ -42,10 +59,10 @@ }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page" }, - "id": "http://www.example.org/mod/wiki/view.php?pageid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/wiki/view.php?id=1", "definition": { "description": { "en": "test_intro" @@ -55,27 +72,26 @@ }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" }, - "id": "http://www.example.org/mod/wiki/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -89,22 +105,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "Comment" - }, - "type": "http://activitystrea.ms/comment" - }, - "id": "http://www.example.org/mod/wiki/instancecomments.php?commentid=1&pageid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Deleted" - }, - "id": "http://activitystrea.ms/delete" } } ] diff --git a/tests/mod_wiki/comments_viewed/data.json b/tests/mod_wiki/comments_viewed/data.json index 0db9e2a02..e4c3ec844 100644 --- a/tests/mod_wiki/comments_viewed/data.json +++ b/tests/mod_wiki/comments_viewed/data.json @@ -1,9 +1,9 @@ { "comments": [ { - "content": "

test_content

", "id": 1, - "itemid": 1 + "itemid": 1, + "content": "

test_content

" } ], "modules": [ @@ -15,15 +15,15 @@ "wiki": [ { "id": 1, - "intro": "

test_intro

", - "name": "test_name" + "name": "test_name", + "intro": "

test_intro

" } ], "wiki_pages": [ { - "cachedcontent": "

test_content

", "id": 1, "subwikiid": 1, + "cachedcontent": "

test_content

", "title": "test_page_title" } ], diff --git a/tests/mod_wiki/comments_viewed/event.json b/tests/mod_wiki/comments_viewed/event.json index 3d43bfdb8..6843346a3 100644 --- a/tests/mod_wiki/comments_viewed/event.json +++ b/tests/mod_wiki/comments_viewed/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_wiki\\event\\comments_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_wiki\\event\\comments_viewed", "objecttable": "wiki_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_wiki/comments_viewed/statements.json b/tests/mod_wiki/comments_viewed/statements.json index 7043e1f5c..3f3d8f298 100644 --- a/tests/mod_wiki/comments_viewed/statements.json +++ b/tests/mod_wiki/comments_viewed/statements.json @@ -7,22 +7,39 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", + "definition": { + "name": { + "en": "test_page_title Discussion" + }, + "type": "http://id.tincanapi.com/activitytype/discussion" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/wiki/view.php?pageid=1", "definition": { "description": { "en": "test_content" @@ -32,10 +49,10 @@ }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page" }, - "id": "http://www.example.org/mod/wiki/view.php?pageid=1", "objectType": "Activity" }, { + "id": "http://www.example.org/mod/wiki/view.php?id=1", "definition": { "description": { "en": "test_intro" @@ -45,27 +62,26 @@ }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" }, - "id": "http://www.example.org/mod/wiki/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -79,22 +95,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_page_title Discussion" - }, - "type": "http://id.tincanapi.com/activitytype/discussion" - }, - "id": "http://www.example.org/mod/wiki/comments.php?pageid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_wiki/course_module_viewed/existing_module/data.json b/tests/mod_wiki/course_module_viewed/existing_module/data.json index 25a80fee2..4edf54c26 100644 --- a/tests/mod_wiki/course_module_viewed/existing_module/data.json +++ b/tests/mod_wiki/course_module_viewed/existing_module/data.json @@ -8,8 +8,8 @@ "wiki": [ { "id": 1, - "intro": "

test_intro

", - "name": "test_name" + "name": "test_name", + "intro": "

test_intro

" } ] } diff --git a/tests/mod_wiki/course_module_viewed/existing_module/event.json b/tests/mod_wiki/course_module_viewed/existing_module/event.json index cd9e3e059..f56a7012d 100644 --- a/tests/mod_wiki/course_module_viewed/existing_module/event.json +++ b/tests/mod_wiki/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_wiki\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_wiki\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_wiki/course_module_viewed/existing_module/statements.json b/tests/mod_wiki/course_module_viewed/existing_module/statements.json index ab899145b..fa7e9199c 100644 --- a/tests/mod_wiki/course_module_viewed/existing_module/statements.json +++ b/tests/mod_wiki/course_module_viewed/existing_module/statements.json @@ -7,39 +7,58 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/wiki/view.php?id=1", + "definition": { + "description": { + "en": "test_intro" + }, + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,25 +72,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_intro" - }, - "name": { - "en": "test_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" - }, - "id": "http://www.example.org/mod/wiki/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_wiki/page_viewed/data.json b/tests/mod_wiki/page_viewed/data.json index 954b8baf4..96308b078 100644 --- a/tests/mod_wiki/page_viewed/data.json +++ b/tests/mod_wiki/page_viewed/data.json @@ -8,15 +8,15 @@ "wiki": [ { "id": 1, - "intro": "

test_intro

", - "name": "test_name" + "name": "test_name", + "intro": "

test_intro

" } ], "wiki_pages": [ { - "cachedcontent": "

test_content

", "id": 1, "subwikiid": 1, + "cachedcontent": "

test_content

", "title": "test_page_title" } ], diff --git a/tests/mod_wiki/page_viewed/event.json b/tests/mod_wiki/page_viewed/event.json index 10c5fa852..03c4797c2 100644 --- a/tests/mod_wiki/page_viewed/event.json +++ b/tests/mod_wiki/page_viewed/event.json @@ -1,10 +1,10 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_wiki\\event\\page_viewed", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\mod_wiki\\event\\page_viewed", "objecttable": "wiki_pages", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/mod_wiki/page_viewed/statements.json b/tests/mod_wiki/page_viewed/statements.json index 77b63cede..9e439582e 100644 --- a/tests/mod_wiki/page_viewed/statements.json +++ b/tests/mod_wiki/page_viewed/statements.json @@ -7,22 +7,42 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/wiki/view.php?pageid=1", + "definition": { + "description": { + "en": "test_content" + }, + "name": { + "en": "test_page_title" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/mod/wiki/view.php?id=1", "definition": { "description": { "en": "test_intro" @@ -32,27 +52,26 @@ }, "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki" }, - "id": "http://www.example.org/mod/wiki/view.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -66,25 +85,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "description": { - "en": "test_content" - }, - "name": { - "en": "test_page_title" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/wiki-page" - }, - "id": "http://www.example.org/mod/wiki/view.php?pageid=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/mod_workshop/course_module_viewed/existing_module/event.json b/tests/mod_workshop/course_module_viewed/existing_module/event.json index 1bf11ef45..68928dd14 100644 --- a/tests/mod_workshop/course_module_viewed/existing_module/event.json +++ b/tests/mod_workshop/course_module_viewed/existing_module/event.json @@ -1,8 +1,8 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\mod_workshop\\event\\course_module_viewed", "id": 1, - "timecreated": 1433946701, - "userid": 1 + "userid": 1, + "eventname": "\\mod_workshop\\event\\course_module_viewed", + "timecreated": 1433946701 } diff --git a/tests/mod_workshop/course_module_viewed/existing_module/statements.json b/tests/mod_workshop/course_module_viewed/existing_module/statements.json index 08d551fda..a4d181c4a 100644 --- a/tests/mod_workshop/course_module_viewed/existing_module/statements.json +++ b/tests/mod_workshop/course_module_viewed/existing_module/statements.json @@ -7,39 +7,55 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://id.tincanapi.com/verb/viewed", + "display": { + "en": "Viewed" + } + }, + "object": { + "id": "http://www.example.org/mod/workshop/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/workshop" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ], "parent": [ { + "id": "http://www.example.org/course/section.php?id=1", "definition": { "name": { "en": "test_name Section 0" }, "type": "http://id.tincanapi.com/activitytype/section" }, - "id": "http://www.example.org/course/section.php?id=1", "objectType": "Activity" }, { + "id": "http://www.example.org/course/view.php?id=2", "definition": { "name": { "en": "test_name" }, "type": "https://w3id.org/xapi/cmi5/activitytype/course" }, - "id": "http://www.example.org/course/view.php?id=2", "objectType": "Activity" } ] @@ -53,22 +69,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/workshop" - }, - "id": "http://www.example.org/mod/workshop/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Viewed" - }, - "id": "http://id.tincanapi.com/verb/viewed" } } ] diff --git a/tests/tool_certificate/certificate_issued/data.json b/tests/tool_certificate/certificate_issued/data.json index b348eb8ae..2460ca2df 100644 --- a/tests/tool_certificate/certificate_issued/data.json +++ b/tests/tool_certificate/certificate_issued/data.json @@ -1,21 +1,21 @@ { "tool_certificate_issues": [ { - "code": "4303209428AU", "courseid": null, - "id": 1 + "id": 1, + "code": "4303209428AU" } ], "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/tool_certificate/certificate_issued/event.json b/tests/tool_certificate/certificate_issued/event.json index 7e852aee0..1f0a1c1f0 100644 --- a/tests/tool_certificate/certificate_issued/event.json +++ b/tests/tool_certificate/certificate_issued/event.json @@ -1,11 +1,11 @@ { "courseid": 0, - "eventname": "\\tool_certificate\\event\\certificate_issued", "id": 1, "objectid": 1, + "relateduserid": 2, + "userid": 1, + "eventname": "\\tool_certificate\\event\\certificate_issued", "objecttable": "tool_certificate_issues", "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", - "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/tool_certificate/certificate_issued/statements.json b/tests/tool_certificate/certificate_issued/statements.json index 8d8608567..8d0612b54 100644 --- a/tests/tool_certificate/certificate_issued/statements.json +++ b/tests/tool_certificate/certificate_issued/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname2" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/achieved", + "display": { + "en": "Achieved" + } + }, + "object": { + "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", + "definition": { + "name": { + "en": "Certificate 4303209428AU" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -38,22 +54,6 @@ "name": "test_fullname1" }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "Certificate 4303209428AU" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate" - }, - "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Achieved" - }, - "id": "https://w3id.org/xapi/tla/verbs/achieved" } } ] diff --git a/tests/tool_certificate/certificate_revoked/data.json b/tests/tool_certificate/certificate_revoked/data.json index 2f6b7f08a..0b0e7b25a 100644 --- a/tests/tool_certificate/certificate_revoked/data.json +++ b/tests/tool_certificate/certificate_revoked/data.json @@ -1,14 +1,14 @@ { "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/tool_certificate/certificate_revoked/event.json b/tests/tool_certificate/certificate_revoked/event.json index 002108ec4..0cd3ece3e 100644 --- a/tests/tool_certificate/certificate_revoked/event.json +++ b/tests/tool_certificate/certificate_revoked/event.json @@ -1,11 +1,11 @@ { "courseid": 0, - "eventname": "\\tool_certificate\\event\\certificate_revoked", "id": 1, "objectid": 1, + "relateduserid": 2, + "userid": 1, + "eventname": "\\tool_certificate\\event\\certificate_revoked", "objecttable": "tool_certificate_issues", "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", - "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/tool_certificate/certificate_revoked/statements.json b/tests/tool_certificate/certificate_revoked/statements.json index 96f174f71..c1a48a133 100644 --- a/tests/tool_certificate/certificate_revoked/statements.json +++ b/tests/tool_certificate/certificate_revoked/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname2" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/forfeited", + "display": { + "en": "Forfeited" + } + }, + "object": { + "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", + "definition": { + "name": { + "en": "Certificate 4303209428AU" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -38,22 +54,6 @@ "name": "test_fullname1" }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "Certificate 4303209428AU" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate" - }, - "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Forfeited" - }, - "id": "https://w3id.org/xapi/tla/verbs/forfeited" } } ] diff --git a/tests/tool_certificate/certificate_verified/data.json b/tests/tool_certificate/certificate_verified/data.json index b348eb8ae..2460ca2df 100644 --- a/tests/tool_certificate/certificate_verified/data.json +++ b/tests/tool_certificate/certificate_verified/data.json @@ -1,21 +1,21 @@ { "tool_certificate_issues": [ { - "code": "4303209428AU", "courseid": null, - "id": 1 + "id": 1, + "code": "4303209428AU" } ], "user": [ { - "email": "test1@test.com", + "id": 1, "firstname": "test_fullname1", - "id": 1 + "email": "test1@test.com" }, { - "email": "test2@test.com", + "id": 2, "firstname": "test_fullname2", - "id": 2 + "email": "test2@test.com" } ] } diff --git a/tests/tool_certificate/certificate_verified/event.json b/tests/tool_certificate/certificate_verified/event.json index c5d417602..db8226522 100644 --- a/tests/tool_certificate/certificate_verified/event.json +++ b/tests/tool_certificate/certificate_verified/event.json @@ -1,11 +1,11 @@ { "courseid": 2, - "eventname": "\\tool_certificate\\event\\certificate_verified", "id": 1, "objectid": 1, + "relateduserid": 2, + "userid": 1, + "eventname": "\\tool_certificate\\event\\certificate_verified", "objecttable": "tool_certificate_issues", "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", - "relateduserid": 2, - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/tool_certificate/certificate_verified/statements.json b/tests/tool_certificate/certificate_verified/statements.json index 43d511081..29482e236 100644 --- a/tests/tool_certificate/certificate_verified/statements.json +++ b/tests/tool_certificate/certificate_verified/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname1" }, + "verb": { + "id": "https://w3id.org/xapi/tla/verbs/verified", + "display": { + "en": "Verified" + } + }, + "object": { + "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", + "definition": { + "name": { + "en": "Certificate 4303209428AU" + }, + "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -31,22 +47,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "Certificate 4303209428AU" - }, - "type": "https://xapi.edlm/profiles/edlm-lms/concepts/activity-types/certificate" - }, - "id": "http://www.example.org/admin/tool/certificate/index.php?code=4303209428AU", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Verified" - }, - "id": "https://w3id.org/xapi/tla/verbs/verified" } } ] diff --git a/tests/tool_usertours/tour_ended/event.json b/tests/tool_usertours/tour_ended/event.json index e4d27421c..1eabecbb0 100644 --- a/tests/tool_usertours/tour_ended/event.json +++ b/tests/tool_usertours/tour_ended/event.json @@ -1,9 +1,9 @@ { "contextinstanceid": 1, "courseid": 2, - "eventname": "\\tool_usertours\\event\\tour_ended", "id": 1, + "userid": 1, + "eventname": "\\tool_usertours\\event\\tour_ended", "other": "a:3:{s:7:\"pageurl\";s:42:\"http://localhost:8000/course/view.php?id=1\";s:6:\"stepid\";i:7;s:9:\"stepindex\";i:2;}", - "timecreated": 1433946701, - "userid": 1 + "timecreated": 1433946701 } diff --git a/tests/tool_usertours/tour_ended/statements.json b/tests/tool_usertours/tour_ended/statements.json index 0b18bfee1..2abc4c060 100644 --- a/tests/tool_usertours/tour_ended/statements.json +++ b/tests/tool_usertours/tour_ended/statements.json @@ -7,17 +7,27 @@ }, "name": "test_fullname" }, + "verb": { + "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/toured", + "display": { + "en": "Toured" + } + }, + "object": { + "id": "http://www.example.org/course/view.php?id=2", + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { + "id": "http://www.example.org", "definition": { "name": { "en": "test_name" }, "type": "http://id.tincanapi.com/activitytype/lms" - }, - "id": "http://www.example.org" + } } ] }, @@ -30,16 +40,6 @@ } }, "language": "en" - }, - "object": { - "id": "http://www.example.org/course/view.php?id=2", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "Toured" - }, - "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/toured" } } ] diff --git a/tests/totara_program/program_assigned/existing_program/data.json b/tests/totara_program/program_assigned/existing_program/data.json index 4c97dfdd6..72b7a58c6 100644 --- a/tests/totara_program/program_assigned/existing_program/data.json +++ b/tests/totara_program/program_assigned/existing_program/data.json @@ -1,8 +1,8 @@ { "prog": [ { - "fullname": "test_name", - "id": 1 + "id": 1, + "fullname": "test_name" } ] } diff --git a/tests/totara_program/program_assigned/existing_program/event.json b/tests/totara_program/program_assigned/existing_program/event.json index 79aa0b88f..e5b28ca12 100644 --- a/tests/totara_program/program_assigned/existing_program/event.json +++ b/tests/totara_program/program_assigned/existing_program/event.json @@ -1,8 +1,8 @@ { - "eventname": "\\totara_program\\event\\program_assigned", "id": 1, "objectid": 1, + "userid": 1, + "eventname": "\\totara_program\\event\\program_assigned", "objecttable": "prog_assignment", - "timecreated": 1560399491, - "userid": 1 + "timecreated": 1560399491 } diff --git a/tests/totara_program/program_assigned/existing_program/statements.json b/tests/totara_program/program_assigned/existing_program/statements.json index 351224572..f6ee59c53 100644 --- a/tests/totara_program/program_assigned/existing_program/statements.json +++ b/tests/totara_program/program_assigned/existing_program/statements.json @@ -7,18 +7,34 @@ }, "name": "test_fullname" }, + "verb": { + "id": "http://activitystrea.ms/schema/1.0/assign", + "display": { + "en": "assigned" + } + }, + "object": { + "id": "http://www.example.org/totara/program/view.php?id=1", + "definition": { + "name": { + "en": "test_name" + }, + "type": "http://id.tincanapi.com/activitytype/lms/program" + }, + "objectType": "Activity" + }, "context": { "contextActivities": { "category": [ { "id": "http://www.example.org", - "objectType": "Activity", "definition": { "name": { "en": "test_site_fullname" }, "type": "http://id.tincanapi.com/activitytype/lms" - } + }, + "objectType": "Activity" } ] }, @@ -31,22 +47,6 @@ } }, "language": "en" - }, - "object": { - "definition": { - "name": { - "en": "test_name" - }, - "type": "http://id.tincanapi.com/activitytype/lms/program" - }, - "id": "http://www.example.org/totara/program/view.php?id=1", - "objectType": "Activity" - }, - "verb": { - "display": { - "en": "assigned" - }, - "id": "http://activitystrea.ms/schema/1.0/assign" } } ]