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

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

    Details

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

      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            krajewsk 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
            krajewsk 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
            iarenaza 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
            iarenaza 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
            howardsmiller Howard Miller added a comment -

            Yep - looks good to me

            Show
            howardsmiller 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:
                  Fix Release Date:
                  11/Jul/08