mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-17 05:48:43 +02:00
Issue #46 and #53 - Improve test assertion for static info page. Added more screenshots and updated the README.
This commit is contained in:
56
README.md
56
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.
|
||||
|
||||

|
||||
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.
|
||||
|
||||

|
||||
The warning bar during an ongoing outage.
|
||||
|
||||

|
||||
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
|
||||
|
||||
BIN
docs/2016-09-28_screenshot_ended.png
Normal file
BIN
docs/2016-09-28_screenshot_ended.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
BIN
docs/2016-09-28_screenshot_ongoing.png
Normal file
BIN
docs/2016-09-28_screenshot_ongoing.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/2016-09-28_screenshot_warning.png
Normal file
BIN
docs/2016-09-28_screenshot_warning.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 120 KiB |
@@ -92,7 +92,7 @@ class infopagecontroller_test extends advanced_testcase {
|
||||
$html = $info->get_output();
|
||||
// Must find...
|
||||
self::assertContains('<!DOCTYPE html>', $html);
|
||||
self::assertContains('<meta http-equiv="refresh" content="'.$outage->get_duration_planned().'">', $html); // Issue #53.
|
||||
self::assertContains('<meta http-equiv="refresh" content="'.(60 * 60).'">', $html); // Issue #53.
|
||||
self::assertContains('</html>', $html);
|
||||
self::assertContains($outage->get_title(), $html);
|
||||
self::assertContains($outage->get_description(), $html);
|
||||
|
||||
Reference in New Issue
Block a user