This page contains documentation for developers (people who would like to contribute code to the project).
From the root directory of your Moodle installation run the script below.
cd admin/tool/log/store; rm -rf xapi; git clone [email protected]:xAPI-vle/moodle-logstore_xapi.git xapi; cd xapi; php -r "readfile('https://getcomposer.org/installer');" | php; rm -rf vendor; php composer.phar install --prefer-source;
If you hadn't already installed the plugin, you'll need to login as an admin and navigate to "http://www.example.com/admin/index.php" (replacing “www.example.com” with your own domain). Once there you can follow on from step 6 of the user installation guide.
Assuming you've followed the instructions above, you can modify and test events by updating the code inside the directories below.
- vendor/learninglocker/moodle-log-expander
- vendor/learninglocker/moodle-xapi-translator
- vendor/learninglocker/xapi-recipe-emitter
If you've read the plugin design you should understand what each of these directories are responsible for. Each of the parts have their own documentation on their respective Github repositories (linked below).
Run these with the Moodle PHPUnit test framework:
vendor/bin/phpunit --testsuite logstore_xapi_testsuite
All PHPUnit tests should pass, but if you'd like to only run the tests for specific events, add the --filter
option:
vendor/bin/phpunit --testsuite logstore_xapi_testsuite --filter <Test_Name>
e.g.:
vendor/bin/phpunit --testsuite logstore_xapi_testsuite --filter course_completed_test
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.