diff --git a/README.md b/README.md index 33f9748..f3e38fb 100644 --- a/README.md +++ b/README.md @@ -12,18 +12,27 @@ What is this? ------------- -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. +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 booleon 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. - -![Screenshot as of 2016-09-06](docs/2016-09-06_screenshot.png?raw=true) +The main idea is that instead of an outage being a very booleon 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. -Why it is an auth plugin? -------------------------- +Screenshots +----------- -One of the graduated stages this plugin introduces is a 'tester only' mode which disables login for most normal users. This is conceptually similar to the maintenance mode but enables testers to login and confirm the state after an upgrade without needing full admin privileges. +![Manage outages page with a scheduled outage warning.](docs/2016-09-28_screenshot_warning.png?raw=true) +Manage outages page with a scheduled outage warning. +![The warning bar during an ongoing outage.](docs/2016-09-28_screenshot_ongoing.png?raw=true) +The warning bar during an ongoing outage. + +![The warning bar once the outage has ended.](docs/2016-09-28_screenshot_ended.png?raw=true) +The warning bar once the outage has ended. Installation ------------ @@ -43,9 +52,38 @@ If you have issues please log them in github here: https://github.com/catalyst/moodle-auth_outage/issues -3. Go to Dashboard ► Site administration ► Plugins ► Authentication ► Manage authentication and enable the auth_outage plugin and make it the very first auth plugin +3. Go to `Dashboard ► Site administration ► Plugins ► Authentication ► Manage authentication`, +enable the `Outage manager` plugin and place it on the top. -4. Go to Dashboard ► Site administration ► Plugins ► Authentication ► Outage ► Manage and set up your future outages + +How to use +---------- + +1. Go to `Dashboard ► Site administration ► Plugins ► Authentication ► Outage manager ► Manage` and set up your future outages. + +2. *(optional)* Integrate your maintenance scripts using the CLI in `auth/outage/cli`. + +Example of CLI usage: +``` +$ php cli/create.php --help +Creates a new outage. + + -h, --help shows parameters help. + -c, --clone clone another outage except for the start time. + -a, --autostart must be Y or N, sets if the outage automatically triggers maintenance mode. + -w, --warn how many seconds before it starts to display a warning. + -s, --start in how many seconds should this outage start. Required. + -d, --duration how many seconds should the outage last. + -t, --title the title of the outage. + -e, --description the description of the outage. + --onlyid only outputs the new outage id, useful for scripts. + -b, --block blocks until outage starts. +``` + +Why it is an auth plugin? +------------------------- + +One of the graduated stages this plugin introduces is a 'tester only' mode which disables login for most normal users. This is conceptually similar to the maintenance mode but enables testers to login and confirm the state after an upgrade without needing full admin privileges. Feedback and issues diff --git a/docs/2016-09-28_screenshot_ended.png b/docs/2016-09-28_screenshot_ended.png new file mode 100644 index 0000000..402e199 Binary files /dev/null and b/docs/2016-09-28_screenshot_ended.png differ diff --git a/docs/2016-09-28_screenshot_ongoing.png b/docs/2016-09-28_screenshot_ongoing.png new file mode 100644 index 0000000..eac0760 Binary files /dev/null and b/docs/2016-09-28_screenshot_ongoing.png differ diff --git a/docs/2016-09-28_screenshot_warning.png b/docs/2016-09-28_screenshot_warning.png new file mode 100644 index 0000000..4fa6c3a Binary files /dev/null and b/docs/2016-09-28_screenshot_warning.png differ diff --git a/tests/phpunit/local/controllers/infopage_test.php b/tests/phpunit/local/controllers/infopage_test.php index aa4cca4..5fd2ab2 100644 --- a/tests/phpunit/local/controllers/infopage_test.php +++ b/tests/phpunit/local/controllers/infopage_test.php @@ -92,7 +92,7 @@ class infopagecontroller_test extends advanced_testcase { $html = $info->get_output(); // Must find... self::assertContains('', $html); - self::assertContains('', $html); // Issue #53. + self::assertContains('', $html); // Issue #53. self::assertContains('', $html); self::assertContains($outage->get_title(), $html); self::assertContains($outage->get_description(), $html);