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

E-mail sent from course during cron.php results in the unenroll action for the enrol/database plugin being triggered for that course.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: Enrolments
    • Labels:
      None
    • Environment:
      WAMP, MySQL 5.051b, PHP 5.2.11
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Enrollments based on enrol/database are being dropped from courses during the cron.php run. This seems to occur only on courses which have an e-mail waiting to be sent, such as a subscribed forum post or news posting.

      Expected behavior: Enrol/database enrolls according to the external database, with no other effects.

      Actual behavior: Unenrollment (or other action set in enrol/database) occurs in courses with pending e-mails when cron.php is run.

      Steps to reproduce:
      1. Take a test course with database enrollments. Verify the user status as fully enrolled via external database.
      2. Post to news forum with "mail now" checked.
      3. Run admin/cron.php
      4. Refresh user page for course to see unenrollment has taken place.
      5. Run CLI script for enrol/database to restore prior enrollments.

        Attachments

        1. lib.php
          26 kB
          Bill Johnson

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              wscjohnson Bill Johnson
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Dec/10