From af275d169978e081cc12bced947795d55571a596 Mon Sep 17 00:00:00 2001 From: Hamza Tamyachte Date: Sun, 15 Mar 2026 22:22:16 +0100 Subject: [PATCH 1/3] Fix #86c89ftg9 - Remove PHP 7.4 typed properties for PHP 7.3 compatibility Remove typed property declarations to prevent fatal parse errors on Moodle 4.0.x servers running PHP 7.3. Lower environment.xml PHP requirement from 7.4 to 7.3. Fixes #13 --- classes/condition.php | 4 ++-- environment.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/condition.php b/classes/condition.php index 50a202c..7d2f461 100644 --- a/classes/condition.php +++ b/classes/condition.php @@ -42,14 +42,14 @@ class condition extends \core_availability\condition { * * @var string */ - protected string $ipaddresses = ''; + protected $ipaddresses = ''; /** * Predefined IP address ranges. * * @var array */ - protected array $predefinedranges = []; + protected $predefinedranges = []; /** * condition constructor. diff --git a/environment.xml b/environment.xml index cff201b..dd3ab8f 100644 --- a/environment.xml +++ b/environment.xml @@ -1,6 +1,6 @@ - + From cccebb6c157673429bbb7b99d66ccb6b6d7c93d2 Mon Sep 17 00:00:00 2001 From: Hamza Tamyachte Date: Sun, 15 Mar 2026 22:35:39 +0100 Subject: [PATCH 2/3] Update #86c89ftg9 - Reorganise changelog and update PHP compatibility docs --- .gitignore | 0 README.md | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index 0c7784d..709cbf7 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ activity, making it accessible only to users from specified IP addresses. * Author: Luuk Verhoeven, [ldesignmedia.nl](https://ldesignmedia.nl/) * Author: Vincent Cornelis, [ldesignmedia.nl](https://ldesignmedia.nl/) * Min. required: Moodle 4.0 -* Supports PHP: 7.4 +* Supports PHP: 7.3+ ![Moodle400](https://img.shields.io/badge/moodle-4.0-F98012.svg?logo=moodle) ![Moodle401](https://img.shields.io/badge/moodle-4.1-F98012.svg?logo=moodle) @@ -21,6 +21,7 @@ activity, making it accessible only to users from specified IP addresses. ![Moodle405](https://img.shields.io/badge/moodle-4.5-F98012.svg?logo=moodle) ![Moodle500](https://img.shields.io/badge/moodle-5.0-F98012.svg?logo=moodle) +![PHP7.3](https://img.shields.io/badge/PHP-7.3-777BB4.svg?logo=php) ![PHP7.4](https://img.shields.io/badge/PHP-7.4-777BB4.svg?logo=php) ![PHP8.0](https://img.shields.io/badge/PHP-8.0-777BB4.svg?logo=php) ![PHP8.1](https://img.shields.io/badge/PHP-8.1-777BB4.svg?logo=php) @@ -62,12 +63,30 @@ The GNU GENERAL PUBLIC LICENSE. Please see [License File](LICENSE) for more info Contributions are welcome and will be fully credited. We accept contributions via Pull Requests on Github. -## Changelog +### Changelog -- 2024080401 Added support for pre-configuring IP ranges by admins -- 2025052200 Tested on Moodle 5.0 -- 2025040400 Tested on Moodle 4.5 -- 2024072000 Tested on Moodle 4.4 -- 2022021100 Thanks for adding ip-range support @[juacas](https://github.com/juacas) -- 2022052800 Fixed the [issue 6](https://github.com/ldesignmediaNL/moodle-availability_ipaddress/issues/6) @[hamzatamyachte](https://github.com/hamzatamyachte) -- 2022052801 Test in Moodle 4.0 @[hamzatamyachte](https://github.com/hamzatamyachte) +##### 5.0.3 (15.03.2026) +* Fixed PHP 7.3 compatibility issue that broke Moodle 4.0.x servers ([#13](https://github.com/LdesignMedia/moodle-availability_ipaddress/issues/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](https://github.com/hamzatamyachte) + +##### 4.0.1 (28.05.2022) +* Fixed [issue 6](https://github.com/ldesignmediaNL/moodle-availability_ipaddress/issues/6) @[hamzatamyachte](https://github.com/hamzatamyachte) + +##### 3.9.0 (11.02.2022) +* Added ip-range support @[juacas](https://github.com/juacas) From 700820480d505e20974103dc6d6cfe1507fd412d Mon Sep 17 00:00:00 2001 From: Hamza Tamyachte Date: Wed, 18 Mar 2026 10:13:19 +0100 Subject: [PATCH 3/3] Update #86c89ftg9 - Bump version to 2026031800 for plugin availability_ipaddress --- version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.php b/version.php index d764e5d..8e18692 100644 --- a/version.php +++ b/version.php @@ -27,7 +27,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'availability_ipaddress'; -$plugin->version = 2025080401; +$plugin->version = 2026031800; $plugin->release = '5.0.2'; $plugin->requires = 2016120500; $plugin->maturity = MATURITY_STABLE;