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

'Error: A required parameter (id) was missing' when using enrolment key to join course

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Enrolments, JavaScript
    • Labels:
    • Environment:
      Windows, Active Directory
    • Database:
      MySQL
    • Testing Instructions:
      Hide
      1. Log in as an admin
      2. Create a new user
      3. Create two courses
      4. In the first course enable self enrolment without a key
      5. Log in as the new user
      6. Browse to the course with self enrolment enabled (but DO NOT enrol yourself yet)
      7. In the navigation try to expand the navigation for the course, as well as the expand the navigation for the other course
      8. Use firebug or web dev tool to confirm you get an AJAX request for which the response is an error like "Error: Course or activity not accessible."
      9. Click the enrol me button
      10. Confirm you arrive at a valid page (likely the course front page) and NOT at lib/ajax/getnavbranch.php
      Show
      Log in as an admin Create a new user Create two courses In the first course enable self enrolment without a key Log in as the new user Browse to the course with self enrolment enabled (but DO NOT enrol yourself yet) In the navigation try to expand the navigation for the course, as well as the expand the navigation for the other course Use firebug or web dev tool to confirm you get an AJAX request for which the response is an error like "Error: Course or activity not accessible." Click the enrol me button Confirm you arrive at a valid page (likely the course front page) and NOT at lib/ajax/getnavbranch.php
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-MDL-29678-m23

      Description

      My site is set up so that users get added via Active Directory, and are given a link to the first subject in their course, which they then enrol in using an enrolment key. I am now finding that when users do so, they get an error page at 'lib/ajax/getnavbranch.php', which says 'Error: A required parameter (id) was missing'. They are still enrolled in the course as expected, but the error page understandably concerns and confuses people.

      In the testing I have done, this only seems to happen for users who were created in active directory; a test account of mine that was created manually within Moodle itself did not have this problem.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  4 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/12