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

enrol/index.php page does not handle direct access well

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.7, 2.8.5
    • Fix Version/s: 2.7.8, 2.8.6
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      Hide
      Prerequisite.
      1. Create a course that has self enrolment enabled, at least one user enrolled and does not allow guest access.
      2. An account that is not enrolled in that course.
      3. Copy the course and course enrolment URL (eg. <yoursite>/course/view.php?id=<id> and <yoursite>//enrol/index.php?id=<id>).
      Test 1
      1. Ensure you are not logged in.
      2. Visit the course URL.
      3. You should be redirected to the login page.
      4. Log in as a user who is enrolled.
      5. Ensure you are redirected to the course page.
      Test 2
      1. Ensure you are not logged in.
      2. Visit the course URL.
      3. You should be redirected to the login page.
      4. Log in as a user who is not enrolled.
      5. Ensure you are redirected to the page allowing you to self enrol.
      Test 3
      1. Ensure you are not logged in.
      2. Visit the course URL.
      3. You should be redirected to the login page.
      4. Log in as a guest.
      5. Ensure you are redirected to the page telling you guest access is not allowed
      Test 4
      1. Ensure you are not logged in.
      2. Visit the course enrolment URL.
      3. You should be redirected to the login page.
      4. Log in as a user who is enrolled.
      5. Ensure you are redirected to the course page.
      Test 5
      1. Ensure you are not logged in.
      2. Visit the course enrolment URL.
      3. You should be redirected to the login page.
      4. Log in as a user who is not enrolled.
      5. Ensure you are redirected to the page allowing you to self enrol.
      Test 6
      1. Ensure you are not logged in.
      2. Visit the course enrolment URL.
      3. You should be redirected to the login page.
      4. Log in as a guest.
      5. You should be told that guest access is not allowed.
      Show
      Prerequisite. Create a course that has self enrolment enabled, at least one user enrolled and does not allow guest access. An account that is not enrolled in that course. Copy the course and course enrolment URL (eg. <yoursite>/course/view.php?id=<id> and <yoursite>//enrol/index.php?id=<id>). Test 1 Ensure you are not logged in. Visit the course URL. You should be redirected to the login page. Log in as a user who is enrolled. Ensure you are redirected to the course page. Test 2 Ensure you are not logged in. Visit the course URL. You should be redirected to the login page. Log in as a user who is not enrolled. Ensure you are redirected to the page allowing you to self enrol. Test 3 Ensure you are not logged in. Visit the course URL. You should be redirected to the login page. Log in as a guest. Ensure you are redirected to the page telling you guest access is not allowed Test 4 Ensure you are not logged in. Visit the course enrolment URL. You should be redirected to the login page. Log in as a user who is enrolled. Ensure you are redirected to the course page. Test 5 Ensure you are not logged in. Visit the course enrolment URL. You should be redirected to the login page. Log in as a user who is not enrolled. Ensure you are redirected to the page allowing you to self enrol. Test 6 Ensure you are not logged in. Visit the course enrolment URL. You should be redirected to the login page. Log in as a guest. You should be told that guest access is not allowed.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      If a user tries to access the enrol/index.php page directly when not logged in they are prompted to login and then redirected to the Moodle frontpage rather than back to the enrol page.

      I would expect that on a direct access the user would be redirected back to the enrolment page so they can enrol if self enrolment is enabled on that course.

        Attachments

          Activity

            People

            Assignee:
            nmagill Neill Magill
            Reporter:
            nmagill Neill Magill
            Peer reviewer:
            Mark Nelson
            Integrator:
            Andrew Nicols
            Tester:
            Dave Cooper
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/May/15