Moodle
  1. Moodle
  2. MDL-12783

IMS Enterprise enrollment will unenroll students who were enrolled by other plug-ins

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.3, 1.9.1
    • Fix Version/s: 1.8.6, 1.9.2, 2.0
    • Component/s: Enrolments
    • Labels:
      None
    • Environment:
      Moodle 1.8.3 + (2007021534)
      Moodle 1.9.1 + (20080528)
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      30804

      Description

      See http://moodle.org/mod/forum/discuss.php?d=87203
      If I manually add a student to a course, IMS Enterprise enrollment will remove them if they are listed as a drop in the XML file.

        Activity

        Hide
        Scott Krajewski added a comment -

        I found the fix for 1.9.1.

        enrol/imsenterprise/enrol.php
        line 824
        from
        if (! role_unassign($moodleroleid, $memberstoreobj->userid, 0, $rolecontext,)) {

        to
        if (! role_unassign($moodleroleid, $memberstoreobj->userid, 0, $rolecontext,'imsenterprise')) {

        No method was specified so the function role_unassign assumes null which means any which means remove them no matter what.

        Show
        Scott Krajewski added a comment - I found the fix for 1.9.1. enrol/imsenterprise/enrol.php line 824 from if (! role_unassign($moodleroleid, $memberstoreobj->userid, 0, $rolecontext,)) { to if (! role_unassign($moodleroleid, $memberstoreobj->userid, 0, $rolecontext,'imsenterprise')) { No method was specified so the function role_unassign assumes null which means any which means remove them no matter what.
        Hide
        Iñaki Arenaza added a comment -

        Fixes committed into CVS, in 1.8, 1.9 and HEAD.

        Scott, thanks a lot for the bug report and the patch!

        Saludos. Iñaki.

        Show
        Iñaki Arenaza added a comment - Fixes committed into CVS, in 1.8, 1.9 and HEAD. Scott, thanks a lot for the bug report and the patch! Saludos. Iñaki.
        Hide
        Howard Miller added a comment -

        Yep - looks good to me

        Show
        Howard Miller added a comment - Yep - looks good to me

          People

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

            Dates

            • Created:
              Updated:
              Resolved: