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.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
    • Rank:
      15800

      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.

      1. lib.php
        26 kB
        Bill Johnson

        Activity

        Bill Johnson created issue -
        Bill Johnson made changes -
        Field Original Value New Value
        Attachment lib.php [ 22594 ]
        Petr Škoda made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Petr Škoda made changes -
        Fix Version/s 2.0.1 [ 10420 ]
        Petr Škoda made changes -
        Comment [ My progress can be tracked at https://github.com/skodak/moodle/compare/master...MDL-25674
        ]
        Martin Dougiamas made changes -
        Workflow jira [ 40890 ] MDL Workflow [ 47619 ]
        Petr Škoda made changes -
        Link This issue will be resolved by PULL-26 [ PULL-26 ]
        Petr Škoda made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Martin Dougiamas made changes -
        Workflow MDL Workflow [ 47619 ] MDL Full Workflow [ 95798 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: