├── .editorconfig ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── moodle-plugin-ci.yml │ └── moodle-release.yml ├── .gitignore ├── LICENSE ├── README.md ├── ajax └── moveback_to_log.php ├── amd ├── build │ ├── replayevents.min.js │ └── replayevents.min.js.map └── src │ └── replayevents.js ├── classes ├── form │ └── reportfilter_form.php ├── log │ ├── moveback.php │ └── store.php ├── output │ └── renderer.php ├── privacy │ └── provider.php └── task │ ├── emit_task.php │ ├── failed_task.php │ ├── historical_task.php │ └── sendfailednotifications_task.php ├── cli └── testdataseeder.php ├── composer.json ├── composer.lock ├── db ├── access.php ├── install.xml ├── tasks.php └── upgrade.php ├── docs ├── change-statements.md ├── configure-the-plugin.md ├── enable-the-plugin.md ├── historical-events.md ├── install-with-download.md ├── install-with-git.md ├── install-with-zip.md ├── new-events.md ├── new-statements.md └── testing.md ├── lang ├── en │ └── logstore_xapi.php └── sv │ └── logstore_xapi.php ├── lib.php ├── report.php ├── scripts ├── generateVersionFile.sh ├── generateZipFile.sh └── templateVersionFile ├── settings.php ├── src ├── autoload.php ├── handler.php ├── loader │ ├── handler.php │ ├── log.php │ ├── lrs.php │ ├── moodle_curl_lrs.php │ ├── none.php │ └── utils │ │ ├── construct_loaded_events.php │ │ ├── correct_endpoint.php │ │ ├── filelib.php │ │ ├── filter_transformed_events.php │ │ ├── get_event_batches.php │ │ ├── load_batch.php │ │ └── load_in_batches.php └── transformer │ ├── events │ ├── all │ │ └── course_module_viewed.php │ ├── core │ │ ├── badge_awarded.php │ │ ├── badge_revoked.php │ │ ├── badge_updated.php │ │ ├── badge_viewed.php │ │ ├── calendar_event_created.php │ │ ├── calendar_event_deleted.php │ │ ├── calendar_event_updated.php │ │ ├── calendar_subscription_created.php │ │ ├── calendar_subscription_deleted.php │ │ ├── calendar_subscription_updated.php │ │ ├── course_category_created.php │ │ ├── course_completed.php │ │ ├── course_completion_updated.php │ │ ├── course_created.php │ │ ├── course_module_completion_updated.php │ │ ├── course_module_created.php │ │ ├── course_resources_list_viewed.php │ │ ├── course_section_created.php │ │ ├── course_updated.php │ │ ├── course_viewed.php │ │ ├── group_created.php │ │ ├── group_deleted.php │ │ ├── group_member_added.php │ │ ├── group_member_removed.php │ │ ├── group_message_sent.php │ │ ├── message_sent.php │ │ ├── message_viewed.php │ │ ├── note_created.php │ │ ├── note_updated.php │ │ ├── notes_viewed.php │ │ ├── question_created.php │ │ ├── questions_imported.php │ │ ├── search_results_viewed.php │ │ ├── user_created.php │ │ ├── user_enrolment_created.php │ │ ├── user_enrolment_deleted.php │ │ ├── user_enrolment_updated.php │ │ ├── user_loggedin.php │ │ └── user_loggedout.php │ ├── debug │ │ └── debug_event.php │ ├── mod_assign │ │ ├── assignment_graded.php │ │ ├── assignment_submitted.php │ │ ├── feedback_viewed.php │ │ ├── submission_locked.php │ │ └── submission_viewed.php │ ├── mod_bigbluebuttonbn │ │ ├── activity_management_viewed.php │ │ ├── handler.php │ │ ├── live_session.php │ │ ├── meeting_created.php │ │ ├── meeting_ended.php │ │ ├── meeting_joined.php │ │ ├── meeting_left.php │ │ ├── recording_deleted.php │ │ ├── recording_edited.php │ │ ├── recording_imported.php │ │ ├── recording_protected.php │ │ ├── recording_published.php │ │ ├── recording_unprotected.php │ │ ├── recording_unpublished.php │ │ └── recording_viewed.php │ ├── mod_book │ │ ├── chapter_created.php │ │ └── chapter_viewed.php │ ├── mod_choice │ │ └── answer_created.php │ ├── mod_facetoface │ │ ├── cancel_booking.php │ │ ├── signup_success.php │ │ └── take_attendance.php │ ├── mod_feedback │ │ ├── item_answered │ │ │ ├── handler.php │ │ │ ├── multichoice.php │ │ │ ├── multichoicerated.php │ │ │ ├── numerical.php │ │ │ ├── textarea.php │ │ │ └── textfield.php │ │ └── response_submitted │ │ │ ├── handler.php │ │ │ └── response_submitted.php │ ├── mod_forum │ │ ├── discussion_created.php │ │ ├── discussion_subscription_created.php │ │ ├── discussion_subscription_deleted.php │ │ ├── discussion_viewed.php │ │ ├── post_created.php │ │ ├── post_deleted.php │ │ ├── post_updated.php │ │ ├── subscription_created.php │ │ ├── subscription_deleted.php │ │ └── user_report_viewed.php │ ├── mod_glossary │ │ ├── comment_created.php │ │ ├── comment_deleted.php │ │ └── entry_viewed.php │ ├── mod_lesson │ │ ├── content_page_viewed.php │ │ ├── essay_assessed.php │ │ ├── lesson_ended.php │ │ ├── lesson_restarted.php │ │ ├── lesson_resumed.php │ │ ├── lesson_started.php │ │ ├── question_answered.php │ │ └── question_viewed.php │ ├── mod_questionnaire │ │ ├── all_responses_viewed.php │ │ ├── attempt_resumed.php │ │ ├── attempt_saved.php │ │ └── attempt_submitted.php │ ├── mod_quiz │ │ ├── attempt_becameoverdue.php │ │ ├── attempt_reviewed.php │ │ ├── attempt_started.php │ │ ├── attempt_submitted │ │ │ ├── attempt_submitted.php │ │ │ └── handler.php │ │ ├── attempt_viewed.php │ │ ├── question_answered │ │ │ ├── essay.php │ │ │ ├── gapselect.php │ │ │ ├── handler.php │ │ │ ├── match.php │ │ │ ├── multichoice.php │ │ │ ├── numerical.php │ │ │ ├── randomsamatch.php │ │ │ ├── shortanswer.php │ │ │ └── truefalse.php │ │ └── question_manually_graded.php │ ├── mod_scorm │ │ ├── sco_launched.php │ │ ├── scoreraw_submitted.php │ │ └── status_submitted.php │ ├── mod_survey │ │ ├── report_viewed.php │ │ └── response_submitted.php │ ├── mod_wiki │ │ ├── comment_created.php │ │ ├── comment_deleted.php │ │ ├── comments_viewed.php │ │ └── page_viewed.php │ ├── tool_certificate │ │ ├── certificate_issued.php │ │ ├── certificate_revoked.php │ │ └── certificate_verified.php │ ├── tool_usertours │ │ └── tour_ended.php │ └── totara_program │ │ └── program_assigned.php │ ├── get_event_function_map.php │ ├── handler.php │ ├── repos │ ├── MoodleRepository.php │ ├── Repository.php │ └── TestRepository.php │ └── utils │ ├── add_parent.php │ ├── apply_statement_defaults.php │ ├── cap_raw_score.php │ ├── context_activities │ └── get_parent.php │ ├── create_timestamp.php │ ├── deep_merge_arrays.php │ ├── extensions │ ├── base.php │ ├── course_area.php │ ├── info.php │ └── jisc.php │ ├── get_activity │ ├── assign_submission.php │ ├── badge.php │ ├── base.php │ ├── book_chapter.php │ ├── calendar_event.php │ ├── calendar_subscription.php │ ├── certificate.php │ ├── course.php │ ├── course_assignment.php │ ├── course_category.php │ ├── course_discussion.php │ ├── course_forum.php │ ├── course_group.php │ ├── course_module.php │ ├── course_note.php │ ├── course_quiz.php │ ├── course_resources_list.php │ ├── course_section.php │ ├── definition │ │ ├── choice.php │ │ ├── cmi │ │ │ ├── choice.php │ │ │ ├── common.php │ │ │ ├── fill_in.php │ │ │ ├── long_fill_in.php │ │ │ ├── matching.php │ │ │ ├── numeric.php │ │ │ ├── sequencing.php │ │ │ └── true_false.php │ │ └── question.php │ ├── forum_discussion_post.php │ ├── forum_discussion_post_reply.php │ ├── glossary_comment.php │ ├── glossary_entry.php │ ├── lesson.php │ ├── lesson_content_page.php │ ├── lesson_question_page.php │ ├── message.php │ ├── questionnaire_all_responses_report.php │ ├── quiz_attempt.php │ ├── quiz_review.php │ ├── scorm_content_object.php │ ├── site.php │ ├── source.php │ ├── user_report.php │ ├── web_calendar.php │ ├── wiki_discussion.php │ └── wiki_page.php │ ├── get_attempt_duration.php │ ├── get_attempt_result.php │ ├── get_context_base.php │ ├── get_course_lang.php │ ├── get_enrolment_context.php │ ├── get_event_timestamp.php │ ├── get_full_name.php │ ├── get_group.php │ ├── get_lesson_essay_result.php │ ├── get_lesson_question_result.php │ ├── get_lesson_result.php │ ├── get_module_activity_type.php │ ├── get_quiz_question_id.php │ ├── get_scaled_score.php │ ├── get_scorm_result.php │ ├── get_scorm_verb.php │ ├── get_session_duration.php │ ├── get_string_html_removed.php │ ├── get_user.php │ ├── get_verb.php │ ├── is_enabled_config.php │ ├── quiz_question │ └── get_numerical_answer.php │ ├── result │ ├── get_matching_response.php │ └── get_numeric_success.php │ ├── reverse_backslashes.php │ ├── slugify.php │ ├── string_to_uuidv5.php │ └── totara │ └── program.php ├── styles.css ├── templates └── failed_notification_email.mustache ├── tests ├── common │ ├── data.json │ ├── event.json │ └── statement.json ├── core │ ├── badge_awarded │ │ └── user_achieved_badge │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_achieved_badge_test.php │ ├── badge_revoked │ │ └── user_forfeited_badge │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_forfeited_badge_test.php │ ├── badge_updated │ │ ├── badge_updated_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── badge_viewed │ │ └── user_viewed_badge │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_viewed_badge_test.php │ ├── calendar_event_created │ │ └── user_created_calendar_event │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_created_calendar_event_test.php │ ├── calendar_event_deleted │ │ └── user_deleted_calendar_event │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_deleted_calendar_event_test.php │ ├── calendar_event_updated │ │ └── user_updated_calendar_event │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_updated_calendar_event_test.php │ ├── calendar_subscription_created │ │ └── user_created_calendar_subscription │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_created_calendar_subscription_test.php │ ├── calendar_subscription_deleted │ │ └── user_deleted_calendar_subscription │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_deleted_calendar_subscription_test.php │ ├── calendar_subscription_updated │ │ └── user_updated_calendar_subscription │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_updated_calendar_subscription_test.php │ ├── course_category_created │ │ ├── course_category_created_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── course_completed │ │ ├── completing_existing_course │ │ │ ├── completing_existing_course_test.php │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ └── statements.json │ │ └── send_jisc_data │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── send_jisc_data_test.php │ │ │ └── statements.json │ ├── course_completion_updated │ │ └── course_completion_updated │ │ │ ├── course_completion_updated_test.php │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ └── statements.json │ ├── course_created │ │ └── creating_new_course │ │ │ ├── creating_new_course_test.php │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ └── statements.json │ ├── course_module_completion_update │ │ ├── completing_existing_module │ │ │ ├── completing_existing_module_test.php │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ └── statements.json │ │ └── uncompleting_existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── uncompleting_existing_module_test.php │ ├── course_module_created │ │ └── creating_new_course_module │ │ │ ├── creating_new_course_module_test.php │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ └── statements.json │ ├── course_resources_list_viewed │ │ └── existing_course_resources_list_viewed │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_course_resources_list_viewed_test.php │ │ │ └── statements.json │ ├── course_section_created │ │ └── new_course_section_created │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── new_course_section_created.php │ │ │ └── statements.json │ ├── course_updated │ │ └── updating_existing_course │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── updating_existing_course_test.php │ ├── course_viewed │ │ └── viewing_existing_course │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── viewing_existing_course_test.php │ ├── group_created │ │ └── creating_new_group │ │ │ ├── creating_new_group_test.php │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ └── statements.json │ ├── group_deleted │ │ └── existing_group_deleted_test │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_group_deleted_test.php │ │ │ └── statements.json │ ├── group_member_added │ │ └── new_group_member_added_test │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── new_group_member_added_test.php │ │ │ └── statements.json │ ├── group_member_removed │ │ └── existing_group_member_removed_test │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_group_member_removed_test.php │ │ │ └── statements.json │ ├── group_message_sent │ │ └── new_group_message_sent │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── new_group_message_sent_test.php │ │ │ └── statements.json │ ├── message_sent │ │ └── user_sent_message │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_sent_message_test.php │ ├── message_viewed │ │ └── user_viewed_message │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_viewed_message_test.php │ ├── note_created │ │ └── user_created_note │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_created_note_test.php │ ├── note_updated │ │ └── user_updated_note │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_updated_note_test.php │ ├── notes_viewed │ │ └── user_viewed_notes │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_viewed_notes_test.php │ ├── question_created │ │ └── new_question_created_test │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── new_question_created_test.php │ │ │ └── statements.json │ ├── questions_imported │ │ └── new_questions_imported │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── new_questions_imported_test.php │ │ │ └── statements.json │ ├── search_results_viewed │ │ └── user_viewed_search_results │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_viewed_search_results_test.php │ ├── user_created │ │ ├── existing_user_created │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_user_created_test.php │ │ │ └── statements.json │ │ └── send_jisc_data │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── send_jisc_data_test.php │ │ │ └── statements.json │ ├── user_enrolment_created │ │ └── existing_user_enrolled │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_user_enrolled_test.php │ │ │ └── statements.json │ ├── user_enrolment_deleted │ │ └── existing_user_enrolment_deleted │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_user_enrolment_deleted_test.php │ │ │ └── statements.json │ ├── user_enrolment_updated │ │ ├── user_resumed_course │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_resumed_course_test.php │ │ └── user_suspended_course │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_suspended_course_test.php │ ├── user_loggedin │ │ └── existing_user_loggedin │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_user_loggedin_test.php │ │ │ └── statements.json │ ├── user_loggedinas │ │ └── existing_user_loggedinas │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_user_loggedinas_test.php │ │ │ └── statements.json │ └── user_loggedout │ │ └── existing_user_loggedout │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_user_loggedout_test.php │ │ └── statements.json ├── core_h5p │ └── course_module_viewed │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── user_viewed_h5p_test.php ├── enchancement_jisc_skeleton.php ├── failed_report_test.php ├── history_report_test.php ├── mod_assign │ ├── assignment_graded │ │ ├── existing_assignment_graded_comment │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_assignment_graded_comment_test.php │ │ │ └── statements.json │ │ └── existing_assignment_graded_nocomment │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_assignment_graded_nocomment_test.php │ │ │ └── statements.json │ ├── assignment_submitted │ │ └── existing_assignment_submitted │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_assignment_submitted_test.php │ │ │ └── statements.json │ ├── course_module_viewed │ │ └── existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_module_test.php │ │ │ └── statements.json │ ├── feedback_viewed │ │ └── user_viewed_feedback │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── user_viewed_feedback_test.php │ ├── submission_locked │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── submission_locked_test.php │ ├── submission_unlocked │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── submission_unlocked_test.php │ └── submission_viewed │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── submission_viewed_test.php ├── mod_bigbluebuttonbn │ ├── activity_management_viewed │ │ ├── activity_management_viewed_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── live_session │ │ ├── data.json │ │ ├── event.json │ │ ├── live_session_test.php │ │ └── statements.json │ ├── meeting_created │ │ ├── data.json │ │ ├── event.json │ │ ├── meeting_created_test.php │ │ └── statements.json │ ├── meeting_ended │ │ ├── data.json │ │ ├── event.json │ │ ├── meeting_ended_test.php │ │ └── statements.json │ ├── meeting_joined │ │ ├── data.json │ │ ├── event.json │ │ ├── meeting_joined_test.php │ │ └── statements.json │ ├── meeting_left │ │ ├── data.json │ │ ├── event.json │ │ ├── meeting_left_test.php │ │ └── statements.json │ ├── recording_deleted │ │ ├── data.json │ │ ├── event.json │ │ ├── recording_deleted_test.php │ │ └── statements.json │ ├── recording_edited │ │ ├── data.json │ │ ├── event.json │ │ ├── recording_edited_test.php │ │ └── statements.json │ ├── recording_imported │ │ ├── data.json │ │ ├── event.json │ │ ├── recording_imported_test.php │ │ └── statements.json │ ├── recording_protected │ │ ├── data.json │ │ ├── event.json │ │ ├── recording_protected_test.php │ │ └── statements.json │ ├── recording_published │ │ ├── data.json │ │ ├── event.json │ │ ├── recording_published_test.php │ │ └── statements.json │ ├── recording_unprotected │ │ ├── data.json │ │ ├── event.json │ │ ├── recording_unprotected_test.php │ │ └── statements.json │ ├── recording_unpublished │ │ ├── data.json │ │ ├── event.json │ │ ├── recording_unpublished_test.php │ │ └── statements.json │ └── recording_viewed │ │ ├── data.json │ │ ├── event.json │ │ ├── recording_viewed_test.php │ │ └── statements.json ├── mod_book │ ├── chapter_created │ │ ├── chapter_created_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── chapter_viewed │ │ ├── existing_chapter_viewed_with_parent │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_chapter_viewed_with_parent_test.php │ │ │ └── statements.json │ │ └── existing_chapter_viewed_without_parent │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_chapter_viewed_without_parent_test.php │ │ │ └── statements.json │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_chat │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_choice │ ├── answer_created │ │ ├── answer_created_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_data │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_facetoface │ ├── cancel_booking │ │ └── existing_booking_cancelled │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_booking_canceled_test.php │ │ │ └── statements.json │ ├── course_module_viewed │ │ └── existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_module_test.php │ │ │ └── statements.json │ ├── signup_success │ │ └── existing_signup_success │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_signup_success_test.php │ │ │ └── statements.json │ └── take_attendance │ │ └── existing_attendance_taken │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_attendance_taken_test.php │ │ └── statements.json ├── mod_feedback │ ├── course_module_viewed │ │ └── viewing_feedback │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── viewing_feedback_test.php │ └── response_submitted │ │ ├── multichoice │ │ ├── data.json │ │ ├── event.json │ │ ├── multichoice_test.php │ │ └── statements.json │ │ ├── multichoicerated │ │ ├── data.json │ │ ├── event.json │ │ ├── multichoicerated_test.php │ │ └── statements.json │ │ ├── no_items │ │ ├── data.json │ │ ├── event.json │ │ ├── no_items_test.php │ │ └── statements.json │ │ ├── numerical │ │ ├── data.json │ │ ├── event.json │ │ ├── numerical_test.php │ │ └── statements.json │ │ ├── textarea │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── textarea_test.php │ │ ├── textarea_anon │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── textarea_test.php │ │ ├── textfield │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── textfield_test.php │ │ └── unknown_typ │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── unknown_typ_test.php ├── mod_folder │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_forum │ ├── course_module_viewed │ │ └── existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_module_test.php │ │ │ └── statements.json │ ├── discussion_created │ │ ├── data.json │ │ ├── discussion_created_test.php │ │ ├── event.json │ │ └── statements.json │ ├── discussion_subscription_created │ │ ├── data.json │ │ ├── discussion_subscription_created_test.php │ │ ├── event.json │ │ └── statements.json │ ├── discussion_subscription_deleted │ │ ├── data.json │ │ ├── discussion_subscription_deleted_test.php │ │ ├── event.json │ │ └── statements.json │ ├── discussion_viewed │ │ └── existing_discussion_viewed │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_discussion_viewed_test.php │ │ │ └── statements.json │ ├── post_created │ │ ├── data.json │ │ ├── event.json │ │ ├── post_created_test.php │ │ └── statements.json │ ├── post_deleted │ │ ├── data.json │ │ ├── event.json │ │ ├── post_deleted_test.php │ │ └── statements.json │ ├── post_updated │ │ ├── data.json │ │ ├── event.json │ │ ├── post_updated_test.php │ │ └── statements.json │ ├── subscription_created │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── subscription_created_test.php │ ├── subscription_deleted │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── subscription_deleted_test.php │ └── user_report_viewed │ │ ├── existing_report_viewed │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_report_viewed_test.php │ │ └── statements.json │ │ └── existing_report_viewed_all_courses │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_report_viewed_all_courses_test.php │ │ └── statements.json ├── mod_glossary │ ├── comment_created │ │ ├── comment_created_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── comment_deleted │ │ ├── comment_deleted_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── course_module_viewed │ │ └── existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_module_test.php │ │ │ └── statements.json │ └── entry_viewed │ │ ├── data.json │ │ ├── entry_viewed_test.php │ │ ├── event.json │ │ └── statements.json ├── mod_imscp │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_lesson │ ├── content_page_viewed │ │ ├── content_page_viewed_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── course_module_viewed │ │ └── existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_module_test.php │ │ │ └── statements.json │ ├── essay_assessed │ │ ├── data.json │ │ ├── essay_assessed_test.php │ │ ├── event.json │ │ └── statements.json │ ├── lesson_ended │ │ ├── data.json │ │ ├── event.json │ │ ├── lesson_ended_test.php │ │ └── statements.json │ ├── lesson_restarted │ │ ├── data.json │ │ ├── event.json │ │ ├── lesson_restarted_test.php │ │ └── statements.json │ ├── lesson_resumed │ │ ├── data.json │ │ ├── event.json │ │ ├── lesson_resumed_test.php │ │ └── statements.json │ ├── lesson_started │ │ ├── data.json │ │ ├── event.json │ │ ├── lesson_started_test.php │ │ └── statements.json │ ├── question_answered │ │ ├── choice │ │ │ ├── choice_test.php │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ └── statements.json │ │ ├── essay │ │ │ ├── data.json │ │ │ ├── essay_test.php │ │ │ ├── event.json │ │ │ └── statements.json │ │ ├── matching │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── matching_test.php │ │ │ └── statements.json │ │ ├── numerical │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── numerical_test.php │ │ │ └── statements.json │ │ ├── shortanswer │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── shortanswer_test.php │ │ │ └── statements.json │ │ └── truefalse │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── truefalse_test.php │ └── question_viewed │ │ ├── choice │ │ ├── choice_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ │ ├── essay │ │ ├── data.json │ │ ├── essay_test.php │ │ ├── event.json │ │ └── statements.json │ │ ├── matching │ │ ├── data.json │ │ ├── event.json │ │ ├── matching_test.php │ │ └── statements.json │ │ ├── numerical │ │ ├── data.json │ │ ├── event.json │ │ ├── numerical_test.php │ │ └── statements.json │ │ ├── shortanswer │ │ ├── data.json │ │ ├── event.json │ │ ├── shortanswer_test.php │ │ └── statements.json │ │ └── truefalse │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── truefalse_test.php ├── mod_lti │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_page │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_questionnaire │ ├── all_responses_viewed │ │ ├── all_responses_viewed_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── attempt_resumed │ │ ├── attempt_resumed_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── attempt_saved │ │ ├── attempt_saved_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── attempt_submitted │ │ ├── attempt_submitted_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_quiz │ ├── attempt_becameoverdue │ │ ├── attempt_becameoverdue_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── attempt_reviewed │ │ └── existing_attempt_reviewed │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_attempt_reviewed_test.php │ │ │ └── statements.json │ ├── attempt_started │ │ └── existing_attempt_started │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_attempt_started_test.php │ │ │ └── statements.json │ ├── attempt_submitted │ │ ├── essay │ │ │ ├── data.json │ │ │ ├── essay_test.php │ │ │ ├── event.json │ │ │ └── statements.json │ │ ├── essay_null_response │ │ │ ├── data.json │ │ │ ├── essay_null_response_test.php │ │ │ ├── event.json │ │ │ └── statements.json │ │ ├── gapselect │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── gapselect_test.php │ │ │ └── statements.json │ │ ├── match │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── match_test.php │ │ │ └── statements.json │ │ ├── multichoice │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── multichoice_test.php │ │ │ └── statements.json │ │ ├── multichoice_withchoices │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── multichoice_withchoices_test.php │ │ │ └── statements.json │ │ ├── multichoiceset │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── multichoiceset_test.php │ │ │ └── statements.json │ │ ├── multichoiceset_withchoices │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── multichoiceset_withchoices_test.php │ │ │ └── statements.json │ │ ├── no_questions │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── no_questions_test.php │ │ │ └── statements.json │ │ ├── numerical │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── numerical_test.php │ │ │ └── statements.json │ │ ├── randomsamatch │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── randomsamatch_test.php │ │ │ └── statements.json │ │ ├── shortanswer │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── shortanswer_test.php │ │ │ └── statements.json │ │ ├── truefalse │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── truefalse_test.php │ │ └── unknown_qtype │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── statements.json │ │ │ └── unknown_qtype_test.php │ ├── attempt_viewed │ │ └── existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_module_test.php │ │ │ └── statements.json │ ├── course_module_viewed │ │ └── existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_module_test.php │ │ │ └── statements.json │ └── question_manually_graded │ │ ├── data.json │ │ ├── event.json │ │ ├── question_manually_graded_test.php │ │ └── statements.json ├── mod_resource │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_scorm │ ├── course_module_viewed │ │ └── existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_module_test.php │ │ │ └── statements.json │ ├── sco_launched │ │ └── existing_sco_launched │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_sco_launched_test.php │ │ │ └── statements.json │ ├── scoreraw_submitted │ │ └── existing_scoreraw_submitted │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_scoreraw_submitted_test.php │ │ │ └── statements.json │ └── status_submitted │ │ └── existing_status_submitted │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_status_submitted_test.php │ │ └── statements.json ├── mod_survey │ ├── course_module_viewed │ │ └── existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_module_test.php │ │ │ └── statements.json │ ├── report_viewed │ │ ├── data.json │ │ ├── event.json │ │ ├── report_viewed_test.php │ │ └── statements.json │ └── response_submitted │ │ ├── data.json │ │ ├── event.json │ │ ├── response_submitted_test.php │ │ └── statements.json ├── mod_url │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── mod_wiki │ ├── comment_created │ │ ├── comment_created_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── comment_deleted │ │ ├── comment_deleted_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── comments_viewed │ │ ├── comments_viewed_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── course_module_viewed │ │ └── existing_module │ │ │ ├── data.json │ │ │ ├── event.json │ │ │ ├── existing_module_test.php │ │ │ └── statements.json │ └── page_viewed │ │ ├── data.json │ │ ├── event.json │ │ ├── page_viewed_test.php │ │ └── statements.json ├── mod_workshop │ └── course_module_viewed │ │ └── existing_module │ │ ├── data.json │ │ ├── event.json │ │ ├── existing_module_test.php │ │ └── statements.json ├── moveback_failed_statements_test.php ├── tool_certificate │ ├── certificate_issued │ │ ├── certificate_issued_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ ├── certificate_revoked │ │ ├── certificate_revoked_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json │ └── certificate_verified │ │ ├── certificate_verified_test.php │ │ ├── data.json │ │ ├── event.json │ │ └── statements.json ├── tool_usertours │ └── tour_ended │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── tour_ended_test.php ├── totara_program │ └── program_assigned │ │ └── existing_program │ │ ├── data.json │ │ ├── event.json │ │ ├── statements.json │ │ └── test.php ├── utils │ ├── deep_merge_objects.php │ └── object_to_array.php └── xapi_test_case.php ├── thirdpartylibs.xml ├── version.php └── xapi-config.png /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines, 2 spaced tabs, UTF-8 with a newline ending 7 | # across every file 8 | [*] 9 | end_of_line = lf 10 | indent_style = space 11 | indent_size = 2 12 | charset = utf-8 13 | 14 | [*.{json}] 15 | indent_size = 2 16 | tab_width = 2 17 | trim_trailing_whitespace=true 18 | 19 | [*.{php}] 20 | indent_size = 4 21 | trim_trailing_whitespace=true 22 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ### Issue Templates 2 | If you are reporting an issue, you need to replace the parts of the template where you see `{{some text}}`. 3 | 4 | ### Code Structure 5 | Repository = Data layer = Reads and writes data from a location (variable/DB/external API/etc). 6 | 7 | Service = Business layer = Operates on data and transforms data from a given structure to a required structure. 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Description** 2 | - {{Brief description of your bug}} 3 | 4 | **Version** 5 | - {{branch}} at {{commit}} on {{version - found in your copy of the VERSION file}} 6 | 7 | **Steps to reproduce the bug** 8 | 1. {{steps}} 9 | 10 | **Expected behaviour** 11 | - {{feature}} should be {{expectedResult}} because {{reason}}. 12 | 13 | **Actual behaviour** 14 | - {{feature}} is {{actualResult}}. 15 | 16 | **Server information** 17 | - {{database}} with {{authentication}}. 18 | 19 | **Client information** 20 | - OS: {{operatingSystem}} 21 | - Browser: {{browser}} {{version}} 22 | 23 | **Additional information** 24 | - {{additionalInfo}}) 25 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Description** 2 | - {{Brief description of your PR}} 3 | 4 | **Related Issues** 5 | - #{{issue_number}} 6 | 7 | **PR Type** 8 | - Fix or Enhancement 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_STORE 2 | /.idea 3 | /.vscode 4 | /*.sublime-project 5 | /*.sublime-workspace 6 | /classes/log/error_log.txt 7 | /composer.phar 8 | /node_modules 9 | /notes.md 10 | /vendor 11 | /xapi 12 | /xapi.zip 13 | .phpunit.result.cache -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Moodle Logstore xAPI](https://moodle.org/plugins/view/logstore_xapi) 2 | > Emits [xAPI](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md) statements using the [Moodle](https://moodle.org/) Logstore. 3 | 4 | - Install the plugin using [our zip installation guide](/docs/install-with-zip.md). 5 | - Process events before the plugin was installed using [our historical events guide](/docs/historical-events.md). 6 | - Ask questions via the [Github issue tracker](https://github.com/xAPI-vle/moodle-logstore_xapi/issues). 7 | - Report bugs and suggest features with the [Github issue tracker](https://github.com/xAPI-vle/moodle-logstore_xapi/issues). 8 | - View the supported events in [our `get_event_function_map` function](/src/transformer/get_event_function_map.php). 9 | - Change existing statements for the supported events using [our change statements guide](/docs/change-statements.md). 10 | - Create statements using [our new statements guide](/docs/new-statements.md). 11 | -------------------------------------------------------------------------------- /classes/output/renderer.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | namespace logstore_xapi\output; 18 | 19 | use plugin_renderer_base; 20 | 21 | /** 22 | * Renderer class for logstore_xapi 23 | * 24 | * @package logstore_xapi 25 | * @copyright 2020 Learning Pool Ltd 26 | * @author Stephen O'Hara 27 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 28 | */ 29 | class renderer extends plugin_renderer_base { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "xapi-vle/moodle-logstore-xapi", 3 | "license": "GPL v3", 4 | "require-dev": { 5 | "yetanalytics/statementfactory": "v0.0.12" 6 | }, 7 | "require": { 8 | "ext-json": "*" 9 | }, 10 | "prefer-stable": true, 11 | "minimum-stability": "dev" 12 | } 13 | -------------------------------------------------------------------------------- /docs/configure-the-plugin.md: -------------------------------------------------------------------------------- 1 | # Configure the plugin 2 | 3 | **Note that by default the plugin now runs in background mode via a cron task to avoid blocking page responses. This can be changed on the configuration page.** 4 | 5 | 1. Set your “endpoint” to your LRS endpoint (e.g. “”). 6 | 1. Set your “username” to your LRS basic auth key/username (e.g. “d416e6220812740d3922eb09813ebb4163e8eb3e”). 7 | 1. Set your “password” to your LRS basic auth secret/password (e.g. “bc7e0a2edd5d1969b6d774e679d4eb4e7a35be13”). 8 | 1. Click “Save changes”. 9 | 10 | You can change this configuration anytime by navigating to "http://your.moodle/admin/settings.php?section=logsettingxapi". 11 | 12 | -------------------------------------------------------------------------------- /docs/enable-the-plugin.md: -------------------------------------------------------------------------------- 1 | # Enable the plugin 2 | 3 | 1. Navigate to "http://your.moodle/admin/index.php" as an admin. 4 | 1. Click “Upgrade Moodle database now”. 5 | 1. Click “Continue”. 6 | 1. [Configure the plugin](configure-the-plugin.md) 7 | 1. Go to "http://your.moodle/admin/settings.php?section=managelogging". 8 | 1. Enable the "Logstore xAPI" plugin. -------------------------------------------------------------------------------- /docs/install-with-download.md: -------------------------------------------------------------------------------- 1 | # Installing with the downloaded plugin 2 | If you're here, it's probably because zip installation is disabled for your Moodle instance, if that's not the case, we recommend you [install with the zip file](install-with-zip.md). If zip installation is disabled you can follow the steps below to get the plugin installed on your Moodle instance. 3 | 4 | 1. Download the "xapi.zip" file from [the latest release](https://github.com/xAPI-vle/moodle-logstore_xapi/releases/latest). 5 | 1. Unzip the downloaded "xapi.zip" file and move the contents into the `admin/tool/log/store` directory from the root of your Moodle directory. 6 | 1. Finally you can [configure and enable the plugin](enable-the-plugin.md). 7 | 8 | If you're having some issues with this guide, please create a new issue on [our Github issue tracker](https://github.com/xAPI-vle/moodle-logstore_xapi/issues). 9 | -------------------------------------------------------------------------------- /docs/install-with-zip.md: -------------------------------------------------------------------------------- 1 | # Installing with the ZIP file 2 | Before we begin installing the plugin, you of course need to have [Moodle](https://moodle.org/) installed first and you need to be logged in to your Moodle instance as an admin. If zip installation is disabled, you can use our [download installation guide](install-with-download.md), otherwise you can follow the steps below. 3 | 4 | 1. Download the "xapi.zip" file from [the latest release](https://github.com/xAPI-vle/moodle-logstore_xapi/releases/latest). 5 | 1. Go to "http://your.moodle/admin/tool/installaddon/index.php". 6 | 1. Drag and drop the ZIP file. 7 | 1. Click "Install plugin from the ZIP file". 8 | 1. Click “Install plugin!”. 9 | 1. Finally you can [configure and enable the plugin](enable-the-plugin.md). 10 | 11 | If you're having some issues with this guide, please create a new issue on [our Github issue tracker](https://github.com/xAPI-vle/moodle-logstore_xapi/issues). 12 | -------------------------------------------------------------------------------- /docs/testing.md: -------------------------------------------------------------------------------- 1 | # Testing 2 | You can run the tests by running `./vendor/bin/phpunit` in your terminal from inside the plugin directory. To change the tests, take a look in [the `tests` directory of the plugin](../tests), you'll find that it's structured very similarly to [the `src/transformer` directory](../src/transformer). You should also notice that each test is made up of 4 files: 3 | 4 | - [The `test.php` file](../tests/all/course_module_viewed/test.php) is used to run the test and specifies the directory containing the files listed below. 5 | - [The `data.json` file](../tests/all/course_module_viewed/data.json) is used to mock the Moodle database for the test. 6 | - [The `event.json` file](../tests/all/course_module_viewed/event.json) is used to mock the logstore event for the test. 7 | - [The `statements.json` file](../tests/all/course_module_viewed/statements.json) is the expected output of the transformer during the test. 8 | -------------------------------------------------------------------------------- /scripts/generateVersionFile.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | release="$TRAVIS_TAG" 3 | 4 | year=$(date +"%Y") 5 | 6 | today=$(date +"%Y-%m-%d") 7 | todaysReleases=$(git log --tags --simplify-by-decoration --pretty="format:%ai %d" | sort -r | grep "$today" | wc -l | tr -d '[:space:]') 8 | 9 | versionPrefix=$(date +"%Y%m%d") 10 | versionSuffix=$(printf %02d $todaysReleases) 11 | version="$versionPrefix$versionSuffix" 12 | 13 | template=$(cat ./scripts/templateVersionFile) 14 | eval "echo \"$template\"" > version.php 15 | -------------------------------------------------------------------------------- /scripts/generateZipFile.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Installs composer production dependencies. 4 | rm -rf vendor 5 | composer install --no-interaction --no-dev 6 | 7 | # Creates folder to zip. 8 | rm -rf xapi 9 | mkdir -p ./xapi/classes && cp -r ./classes ./xapi 10 | mkdir -p ./xapi/db && cp -r ./db ./xapi 11 | mkdir -p ./xapi/lang && cp -r ./lang ./xapi 12 | mkdir -p ./xapi/src && cp -r ./src ./xapi 13 | mkdir -p ./xapi/vendor && cp -r ./vendor ./xapi 14 | cp ./LICENSE ./xapi 15 | cp ./README.md ./xapi 16 | cp ./settings.php ./xapi 17 | cp ./version.php ./xapi 18 | 19 | # Creates the zip file. 20 | zip -r xapi.zip xapi 21 | -------------------------------------------------------------------------------- /scripts/templateVersionFile: -------------------------------------------------------------------------------- 1 | . 16 | 17 | defined('MOODLE_INTERNAL') || die(); 18 | 19 | \$plugin = isset(\$plugin) && is_object(\$plugin) ? \$plugin : new \stdClass(); 20 | \$plugin->component = 'logstore_xapi'; 21 | \$plugin->version = $version; 22 | \$plugin->release = '$release'; 23 | \$plugin->requires = 2014111000; 24 | \$plugin->maturity = MATURITY_STABLE; 25 | -------------------------------------------------------------------------------- /src/loader/handler.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Loader handler. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Jerret Fowler 22 | * Ryan Smith 23 | * David Pesce 24 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 25 | */ 26 | 27 | namespace src\loader; 28 | 29 | /** 30 | * Generic handler for the loader. 31 | * 32 | * @param array $config An array of configuration settings. 33 | * @param array $events An array of events. 34 | * @return string 35 | */ 36 | function handler(array $config, array $events) { 37 | $loadername = $config['loader']; 38 | $load = "\src\loader\\$loadername\load"; 39 | return $load($config, $events); 40 | } 41 | -------------------------------------------------------------------------------- /src/loader/none.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Load none type events. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Jerret Fowler 22 | * Ryan Smith 23 | * David Pesce 24 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 25 | */ 26 | 27 | namespace src\loader\none; 28 | 29 | use src\loader\utils as utils; 30 | 31 | /** 32 | * Load none type events. 33 | * 34 | * @param array $config An array of configuration settings. 35 | * @param array $transformedevents An array of transformed events. 36 | * @return array 37 | */ 38 | function load(array $config, array $transformedevents) { 39 | return utils\construct_loaded_events($transformedevents, true); 40 | } 41 | -------------------------------------------------------------------------------- /src/loader/utils/filelib.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This is just a dummy file to avoid failures in CI. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Jerret Fowler 22 | * Ryan Smith 23 | * David Pesce 24 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 25 | */ 26 | 27 | namespace src\loader\utils; 28 | 29 | /** 30 | * A dummy file to avoid failures in CI. 31 | * 32 | * @return void 33 | */ 34 | class curl { 35 | // This is just a dummy file to avoid failures in CI. 36 | } 37 | -------------------------------------------------------------------------------- /src/transformer/events/mod_bigbluebuttonbn/activity_management_viewed.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * The mod_bigbluebuttonbn activity management viewed event. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Paul Walter (https://github.com/paulito-bandito) 22 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace src\transformer\events\mod_bigbluebuttonbn; 26 | 27 | /** 28 | * Transformer for bigbluebutton activity management viewed event. 29 | * 30 | * @param array $config The transformer config settings. 31 | * @param \stdClass $event The event to be transformed. 32 | * @return array 33 | */ 34 | function activity_management_viewed(array $config, \stdClass $event) { 35 | return create_statement( $config, $event, 'http://id.tincanapi.com/verb/viewed', 'Viewed' ); 36 | } 37 | -------------------------------------------------------------------------------- /src/transformer/events/mod_bigbluebuttonbn/live_session.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Used to convey what actions occur during a recording. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Paul Walter (https://github.com/paulito-bandito) 22 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace src\transformer\events\mod_bigbluebuttonbn; 26 | 27 | /** 28 | * Transformer for bigbluebutton live session event. 29 | * 30 | * @param array $config The transformer config settings. 31 | * @param \stdClass $event The event to be transformed. 32 | * @return array 33 | */ 34 | function live_session(array $config, \stdClass $event) { 35 | return create_statement( $config, $event, 'http://id.tincanapi.com/verb/live', 'Live' ); 36 | } 37 | -------------------------------------------------------------------------------- /src/transformer/events/mod_bigbluebuttonbn/meeting_left.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * The mod_bigbluebuttonbn meeting left event. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Paul Walter (https://github.com/paulito-bandito) 22 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace src\transformer\events\mod_bigbluebuttonbn; 26 | 27 | /** 28 | * Transformer for bigbluebutton meeting left event. 29 | * 30 | * @param array $config The transformer config settings. 31 | * @param \stdClass $event The event to be transformed. 32 | * @return array 33 | */ 34 | function meeting_left(array $config, \stdClass $event) { 35 | return create_statement( $config, $event, 'http://activitystrea.ms/schema/1.0/leave', 'Left' ); 36 | } 37 | -------------------------------------------------------------------------------- /src/transformer/events/mod_bigbluebuttonbn/recording_deleted.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * The mod_bigbluebuttonbn recording deleted event. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Paul Walter (https://github.com/paulito-bandito) 22 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace src\transformer\events\mod_bigbluebuttonbn; 26 | 27 | /** 28 | * Transformer for bigbluebutton recording deleted event. 29 | * 30 | * @param array $config The transformer config settings. 31 | * @param \stdClass $event The event to be transformed. 32 | * @return array 33 | */ 34 | function recording_deleted(array $config, \stdClass $event) { 35 | return create_statement( $config, $event, 'https://w3id.org/xapi/dod-isd/verbs/deleted', 'Deleted' ); 36 | } 37 | -------------------------------------------------------------------------------- /src/transformer/events/mod_bigbluebuttonbn/recording_edited.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * The mod_bigbluebuttonbn recording edited event. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Paul Walter (https://github.com/paulito-bandito) 22 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace src\transformer\events\mod_bigbluebuttonbn; 26 | 27 | /** 28 | * Transformer for bigbluebutton recording edited event. 29 | * 30 | * @param array $config The transformer config settings. 31 | * @param \stdClass $event The event to be transformed. 32 | * @return array 33 | */ 34 | function recording_edited(array $config, \stdClass $event) { 35 | return create_statement( $config, $event, 'https://w3id.org/xapi/dod-isd/verbs/edited', 'Edited' ); 36 | } 37 | -------------------------------------------------------------------------------- /src/transformer/events/mod_bigbluebuttonbn/recording_published.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * The mod_bigbluebuttonbn recording published event. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Paul Walter (https://github.com/paulito-bandito) 22 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace src\transformer\events\mod_bigbluebuttonbn; 26 | 27 | /** 28 | * Transformer for bigbluebutton recording published event. 29 | * 30 | * @param array $config The transformer config settings. 31 | * @param \stdClass $event The event to be transformed. 32 | * @return array 33 | */ 34 | function recording_published(array $config, \stdClass $event) { 35 | return create_statement( $config, $event, 'https://w3id.org/xapi/dod-isd/verbs/published', 'Published' ); 36 | } 37 | -------------------------------------------------------------------------------- /src/transformer/events/mod_bigbluebuttonbn/recording_viewed.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * The mod_bigbluebuttonbn recording viewed event (triggered when a recording is viewed). 19 | * 20 | * @package logstore_xapi 21 | * @copyright Paul Walter (https://github.com/paulito-bandito) 22 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace src\transformer\events\mod_bigbluebuttonbn; 26 | 27 | /** 28 | * Transformer for the bigbluebutton recording viewed event. 29 | * 30 | * @param array $config The transformer config settings. 31 | * @param \stdClass $event The event to be transformed. 32 | * @return array 33 | */ 34 | function recording_viewed(array $config, \stdClass $event) { 35 | return create_statement( $config, $event, 'http://id.tincanapi.com/verb/viewed', 'Viewed'); 36 | } 37 | -------------------------------------------------------------------------------- /src/transformer/utils/get_activity/base.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Transformer utility for generating default activity fields. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Milt Reder 22 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace src\transformer\utils\get_activity; 26 | 27 | /** 28 | * Transformer utility for generating default activity fields. 29 | * 30 | * @return array 31 | */ 32 | function base() { 33 | return [ 34 | 'objectType' => 'Activity', 35 | ]; 36 | } 37 | -------------------------------------------------------------------------------- /src/transformer/utils/get_event_timestamp.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Transformer utility for retrieving the event timestamp. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Jerret Fowler 22 | * Ryan Smith 23 | * David Pesce 24 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 25 | */ 26 | 27 | namespace src\transformer\utils; 28 | 29 | /** 30 | * Transformer utility for retrieving the event timestamp. 31 | * 32 | * @param \stdClass $event The event to be transformed. 33 | * @return string 34 | */ 35 | function get_event_timestamp(\stdClass $event) { 36 | return create_timestamp($event->timecreated); 37 | } 38 | -------------------------------------------------------------------------------- /src/transformer/utils/result/get_numeric_success.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Transformer utility for retrieving CMI numeric result success. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Milt Reder 22 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace src\transformer\utils\result; 26 | 27 | use src\transformer\utils as utils; 28 | 29 | /** 30 | * Transformer utility for retrieving CMI numeric result success. 31 | * 32 | * @param array $config The transformer config settings. 33 | * @param \stdClass $questionattempt The question attempt object. 34 | * @param string $lang The language. 35 | */ 36 | function get_numeric_success( 37 | array $config, 38 | \stdClass $questionattempt, 39 | string $lang 40 | ) { 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/transformer/utils/reverse_backslashes.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Utility to reverse backslashes. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Milt Reder 22 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace src\transformer\utils; 26 | 27 | /** 28 | * Replaces all backslashes with forward slashes in a given string. 29 | * 30 | * @param string $string The input string containing backslashes. 31 | * @return string The modified string with backslashes replaced by forward slashes. 32 | */ 33 | function reversebackslashes($string) { 34 | return str_replace('\\', '/', $string); 35 | } 36 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | #xapierrorlog .reply-event { 2 | cursor: pointer; 3 | } 4 | #xapierrorlog .reply-event:hover { 5 | opacity: 0.7; 6 | } 7 | #xapierrorlog .disabled { 8 | cursor: not-allowed; 9 | } 10 | #xapierrorlog .fa-repeat { 11 | color: lightskyblue; 12 | } 13 | #xapierrorlog .fa-spin { 14 | color: blue; 15 | } 16 | #xapierrorlog .fa-check { 17 | color: green; 18 | } 19 | #xapierrorlog .fa-remove { 20 | color: red; 21 | } -------------------------------------------------------------------------------- /tests/common/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "course": [ 3 | { 4 | "id": 1, 5 | "fullname": "test_site_fullname", 6 | "lang": "en" 7 | }, 8 | { 9 | "id": 2, 10 | "fullname": "test_name", 11 | "lang": "en" 12 | } 13 | ], 14 | "course_modules": [ 15 | { 16 | "id": 1, 17 | "course": 2, 18 | "instance": 1, 19 | "module": 1, 20 | "section": 1 21 | } 22 | ], 23 | "course_sections": [ 24 | { 25 | "id": 1, 26 | "course": 2, 27 | "section": 0 28 | } 29 | ], 30 | "user": [ 31 | { 32 | "id": 1, 33 | "firstname": "test_fullname", 34 | "email": "test@test.com" 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /tests/common/event.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /tests/common/statement.json: -------------------------------------------------------------------------------- 1 | { 2 | "context": { 3 | "language": "en", 4 | "platform": "Moodle", 5 | "registration": "58028332-2277-5b51-a632-7836992917ea" 6 | }, 7 | "timestamp": "2015-06-10T14:31:41.000Z" 8 | } 9 | -------------------------------------------------------------------------------- /tests/core/badge_awarded/user_achieved_badge/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "badge": [ 3 | { 4 | "courseid": 2, 5 | "id": 1, 6 | "name": "test_badgename", 7 | "description": "test badge description", 8 | "message": "you got the test badge!", 9 | "type": 2, 10 | "version": "1.0" 11 | } 12 | ], 13 | "badge_manual_award": [ 14 | { 15 | "id": 2, 16 | "issuerid": 2 17 | } 18 | ], 19 | "course": [ 20 | { 21 | "id": 1, 22 | "fullname": "test_site_fullname", 23 | "lang": "en" 24 | }, 25 | { 26 | "id": 2, 27 | "fullname": "test_name", 28 | "lang": "en", 29 | "summary": "test_summary" 30 | } 31 | ], 32 | "user": [ 33 | { 34 | "id": 1, 35 | "firstname": "test_recipient_firstname", 36 | "lastname": "test_recipient_lastname", 37 | "username": "recipient", 38 | "email": "recipient@test.com" 39 | }, 40 | { 41 | "id": 2, 42 | "firstname": "test_awarder_firstname", 43 | "lastname": "test_awarder_lastname", 44 | "username": "awarder", 45 | "email": "awarder@test.com" 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /tests/core/badge_awarded/user_achieved_badge/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 1, 6 | "eventname": "\\core\\event\\badge_awarded", 7 | "objecttable": "badge", 8 | "other": "a:1:{s:13:\"badgeissuedid\";i:2;}", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/badge_revoked/user_forfeited_badge/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "badge": [ 3 | { 4 | "courseid": null, 5 | "id": 1, 6 | "name": "test_badgename", 7 | "description": "test badge description", 8 | "message": "you got the test badge!", 9 | "type": 1, 10 | "version": "1.0" 11 | } 12 | ], 13 | "user": [ 14 | { 15 | "id": 1, 16 | "firstname": "test_revoker_firstname", 17 | "lastname": "test_revoker_lastname", 18 | "username": "revoker", 19 | "email": "revoker@test.com" 20 | }, 21 | { 22 | "id": 2, 23 | "firstname": "test_recipient_firstname", 24 | "lastname": "test_recipient_lastname", 25 | "username": "recipient", 26 | "email": "recipient@test.com" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /tests/core/badge_revoked/user_forfeited_badge/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "objectid": 1, 4 | "relateduserid": 2, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\badge_revoked", 7 | "objecttable": "badge", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/badge_updated/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "badge": [ 3 | { 4 | "courseid": 2, 5 | "id": 1, 6 | "name": "test_badgename", 7 | "description": "test badge description", 8 | "message": "you got the test badge!", 9 | "type": 2, 10 | "version": "1.0" 11 | } 12 | ], 13 | "badge_manual_award": [ 14 | { 15 | "id": 2, 16 | "issuerid": 2 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /tests/core/badge_updated/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 1, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\badge_updated", 8 | "objecttable": "badge", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/badge_viewed/user_viewed_badge/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "badge": [ 3 | { 4 | "id": 1, 5 | "name": "testbadge", 6 | "description": "badge description", 7 | "type": 1, 8 | "version": "1.0" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /tests/core/badge_viewed/user_viewed_badge/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\badge_viewed", 7 | "objecttable": "badge", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/calendar_event_created/user_created_calendar_event/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "course": [ 3 | { 4 | "id": 1, 5 | "fullname": "test_site_fullname", 6 | "lang": "en" 7 | }, 8 | { 9 | "id": 2, 10 | "fullname": "test_name", 11 | "lang": "en", 12 | "summary": "test_summary" 13 | } 14 | ], 15 | "event": [ 16 | { 17 | "id": 1, 18 | "name": "test event" 19 | } 20 | ], 21 | "user": [ 22 | { 23 | "id": 1, 24 | "firstname": "event_creator_firstname", 25 | "lastname": "event_creator_lastname", 26 | "username": "creator", 27 | "email": "creator@test.com" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /tests/core/calendar_event_created/user_created_calendar_event/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\calendar_event_created", 7 | "objecttable": "event", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/calendar_event_deleted/user_deleted_calendar_event/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "course": [ 3 | { 4 | "id": 1, 5 | "fullname": "test_site_fullname", 6 | "lang": "en" 7 | }, 8 | { 9 | "id": 2, 10 | "fullname": "test_name", 11 | "lang": "en", 12 | "summary": "test_summary" 13 | } 14 | ], 15 | "event": [], 16 | "user": [ 17 | { 18 | "id": 1, 19 | "firstname": "event_deleter_firstname", 20 | "lastname": "event_deleter_lastname", 21 | "email": "deleter@test.com" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tests/core/calendar_event_deleted/user_deleted_calendar_event/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\calendar_event_deleted", 7 | "objecttable": "event", 8 | "other": "a:1:{s:4:\"name\";s:10:\"test event\";}", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/calendar_event_updated/user_updated_calendar_event/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "course": [ 3 | { 4 | "id": 1, 5 | "fullname": "test_site_fullname", 6 | "lang": "en" 7 | }, 8 | { 9 | "id": 2, 10 | "fullname": "test_name", 11 | "lang": "en", 12 | "summary": "test_summary" 13 | } 14 | ], 15 | "event": [ 16 | { 17 | "id": 1, 18 | "name": "test event" 19 | } 20 | ], 21 | "user": [ 22 | { 23 | "id": 1, 24 | "firstname": "event_updater_firstname", 25 | "lastname": "event_updater_lastname", 26 | "username": "updater", 27 | "email": "updater@test.com" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /tests/core/calendar_event_updated/user_updated_calendar_event/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\calendar_event_updated", 7 | "objecttable": "event", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/calendar_subscription_created/user_created_calendar_subscription/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "event_subscriptions": [ 3 | { 4 | "id": 1, 5 | "name": "example calendar subscription", 6 | "url": "http://example-cal.com/HASH" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/calendar_subscription_created/user_created_calendar_subscription/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\calendar_subscription_created", 7 | "objecttable": "event_subscriptions", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "event_subscriptions": [] 3 | } 4 | -------------------------------------------------------------------------------- /tests/core/calendar_subscription_deleted/user_deleted_calendar_subscription/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\calendar_subscription_deleted", 7 | "action": "deleted", 8 | "objecttable": "event_subscriptions", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/calendar_subscription_updated/user_updated_calendar_subscription/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "event_subscriptions": [ 3 | { 4 | "id": 1, 5 | "name": "example calendar subscription", 6 | "url": "http://example-cal.com/HASH" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/calendar_subscription_updated/user_updated_calendar_subscription/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\calendar_subscription_updated", 7 | "objecttable": "event_subscriptions", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_category_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "course_categories": [ 3 | { 4 | "id": 2, 5 | "name": "Base Category", 6 | "description": "Default Moodle Course Category" 7 | }, 8 | { 9 | "id": 3, 10 | "name": "Sub Category", 11 | "description": "Moodle Course Sub-Category", 12 | "parent": 2 13 | } 14 | ], 15 | "user": [ 16 | { 17 | "id": 1, 18 | "firstname": "test_fullname", 19 | "email": "test@test.com" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /tests/core/course_category_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "objectid": 3, 4 | "userid": 1, 5 | "eventname": "\\core\\event\\course_category_created", 6 | "objecttable": "course_categories", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/core/course_completed/completing_existing_course/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname", 6 | "email": "test@test.com" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_completed/completing_existing_course/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 2, 5 | "relateduserid": 1, 6 | "eventname": "\\core\\event\\course_completed", 7 | "objecttable": "course", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_completed/send_jisc_data/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "course": [ 3 | { 4 | "id": 1, 5 | "fullname": "test_site_fullname", 6 | "lang": "en" 7 | }, 8 | { 9 | "id": 2, 10 | "fullname": "test_name", 11 | "shortname": "test_course_short_name", 12 | "lang": "en" 13 | } 14 | ], 15 | "user": [ 16 | { 17 | "id": 1, 18 | "firstname": "test_fullname", 19 | "email": "test@test.com" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /tests/core/course_completed/send_jisc_data/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 2, 5 | "relateduserid": 1, 6 | "eventname": "\\core\\event\\course_completed", 7 | "ip": "127.0.0.1", 8 | "objecttable": "course", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/course_completion_updated/course_completion_updated/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname", 6 | "email": "test@test.com" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_completion_updated/course_completion_updated/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": null, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\course_completion_updated", 7 | "objecttable": null, 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_created/creating_new_course/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname", 6 | "email": "test@test.com" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_created/creating_new_course/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 2, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\course_created", 7 | "objecttable": "course", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_created/creating_new_course/statements.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "actor": { 4 | "account": { 5 | "homePage": "http://www.example.org", 6 | "name": "1" 7 | }, 8 | "name": "test_fullname" 9 | }, 10 | "verb": { 11 | "id": "http://activitystrea.ms/create", 12 | "display": { 13 | "en": "Created" 14 | } 15 | }, 16 | "object": { 17 | "id": "http://www.example.org/course/view.php?id=2", 18 | "definition": { 19 | "name": { 20 | "en": "test_name" 21 | }, 22 | "type": "https://w3id.org/xapi/cmi5/activitytype/course" 23 | }, 24 | "objectType": "Activity" 25 | }, 26 | "context": { 27 | "contextActivities": { 28 | "category": [ 29 | { 30 | "id": "http://www.example.org", 31 | "definition": { 32 | "name": { 33 | "en": "test_site_fullname" 34 | }, 35 | "type": "http://id.tincanapi.com/activitytype/lms" 36 | }, 37 | "objectType": "Activity" 38 | } 39 | ] 40 | }, 41 | "extensions": { 42 | "http://lrs.learninglocker.net/define/extensions/info": { 43 | "event_function": "\\src\\transformer\\events\\core\\course_created", 44 | "event_name": "\\core\\event\\course_created", 45 | "http://moodle.org": "1.0.0", 46 | "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" 47 | } 48 | } 49 | } 50 | } 51 | ] 52 | -------------------------------------------------------------------------------- /tests/core/course_module_completion_update/completing_existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "book": [ 3 | { 4 | "id": 1, 5 | "name": "test_book_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "book" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/core/course_module_completion_update/completing_existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "relateduserid": 1, 6 | "eventname": "\\core\\event\\course_module_completion_updated", 7 | "other": "a:3:{s:13:\"relateduserid\";i:1;s:10:\"overrideby\";N;s:15:\"completionstate\";i:2;}", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_module_completion_update/uncompleting_existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "book": [ 3 | { 4 | "id": 1, 5 | "name": "test_book_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "book" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/core/course_module_completion_update/uncompleting_existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "relateduserid": 1, 6 | "eventname": "\\core\\event\\course_module_completion_updated", 7 | "other": "a:3:{s:13:\"relateduserid\";i:1;s:10:\"overrideby\";N;s:15:\"completionstate\";i:0;}", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_module_created/creating_new_course_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "book": [ 3 | { 4 | "id": 1, 5 | "name": "test_book_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "book" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/core/course_module_created/creating_new_course_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\course_module_created", 8 | "objecttable": "course_modules", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname", 6 | "email": "test@test.com" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_resources_list_viewed/existing_course_resources_list_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": null, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\course_resources_list_viewed", 7 | "objecttable": null, 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_section_created/new_course_section_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "course": [ 3 | { 4 | "id": 1, 5 | "fullname": "test_name", 6 | "lang": "en" 7 | } 8 | ], 9 | "course_sections": [ 10 | { 11 | "id": 1, 12 | "name": null, 13 | "course": 2, 14 | "section": 5 15 | } 16 | ], 17 | "user": [ 18 | { 19 | "id": 1, 20 | "firstname": "test_fullname", 21 | "email": "test@test.com" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tests/core/course_section_created/new_course_section_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\course_section_created", 7 | "objecttable": "course_sections", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_updated/updating_existing_course/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname", 6 | "email": "test@test.com" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_updated/updating_existing_course/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 2, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\course_updated", 7 | "objecttable": "course", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_updated/updating_existing_course/statements.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "actor": { 4 | "account": { 5 | "homePage": "http://www.example.org", 6 | "name": "1" 7 | }, 8 | "name": "test_fullname" 9 | }, 10 | "verb": { 11 | "id": "https://w3id.org/xapi/acrossx/verbs/edited", 12 | "display": { 13 | "en": "Edited" 14 | } 15 | }, 16 | "object": { 17 | "id": "http://www.example.org/course/view.php?id=2", 18 | "definition": { 19 | "name": { 20 | "en": "test_name" 21 | }, 22 | "type": "https://w3id.org/xapi/cmi5/activitytype/course" 23 | }, 24 | "objectType": "Activity" 25 | }, 26 | "context": { 27 | "contextActivities": { 28 | "category": [ 29 | { 30 | "id": "http://www.example.org", 31 | "definition": { 32 | "name": { 33 | "en": "test_site_fullname" 34 | }, 35 | "type": "http://id.tincanapi.com/activitytype/lms" 36 | }, 37 | "objectType": "Activity" 38 | } 39 | ] 40 | }, 41 | "extensions": { 42 | "http://lrs.learninglocker.net/define/extensions/info": { 43 | "event_function": "\\src\\transformer\\events\\core\\course_updated", 44 | "event_name": "\\core\\event\\course_updated", 45 | "http://moodle.org": "1.0.0", 46 | "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" 47 | } 48 | } 49 | } 50 | } 51 | ] 52 | -------------------------------------------------------------------------------- /tests/core/course_viewed/viewing_existing_course/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname", 6 | "email": "test@test.com" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/course_viewed/viewing_existing_course/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 2, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\course_viewed", 7 | "objecttable": "course", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/group_created/creating_new_group/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "groups": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /tests/core/group_created/creating_new_group/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\group_created", 7 | "objecttable": "groups", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/group_deleted/existing_group_deleted_test/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "groups": [] 3 | } 4 | -------------------------------------------------------------------------------- /tests/core/group_deleted/existing_group_deleted_test/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\group_deleted", 7 | "objecttable": "groups", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/group_member_added/new_group_member_added_test/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "groups": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "user": [ 9 | { 10 | "id": 1, 11 | "firstname": "test_fullname1", 12 | "email": "test1@test.com" 13 | }, 14 | { 15 | "id": 2, 16 | "firstname": "test_fullname2", 17 | "email": "test2@test.com" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/core/group_member_added/new_group_member_added_test/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\group_member_added", 8 | "objecttable": "groups", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/group_member_removed/existing_group_member_removed_test/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "groups": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "user": [ 9 | { 10 | "id": 1, 11 | "firstname": "test_fullname1", 12 | "email": "test1@test.com" 13 | }, 14 | { 15 | "id": 2, 16 | "firstname": "test_fullname2", 17 | "email": "test2@test.com" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/core/group_member_removed/existing_group_member_removed_test/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\group_member_removed", 8 | "objecttable": "groups", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/group_message_sent/new_group_message_sent/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "groups": [ 3 | { 4 | "courseid": 2, 5 | "id": 1, 6 | "name": "test_name" 7 | } 8 | ], 9 | "groups_members": [ 10 | { 11 | "groupid": 1, 12 | "userid": 1 13 | } 14 | ], 15 | "message_conversations": [ 16 | { 17 | "id": 1, 18 | "itemid": 1 19 | } 20 | ], 21 | "messages": [ 22 | { 23 | "conversationid": 1, 24 | "id": 1, 25 | "fullmessage": "test_message_body", 26 | "subject": "test_message_subject" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /tests/core/group_message_sent/new_group_message_sent/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\group_message_sent", 7 | "objecttable": "messages", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/message_sent/user_sent_message/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages": [ 3 | { 4 | "id": 1, 5 | "fullmessage": "hi there!(messagetext)", 6 | "subject": "hi there(subject)" 7 | } 8 | ], 9 | "user": [ 10 | { 11 | "id": 1, 12 | "firstname": "sender", 13 | "lastname": "senderson", 14 | "username": "sender", 15 | "email": "sender@example.com" 16 | }, 17 | { 18 | "id": 2, 19 | "firstname": "receiver", 20 | "lastname": "receiverson", 21 | "username": "receiver", 22 | "email": "receiver@example.com" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /tests/core/message_sent/user_sent_message/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\message_sent", 8 | "objecttable": "messages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/message_viewed/user_viewed_message/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages": [ 3 | { 4 | "id": 1, 5 | "fullmessage": "hi there!(messagetext)", 6 | "subject": "hi there(subject)" 7 | } 8 | ], 9 | "user": [ 10 | { 11 | "id": 1, 12 | "firstname": "sender", 13 | "lastname": "senderson", 14 | "username": "sender", 15 | "email": "sender@example.com" 16 | }, 17 | { 18 | "id": 2, 19 | "firstname": "receiver", 20 | "lastname": "receiverson", 21 | "username": "receiver", 22 | "email": "receiver@example.com" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /tests/core/message_viewed/user_viewed_message/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 1, 6 | "userid": 2, 7 | "eventname": "\\core\\event\\message_viewed", 8 | "objecttable": "messages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/note_created/user_created_note/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "post": [ 3 | { 4 | "id": 1, 5 | "content": "here is a note", 6 | "subject": "no subject" 7 | } 8 | ], 9 | "user": [ 10 | { 11 | "id": 1, 12 | "firstname": "note_author_firstname", 13 | "lastname": "note_author_lastname", 14 | "email": "author@test.com" 15 | }, 16 | { 17 | "id": 2, 18 | "firstname": "note_subject_firstname", 19 | "lastname": "note_subject_lastname", 20 | "email": "subject@test.com" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /tests/core/note_created/user_created_note/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\note_created", 8 | "objecttable": "post", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/note_updated/user_updated_note/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "post": [ 3 | { 4 | "id": 1, 5 | "content": "contents of a note", 6 | "subject": "a note title" 7 | } 8 | ], 9 | "user": [ 10 | { 11 | "id": 1, 12 | "firstname": "note_editor_firstname", 13 | "lastname": "note_editor_lastname", 14 | "email": "editor@test.com" 15 | }, 16 | { 17 | "id": 2, 18 | "firstname": "note_subject_firstname", 19 | "lastname": "note_subject_lastname", 20 | "email": "editor@test.com" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /tests/core/note_updated/user_updated_note/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\note_updated", 8 | "objecttable": "post", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/notes_viewed/user_viewed_notes/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "notes_viewer_firstname", 6 | "lastname": "notes_viewer_lastname", 7 | "email": "viewer@test.com" 8 | }, 9 | { 10 | "id": 2, 11 | "firstname": "notes_subject_firstname", 12 | "lastname": "notes_subject_lastname", 13 | "email": "subject@test.com" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /tests/core/notes_viewed/user_viewed_notes/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\notes_viewed", 8 | "objecttable": "post", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/question_created/new_question_created_test/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "question": [ 3 | { 4 | "id": 1, 5 | "name": "True or False?", 6 | "qtype": "truefalse", 7 | "questiontext": "

Is the sky blue?

" 8 | } 9 | ], 10 | "question_answers": [ 11 | { 12 | "id": 1, 13 | "answer": "True", 14 | "fraction": 1.0, 15 | "question": 1 16 | }, 17 | { 18 | "id": 2, 19 | "answer": "False", 20 | "fraction": 0.0, 21 | "question": 1 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tests/core/question_created/new_question_created_test/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\question_created", 7 | "objecttable": "question", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/questions_imported/new_questions_imported/data.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /tests/core/questions_imported/new_questions_imported/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\questions_imported", 7 | "objecttable": null, 8 | "other": "a:2:{s:6:\"format\";s:3:\"xml\";s:10:\"categoryid\";s:2:\"10\";}", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/search_results_viewed/user_viewed_search_results/data.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /tests/core/search_results_viewed/user_viewed_search_results/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": null, 3 | "id": 1, 4 | "objectid": null, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\search_results_viewed", 7 | "objecttable": null, 8 | "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;}", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/user_created/existing_user_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname", 6 | "email": "test@test.com" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/user_created/existing_user_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 1, 6 | "eventname": "\\core\\event\\user_created", 7 | "objecttable": "user", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/user_created/send_jisc_data/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "course": [ 3 | { 4 | "id": 1, 5 | "fullname": "test_site_fullname", 6 | "lang": "en" 7 | }, 8 | { 9 | "id": 2, 10 | "fullname": "test_name", 11 | "shortname": "test_course_short_name", 12 | "lang": "en" 13 | } 14 | ], 15 | "user": [ 16 | { 17 | "id": 1, 18 | "firstname": "test_fullname", 19 | "email": "test@test.com" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /tests/core/user_created/send_jisc_data/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 1, 6 | "eventname": "\\core\\event\\user_created", 7 | "ip": "127.0.0.1", 8 | "objecttable": "user", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/user_enrolment_created/existing_user_enrolled/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname1", 6 | "email": "test@test.com" 7 | }, 8 | { 9 | "id": 2, 10 | "firstname": "test_fullname2", 11 | "email": "test@test.com" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/core/user_enrolment_created/existing_user_enrolled/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\user_enrolment_created", 8 | "objecttable": "user_enrolments", 9 | "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname1", 6 | "email": "test@test.com" 7 | }, 8 | { 9 | "id": 2, 10 | "firstname": "test_fullname2", 11 | "email": "test@test.com" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/core/user_enrolment_deleted/existing_user_enrolment_deleted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\user_enrolment_deleted", 8 | "objecttable": "user_enrolments", 9 | "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/core/user_enrolment_updated/user_resumed_course/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname1", 6 | "email": "test@test.com" 7 | }, 8 | { 9 | "id": 2, 10 | "firstname": "test_fullname2", 11 | "email": "test@test.com" 12 | } 13 | ], 14 | "user_enrolments": [ 15 | { 16 | "id": 1, 17 | "status": 0 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/core/user_enrolment_updated/user_resumed_course/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\user_enrolment_updated", 8 | "objecttable": "user_enrolments", 9 | "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/core/user_enrolment_updated/user_suspended_course/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname1", 6 | "email": "test@test.com" 7 | }, 8 | { 9 | "id": 2, 10 | "firstname": "test_fullname2", 11 | "email": "test@test.com" 12 | } 13 | ], 14 | "user_enrolments": [ 15 | { 16 | "id": 1, 17 | "status": 1 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/core/user_enrolment_updated/user_suspended_course/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\user_enrolment_updated", 8 | "objecttable": "user_enrolments", 9 | "other": "a:1:{s:5:\"enrol\";s:6:\"manual\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/core/user_loggedin/existing_user_loggedin/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname", 6 | "email": "test@test.com" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/user_loggedin/existing_user_loggedin/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": null, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\user_loggedin", 8 | "objecttable": "course", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/user_loggedin/existing_user_loggedin/statements.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "actor": { 4 | "account": { 5 | "homePage": "http://www.example.org", 6 | "name": "1" 7 | }, 8 | "name": "test_fullname" 9 | }, 10 | "verb": { 11 | "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/login", 12 | "display": { 13 | "en": "Logged In" 14 | } 15 | }, 16 | "object": { 17 | "id": "http://www.example.org", 18 | "definition": { 19 | "name": { 20 | "en": "test_site_fullname" 21 | }, 22 | "type": "http://id.tincanapi.com/activitytype/lms" 23 | }, 24 | "objectType": "Activity" 25 | }, 26 | "context": { 27 | "extensions": { 28 | "http://lrs.learninglocker.net/define/extensions/info": { 29 | "event_function": "\\src\\transformer\\events\\core\\user_loggedin", 30 | "event_name": "\\core\\event\\user_loggedin", 31 | "http://moodle.org": "1.0.0", 32 | "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" 33 | } 34 | }, 35 | "language": "en" 36 | } 37 | } 38 | ] 39 | -------------------------------------------------------------------------------- /tests/core/user_loggedinas/existing_user_loggedinas/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname1", 6 | "email": "test1@test.com" 7 | }, 8 | { 9 | "id": 2, 10 | "firstname": "test_fullname2", 11 | "email": "test2@test.com" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/core/user_loggedinas/existing_user_loggedinas/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\core\\event\\user_loggedinas", 8 | "objecttable": "user", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/core/user_loggedinas/existing_user_loggedinas/statements.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "actor": { 4 | "account": { 5 | "homePage": "http://www.example.org", 6 | "name": "1" 7 | }, 8 | "name": "test_fullname1" 9 | }, 10 | "verb": { 11 | "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/login", 12 | "display": { 13 | "en": "Logged In" 14 | } 15 | }, 16 | "object": { 17 | "id": "http://www.example.org", 18 | "definition": { 19 | "name": { 20 | "en": "test_site_fullname" 21 | }, 22 | "type": "http://id.tincanapi.com/activitytype/lms" 23 | }, 24 | "objectType": "Activity" 25 | }, 26 | "context": { 27 | "extensions": { 28 | "http://lrs.learninglocker.net/define/extensions/info": { 29 | "event_function": "\\src\\transformer\\events\\core\\user_loggedin", 30 | "event_name": "\\core\\event\\user_loggedinas", 31 | "http://moodle.org": "1.0.0", 32 | "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" 33 | }, 34 | "https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/as": { 35 | "account": { 36 | "homePage": "http://www.example.org", 37 | "name": "2" 38 | }, 39 | "name": "test_fullname2" 40 | } 41 | }, 42 | "language": "en" 43 | } 44 | } 45 | ] 46 | -------------------------------------------------------------------------------- /tests/core/user_loggedout/existing_user_loggedout/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname", 6 | "email": "test@test.com" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/user_loggedout/existing_user_loggedout/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "userid": 1, 6 | "eventname": "\\core\\event\\user_loggedout", 7 | "objecttable": "course", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/core/user_loggedout/existing_user_loggedout/statements.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "actor": { 4 | "account": { 5 | "homePage": "http://www.example.org", 6 | "name": "1" 7 | }, 8 | "name": "test_fullname" 9 | }, 10 | "verb": { 11 | "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/logout", 12 | "display": { 13 | "en": "Logged Out" 14 | } 15 | }, 16 | "object": { 17 | "id": "http://www.example.org", 18 | "definition": { 19 | "name": { 20 | "en": "test_site_fullname" 21 | }, 22 | "type": "http://id.tincanapi.com/activitytype/lms" 23 | }, 24 | "objectType": "Activity" 25 | }, 26 | "context": { 27 | "extensions": { 28 | "http://lrs.learninglocker.net/define/extensions/info": { 29 | "event_function": "\\src\\transformer\\events\\core\\user_loggedout", 30 | "event_name": "\\core\\event\\user_loggedout", 31 | "http://moodle.org": "1.0.0", 32 | "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" 33 | } 34 | }, 35 | "language": "en" 36 | } 37 | } 38 | ] 39 | -------------------------------------------------------------------------------- /tests/core_h5p/course_module_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "h5pactivity": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "h5pactivity" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/core_h5p/course_module_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\core_h5p\\event\\h5p_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_assign/assignment_graded/existing_assignment_graded_comment/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "assign": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "assignfeedback_comments": [ 9 | { 10 | "id": 1, 11 | "assignment": 1, 12 | "commenttext": "test_comment_text", 13 | "grade": 1 14 | } 15 | ], 16 | "grade": [ 17 | { 18 | "id": 1, 19 | "userid": 2, 20 | "assignment": 1, 21 | "grade": 1 22 | } 23 | ], 24 | "grade_items": [ 25 | { 26 | "id": 1, 27 | "grademax": 2, 28 | "grademin": 0, 29 | "gradepass": 1, 30 | "iteminstance": 1, 31 | "itemmodule": "assign" 32 | } 33 | ], 34 | "modules": [ 35 | { 36 | "id": 1, 37 | "name": "assign" 38 | } 39 | ], 40 | "user": [ 41 | { 42 | "id": 1, 43 | "firstname": "test_fullname", 44 | "email": "test@test.com" 45 | }, 46 | { 47 | "id": 2, 48 | "firstname": "test2_fullname", 49 | "email": "test2@test.com" 50 | } 51 | ] 52 | } 53 | -------------------------------------------------------------------------------- /tests/mod_assign/assignment_graded/existing_assignment_graded_comment/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_assign\\event\\submission_graded", 8 | "objecttable": "grade", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "assign": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "assignfeedback_comments": [], 9 | "grade": [ 10 | { 11 | "id": 1, 12 | "userid": 2, 13 | "assignment": 1, 14 | "grade": 1 15 | } 16 | ], 17 | "grade_items": [ 18 | { 19 | "id": 1, 20 | "grademax": 2, 21 | "grademin": 0, 22 | "gradepass": 1, 23 | "iteminstance": 1, 24 | "itemmodule": "assign" 25 | } 26 | ], 27 | "modules": [ 28 | { 29 | "id": 1, 30 | "name": "assign" 31 | } 32 | ], 33 | "user": [ 34 | { 35 | "id": 1, 36 | "firstname": "test_fullname", 37 | "email": "test@test.com" 38 | }, 39 | { 40 | "id": 2, 41 | "firstname": "test2_fullname", 42 | "email": "test2@test.com" 43 | } 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /tests/mod_assign/assignment_graded/existing_assignment_graded_nocomment/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_assign\\event\\submission_graded", 8 | "objecttable": "grade", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_assign/assignment_submitted/existing_assignment_submitted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "assign": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "assign_submission": [ 9 | { 10 | "id": 1, 11 | "assignment": 1 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "assign" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/mod_assign/assignment_submitted/existing_assignment_submitted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_assign\\event\\assessable_submitted", 8 | "objecttable": "assignment_submissions", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_assign/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "assign": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "assign" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_assign/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_assign\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_assign/feedback_viewed/user_viewed_feedback/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "assign": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "assign_grades": [ 9 | { 10 | "id": 1, 11 | "grader": 2 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "assign" 18 | } 19 | ], 20 | "user": [ 21 | { 22 | "id": 1, 23 | "firstname": "test_fullname1", 24 | "email": "test1@test.com" 25 | }, 26 | { 27 | "id": 2, 28 | "firstname": "test_fullname2", 29 | "email": "test2@test.com" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /tests/mod_assign/feedback_viewed/user_viewed_feedback/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_assign\\event\\feedback_viewed", 8 | "objecttable": "assign_grades", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_assign/submission_locked/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "assign": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "assign_submission": [ 9 | { 10 | "id": 1, 11 | "assignment": 1 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "assign" 18 | } 19 | ], 20 | "user": [ 21 | { 22 | "id": 1, 23 | "firstname": "test_fullname1", 24 | "email": "test1@test.com" 25 | }, 26 | { 27 | "id": 2, 28 | "firstname": "test_fullname2", 29 | "email": "test2@test.com" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /tests/mod_assign/submission_locked/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 2, 7 | "userid": 1, 8 | "eventname": "\\mod_assign\\event\\submission_locked", 9 | "action": "locked", 10 | "objecttable": "assign", 11 | "timecreated": 1433946701 12 | } 13 | -------------------------------------------------------------------------------- /tests/mod_assign/submission_unlocked/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "assign": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "assign_submission": [ 9 | { 10 | "id": 1, 11 | "assignment": 1 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "assign" 18 | } 19 | ], 20 | "user": [ 21 | { 22 | "id": 1, 23 | "firstname": "test_fullname1", 24 | "email": "test1@test.com" 25 | }, 26 | { 27 | "id": 2, 28 | "firstname": "test_fullname2", 29 | "email": "test2@test.com" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /tests/mod_assign/submission_unlocked/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 2, 7 | "userid": 1, 8 | "eventname": "\\mod_assign\\event\\submission_unlocked", 9 | "action": "unlocked", 10 | "objecttable": "assign", 11 | "timecreated": 1433946701 12 | } 13 | -------------------------------------------------------------------------------- /tests/mod_assign/submission_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "assign": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "assign_submission": [ 9 | { 10 | "id": 1, 11 | "assignment": 1 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "assign" 18 | } 19 | ], 20 | "user": [ 21 | { 22 | "id": 1, 23 | "firstname": "test_fullname1", 24 | "email": "test1@test.com" 25 | }, 26 | { 27 | "id": 2, 28 | "firstname": "test_fullname2", 29 | "email": "test2@test.com" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /tests/mod_assign/submission_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 2, 7 | "userid": 1, 8 | "eventname": "\\mod_assign\\event\\submission_viewed", 9 | "objecttable": "assign", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/activity_management_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/activity_management_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\activity_management_viewed", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/live_session/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/live_session/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\live_session_event", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/meeting_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/meeting_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_created", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/meeting_ended/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/meeting_ended/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_ended", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/meeting_joined/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/meeting_joined/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_joined", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/meeting_left/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/meeting_left/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\meeting_left", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_deleted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_deleted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\recording_deleted", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_edited/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_edited/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\recording_deleted", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_imported/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_imported/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\recording_imported", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_protected/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_protected/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\recording_protected", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_published/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_published/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\recording_published", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_unprotected/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_unprotected/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\recording_unprotected", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_unpublished/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_unpublished/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\recording_unpublished", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "bigbluebuttonbn": [ 3 | { 4 | "id": 1, 5 | "name": "test_bigbluebuttonbn_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "bigbluebuttonbn" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_bigbluebuttonbn/recording_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_bigbluebuttonbn\\event\\recording_viewed", 8 | "objecttable": "bigbluebuttonbn", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_book/chapter_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "book": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "book_chapters": [ 9 | { 10 | "bookid": "1", 11 | "id": 1, 12 | "content": "

test_book_chapter_content

", 13 | "pagenum": "1", 14 | "subchapter": "0", 15 | "title": "test_book_chapter_title" 16 | } 17 | ], 18 | "modules": [ 19 | { 20 | "id": 1, 21 | "name": "book" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tests/mod_book/chapter_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_book\\event\\chapter_created", 8 | "objecttable": "book_chapters", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "book": [ 3 | { 4 | "id": 1, 5 | "name": "test_book_name" 6 | } 7 | ], 8 | "book_chapters": [ 9 | { 10 | "bookid": 1, 11 | "id": 1, 12 | "content": "

test_parent_content

", 13 | "pagenum": 1, 14 | "subchapter": 0, 15 | "title": "test_parent_name" 16 | }, 17 | { 18 | "bookid": 1, 19 | "id": 2, 20 | "content": "

test_book_chapter_content

", 21 | "pagenum": 2, 22 | "subchapter": 1, 23 | "title": "test_book_chapter_title" 24 | } 25 | ], 26 | "modules": [ 27 | { 28 | "id": 1, 29 | "name": "book" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /tests/mod_book/chapter_viewed/existing_chapter_viewed_with_parent/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 2, 6 | "userid": 1, 7 | "eventname": "\\mod_book\\event\\chapter_viewed", 8 | "objecttable": "book_chapters", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "book": [ 3 | { 4 | "id": 1, 5 | "name": "test_book_name" 6 | } 7 | ], 8 | "book_chapters": [ 9 | { 10 | "bookid": "1", 11 | "id": 1, 12 | "content": "

test_book_chapter_content

", 13 | "pagenum": "1", 14 | "subchapter": "0", 15 | "title": "test_book_chapter_title" 16 | } 17 | ], 18 | "modules": [ 19 | { 20 | "id": 1, 21 | "name": "book" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tests/mod_book/chapter_viewed/existing_chapter_viewed_without_parent/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_book\\event\\chapter_viewed", 8 | "objecttable": "book_chapters", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_book/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "book": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "book" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_book/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_book\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_chat/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "chat": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "chat" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_chat/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_chat\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_choice/answer_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "choice": [ 3 | { 4 | "id": 1, 5 | "name": "To be or not to be?", 6 | "intro": "

That is the question.

" 7 | } 8 | ], 9 | "choice_answers": [ 10 | { 11 | "choiceid": 1, 12 | "id": 1, 13 | "optionid": 1 14 | } 15 | ], 16 | "choice_options": [ 17 | { 18 | "choiceid": 1, 19 | "id": 2, 20 | "text": "Not to be" 21 | }, 22 | { 23 | "choiceid": 1, 24 | "id": 1, 25 | "text": "To be" 26 | } 27 | ], 28 | "modules": [ 29 | { 30 | "id": 1, 31 | "name": "choice" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /tests/mod_choice/answer_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_choice\\event\\answer_created", 8 | "objecttable": "choice_answers", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_choice/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "choice": [ 3 | { 4 | "id": 1, 5 | "name": "To be or not to be?", 6 | "intro": "

That is the question.

" 7 | } 8 | ], 9 | "choice_answers": [ 10 | { 11 | "choiceid": 1, 12 | "id": 1, 13 | "optionid": 1 14 | } 15 | ], 16 | "choice_options": [ 17 | { 18 | "choiceid": 1, 19 | "id": 1, 20 | "text": "To be" 21 | }, 22 | { 23 | "choiceid": 1, 24 | "id": 2, 25 | "text": "Not to be" 26 | } 27 | ], 28 | "modules": [ 29 | { 30 | "id": 1, 31 | "name": "choice" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /tests/mod_choice/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_choice\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_data/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "data" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_data/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_data\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_facetoface/cancel_booking/existing_booking_cancelled/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "facetoface": [ 3 | { 4 | "id": 1, 5 | "name": "test_facetoface_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "facetoface" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_facetoface/cancel_booking/existing_booking_cancelled/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_facetoface\\event\\cancel_booking", 8 | "objecttable": "facetoface", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_facetoface/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "facetoface": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "facetoface" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_facetoface/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_facetoface\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_facetoface/signup_success/existing_signup_success/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "facetoface": [ 3 | { 4 | "id": 1, 5 | "name": "test_facetoface_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "facetoface" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_facetoface/signup_success/existing_signup_success/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_facetoface\\event\\signup_success", 8 | "objecttable": "facetoface", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_facetoface/take_attendance/existing_attendance_taken/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "facetoface": [ 3 | { 4 | "id": 1, 5 | "name": "test_facetoface_name" 6 | } 7 | ], 8 | "facetoface_sessions": [ 9 | { 10 | "id": 1, 11 | "facetoface": 1 12 | } 13 | ], 14 | "facetoface_sessions_dates": [ 15 | { 16 | "id": 1, 17 | "sessionid": 1, 18 | "timefinish": 123123123, 19 | "timestart": 123123123 20 | } 21 | ], 22 | "facetoface_signups": [ 23 | { 24 | "id": 1, 25 | "sessionid": 1, 26 | "userid": 2 27 | } 28 | ], 29 | "facetoface_signups_status": [ 30 | { 31 | "id": 1, 32 | "signupid": 1, 33 | "statuscode": 100, 34 | "timecreated": 123123123 35 | } 36 | ], 37 | "modules": [ 38 | { 39 | "id": 1, 40 | "name": "facetoface" 41 | } 42 | ], 43 | "user": [ 44 | { 45 | "id": 1, 46 | "firstname": "test_instructor_name", 47 | "email": "instructor@test.com" 48 | }, 49 | { 50 | "id": 2, 51 | "firstname": "test_attendee_name", 52 | "email": "attendee@test.com" 53 | } 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /tests/mod_facetoface/take_attendance/existing_attendance_taken/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_facetoface\\event\\take_attendance", 8 | "objecttable": "facetoface", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_feedback/course_module_viewed/viewing_feedback/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "feedback": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "feedback" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_feedback/course_module_viewed/viewing_feedback/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_feedback\\event\\course_module_viewed", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/multichoice/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "feedback": [ 3 | { 4 | "id": 1, 5 | "name": "test_feedback_name" 6 | } 7 | ], 8 | "feedback_completed": [ 9 | { 10 | "id": 1, 11 | "anonymous_response": 0, 12 | "feedback": 1 13 | } 14 | ], 15 | "feedback_item": [ 16 | { 17 | "id": 1, 18 | "name": "test_feedback_item", 19 | "feedback": 1, 20 | "presentation": "r>>>>>test_choice_1\n|test_choice_2\n|test_choice_3", 21 | "typ": "multichoice" 22 | } 23 | ], 24 | "feedback_value": [ 25 | { 26 | "id": 1, 27 | "completed": 1, 28 | "item": 1, 29 | "value": "2" 30 | } 31 | ], 32 | "modules": [ 33 | { 34 | "id": 1, 35 | "name": "feedback" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/multichoice/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_feedback\\event\\response_submitted", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/multichoicerated/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "feedback": [ 3 | { 4 | "id": 1, 5 | "name": "test_feedback_name" 6 | } 7 | ], 8 | "feedback_completed": [ 9 | { 10 | "id": 1, 11 | "anonymous_response": 0, 12 | "feedback": 1 13 | } 14 | ], 15 | "feedback_item": [ 16 | { 17 | "id": 1, 18 | "name": "test_feedback_item", 19 | "feedback": 1, 20 | "presentation": "r>>>>>3####test_choice_1|2####test_choice_2|1####test_choice_3", 21 | "typ": "multichoicerated" 22 | } 23 | ], 24 | "feedback_value": [ 25 | { 26 | "id": 1, 27 | "completed": 1, 28 | "item": 1, 29 | "value": "3" 30 | } 31 | ], 32 | "modules": [ 33 | { 34 | "id": 1, 35 | "name": "feedback" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/multichoicerated/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_feedback\\event\\response_submitted", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/no_items/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "feedback": [ 3 | { 4 | "id": 1, 5 | "name": "test_feedback_name" 6 | } 7 | ], 8 | "feedback_completed": [ 9 | { 10 | "id": 1, 11 | "anonymous_response": 0, 12 | "feedback": 1 13 | } 14 | ], 15 | "feedback_value": [], 16 | "modules": [ 17 | { 18 | "id": 1, 19 | "name": "feedback" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/no_items/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_feedback\\event\\response_submitted", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/numerical/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "feedback": [ 3 | { 4 | "id": 1, 5 | "name": "test_feedback_name" 6 | } 7 | ], 8 | "feedback_completed": [ 9 | { 10 | "id": 1, 11 | "anonymous_response": 0, 12 | "feedback": 1 13 | } 14 | ], 15 | "feedback_item": [ 16 | { 17 | "id": 1, 18 | "name": "test_feedback_item", 19 | "feedback": 1, 20 | "presentation": "0|10", 21 | "typ": "numeric" 22 | } 23 | ], 24 | "feedback_value": [ 25 | { 26 | "id": 1, 27 | "completed": 1, 28 | "item": 1, 29 | "value": "3" 30 | } 31 | ], 32 | "modules": [ 33 | { 34 | "id": 1, 35 | "name": "feedback" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/numerical/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_feedback\\event\\response_submitted", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/textarea/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "feedback": [ 3 | { 4 | "id": 1, 5 | "name": "test_feedback_name" 6 | } 7 | ], 8 | "feedback_completed": [ 9 | { 10 | "id": 1, 11 | "anonymous_response": 0, 12 | "feedback": 1 13 | } 14 | ], 15 | "feedback_item": [ 16 | { 17 | "id": 1, 18 | "name": "test_feedback_item", 19 | "feedback": 1, 20 | "typ": "textarea" 21 | } 22 | ], 23 | "feedback_value": [ 24 | { 25 | "id": 1, 26 | "completed": 1, 27 | "item": 1, 28 | "value": "test_long_text_answer" 29 | } 30 | ], 31 | "modules": [ 32 | { 33 | "id": 1, 34 | "name": "feedback" 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/textarea/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_feedback\\event\\response_submitted", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/textarea_anon/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "feedback": [ 3 | { 4 | "id": 1, 5 | "name": "test_feedback_name" 6 | } 7 | ], 8 | "feedback_completed": [ 9 | { 10 | "id": 1, 11 | "anonymous_response": 1, 12 | "feedback": 1 13 | } 14 | ], 15 | "feedback_item": [ 16 | { 17 | "id": 1, 18 | "name": "test_feedback_item", 19 | "feedback": 1, 20 | "typ": "textarea" 21 | } 22 | ], 23 | "feedback_value": [ 24 | { 25 | "id": 1, 26 | "completed": 1, 27 | "item": 1, 28 | "value": "test_long_text_answer" 29 | } 30 | ], 31 | "modules": [ 32 | { 33 | "id": 1, 34 | "name": "feedback" 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/textarea_anon/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_feedback\\event\\response_submitted", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/textfield/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "feedback": [ 3 | { 4 | "id": 1, 5 | "name": "test_feedback_name" 6 | } 7 | ], 8 | "feedback_completed": [ 9 | { 10 | "id": 1, 11 | "anonymous_response": 0, 12 | "feedback": 1 13 | } 14 | ], 15 | "feedback_item": [ 16 | { 17 | "id": 1, 18 | "name": "test_feedback_item", 19 | "feedback": 1, 20 | "typ": "textfield" 21 | } 22 | ], 23 | "feedback_value": [ 24 | { 25 | "id": 1, 26 | "completed": 1, 27 | "item": 1, 28 | "value": "test_short_text_answer" 29 | } 30 | ], 31 | "modules": [ 32 | { 33 | "id": 1, 34 | "name": "feedback" 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/textfield/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_feedback\\event\\response_submitted", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/unknown_typ/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "feedback": [ 3 | { 4 | "id": 1, 5 | "name": "test_feedback_name" 6 | } 7 | ], 8 | "feedback_completed": [ 9 | { 10 | "id": 1, 11 | "anonymous_response": 0, 12 | "feedback": 1 13 | } 14 | ], 15 | "feedback_item": [ 16 | { 17 | "id": 1, 18 | "name": "test_feedback_item", 19 | "feedback": 1, 20 | "typ": "unknown" 21 | } 22 | ], 23 | "feedback_value": [ 24 | { 25 | "id": 1, 26 | "completed": 1, 27 | "item": 1 28 | } 29 | ], 30 | "modules": [ 31 | { 32 | "id": 1, 33 | "name": "feedback" 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /tests/mod_feedback/response_submitted/unknown_typ/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_feedback\\event\\response_submitted", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_folder/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "folder": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "folder" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_folder/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_folder\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_forum/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "forum": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "forum" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_forum/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_forum\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_forum/discussion_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "forum": [ 3 | { 4 | "id": 1, 5 | "name": "test_forum_name" 6 | } 7 | ], 8 | "forum_discussions": [ 9 | { 10 | "id": 1, 11 | "name": "test_forum_discussion_name" 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "forum" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/mod_forum/discussion_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\discussion_created", 8 | "objecttable": "forum", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_forum/discussion_subscription_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "forum": [ 3 | { 4 | "id": 1, 5 | "name": "test_forum_name" 6 | } 7 | ], 8 | "forum_discussions": [ 9 | { 10 | "id": 1, 11 | "name": "test_forum_discussion_name" 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "forum" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/mod_forum/discussion_subscription_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\discussion_subscription_created", 8 | "objecttable": "forum", 9 | "other": "a:2:{s:10:\"discussion\";i:1;s:7:\"forumid\";i:1;}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_forum/discussion_subscription_deleted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "forum": [ 3 | { 4 | "id": 1, 5 | "name": "test_forum_name" 6 | } 7 | ], 8 | "forum_discussions": [ 9 | { 10 | "id": 1, 11 | "name": "test_forum_discussion_name" 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "forum" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/mod_forum/discussion_subscription_deleted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\discussion_subscription_deleted", 8 | "objecttable": "forum", 9 | "other": "a:2:{s:10:\"discussion\";i:1;s:7:\"forumid\";i:1;}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_forum/discussion_viewed/existing_discussion_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "forum": [ 3 | { 4 | "id": 1, 5 | "name": "test_forum_name" 6 | } 7 | ], 8 | "forum_discussions": [ 9 | { 10 | "id": 1, 11 | "name": "test_forum_discussion_name" 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "forum" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/mod_forum/discussion_viewed/existing_discussion_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\discussion_viewed", 8 | "objecttable": "forum", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_forum/post_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "forum": [ 3 | { 4 | "id": 1, 5 | "name": "test_forum_name" 6 | } 7 | ], 8 | "forum_discussions": [ 9 | { 10 | "id": 1, 11 | "name": "test_forum_discussion_name" 12 | } 13 | ], 14 | "forum_posts": [ 15 | { 16 | "id": 1, 17 | "discussion": 1, 18 | "message": "
test_response_text
", 19 | "subject": "Re: test_forum_discussion_name" 20 | } 21 | ], 22 | "modules": [ 23 | { 24 | "id": 1, 25 | "name": "forum" 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /tests/mod_forum/post_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\post_created", 8 | "objecttable": "forum", 9 | "other": "a:3:{s:12:\"discussionid\";i:1;s:7:\"forumid\";i:2;s:9:\"forumtype\";s:7:\"general\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_forum/post_deleted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "forum": [ 3 | { 4 | "id": 1, 5 | "name": "test_forum_name" 6 | } 7 | ], 8 | "forum_discussions": [ 9 | { 10 | "id": 1, 11 | "name": "test_forum_discussion_name" 12 | } 13 | ], 14 | "forum_posts": [ 15 | { 16 | "id": 1, 17 | "discussion": 1, 18 | "message": "
test_response_text
", 19 | "subject": "Re: test_forum_discussion_name" 20 | } 21 | ], 22 | "modules": [ 23 | { 24 | "id": 1, 25 | "name": "forum" 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /tests/mod_forum/post_deleted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\post_deleted", 8 | "objecttable": "forum", 9 | "other": "a:3:{s:12:\"discussionid\";i:1;s:7:\"forumid\";i:2;s:9:\"forumtype\";s:7:\"general\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_forum/post_updated/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "forum": [ 3 | { 4 | "id": 1, 5 | "name": "test_forum_name" 6 | } 7 | ], 8 | "forum_discussions": [ 9 | { 10 | "id": 1, 11 | "name": "test_forum_discussion_name" 12 | } 13 | ], 14 | "forum_posts": [ 15 | { 16 | "id": 1, 17 | "discussion": 1, 18 | "message": "
test_response_text
", 19 | "subject": "Re: test_forum_discussion_name" 20 | } 21 | ], 22 | "modules": [ 23 | { 24 | "id": 1, 25 | "name": "forum" 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /tests/mod_forum/post_updated/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\post_updated", 8 | "objecttable": "forum", 9 | "other": "a:3:{s:12:\"discussionid\";i:1;s:7:\"forumid\";i:2;s:9:\"forumtype\";s:7:\"general\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_forum/subscription_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "forum": [ 3 | { 4 | "id": 1, 5 | "name": "test_forum_name" 6 | } 7 | ], 8 | "forum_discussions": [ 9 | { 10 | "id": 1, 11 | "name": "test_forum_discussion_name" 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "forum" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/mod_forum/subscription_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\subscription_created", 8 | "objecttable": "forum", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_forum/subscription_deleted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "forum": [ 3 | { 4 | "id": 1, 5 | "name": "test_forum_name" 6 | } 7 | ], 8 | "forum_discussions": [ 9 | { 10 | "id": 1, 11 | "name": "test_forum_discussion_name" 12 | } 13 | ], 14 | "modules": [ 15 | { 16 | "id": 1, 17 | "name": "forum" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/mod_forum/subscription_deleted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\subscription_deleted", 8 | "objecttable": "forum", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_forum/user_report_viewed/existing_report_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "loggedin_user_firstname", 6 | "email": "test1@test.com" 7 | }, 8 | { 9 | "id": 2, 10 | "firstname": "viewed_user_firstname", 11 | "email": "test2@test.com" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_forum/user_report_viewed/existing_report_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": null, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\user_report_viewed", 8 | "objecttable": null, 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "loggedin_user_firstname", 6 | "email": "test1@test.com" 7 | }, 8 | { 9 | "id": 2, 10 | "firstname": "viewed_user_firstname", 11 | "email": "test2@test.com" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_forum/user_report_viewed/existing_report_viewed_all_courses/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 0, 3 | "id": 1, 4 | "objectid": null, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\mod_forum\\event\\user_report_viewed", 8 | "objecttable": null, 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_glossary/comment_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": [ 3 | { 4 | "id": 1, 5 | "itemid": 1, 6 | "content": "test_glossary_entry_comment_content" 7 | } 8 | ], 9 | "glossary": [ 10 | { 11 | "id": 1, 12 | "name": "test_glossary_name" 13 | } 14 | ], 15 | "glossary_entries": [ 16 | { 17 | "glossaryid": 1, 18 | "id": 1, 19 | "concept": "test_glossary_entry_name", 20 | "definition": "test_glossary_entry_description" 21 | } 22 | ], 23 | "modules": [ 24 | { 25 | "id": 1, 26 | "name": "glossary" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /tests/mod_glossary/comment_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_glossary\\event\\comment_created", 8 | "objecttable": "comments", 9 | "other": "a:1:{s:6:\"itemid\";i:1;}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_glossary/comment_deleted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "glossary": [ 3 | { 4 | "id": 1, 5 | "name": "test_glossary_name" 6 | } 7 | ], 8 | "glossary_entries": [ 9 | { 10 | "glossaryid": 1, 11 | "id": 1, 12 | "concept": "test_glossary_entry_name", 13 | "definition": "test_glossary_entry_description" 14 | } 15 | ], 16 | "modules": [ 17 | { 18 | "id": 1, 19 | "name": "glossary" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /tests/mod_glossary/comment_deleted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_glossary\\event\\comment_deleted", 8 | "objecttable": "comments", 9 | "other": "a:1:{s:6:\"itemid\";i:1;}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_glossary/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "glossary": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "glossary" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_glossary/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_glossary\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_glossary/entry_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "glossary": [ 3 | { 4 | "id": 1, 5 | "name": "test_glossary_name" 6 | } 7 | ], 8 | "glossary_entries": [ 9 | { 10 | "glossaryid": 1, 11 | "id": 1, 12 | "concept": "test_glossary_entry_name", 13 | "definition": "test_glossary_entry_description" 14 | } 15 | ], 16 | "modules": [ 17 | { 18 | "id": 1, 19 | "name": "glossary" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /tests/mod_glossary/entry_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_glossary\\event\\entry_viewed", 8 | "objecttable": "glossary_entries", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_imscp/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "imscp": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "imscp" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_imscp/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_imscp\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_lesson/content_page_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_pages": [ 10 | { 11 | "id": 1, 12 | "lessonid": 1, 13 | "title": "lesson_content_page_title" 14 | } 15 | ], 16 | "modules": [ 17 | { 18 | "id": 1, 19 | "name": "lesson" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /tests/mod_lesson/content_page_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\content_page_viewed", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "lesson" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_lesson/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_lesson\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_lesson/essay_assessed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "score": 1 13 | } 14 | ], 15 | "lesson_attempts": [ 16 | { 17 | "id": 1, 18 | "lessonid": 1, 19 | "pageid": 1, 20 | "userid": 1, 21 | "correct": 1, 22 | "timeseen": "1731972680", 23 | "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\";}" 24 | } 25 | ], 26 | "lesson_pages": [ 27 | { 28 | "id": 1, 29 | "lessonid": 1, 30 | "contents": "lesson_question_page_contents", 31 | "qtype": 10, 32 | "title": "lesson_question_page_title" 33 | } 34 | ], 35 | "modules": [ 36 | { 37 | "id": 1, 38 | "name": "lesson" 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /tests/mod_lesson/essay_assessed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\essay_assessed", 8 | "objecttable": "lesson_pages", 9 | "other": "a:2:{s:8:\"lessonid\";s:1:\"1\";s:9:\"attemptid\";i:1;}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_lesson/lesson_ended/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "grade_grades": [ 3 | { 4 | "itemid": 1, 5 | "userid": 1, 6 | "rawgrade": 75, 7 | "rawgrademax": 100, 8 | "rawgrademin": 0, 9 | "timemodified": 1731595610 10 | } 11 | ], 12 | "grade_items": [ 13 | { 14 | "id": 1, 15 | "gradepass": 50, 16 | "iteminstance": 1, 17 | "itemmodule": "lesson" 18 | } 19 | ], 20 | "lesson": [ 21 | { 22 | "id": 1, 23 | "name": "test_lesson", 24 | "intro": "test_lesson_intro" 25 | } 26 | ], 27 | "modules": [ 28 | { 29 | "id": 1, 30 | "name": "lesson" 31 | } 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /tests/mod_lesson/lesson_ended/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\lesson_ended", 8 | "objecttable": "lesson", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/lesson_restarted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "modules": [ 10 | { 11 | "id": 1, 12 | "name": "lesson" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tests/mod_lesson/lesson_restarted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\lesson_restarted", 8 | "objecttable": "lesson", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/lesson_resumed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "modules": [ 10 | { 11 | "id": 1, 12 | "name": "lesson" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tests/mod_lesson/lesson_resumed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\lesson_resumed", 8 | "objecttable": "lesson", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/lesson_started/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "modules": [ 10 | { 11 | "id": 1, 12 | "name": "lesson" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tests/mod_lesson/lesson_started/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\lesson_started", 8 | "objecttable": "lesson", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/choice/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "response": "a", 13 | "score": 1 14 | }, 15 | { 16 | "pageid": 1, 17 | "response": "b", 18 | "score": 1 19 | }, 20 | { 21 | "pageid": 1, 22 | "response": "c", 23 | "score": 0 24 | } 25 | ], 26 | "lesson_attempts": [ 27 | { 28 | "lessonid": 1, 29 | "pageid": 1, 30 | "userid": 1, 31 | "correct": 1, 32 | "timeseen": "1731972680", 33 | "useranswer": "a" 34 | } 35 | ], 36 | "lesson_pages": [ 37 | { 38 | "id": 1, 39 | "lessonid": 1, 40 | "contents": "lesson_question_page_contents", 41 | "qtype": 3, 42 | "title": "lesson_question_page_title" 43 | } 44 | ], 45 | "modules": [ 46 | { 47 | "id": 1, 48 | "name": "lesson" 49 | } 50 | ] 51 | } 52 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/choice/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_answered", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/essay/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "score": 1 13 | } 14 | ], 15 | "lesson_attempts": [ 16 | { 17 | "lessonid": 1, 18 | "pageid": 1, 19 | "userid": 1, 20 | "correct": 0, 21 | "timeseen": "1731972680", 22 | "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\";}" 23 | } 24 | ], 25 | "lesson_pages": [ 26 | { 27 | "id": 1, 28 | "lessonid": 1, 29 | "contents": "lesson_question_page_contents", 30 | "qtype": 10, 31 | "title": "lesson_question_page_title" 32 | } 33 | ], 34 | "modules": [ 35 | { 36 | "id": 1, 37 | "name": "lesson" 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/essay/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_answered", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/matching/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "id": 1, 12 | "pageid": 1, 13 | "answer": "A", 14 | "response": "Apple", 15 | "score": 0 16 | }, 17 | { 18 | "id": 2, 19 | "pageid": 1, 20 | "answer": "B", 21 | "response": "Banana", 22 | "score": 0 23 | } 24 | ], 25 | "lesson_attempts": [ 26 | { 27 | "lessonid": 1, 28 | "pageid": 1, 29 | "userid": 1, 30 | "correct": 1, 31 | "timeseen": "1731972680", 32 | "useranswer": "Apple,Banana" 33 | } 34 | ], 35 | "lesson_pages": [ 36 | { 37 | "id": 1, 38 | "lessonid": 1, 39 | "contents": "lesson_question_page_contents", 40 | "qtype": 5, 41 | "title": "lesson_question_page_title" 42 | } 43 | ], 44 | "modules": [ 45 | { 46 | "id": 1, 47 | "name": "lesson" 48 | } 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/matching/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_answered", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/numerical/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "response": "23", 13 | "score": 1 14 | } 15 | ], 16 | "lesson_attempts": [ 17 | { 18 | "lessonid": 1, 19 | "pageid": 1, 20 | "userid": 1, 21 | "correct": 1, 22 | "timeseen": "1731972680", 23 | "useranswer": "23" 24 | } 25 | ], 26 | "lesson_pages": [ 27 | { 28 | "id": 1, 29 | "lessonid": 1, 30 | "contents": "lesson_question_page_contents", 31 | "qtype": 8, 32 | "title": "lesson_question_page_title" 33 | } 34 | ], 35 | "modules": [ 36 | { 37 | "id": 1, 38 | "name": "lesson" 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/numerical/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_answered", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/shortanswer/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "response": "Thing", 13 | "score": 1 14 | } 15 | ], 16 | "lesson_attempts": [ 17 | { 18 | "lessonid": 1, 19 | "pageid": 1, 20 | "userid": 1, 21 | "correct": 1, 22 | "timeseen": "1731972680", 23 | "useranswer": "Thing" 24 | } 25 | ], 26 | "lesson_pages": [ 27 | { 28 | "id": 1, 29 | "lessonid": 1, 30 | "contents": "lesson_question_page_contents", 31 | "qtype": 1, 32 | "title": "lesson_question_page_title" 33 | } 34 | ], 35 | "modules": [ 36 | { 37 | "id": 1, 38 | "name": "lesson" 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/shortanswer/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_answered", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/truefalse/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "response": "true", 13 | "score": 1 14 | }, 15 | { 16 | "pageid": 1, 17 | "response": "false", 18 | "score": 0 19 | } 20 | ], 21 | "lesson_attempts": [ 22 | { 23 | "lessonid": 1, 24 | "pageid": 1, 25 | "userid": 1, 26 | "correct": 1, 27 | "timeseen": "1731972680", 28 | "useranswer": "true" 29 | } 30 | ], 31 | "lesson_pages": [ 32 | { 33 | "id": 1, 34 | "lessonid": 1, 35 | "contents": "lesson_question_page_contents", 36 | "qtype": 2, 37 | "title": "lesson_question_page_title" 38 | } 39 | ], 40 | "modules": [ 41 | { 42 | "id": 1, 43 | "name": "lesson" 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_answered/truefalse/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_answered", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/choice/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "response": "a", 13 | "score": 1 14 | }, 15 | { 16 | "pageid": 1, 17 | "response": "b", 18 | "score": 1 19 | }, 20 | { 21 | "pageid": 1, 22 | "response": "c", 23 | "score": 0 24 | } 25 | ], 26 | "lesson_pages": [ 27 | { 28 | "id": 1, 29 | "lessonid": 1, 30 | "contents": "lesson_question_page_contents", 31 | "qtype": 3, 32 | "title": "lesson_question_page_title" 33 | } 34 | ], 35 | "modules": [ 36 | { 37 | "id": 1, 38 | "name": "lesson" 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/choice/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_viewed", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/essay/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "score": 1 13 | } 14 | ], 15 | "lesson_pages": [ 16 | { 17 | "id": 1, 18 | "lessonid": 1, 19 | "contents": "lesson_question_page_contents", 20 | "qtype": 10, 21 | "title": "lesson_question_page_title" 22 | } 23 | ], 24 | "modules": [ 25 | { 26 | "id": 1, 27 | "name": "lesson" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/essay/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_viewed", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/matching/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "answer": "A", 13 | "response": "Apple", 14 | "score": 0 15 | }, 16 | { 17 | "pageid": 1, 18 | "answer": "B", 19 | "response": "Banana", 20 | "score": 0 21 | } 22 | ], 23 | "lesson_pages": [ 24 | { 25 | "id": 1, 26 | "lessonid": 1, 27 | "contents": "lesson_question_page_contents", 28 | "qtype": 5, 29 | "title": "lesson_question_page_title" 30 | } 31 | ], 32 | "modules": [ 33 | { 34 | "id": 1, 35 | "name": "lesson" 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/matching/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_viewed", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/numerical/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "response": "23", 13 | "score": 1 14 | } 15 | ], 16 | "lesson_pages": [ 17 | { 18 | "id": 1, 19 | "lessonid": 1, 20 | "contents": "lesson_question_page_contents", 21 | "qtype": 8, 22 | "title": "lesson_question_page_title" 23 | } 24 | ], 25 | "modules": [ 26 | { 27 | "id": 1, 28 | "name": "lesson" 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/numerical/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_viewed", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/shortanswer/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "response": "Thing", 13 | "score": 1 14 | } 15 | ], 16 | "lesson_pages": [ 17 | { 18 | "id": 1, 19 | "lessonid": 1, 20 | "contents": "lesson_question_page_contents", 21 | "qtype": 1, 22 | "title": "lesson_question_page_title" 23 | } 24 | ], 25 | "modules": [ 26 | { 27 | "id": 1, 28 | "name": "lesson" 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/shortanswer/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_viewed", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/truefalse/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lesson": [ 3 | { 4 | "id": 1, 5 | "name": "test_lesson", 6 | "intro": "test_lesson_intro" 7 | } 8 | ], 9 | "lesson_answers": [ 10 | { 11 | "pageid": 1, 12 | "response": "true", 13 | "score": 1 14 | }, 15 | { 16 | "pageid": 1, 17 | "response": "false", 18 | "score": 0 19 | } 20 | ], 21 | "lesson_pages": [ 22 | { 23 | "id": 1, 24 | "lessonid": 1, 25 | "contents": "lesson_question_page_contents", 26 | "qtype": 2, 27 | "title": "lesson_question_page_title" 28 | } 29 | ], 30 | "modules": [ 31 | { 32 | "id": 1, 33 | "name": "lesson" 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /tests/mod_lesson/question_viewed/truefalse/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_lesson\\event\\question_viewed", 8 | "objecttable": "lesson_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_lti/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "lti": [ 3 | { 4 | "id": 1, 5 | "name": "test_name" 6 | } 7 | ], 8 | "modules": [ 9 | { 10 | "id": 1, 11 | "name": "lti" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_lti/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_lti\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_page/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "page" 6 | } 7 | ], 8 | "page": [ 9 | { 10 | "id": 1, 11 | "name": "test_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_page/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_page\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_questionnaire/all_responses_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "questionnaire" 6 | } 7 | ], 8 | "questionnaire": [ 9 | { 10 | "id": 1, 11 | "name": "test_q_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_questionnaire/all_responses_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_questionnaire\\event\\all_responses_viewed", 8 | "objecttable": "questionnaire", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_questionnaire/attempt_resumed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "questionnaire" 6 | } 7 | ], 8 | "questionnaire": [ 9 | { 10 | "id": 1, 11 | "name": "test_q_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_questionnaire/attempt_resumed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_questionnaire\\event\\attempt_resumed", 8 | "objecttable": "questionnaire", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_questionnaire/attempt_saved/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "questionnaire" 6 | } 7 | ], 8 | "questionnaire": [ 9 | { 10 | "id": 1, 11 | "name": "test_q_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_questionnaire/attempt_saved/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_questionnaire\\event\\attempt_saved", 8 | "objecttable": "questionnaire", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_questionnaire/attempt_submitted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "questionnaire" 6 | } 7 | ], 8 | "questionnaire": [ 9 | { 10 | "id": 1, 11 | "name": "test_q_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_questionnaire/attempt_submitted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_questionnaire\\event\\attempt_submitted", 8 | "objecttable": "questionnaire", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_questionnaire/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "questionnaire" 6 | } 7 | ], 8 | "questionnaire": [ 9 | { 10 | "id": 1, 11 | "name": "test_q_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_questionnaire/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_questionnaire\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_becameoverdue/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "quiz" 6 | } 7 | ], 8 | "quiz": [ 9 | { 10 | "id": 1, 11 | "name": "test_quiz_name" 12 | } 13 | ], 14 | "quiz_attempts": [ 15 | { 16 | "id": 1, 17 | "quiz": 1, 18 | "state": "overdue", 19 | "sumgrades": 50, 20 | "timefinish": 1, 21 | "timestart": 0 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_becameoverdue/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_becameoverdue", 8 | "objecttable": "quiz_attempts", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "quiz" 6 | } 7 | ], 8 | "quiz": [ 9 | { 10 | "id": 1, 11 | "name": "test_quiz_name" 12 | } 13 | ], 14 | "quiz_attempts": [ 15 | { 16 | "id": 1, 17 | "quiz": 1, 18 | "state": "finished", 19 | "sumgrades": 50, 20 | "timefinish": 1, 21 | "timestart": 0 22 | } 23 | ], 24 | "user": [ 25 | { 26 | "id": 1, 27 | "firstname": "test_instructor_fullname", 28 | "email": "instructor@test.com" 29 | }, 30 | { 31 | "id": 2, 32 | "firstname": "test_learner_fullname", 33 | "email": "learner@test.com" 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_reviewed/existing_attempt_reviewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 2, 7 | "userid": 1, 8 | "eventname": "\\mod_quiz\\event\\attempt_reviewed", 9 | "objecttable": "attempt", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_started/existing_attempt_started/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "quiz" 6 | } 7 | ], 8 | "quiz": [ 9 | { 10 | "id": 1, 11 | "name": "test_quiz_name" 12 | } 13 | ], 14 | "quiz_attempts": [ 15 | { 16 | "id": 1, 17 | "quiz": 1, 18 | "state": "finished", 19 | "sumgrades": 50, 20 | "timefinish": 1, 21 | "timestart": 0 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_started/existing_attempt_started/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_started", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/essay/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "grade_grades": [ 3 | { 4 | "itemid": 1, 5 | "userid": 1, 6 | "rawgrade": 50 7 | } 8 | ], 9 | "grade_items": [ 10 | { 11 | "id": 1, 12 | "grademax": 100, 13 | "grademin": 0, 14 | "gradepass": 50, 15 | "iteminstance": 1, 16 | "itemmodule": "quiz" 17 | } 18 | ], 19 | "modules": [ 20 | { 21 | "id": 1, 22 | "name": "quiz" 23 | } 24 | ], 25 | "question": [ 26 | { 27 | "id": 1, 28 | "name": "test_name", 29 | "qtype": "essay", 30 | "questiontext": "test_question" 31 | } 32 | ], 33 | "question_attempts": [ 34 | { 35 | "id": 1, 36 | "questionid": 1, 37 | "questionusageid": 1, 38 | "responsesummary": "test_answer" 39 | } 40 | ], 41 | "question_usages": [ 42 | { 43 | "id": 1 44 | } 45 | ], 46 | "quiz": [ 47 | { 48 | "id": 1, 49 | "name": "test_quiz_name" 50 | } 51 | ], 52 | "quiz_attempts": [ 53 | { 54 | "id": 1, 55 | "uniqueid": 1, 56 | "quiz": 1, 57 | "state": "finished", 58 | "sumgrades": 50, 59 | "timefinish": 1, 60 | "timestart": 0 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/essay/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/essay_null_response/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "grade_grades": [ 3 | { 4 | "itemid": 1, 5 | "userid": 1, 6 | "rawgrade": 50 7 | } 8 | ], 9 | "grade_items": [ 10 | { 11 | "id": 1, 12 | "grademax": 100, 13 | "grademin": 0, 14 | "gradepass": 50, 15 | "iteminstance": 1, 16 | "itemmodule": "quiz" 17 | } 18 | ], 19 | "modules": [ 20 | { 21 | "id": 1, 22 | "name": "quiz" 23 | } 24 | ], 25 | "question": [ 26 | { 27 | "id": 1, 28 | "name": "test_name", 29 | "qtype": "essay", 30 | "questiontext": "test_question" 31 | } 32 | ], 33 | "question_attempts": [ 34 | { 35 | "id": 1, 36 | "questionid": 1, 37 | "questionusageid": 1, 38 | "responsesummary": null 39 | } 40 | ], 41 | "question_usages": [ 42 | { 43 | "id": 1 44 | } 45 | ], 46 | "quiz": [ 47 | { 48 | "id": 1, 49 | "name": "test_quiz_name" 50 | } 51 | ], 52 | "quiz_attempts": [ 53 | { 54 | "id": 1, 55 | "uniqueid": 1, 56 | "quiz": 1, 57 | "state": "finished", 58 | "sumgrades": 50, 59 | "timefinish": 1, 60 | "timestart": 0 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/essay_null_response/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/gapselect/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/match/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/multichoice/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/multichoice_withchoices/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "grade_grades": [ 3 | { 4 | "itemid": 1, 5 | "userid": 1, 6 | "rawgrade": 50 7 | } 8 | ], 9 | "grade_items": [ 10 | { 11 | "id": 1, 12 | "grademax": 100, 13 | "grademin": 0, 14 | "gradepass": 50, 15 | "iteminstance": 1, 16 | "itemmodule": "quiz" 17 | } 18 | ], 19 | "modules": [ 20 | { 21 | "id": 1, 22 | "name": "quiz" 23 | } 24 | ], 25 | "question": [ 26 | { 27 | "id": 1, 28 | "name": "test_name", 29 | "qtype": "multichoice", 30 | "questiontext": "test_question" 31 | } 32 | ], 33 | "question_answers": [ 34 | { 35 | "id": 1, 36 | "answer": "answer 1", 37 | "fraction": 1.0, 38 | "question": 1 39 | } 40 | ], 41 | "question_attempts": [ 42 | { 43 | "id": 1, 44 | "questionid": 1, 45 | "questionusageid": 1, 46 | "responsesummary": "answer 1", 47 | "rightanswer": "answer 1" 48 | } 49 | ], 50 | "question_usages": [ 51 | { 52 | "id": 1 53 | } 54 | ], 55 | "quiz": [ 56 | { 57 | "id": 1, 58 | "name": "test_quiz_name" 59 | } 60 | ], 61 | "quiz_attempts": [ 62 | { 63 | "id": 1, 64 | "uniqueid": 1, 65 | "quiz": 1, 66 | "state": "finished", 67 | "sumgrades": 50, 68 | "timefinish": 1, 69 | "timestart": 0 70 | } 71 | ] 72 | } 73 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/multichoice_withchoices/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/multichoiceset/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/multichoiceset_withchoices/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/no_questions/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "grade_grades": [ 3 | { 4 | "itemid": 1, 5 | "userid": 1, 6 | "rawgrade": 50 7 | } 8 | ], 9 | "grade_items": [ 10 | { 11 | "id": 1, 12 | "grademax": 100, 13 | "grademin": 0, 14 | "gradepass": 50, 15 | "iteminstance": 1, 16 | "itemmodule": "quiz" 17 | } 18 | ], 19 | "modules": [ 20 | { 21 | "id": 1, 22 | "name": "quiz" 23 | } 24 | ], 25 | "question": [], 26 | "question_attempts": [], 27 | "question_usages": [ 28 | { 29 | "id": 1 30 | } 31 | ], 32 | "quiz": [ 33 | { 34 | "id": 1, 35 | "name": "test_quiz_name" 36 | } 37 | ], 38 | "quiz_attempts": [ 39 | { 40 | "id": 1, 41 | "uniqueid": 1, 42 | "quiz": 1, 43 | "state": "finished", 44 | "sumgrades": 50, 45 | "timefinish": 1, 46 | "timestart": 0 47 | } 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/no_questions/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/numerical/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/randomsamatch/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/shortanswer/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "grade_grades": [ 3 | { 4 | "itemid": 1, 5 | "userid": 1, 6 | "rawgrade": 50 7 | } 8 | ], 9 | "grade_items": [ 10 | { 11 | "id": 1, 12 | "grademax": 100, 13 | "grademin": 0, 14 | "gradepass": 50, 15 | "iteminstance": 1, 16 | "itemmodule": "quiz" 17 | } 18 | ], 19 | "modules": [ 20 | { 21 | "id": 1, 22 | "name": "quiz" 23 | } 24 | ], 25 | "question": [ 26 | { 27 | "id": 1, 28 | "name": "test_name", 29 | "qtype": "shortanswer", 30 | "questiontext": "test_question" 31 | } 32 | ], 33 | "question_attempts": [ 34 | { 35 | "id": 1, 36 | "questionid": 1, 37 | "questionusageid": 1, 38 | "responsesummary": "test_answer" 39 | } 40 | ], 41 | "question_usages": [ 42 | { 43 | "id": 1 44 | } 45 | ], 46 | "quiz": [ 47 | { 48 | "id": 1, 49 | "name": "test_quiz_name" 50 | } 51 | ], 52 | "quiz_attempts": [ 53 | { 54 | "id": 1, 55 | "uniqueid": 1, 56 | "quiz": 1, 57 | "state": "finished", 58 | "sumgrades": 50, 59 | "timefinish": 1, 60 | "timestart": 0 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/shortanswer/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/truefalse/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "grade_grades": [ 3 | { 4 | "itemid": 1, 5 | "userid": 1, 6 | "rawgrade": 50 7 | } 8 | ], 9 | "grade_items": [ 10 | { 11 | "id": 1, 12 | "grademax": 100, 13 | "grademin": 0, 14 | "gradepass": 50, 15 | "iteminstance": 1, 16 | "itemmodule": "quiz" 17 | } 18 | ], 19 | "modules": [ 20 | { 21 | "id": 1, 22 | "name": "quiz" 23 | } 24 | ], 25 | "question": [ 26 | { 27 | "id": 1, 28 | "name": "test_name", 29 | "qtype": "truefalse", 30 | "questiontext": "test_question" 31 | } 32 | ], 33 | "question_answers": [ 34 | { 35 | "id": 1, 36 | "answer": "True", 37 | "fraction": 1.0, 38 | "question": 1 39 | }, 40 | { 41 | "id": 2, 42 | "answer": "False", 43 | "fraction": 0.0, 44 | "question": 1 45 | } 46 | ], 47 | "question_attempts": [ 48 | { 49 | "id": 1, 50 | "questionid": 1, 51 | "questionusageid": 1, 52 | "responsesummary": "True", 53 | "rightanswer": "True" 54 | } 55 | ], 56 | "question_usages": [ 57 | { 58 | "id": 1 59 | } 60 | ], 61 | "quiz": [ 62 | { 63 | "id": 1, 64 | "name": "test_quiz_name" 65 | } 66 | ], 67 | "quiz_attempts": [ 68 | { 69 | "id": 1, 70 | "uniqueid": 1, 71 | "quiz": 1, 72 | "state": "finished", 73 | "sumgrades": 50, 74 | "timefinish": 1, 75 | "timestart": 0 76 | } 77 | ] 78 | } 79 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/truefalse/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/unknown_qtype/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "grade_grades": [ 3 | { 4 | "itemid": 1, 5 | "userid": 1, 6 | "rawgrade": 50 7 | } 8 | ], 9 | "grade_items": [ 10 | { 11 | "id": 1, 12 | "grademax": 100, 13 | "grademin": 0, 14 | "gradepass": 50, 15 | "iteminstance": 1, 16 | "itemmodule": "quiz" 17 | } 18 | ], 19 | "modules": [ 20 | { 21 | "id": 1, 22 | "name": "quiz" 23 | } 24 | ], 25 | "question": [ 26 | { 27 | "id": 1, 28 | "name": "test_name", 29 | "qtype": "unknown", 30 | "questiontext": "test_question" 31 | } 32 | ], 33 | "question_attempts": [ 34 | { 35 | "id": 1, 36 | "questionid": 1, 37 | "questionusageid": 1, 38 | "responsesummary": "test_answer" 39 | } 40 | ], 41 | "question_usages": [ 42 | { 43 | "id": 1 44 | } 45 | ], 46 | "quiz": [ 47 | { 48 | "id": 1, 49 | "name": "test_quiz_name" 50 | } 51 | ], 52 | "quiz_attempts": [ 53 | { 54 | "id": 1, 55 | "uniqueid": 1, 56 | "quiz": 1, 57 | "state": "finished", 58 | "sumgrades": 50, 59 | "timefinish": 1, 60 | "timestart": 0 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_submitted/unknown_qtype/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_submitted", 8 | "objecttable": "attempt", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "quiz" 6 | } 7 | ], 8 | "quiz": [ 9 | { 10 | "id": 1, 11 | "name": "test_quiz_name" 12 | } 13 | ], 14 | "quiz_attempts": [ 15 | { 16 | "id": 1, 17 | "quiz": 1, 18 | "state": "finished", 19 | "sumgrades": 50, 20 | "timefinish": 1, 21 | "timestart": 0 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tests/mod_quiz/attempt_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_quiz\\event\\attempt_viewed", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_quiz/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "quiz" 6 | } 7 | ], 8 | "quiz": [ 9 | { 10 | "id": 1, 11 | "name": "test_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_quiz/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_quiz\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_quiz/question_manually_graded/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "quiz" 6 | } 7 | ], 8 | "question_attempt_steps": [ 9 | { 10 | "id": 1, 11 | "questionattemptid": 1, 12 | "fraction": 0.5, 13 | "sequencenumber": 1 14 | } 15 | ], 16 | "question_attempts": [ 17 | { 18 | "id": 1, 19 | "questionusageid": 1, 20 | "maxfraction": 1.0, 21 | "minfraction": 0.0 22 | } 23 | ], 24 | "quiz": [ 25 | { 26 | "id": 1, 27 | "name": "test_quiz_name" 28 | } 29 | ], 30 | "quiz_attempts": [ 31 | { 32 | "id": 1, 33 | "userid": 2, 34 | "quiz": 1, 35 | "state": "finished", 36 | "sumgrades": 50, 37 | "timefinish": 1, 38 | "timestart": 0 39 | } 40 | ], 41 | "user": [ 42 | { 43 | "id": 1, 44 | "firstname": "test_instructor_fullname", 45 | "email": "instructor@test.com" 46 | }, 47 | { 48 | "id": 2, 49 | "firstname": "test_learner_fullname", 50 | "email": "learner@test.com" 51 | } 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /tests/mod_quiz/question_manually_graded/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "relateduserid": null, 7 | "userid": 1, 8 | "eventname": "\\mod_quiz\\event\\question_manually_graded", 9 | "objecttable": "quiz", 10 | "other": "a:3:{s:6:\"quizid\";s:1:\"1\";s:9:\"attemptid\";s:1:\"1\";s:4:\"slot\";i:1;}", 11 | "timecreated": 1433946701 12 | } 13 | -------------------------------------------------------------------------------- /tests/mod_resource/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "resource" 6 | } 7 | ], 8 | "resource": [ 9 | { 10 | "id": 1, 11 | "name": "test_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_resource/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_resource\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_scorm/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "scorm" 6 | } 7 | ], 8 | "scorm": [ 9 | { 10 | "id": 1, 11 | "name": "test_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_scorm/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_scorm\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_scorm/sco_launched/existing_sco_launched/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "scorm" 6 | } 7 | ], 8 | "scorm": [ 9 | { 10 | "id": 1, 11 | "name": "test_name" 12 | } 13 | ], 14 | "scorm_scoes": [ 15 | { 16 | "id": 1, 17 | "scorm": 1 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/mod_scorm/sco_launched/existing_sco_launched/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_scorm\\event\\sco_launched", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "scorm" 6 | } 7 | ], 8 | "scorm": [ 9 | { 10 | "id": 1, 11 | "name": "test_name" 12 | } 13 | ], 14 | "scorm_scoes_track": [ 15 | { 16 | "id": 1, 17 | "scoid": 1, 18 | "scormid": 1, 19 | "userid": 1, 20 | "attempt": 1, 21 | "element": "cmi.core.lesson_status", 22 | "value": "completed" 23 | }, 24 | { 25 | "id": 2, 26 | "scoid": 1, 27 | "scormid": 1, 28 | "userid": 1, 29 | "attempt": 1, 30 | "element": "cmi.core.score.min", 31 | "value": 0 32 | }, 33 | { 34 | "id": 3, 35 | "scoid": 1, 36 | "scormid": 1, 37 | "userid": 1, 38 | "attempt": 1, 39 | "element": "cmi.core.score.max", 40 | "value": 100 41 | } 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /tests/mod_scorm/scoreraw_submitted/existing_scoreraw_submitted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_scorm\\event\\scoreraw_submitted", 8 | "other": "a:2:{s:8:\"cmivalue\";i:100;s:9:\"attemptid\";i:1;}", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_scorm/status_submitted/existing_status_submitted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "scorm" 6 | } 7 | ], 8 | "scorm": [ 9 | { 10 | "id": 1, 11 | "name": "test_name" 12 | } 13 | ], 14 | "scorm_scoes_track": [ 15 | { 16 | "id": 1, 17 | "scoid": 1, 18 | "scormid": 1, 19 | "userid": 1, 20 | "attempt": 1, 21 | "element": "cmi.core.lesson_status", 22 | "value": "completed" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /tests/mod_scorm/status_submitted/existing_status_submitted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_scorm\\event\\status_submitted", 8 | "other": "a:1:{s:9:\"attemptid\";i:1;}", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_survey/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "survey" 6 | } 7 | ], 8 | "survey": [ 9 | { 10 | "id": 1, 11 | "name": "test_name", 12 | "intro": "

test_intro

" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tests/mod_survey/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_survey\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_survey/report_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "survey" 6 | } 7 | ], 8 | "survey": [ 9 | { 10 | "id": 1, 11 | "name": "test_name", 12 | "intro": "

test_intro

" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tests/mod_survey/report_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_survey\\event\\report_viewed", 8 | "objecttable": "survey", 9 | "other": "a:2:{s:6:\"action\";s:7:\"summary\";s:7:\"groupid\";i:0;}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_survey/response_submitted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "survey" 6 | } 7 | ], 8 | "survey": [ 9 | { 10 | "id": 1, 11 | "name": "test_name", 12 | "intro": "

test_intro

" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tests/mod_survey/response_submitted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": null, 6 | "userid": 1, 7 | "eventname": "\\mod_survey\\event\\response_submitted", 8 | "objecttable": null, 9 | "other": "a:1:{s:8:\"surveyid\";s:1:\"1\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_url/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "url" 6 | } 7 | ], 8 | "url": [ 9 | { 10 | "id": 1, 11 | "name": "test_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_url/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_url\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_wiki/comment_created/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": [ 3 | { 4 | "id": 1, 5 | "itemid": 1, 6 | "content": "

test_content

" 7 | } 8 | ], 9 | "modules": [ 10 | { 11 | "id": 1, 12 | "name": "wiki" 13 | } 14 | ], 15 | "wiki": [ 16 | { 17 | "id": 1, 18 | "name": "test_name", 19 | "intro": "

test_intro

" 20 | } 21 | ], 22 | "wiki_pages": [ 23 | { 24 | "id": 1, 25 | "subwikiid": 1, 26 | "cachedcontent": "

test_content

", 27 | "title": "test_page_title" 28 | } 29 | ], 30 | "wiki_subwikis": [ 31 | { 32 | "id": 1, 33 | "wikiid": 1 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /tests/mod_wiki/comment_created/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_wiki\\event\\comment_created", 8 | "objecttable": "comments", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_wiki/comment_deleted/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "wiki" 6 | } 7 | ], 8 | "wiki": [ 9 | { 10 | "id": 1, 11 | "name": "test_name", 12 | "intro": "

test_intro

" 13 | } 14 | ], 15 | "wiki_pages": [ 16 | { 17 | "id": 1, 18 | "subwikiid": 1, 19 | "cachedcontent": "

test_content

", 20 | "title": "test_page_title" 21 | } 22 | ], 23 | "wiki_subwikis": [ 24 | { 25 | "id": 1, 26 | "wikiid": 1 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /tests/mod_wiki/comment_deleted/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_wiki\\event\\comment_deleted", 8 | "objecttable": "comments", 9 | "other": "a:1:{s:6:\"itemid\";s:1:\"1\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/mod_wiki/comments_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": [ 3 | { 4 | "id": 1, 5 | "itemid": 1, 6 | "content": "

test_content

" 7 | } 8 | ], 9 | "modules": [ 10 | { 11 | "id": 1, 12 | "name": "wiki" 13 | } 14 | ], 15 | "wiki": [ 16 | { 17 | "id": 1, 18 | "name": "test_name", 19 | "intro": "

test_intro

" 20 | } 21 | ], 22 | "wiki_pages": [ 23 | { 24 | "id": 1, 25 | "subwikiid": 1, 26 | "cachedcontent": "

test_content

", 27 | "title": "test_page_title" 28 | } 29 | ], 30 | "wiki_subwikis": [ 31 | { 32 | "id": 1, 33 | "wikiid": 1 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /tests/mod_wiki/comments_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_wiki\\event\\comments_viewed", 8 | "objecttable": "wiki_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_wiki/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "wiki" 6 | } 7 | ], 8 | "wiki": [ 9 | { 10 | "id": 1, 11 | "name": "test_name", 12 | "intro": "

test_intro

" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tests/mod_wiki/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_wiki\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/mod_wiki/page_viewed/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "wiki" 6 | } 7 | ], 8 | "wiki": [ 9 | { 10 | "id": 1, 11 | "name": "test_name", 12 | "intro": "

test_intro

" 13 | } 14 | ], 15 | "wiki_pages": [ 16 | { 17 | "id": 1, 18 | "subwikiid": 1, 19 | "cachedcontent": "

test_content

", 20 | "title": "test_page_title" 21 | } 22 | ], 23 | "wiki_subwikis": [ 24 | { 25 | "id": 1, 26 | "wikiid": 1 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /tests/mod_wiki/page_viewed/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "objectid": 1, 6 | "userid": 1, 7 | "eventname": "\\mod_wiki\\event\\page_viewed", 8 | "objecttable": "wiki_pages", 9 | "timecreated": 1433946701 10 | } 11 | -------------------------------------------------------------------------------- /tests/mod_workshop/course_module_viewed/existing_module/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "modules": [ 3 | { 4 | "id": 1, 5 | "name": "workshop" 6 | } 7 | ], 8 | "workshop": [ 9 | { 10 | "id": 1, 11 | "name": "test_name" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/mod_workshop/course_module_viewed/existing_module/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\mod_workshop\\event\\course_module_viewed", 7 | "timecreated": 1433946701 8 | } 9 | -------------------------------------------------------------------------------- /tests/tool_certificate/certificate_issued/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_certificate_issues": [ 3 | { 4 | "courseid": null, 5 | "id": 1, 6 | "code": "4303209428AU" 7 | } 8 | ], 9 | "user": [ 10 | { 11 | "id": 1, 12 | "firstname": "test_fullname1", 13 | "email": "test1@test.com" 14 | }, 15 | { 16 | "id": 2, 17 | "firstname": "test_fullname2", 18 | "email": "test2@test.com" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /tests/tool_certificate/certificate_issued/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 0, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\tool_certificate\\event\\certificate_issued", 8 | "objecttable": "tool_certificate_issues", 9 | "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/tool_certificate/certificate_revoked/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": [ 3 | { 4 | "id": 1, 5 | "firstname": "test_fullname1", 6 | "email": "test1@test.com" 7 | }, 8 | { 9 | "id": 2, 10 | "firstname": "test_fullname2", 11 | "email": "test2@test.com" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/tool_certificate/certificate_revoked/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 0, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\tool_certificate\\event\\certificate_revoked", 8 | "objecttable": "tool_certificate_issues", 9 | "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/tool_certificate/certificate_verified/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_certificate_issues": [ 3 | { 4 | "courseid": null, 5 | "id": 1, 6 | "code": "4303209428AU" 7 | } 8 | ], 9 | "user": [ 10 | { 11 | "id": 1, 12 | "firstname": "test_fullname1", 13 | "email": "test1@test.com" 14 | }, 15 | { 16 | "id": 2, 17 | "firstname": "test_fullname2", 18 | "email": "test2@test.com" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /tests/tool_certificate/certificate_verified/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "courseid": 2, 3 | "id": 1, 4 | "objectid": 1, 5 | "relateduserid": 2, 6 | "userid": 1, 7 | "eventname": "\\tool_certificate\\event\\certificate_verified", 8 | "objecttable": "tool_certificate_issues", 9 | "other": "a:1:{s:4:\"code\";s:12:\"4303209428AU\";}", 10 | "timecreated": 1433946701 11 | } 12 | -------------------------------------------------------------------------------- /tests/tool_usertours/tour_ended/data.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /tests/tool_usertours/tour_ended/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "contextinstanceid": 1, 3 | "courseid": 2, 4 | "id": 1, 5 | "userid": 1, 6 | "eventname": "\\tool_usertours\\event\\tour_ended", 7 | "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;}", 8 | "timecreated": 1433946701 9 | } 10 | -------------------------------------------------------------------------------- /tests/tool_usertours/tour_ended/statements.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "actor": { 4 | "account": { 5 | "homePage": "http://www.example.org", 6 | "name": "1" 7 | }, 8 | "name": "test_fullname" 9 | }, 10 | "verb": { 11 | "id": "https://xapi.edlm/profiles/edlm-lms/concepts/verbs/toured", 12 | "display": { 13 | "en": "Toured" 14 | } 15 | }, 16 | "object": { 17 | "id": "http://www.example.org/course/view.php?id=2", 18 | "objectType": "Activity" 19 | }, 20 | "context": { 21 | "contextActivities": { 22 | "category": [ 23 | { 24 | "id": "http://www.example.org", 25 | "definition": { 26 | "name": { 27 | "en": "test_name" 28 | }, 29 | "type": "http://id.tincanapi.com/activitytype/lms" 30 | } 31 | } 32 | ] 33 | }, 34 | "extensions": { 35 | "http://lrs.learninglocker.net/define/extensions/info": { 36 | "event_function": "\\src\\transformer\\events\\tool_usertours\\tour_ended", 37 | "event_name": "\\tool_usertours\\event\\tour_ended", 38 | "http://moodle.org": "1.0.0", 39 | "https://github.com/xAPI-vle/moodle-logstore_xapi": "0.0.0-development" 40 | } 41 | }, 42 | "language": "en" 43 | } 44 | } 45 | ] 46 | -------------------------------------------------------------------------------- /tests/totara_program/program_assigned/existing_program/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "prog": [ 3 | { 4 | "id": 1, 5 | "fullname": "test_name" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /tests/totara_program/program_assigned/existing_program/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "objectid": 1, 4 | "userid": 1, 5 | "eventname": "\\totara_program\\event\\program_assigned", 6 | "objecttable": "prog_assignment", 7 | "timecreated": 1560399491 8 | } 9 | -------------------------------------------------------------------------------- /thirdpartylibs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | vendor/composer 5 | Composer 6 | latest 7 | MIT 8 | 9 | 10 | 11 | vendor/yetanalytics/statementfactory/ 12 | StatementFactory 13 | v0.0.12 14 | GPL3 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /version.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Plugin version file. 19 | * 20 | * @package logstore_xapi 21 | * @copyright Jerret Fowler 22 | * Ryan Smith 23 | * David Pesce 24 | * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 25 | */ 26 | 27 | defined('MOODLE_INTERNAL') || die(); 28 | 29 | $plugin->component = 'logstore_xapi'; 30 | $plugin->version = 2025021100; 31 | $plugin->requires = 2022112800; 32 | $plugin->supported = [401, 405]; 33 | $plugin->maturity = MATURITY_STABLE; 34 | $plugin->release = ''; 35 | -------------------------------------------------------------------------------- /xapi-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xAPI-vle/moodle-logstore_xapi/adeacf9d9bc72dc42004f9f437886a9cfa693e66/xapi-config.png --------------------------------------------------------------------------------