Skip to content

Commit

Permalink
no more behat explicit redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
ferishili committed Dec 6, 2024
1 parent 1815866 commit b54bf39
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions classes/local/maintenance_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,19 +340,6 @@ public function decide_access_bounce() {
$requesttarget = parse_url($initiator);
$tagetpath = !empty($requesttarget['path']) ? rtrim($requesttarget['path'], '/') : '';

// We handle behat test process right here before going further.
if ($isbahat) {
$behatredirectbackurl = $referer;
if (empty($behatredirectbackurl) && $COURSE && !empty($COURSE->id)) {
$behatredirectbackurl = new \moodle_url('/course/view.php', ['id' => $COURSE->id]);
}
if (!empty($behatredirectbackurl)) {
redirect($behatredirectbackurl);
} else {
throw new \moodle_exception('maintenance_exception_message', self::PLUGINNAME);
}
}

$whitelist = [];
$whitelist[] = $wwwrootparsed['path'];
$whitelist[] = $wwwrootparsed['path'] . '/course/view.php';
Expand Down

0 comments on commit b54bf39

Please sign in to comment.