MDL-4493 issue with 405 pages for IIS users - must specify actual page, as the notice function does a post - you cannot use the POST Verb on a directory in IIS.
This commit is contained in:
+5
-5
@@ -60,13 +60,13 @@
|
||||
/// moved here to fix bug 5734
|
||||
if ($course->metacourse) {
|
||||
print_header_simple();
|
||||
notice(get_string('coursenotaccessible'), $CFG->wwwroot);
|
||||
notice(get_string('coursenotaccessible'), "$CFG->wwwroot/index.php");
|
||||
}
|
||||
|
||||
/// Users can't enroll to site course
|
||||
if (!$course->category) {
|
||||
print_header_simple();
|
||||
notice(get_string('enrollfirst'), $CFG->wwwroot);
|
||||
notice(get_string('enrollfirst'), "$CFG->wwwroot/index.php");
|
||||
}
|
||||
|
||||
/// Double check just in case they are enrolled to start in the future
|
||||
@@ -75,14 +75,14 @@
|
||||
if ($course->enrolperiod and $student->timestart and ($student->timestart >= time())) {
|
||||
$message = get_string('enrolmentnotyet', '', userdate($student->timestart));
|
||||
print_header();
|
||||
notice($message, $CFG->wwwroot);
|
||||
notice($message, "$CFG->wwwroot/index.php");
|
||||
}
|
||||
}
|
||||
|
||||
/// Check if the course is enrollable
|
||||
if (!method_exists($enrol, 'print_entry')) {
|
||||
print_header_simple();
|
||||
notice(get_string('enrolmentnointernal'), $CFG->wwwroot);
|
||||
notice(get_string('enrolmentnointernal'), "$CFG->wwwroot/index.php");
|
||||
}
|
||||
|
||||
if (!$course->enrollable ||
|
||||
@@ -90,7 +90,7 @@
|
||||
($course->enrollable == 2 && $course->enrolenddate > 0 && $course->enrolenddate <= time())
|
||||
) {
|
||||
print_header_simple();
|
||||
notice(get_string('notenrollable'), $CFG->wwwroot);
|
||||
notice(get_string('notenrollable'), "$CFG->wwwroot/index.php");
|
||||
}
|
||||
|
||||
/// Check the submitted enrollment key if there is one
|
||||
|
||||
Reference in New Issue
Block a user