Integrate Wooclap events as a Moodle course activity.
For end-users, it is better to install this plugin from the official Moodle store or from a .zip provided by Wooclap.
For development purposes, it can be useful to install it manually from source with the instructions below:
- Install
node
- Run
npm install
- Run
npm run release
- This will generate a .zip file
- Go to your Moodle instance "Plugin Installer" page:
https://your-moodle-instance/admin/tool/installaddon/index.php
- Drag and drop the .zip file onto the page
- Follow the on-screen instructions
Linting is done using PHP Code Sniffer (phpcs) with a specific moodle standard.
Some links:
- https://github.com/squizlabs/PHP_CodeSniffer
- https://docs.moodle.org/dev/Linting#PHP_.28PHP_CodeSniffer.29 (Linting article on Moodle doc)
- https://docs.moodle.org/dev/Setting_up_Sublime2 (specific article on setting up Sublime Text for Moodle development)
Steps to get linter working on Sublime Text on Windows
- Install PHP on your machine (https://www.php.net/downloads.php)
- Install Composer (PHP dependency manager) here : https://getcomposer.org/download/ (can be installed locally or globally)
- In this folder, run
composer install
(this uses thecomposer.json
file to install PHP Code Sniffer at the correct version) - Extract the content of
vendor_patch.zip
in the newly createdvendor\squizlabs\php_codesniffer\CodeSniffer\Standards
- Using Sublime Package Control, install SublimeLinter and SublimeLinter-phpcs
Code formatting is done using phpfmt in Sublime Text.
- Install PHP on your machine (https://www.php.net/downloads.php)
- Install this package https://packagecontrol.io/packages/phpfmt
- Use the following configuration
{
"indent_with_space": 4,
"passes":
[
"ReindentSwitchBlocks"
],
"version": 1
}
VSCode extensions