-
Ryan Smith authoredRyan Smith authored
- Drag and Drop Moodle installation
- Supported Events
- Plugin Design
- Adding Events
- Plugin Release Process
Supported Events
Moodle Event Name | xAPI Recipe Example |
---|---|
\core\event\course_viewed | CourseViewed |
\mod_page\event\course_module_viewed | ModuleViewed |
\mod_quiz\event\course_module_viewed | ModuleViewed |
\mod_url\event\course_module_viewed | ModuleViewed |
\mod_folder\event\course_module_viewed | ModuleViewed |
\mod_book\event\course_module_viewed | ModuleViewed |
\mod_scorm\event\course_module_viewed | ModuleViewed |
\mod_forum\event\user_report_viewed | ModuleViewed |
\mod_forum\event\course_module_viewed | ModuleViewed |
\mod_resource\event\course_module_viewed | ModuleViewed |
\mod_quiz\event\attempt_viewed | ModuleViewed |
\mod_choice\event\course_module_viewed | ModuleViewed |
\mod_data\event\course_module_viewed | ModuleViewed |
\mod_feedback\event\course_module_viewed | ModuleViewed |
\mod_lesson\event\course_module_viewed | ModuleViewed |
\mod_lti\event\course_module_viewed | ModuleViewed |
\mod_wiki\event\course_module_viewed | ModuleViewed |
\mod_workshop\event\course_module_viewed | ModuleViewed |
\mod_chat\event\course_module_viewed | ModuleViewed |
\mod_glossary\event\course_module_viewed | ModuleViewed |
\mod_imscp\event\course_module_viewed | ModuleViewed |
\mod_survey\event\course_module_viewed | ModuleViewed |
\mod_url\event\course_module_viewed | ModuleViewed |
\mod_facetoface\event\course_module_viewed | ModuleViewed |
\mod_quiz\event\attempt_preview_started | AttemptStarted |
\mod_quiz\event\attempt_reviewed | AttemptCompleted |
\mod_quiz\event\attempt_abandoned | AttemptCompleted |
\core\event\user_loggedin | UserLoggedin |
\core\event\user_loggedout | UserLoggedout |
\mod_assign\event\submission_graded | AssignmentGraded |
\mod_assign\event\assessable_submitted | AssignmentSubmitted |
\mod_forum\event\discussion_viewed | DiscussionViewed |
\core\event\user_created | UserRegistered |
\core\event\user_enrolment_created | EnrolmentCreated |
Plugin Design
The plugin controls and configures the three parts listed below.
The plugin uses the three parts listed above in the following way.
- The plugin passes raw event data from the logstore_standard_log to the Expander.
- The Expander expands events with data from your Moodle Database.
- The plugin passes the expanded events from step 2 to the Translator.
- The Translator translates expanded events to xAPI recipe options.
- The plugin passes the translated events from step 4 to the Emitter.
- The Emitter constructs the translated events as xAPI statements and emits them to the configured LRS.
These parts have been separated into their own repositories to improve their reusability since these parts will be used in other projects.
Adding Events
Assuming you've already installed, you'll need to follow the steps below to begin developing.
From the root directory of Moodle run cd admin/tool/log/store/xapi; php -r "readfile('https://getcomposer.org/installer');" | php; rm -rf vendor; php composer.phar install --prefer-source
.
You'll now be able to modify and test events by updating the code inside the "vendor/learninglocker/moodle-log-expander", "vendor/learninglocker/moodle-xapi-translator", and "vendor/learninglocker/xapi-recipe-emitter" directories. If you've read the section on plugin design you should understand what each of these directories are responsible for in this plugin. Each of the parts have their own documentation on their respective Github repositories (linked below).
Plugin Release Process
This process has been documented for collaborators (users that have write access to the repository) who are releasing new versions of this plugin.
- Modify the version.php file.
- Commit and push the changes made.
- Run
sh build.sh
on the branch to be released. - Create release on Github.
- Document patches.
- Document minor changes.
- Document major changes.
- Document migrations and additional notes.