Issue #129 - Stop maintenance after stoptime.

This commit is contained in:
Daniel Thee Roperto
2018-04-26 15:56:33 +10:00
parent 2c0067d33b
commit 8036147931
2 changed files with 5 additions and 5 deletions

View File

@@ -290,7 +290,7 @@ class outagelib_test extends advanced_testcase {
public function test_createmaintenancephpcode() {
$expected = <<<'EOT'
<?php
if (time() >= 123) {
if ((time() >= 123) && (time() < 456)) {
define('MOODLE_INTERNAL', true);
require_once($CFG->dirroot.'/lib/moodlelib.php');
if (!remoteip_in_list('heyyou
@@ -330,7 +330,7 @@ EOT;
$expected = <<<'EOT'
<?php
if (time() >= 123) {
if ((time() >= 123) && (time() < 456)) {
define('MOODLE_INTERNAL', true);
require_once($CFG->dirroot.'/lib/moodlelib.php');
if (!remoteip_in_list('127.0.0.1')) {