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

Automatic enrollment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7, 1.9
    • Fix Version/s: 1.7.2, 1.8, 1.9
    • Component/s: Enrolments
    • Labels:
      None
    • Environment:
      Bug exists in 1.7 (which we're running) and also is in cvs HEAD
    • Database:
      Any
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      In /enrol/database/enrol.php, line 100 and following:

      foreach($existing as $key => $role_assignment) {
      if ($role_assignment->roleid = $role->id
      && $role_assignment->contextid = $context->id) {

      Should instead be:

      foreach($existing as $key => $role_assignment) {
      if ($role_assignment->roleid == $role->id
      && $role_assignment->contextid == $context->id) {

      Thus, for every course, we get "User is already enroled" in that course. (ie, if we uncomment that error_log() call)

      Thus, no user will ever get auto-enroled in any course.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nicolasconnault Nicolas Connault
              Reporter:
              rbowen Rich Bowen
              Tester:
              Nobody Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                30/Mar/07