{"id":19591910,"url":"https://github.com/catalyst/moodle-auth_outage","last_synced_at":"2025-04-27T14:33:31.109Z","repository":{"id":10579557,"uuid":"66230425","full_name":"catalyst/moodle-auth_outage","owner":"catalyst","description":"Planned, graduated user and admin friendly moodle outages","archived":false,"fork":false,"pushed_at":"2025-03-04T03:17:50.000Z","size":1069,"stargazers_count":17,"open_issues_count":80,"forks_count":35,"subscribers_count":35,"default_branch":"MOODLE_39_STABLE","last_synced_at":"2025-04-05T00:41:21.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://moodle.org/plugins/auth_outage","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catalyst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-22T01:37:27.000Z","updated_at":"2025-02-27T00:27:55.000Z","dependencies_parsed_at":"2023-11-16T02:27:31.773Z","dependency_job_id":"977690a6-6a9f-49b8-9732-7f4a9f3d37f0","html_url":"https://github.com/catalyst/moodle-auth_outage","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-auth_outage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-auth_outage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-auth_outage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catalyst%2Fmoodle-auth_outage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catalyst","download_url":"https://codeload.github.com/catalyst/moodle-auth_outage/tar.gz/refs/heads/MOODLE_39_STABLE","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251154604,"owners_count":21544527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T08:31:44.166Z","updated_at":"2025-04-27T14:33:31.102Z","avatar_url":"https://github.com/catalyst.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![ci](https://github.com/catalyst/moodle-auth_outage/actions/workflows/ci.yml/badge.svg?branch=MOODLE_39_STABLE)](https://github.com/catalyst/moodle-auth_outage/actions/workflows/ci.yml?branch=MOODLE_39_STABLE)\n\n# Moodle Outage manager plugin\n- [Moodle Outage manager plugin](#moodle-outage-manager-plugin)\n  - [What is this?](#what-is-this)\n  - [Moodle Requirements](#moodle-requirements)\n  - [Branches](#branches)\n  - [Screenshots](#screenshots)\n  - [Installation](#installation)\n  - [Theme configuration](#theme-configuration)\n  - [Custom Theme Additional SCSS](#custom-theme-additional-scss)\n  - [How to use](#how-to-use)\n  - [Quick Guide](#quick-guide)\n  - [Why it is an auth plugin?](#why-it-is-an-auth-plugin)\n  - [Tester restriction options](#tester-restriction-options)\n  - [IP restriction](#ip-restriction)\n  - [Access key](#access-key)\n  - [Feedback and issues](#feedback-and-issues)\n\nWhat is this?\n-------------\n\nThis is a Moodle plugin which makes the student experience of planned outages nicer,\nand provides extra tools for administrators and testers that help before and after the\noutage window.\n\nThe main idea is that instead of an outage being a very booleon on/off situation,\nthis plugin creates the concept of graduated outages where at predefined times before\nan outage and after, different levels of warning and access can be provided to students\nand testers letting them know what is about to happen and why.\n\n![image](https://user-images.githubusercontent.com/187449/149717343-1d2c5237-dbc6-4d2a-a08c-2bdb343e87d2.png)\n\nMoodle Requirements\n-------------------\n\nThis plugin will work out-of-the-box with Moodle 3.0 and Moodle 3.1.\n\nIf you have an older version of Moodle you can still make it work but you will\nneed to manually add one extra plugin, please check:\n* https://github.com/catalyst/moodle-local_outage\n\nMoodle supported branches\n--------\n| Version     |  Branch           | PHP  |\n| ------------------ |  ---------------- | ---- |\n| Moodle 3.9+        |  MOODLE_39_STABLE | 7.2+ |\n\nTotara supported branches\n--------\n| Version         | Branch           | PHP  |\n| --------------- | ---------------- | ---- |\n| Totara 19       | TOTARA_19 | 7.2+ |\n| Totara 13-18    | MOODLE_39_STABLE | 7.2+ |\n\n\nScreenshots\n-----------\n\n![Manage outages page with a scheduled outage warning.](docs/2016-09-28_screenshot_warning.png?raw=true)\nManage outages page with a scheduled outage warning.\n\n![The warning bar during an ongoing outage.](docs/2016-09-28_screenshot_ongoing.png?raw=true)\nThe warning bar during an ongoing outage.\n\n![The warning bar once the outage has ended.](docs/2016-09-28_screenshot_ended.png?raw=true)\nThe warning bar once the outage has ended.\n\nInstallation\n------------\n\n1. Install the plugin the same as any standard moodle plugin either via the\nMoodle plugin directory, or you can use git to clone it into your source:\n\n     `git clone git@github.com:catalyst/moodle-auth_outage.git auth/outage`\n\n    Or install via the Moodle plugin directory:\n    \n     https://moodle.org/plugins/auth_outage\n\n2. Then run the Moodle upgrade\n\nIf you have issues please log them in github here:\n\nhttps://github.com/catalyst/moodle-auth_outage/issues\n\n3. Go to `Dashboard ► Site administration ► Plugins ► Authentication ► Manage authentication`,\nenable the `Outage manager` plugin and place it on the top.\n\n4. If you need to use the IP Blocking, please add the following lines into your `config.php`\nbefore the `require('/lib/setup.php')` call:\n\n```\n// Insert this after $CFG-\u003edataroot is defined.\nif (file_exists(__DIR__.'/auth/outage/bootstrap.php')) {\n    require(__DIR__.'/auth/outage/bootstrap.php');\n}\n```\n\nTheme configuration\n-------------------\n\nThis plugin must work gracefully with your theme, but every theme can be different so it's impossible to get this right out of the box (other than with the default moodle theme Boost).\n\nThere is an admin setting which allows you to add or override and css to fix css issues. Typically these include properly pushing the page down when the outage notification bar is visible, including making this work with fixed headers and when the hamburger menu is open / closed and at different responsive breakpoints.\n\nThis can be found at:\n\n`Dashboard / Site administration / Plugins / Authentication / Outage manager / Settings`\n\n\n\nCustom Theme Additional SCSS\n-------------------\n\nCustom themes generally do not have the same `$navbar-height` variable set to 80px (MOODLE), therefore custom themes will not calculate the change in navbar height with page elements that calculate the navbar total height. \n\nAdd the following SCSS For Moodle 3.11+\n\n```\nbody.auth_outage {\n    #page-wrapper {\n        #nav-drawer {\n            top: $navbar-height + 100px;\n            height: calc(100% - (#{$navbar-height} + 100px));\n        }\n        #page {\n            margin-top: $navbar-height + 100px;\n        }\n    }\n    [data-region=right-hand-drawer].drawer {\n        top: $navbar-height + 100px;\n        height: calc(100% - (#{$navbar-height} + 100px));\n    } \n}\n```\n\nTotara is a little different with version 13+ and no variables are used to set the `totaraNav` height \n\nAdd the following CSS For Totara 13+\n\n```\n.totaraNav {\n    margin-top: 100px;\n}\n.local_envbar .totaraNav {\n    margin-top: 50px;\n}\nbody.auth_outage #page {\n    margin-top: 0;\n}\n```\n\n\n\nHow to use\n----------\n\n1. Go to `Dashboard ► Site administration ► Plugins ► Authentication ► Outage manager ► Manage` and set up your future outages.\n\n2. *(optional)* Integrate your maintenance scripts using the CLI in `auth/outage/cli`.\n\nExample of CLI usage:\n```\n$ php cli/create.php --help\nCreates a new outage.\n\n  -h,  --help               shows parameters help.\n  -c,  --clone              clone another outage except for the start time.\n  -a,  --autostart          must be Y or N, sets if the outage automatically triggers maintenance mode.\n  -w,  --warn               how many seconds before it starts to display a warning.\n  -s,  --start              in how many seconds should this outage start or unix time to start outage. Required.\n  -d,  --duration           how many seconds should the outage last.\n  -t,  --title              the title of the outage.\n  -e,  --description        the description of the outage.\n       --onlyid             only outputs the new outage id, useful for scripts.\n  -b,  --block              blocks until outage starts.\n```\n\nQuick Guide\n-----------\n\nPlease see [QUICKGUIDE.md](QUICKGUIDE.md) for step-by-step examples on\nhow to test and use the Outage Manager.\n\nWhy it is an auth plugin?\n-------------------------\n\nOne 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. \n\nTester restriction options\n------------\nTwo options are available to restrict the site to only let testers in during the tester phase.\nNote: these restrictions build on each other; If both are enabled, users must meet both criteria to be allowed in.\n\n## IP restriction\nOnly allow users from a certain IP or range of ips to enter.\n## Access key\nUsers provide an access key in the URL params on first page load, which is then stored as a cookie for 24 hours. If the access key matches the one setup for the outage, they are allowed in.\n## Using IP restriction with access key\nUsers will be allowed if they are from the configured allowed ips OR if they provide the correct access key.\n\n\nFeedback and issues\n-------------------\n\nPlease raise any issues in github:\n\nhttps://github.com/catalyst/moodle-auth_outage/issues\n\nPull requests are welcome :)\n\nIf you need anything urgently or would like to sponsor a feature please contact Catalyst IT Australia:\n\nhttps://www.catalyst-au.net/contact-us\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalyst%2Fmoodle-auth_outage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatalyst%2Fmoodle-auth_outage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalyst%2Fmoodle-auth_outage/lists"}