Thank you for considering contributing to Sensei LMS! Your contributions help make our platform even better.
Please read the following guidelines before contributing.
To contribute to Sensei LMS, please follow these steps:
- Make sure you set up your development environment to get the necessary tools in place before proceeding.
- Fork the Sensei LMS repository to your own account.
- Clone the forked repository to your local machine.
- Create a new branch for your contribution.
- Make your changes and test them thoroughly.
- Commit your changes and push them to your forked repository.
- Create a pull request to merge your changes into the main Sensei LMS repository.
If you notice any issues with Sensei LMS or have a feature request, please submit an issue on our issue tracker. Please include as much detail as possible, including steps to reproduce the issue or a clear description of the feature you're requesting.
- When opening an issue, please keep it to one bug/enhancement/question, etc. to simplify the discussion.
- Please test the trunk branch of the main Sensei LMS repository to confirm that the issue still exists.
- Be as descriptive as possible. Screenshots and even small videos are always welcome.
When submitting a pull request, please ensure that you have thoroughly tested your changes and that they follow our contribution guidelines. We ask that you also provide a clear and detailed description of your changes and the reason for the change.
- The general rule is to use 1 Pull Request for each issue. This helps us to quickly figure out how the new code affects the plugin and speeds up the review process.
- All pull request must be made from the branch "trunk". You will be responsible for checking that your branch is up to date.
- All pull requests must be related to an existing/new issue.
- If you can, please submit new unit tests along with your pull request.
The automated tests for Sensei LMS can be run locally. Please see our test instructions to run the unit tests on your machine.
Before submitting a pull request, make sure that your changes follow the following guidelines:
- Please ensure that your code adheres to coding standards for (PHP, JavaScript, CSS, HTML).
- Please provide clear documentation for any new functions, hooks or features you add.
- Make sure that all strings are translatable (without concatenation, handles plurals)
- Ensure that your new code is well-tested and does not break any existing functionality. Test your changes on different user privileges, including admin, teacher, and subscriber as appropriate. Test your code on the minimum supported PHP and WordPress versions.
- Please ensure that any dependencies are properly handled and documented.
- Because of possible conflicts, all required composer packages should be
scoped
. Scoping is done by copying the package to thethird-party
folder and changing its namespace toSensei\ThirdParty\...
. To do so, first, add the package as a dev dependency -composer require --dev vendor/package
. Then, editconfig/scoper.inc.php
to include the new package. Keep in mind that some packages may have their dependencies, so add those as well. Finally, runcomposer dump-autoload
which will initialize the scoping process.
- JavaScript, JSX, and SCSS files (using SASS) need to be compiled before using the plugin.
- The command
npm run build:assets
generates production-ready versions of these files. - For development, the command
npm run start
will create files with source maps for debugging support and keep watching the source files for changes. - JavaScript linting and auto-formatting is applied by pre-commit hooks.
To stay up-to-date on Sensei LMS's development, we recommend subscribing to our blog. Our blog provides updates on new features, bug fixes, and other changes to the platform. You can also follow our GitHub repository to receive notifications on the latest changes on the source code. Additionally, our support forum is a great place to connect with other developers and get help with any questions you have about Sensei LMS development.