Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-4493

Error 405 after clicking OK when clicking Continue when manual enrolments are disabled

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.6.2
    • Component/s: Enrolments
    • Labels:
      None
    • Environment:
      Windows XP
    • Affected Branches:
      MOODLE_15_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE

      Description

      I use external authentication as well as external enrolments and I disabled manual enrolments. When a user selects a course in which the user is not enrolled, s/he receives the message:Manual enrolments are currently not enabled. When the user selects continue he is redirected to the main moodle site, but receives a 405 error instead of listing the contents.

      The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.

      This also happened on Version 1.5.2.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dougiamas Martin Dougiamas added a comment -

            From Dan Marsden (dan at digitalclay.co.nz) Tuesday, 30 May 2006, 10:04 AM:

            This happens in IIS because some of the moodle Continue links post are called with wwwroot/ rather than an explicit wwwroot/index.php,

            this results in a 405 page as the user is trying to post to a directory. - I presume in apache it redirects before posting

            there are a few people with this problem in the forums - see:

            http://moodle.org/mod/forum/discuss.php?d=45344

            http://moodle.org/mod/forum/discuss.php?d=46256

            • this seems to happen all over the place in moodle code - do a search for notice( and redirect( there are many that just redirect to $CFG->wwwroot which won't work in IIS

            Sugggested fix:

            modify the functions notice and redirect to check if the $link=$CFG->wwwroot and if so, add the correct homepage to the end of the redirect.

            I would suggest a new VAR in config.php maybe something called $CFG>home that contains index.php - or whatever a site admin configures the name of the site homepage to be.

            Dan

            From Dan Marsden (dan at digitalclay.co.nz) Tuesday, 30 May 2006, 10:07 AM:

            should clarify that a bit - a simple redirect works fine, however when that redirect sits within a form eg:

            form action=http://moodle.org/ this doesn't work. - it should be:

            form action=http://moodle.org/index.php

            Show
            dougiamas Martin Dougiamas added a comment - From Dan Marsden (dan at digitalclay.co.nz) Tuesday, 30 May 2006, 10:04 AM: This happens in IIS because some of the moodle Continue links post are called with wwwroot/ rather than an explicit wwwroot/index.php, this results in a 405 page as the user is trying to post to a directory. - I presume in apache it redirects before posting there are a few people with this problem in the forums - see: http://moodle.org/mod/forum/discuss.php?d=45344 http://moodle.org/mod/forum/discuss.php?d=46256 this seems to happen all over the place in moodle code - do a search for notice( and redirect( there are many that just redirect to $CFG->wwwroot which won't work in IIS Sugggested fix: modify the functions notice and redirect to check if the $link=$CFG->wwwroot and if so, add the correct homepage to the end of the redirect. I would suggest a new VAR in config.php maybe something called $CFG >home that contains index.php - or whatever a site admin configures the name of the site homepage to be. Dan From Dan Marsden (dan at digitalclay.co.nz) Tuesday, 30 May 2006, 10:07 AM: should clarify that a bit - a simple redirect works fine, however when that redirect sits within a form eg: form action= http://moodle.org/ this doesn't work. - it should be: form action= http://moodle.org/index.php
            Hide
            danmarsden Dan Marsden added a comment -

            now in 1.6Stable and HEAD

            Show
            danmarsden Dan Marsden added a comment - now in 1.6Stable and HEAD

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Sep/06