Coder Social home page Coder Social logo

ninelanterns / moodle-auth_outage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from catalyst/moodle-auth_outage

0.0 6.0 0.0 764 KB

Planned, graduated user and admin friendly moodle outages

Home Page: https://moodle.org/plugins/auth_outage

PHP 95.02% CSS 0.85% Gherkin 2.80% JavaScript 1.33%

moodle-auth_outage's Introduction

Moodle Outage manager plugin

Version Support

The master branch supports Moodle 3.3 and higher. The MOODLE_32_STABLE branch supports Moodle 2.7 -> Moodle 3.2

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.

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.

Default

Manager

Moodle Requirements

This plugin will work out-of-the-box with Moodle 3.0 and Moodle 3.1.

If you have an older version of Moodle you can still make it work but you will need to manually add one extra plugin, please check:

Screenshots

Manage outages page with a scheduled outage warning. Manage outages page with a scheduled outage warning.

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

The warning bar once the outage has ended. The warning bar once the outage has ended.

Installation

  1. Install the plugin the same as any standard moodle plugin either via the Moodle plugin directory, or you can use git to clone it into your source:

    git clone [email protected]:catalyst/moodle-auth_outage.git auth/outage

    Or install via the Moodle plugin directory:

    https://moodle.org/plugins/auth_outage

  2. Then run the Moodle upgrade

If you have issues please log them in github here:

https://github.com/catalyst/moodle-auth_outage/issues

  1. Go to Dashboard ► Site administration ► Plugins ► Authentication ► Manage authentication, enable the Outage manager plugin and place it on the top.

  2. If you need to use the IP Blocking, please add the following lines into your config.php before the require('/lib/setup.php') call:

// Insert this after $CFG->dataroot is defined.
if (file_exists(__DIR__.'/auth/outage/bootstrap.php')) {
    require(__DIR__.'/auth/outage/bootstrap.php');
}

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.

Quick Guide

Please see QUICKGUIDE.md for step-by-step examples on how to test and use the Outage Manager.

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

Please raise any issues in github:

https://github.com/catalyst/moodle-auth_outage/issues

Pull requests are welcome :)

If you need anything urgently or would like to sponsor a feature please contact Catalyst IT Australia:

https://www.catalyst-au.net/contact-us

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.