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

Error when attempting to enrol users via MNET if no users have the mnetlogintoremote cap

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: MNet
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      To reproduce:

      1. Set up two moodle sites and connect them via Mnet.
      2. In one of the sites make sure that no users have moodle/site:mnetlogintoremote.
      3. Browse to Site Administration > Networking > Remote enrolments client.
      4. Select the other site, and select one of the courses that is enrolable.

      Coding error detected, it must be fixed by a programmer: moodle_database::get_in_or_equal() does not accept empty arrays

      More information about this error
      Stack trace:

      • line 576 of /lib/dml/moodle_database.php: coding_exception thrown
      • line 554 of /mnet/service/enrol/locallib.php: call to moodle_database->get_in_or_equal()
      • line 191 of /user/selector/lib.php: call to mnetservice_enrol_potential_users_selector->find_users()
      • line 161 of /mnet/service/enrol/course.php: call to user_selector_base->display()

      Cheers
      Sam

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            mudrd8mz David Mudrák added a comment -

            Fixed. Thanks for spotting and reporting that Sam!

            Show
            mudrd8mz David Mudrák added a comment - Fixed. Thanks for spotting and reporting that Sam!
            Hide
            tsala Helen Foster added a comment -

            David, thanks for fixing this issue.

            Show
            tsala Helen Foster added a comment - David, thanks for fixing this issue.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Feb/11