Modified unit tests to remove autostart, and quickstart guide and readme.

This commit is contained in:
abhinavgandham
2026-01-20 17:29:24 +10:00
committed by Brendan Heywood
parent bf51ff6de9
commit 5e0a3c015d
23 changed files with 18 additions and 186 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="auth/outage/db" VERSION="20260114" COMMENT="XMLDB file for Moodle auth/outage"
<XMLDB PATH="auth/outage/db" VERSION="20260120" COMMENT="XMLDB file for Moodle auth/outage"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
@@ -7,7 +7,6 @@
<TABLE NAME="auth_outage" COMMENT="Table used for auth/outage plugin. Holds information about all past, current and future outages.">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
<FIELD NAME="autostart" TYPE="int" LENGTH="1" NOTNULL="true" SEQUENCE="false" COMMENT="If the maintenance mode should be automatically triggered once this outage startes."/>
<FIELD NAME="warntime" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="When the outage will start showing a warning for that outage."/>
<FIELD NAME="starttime" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="When outage starts."/>
<FIELD NAME="stoptime" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="When outage ends."/>

View File

@@ -75,7 +75,16 @@ function xmldb_auth_outage_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2026011301, 'auth', 'outage');
}
if ($oldversion < 2026011302) {
if ($oldversion < 2024081902) {
// Getting the table auth_outage and target field to remove from the table.
$table = new xmldb_table('auth_outage');
$field = new xmldb_field('autostart');
// Conditionally launch drop field autostart.
if ($dbman->field_exists($table, $field)) {
$dbman->drop_field($table, $field);
}
// Removing the default_autostart config as it is no longer used.
unset_config('default_autostart', 'auth_outage');