Moodle plugins directory: Outage manager | Moodle.org
Outage manager
Authentication ::: auth_outage
Maintained by Catalyst IT, Brendan Heywood
A plugin to manage outage periods, such as scheduled maintenance, including CLI tools to embed in your scripting.
Latest release:
536 sites
164 downloads
40 fans
Current versions available: 3
This is a Moodle plugin which makes the student experience of planned outages nicer, and provides extra tools for administrators and testers that help before and after the outage window.
The main idea is that instead of an outage being a very boolean on/off situation, this plugin creates the concept of graduated outages where at predefined times before an outage and after, different levels of warning and access can be provided to students and testers letting them know what is about to happen and why.
If you need support for Moodle 2.x ...
... you can still use this plugin but you will need to manually set up an additional local plugin contained, for more information please refer to: https://github.com/catalyst/moodle-local_outage
Contributors
Catalyst IT (Lead maintainer)
Brendan Heywood
Please login to view contributors details and/or to contact them
https://integration.moodle.org/job/Precheck%20remote%20branch/27871/artifact/work/smurf.html
In any case, there are a few problems such as:
https://git.in.moodle.com/mudrd8mz/moodle-plugins-snapshots/blob/63f61fb2ba21ff56c818249746a361409d34b6ea/auth/outage/tests/phpunit/local/controllers/infopage_test.php#L257
That are related to tests, if I use ' $this->expectException() ' I will probably get an deprecated warning. Is there any way to allow annotations?
I will comment again once I fixed most of the errors I can.
Thank you,
Daniel
I can't remember now where I saw it, but IIRC it is preferred to use
$this->setExpectedException('moodle_exception')
over the annotation. In either case, please understand that these pre-checks are primarily here for you to double check they are really intended. We do not discriminate plugins just on these formal prechecks.Regarding the tests, you are right, $this->setExpectedException() is better and we can define which moment the exception should be thrown, which we cannot do with annotations.
That said PHPUnit is deprecating the $this->setExpectedException() and suggesting us to use $this->expectsException() instead. We can do that in Moodle 32 (master) but not before that. I decided to use the annotation to cover both cases.
I fixed them by creating a set_expected_exception which will adapt as needed, I just uploaded a new version with most of the issues fixed.
I am expecting a few " Class ) is not documented " messages but I believe this to be an issue with moodlecheck -- I created an issue at:
https://github.com/moodlehq/moodle-local_moodlecheck/issues/31
If you believe the notation with ::class I used is not good, I can revert to strings. I just think the error message from moodlecheck is complaining about an undocumented class, not that we should not use this notation.
Also, I expect a few invalid tag warning for unit tests, for example I use "@depends" to link test cases and a few "@SupressWarnings" for PHPMD in test cases (I don't see the why breaking testcases into more classes just to get PHPMD approval).
I am waiting for the report, once it I will post here and you can guide me if I should make any further changes.
Cheers,
Daniel
https://integration.moodle.org/job/Precheck%20remote%20branch/28123/artifact/work/smurf.html
thanks for working on this plugin, I can see it being really useful to manage scheduled outages in a more user-friendly manner. The code is documented nicely and follows Moodle coding guidelines well, also great to see the behat and phpunit tests. My one objection is the inclusion of the local_outage plugin within the code which doesn't seem to be required unless you are running an older version. The version uploaded here in the plugins db for newer versions definitely shouldn't include it, and the version for 2.8 should have it listed as a dependency in the version.php file. Once that is resolved I think it is ready for general release so that others can give further feedback on it.
Thank you for the information, I've just submitted the changes as version 1.0.3.
Cheers,
Daniel
https://integration.moodle.org/job/Precheck%20remote%20branch/28697/artifact/work/smurf.html
Thanks Daniel for fixing the raised issues promptly, and thanks Dan for the approval review. I just checked and can see that the only remaining blocker with the local_outage presence has been fixed so I am happy to approve this now. You are cleared to land, welcome to the Plugins directory!