mirror of
https://github.com/LdesignMedia/moodle-availability_ipaddress.git
synced 2026-05-16 21:41:28 +02:00
700820480d505e20974103dc6d6cfe1507fd412d
Moodle - availability ip address plugin
Enhance activity security by restricting access based on IP address. This plugin allows you to control the availability of any chosen activity, making it accessible only to users from specified IP addresses.
Author
- Author: Luuk Verhoeven, ldesignmedia.nl
- Author: Vincent Cornelis, ldesignmedia.nl
- Min. required: Moodle 4.0
- Supports PHP: 7.3+
List of features
- Supports comma separate list of ip-addresses
- Subnet support, eg 192.168.1.0/24
- Inline ip-address validation
- Turning on/off with eye icon, without losing the input value.
Installation
- Copy this plugin to the
availability\condition\ipaddressfolder on the server - Login as administrator
- Go to Site Administrator > Notification
- Install the plugin
Usage
- Add or edit an activity in a Moodle course.
- Go to the section "Restrict access"
- Click IP address in the modal
- There's a new input field that supports a list of comma separated ip address e.g. 127.0.0.1, 192.168.1.0/24
- The users with matching ip addresses can view the activity.
- Save the activity
TODO
- Behat tests ip validation
Security
If you discover any security related issues, please email luuk@ldesignmedia.nl instead of using the issue tracker.
License
The GNU GENERAL PUBLIC LICENSE. Please see License File for more information.
Contributing
Contributions are welcome and will be fully credited. We accept contributions via Pull Requests on Github.
Changelog
5.0.3 (15.03.2026)
- Fixed PHP 7.3 compatibility issue that broke Moodle 4.0.x servers (#13)
- Removed typed properties (PHP 7.4+) to support PHP 7.3+
- Lowered environment.xml PHP requirement from 7.4 to 7.3
5.0.2 (04.08.2025)
- Added support for pre-configuring IP ranges by admins
5.0.1 (22.05.2025)
- Tested on Moodle 5.0
4.5.0 (04.04.2025)
- Tested on Moodle 4.5
4.4.0 (20.07.2024)
- Tested on Moodle 4.4
4.0.2 (28.05.2022)
- Tested on Moodle 4.0 @hamzatamyachte
4.0.1 (28.05.2022)
- Fixed issue 6 @hamzatamyachte
3.9.0 (11.02.2022)
- Added ip-range support @juacas
Languages
PHP
100%