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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7.7, 2.8.5
    • 2.7.8, 2.8.6
    • Enrolments
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • 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.

    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

            nmagill Neill Magill
            nmagill Neill Magill
            Mark Nelson Mark Nelson
            Andrew Lyons Andrew Lyons
            Dave Cooper Dave Cooper
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/May/15