Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Enrolments
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      Best if executed in some stable branch (20, 21)

      1) Under current moodle.git

      • Import one IMS Enterprise file (see last comments in the issue to know which file is ok for our testing purposes)
      • TEST: Verify the process crashes

      2) Under current integration.git

      • Import the same IMS Enterprise file
      • TEST: Process ends without error and data is imported accordingly
      Show
      Best if executed in some stable branch (20, 21) 1) Under current moodle.git Import one IMS Enterprise file (see last comments in the issue to know which file is ok for our testing purposes) TEST: Verify the process crashes 2) Under current integration.git Import the same IMS Enterprise file TEST: Process ends without error and data is imported accordingly
    • Workaround:
      Hide

      not use <extension><cohort> element or correct the line #648 of the file /enrol/imsenterprise/lib.php like that :

      before :
      if($groupid = $DB->get_field('groups', 'id', 'name', $member->groupname, array('courseid'=>$ship->courseid))){

      after:
      if($groupid = $DB->get_field('groups', 'id', array('courseid'=>$ship->courseid, 'name'=>$member->groupname))){

      Show
      not use <extension><cohort> element or correct the line #648 of the file /enrol/imsenterprise/lib.php like that : before : if($groupid = $DB->get_field('groups', 'id', 'name', $member->groupname, array('courseid'=>$ship->courseid))){ after: if($groupid = $DB->get_field('groups', 'id', array('courseid'=>$ship->courseid, 'name'=>$member->groupname))){
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull Master Branch:
      master_MDL-28962

      Description

      Our IMS Enterprise XML input file stopped working after upgrading to Moodle 2.0. The plugin crash when importing the IMS Enterprise XML file with the following reason : PHP catchable fatal error. Our XML file uses the extension cohort element in the memberships.

      Here is the line that cause the file /enrol/imsenterprise/lib.php to crash.

      On line #648 :

      if($groupid = $DB->get_field('groups', 'id', 'name', $member->groupname, array('courseid'=>$ship->courseid))){

      I had to change to the following :

      if($groupid = $DB->get_field('groups', 'id', array('courseid'=>$ship->courseid, 'name'=>$member->groupname))){

      All other calls to this function uses 3 parameters. I guest this caused by the changes made to the API between version 1.x to 2.x because it's the same thing with Moodle 2.1.x.

      Now the import works and the cohorts (groups) too.

        Gliffy Diagrams

          Attachments

          1. ims_code1.png
            ims_code1.png
            79 kB
          2. ims_code2.png
            ims_code2.png
            78 kB
          3. ims_debug.png
            ims_debug.png
            65 kB
          4. ims_debug2.png
            ims_debug2.png
            52 kB
          5. ims_enrolled.png
            ims_enrolled.png
            72 kB
          6. imsenterprise-enrol_2.xml
            1 kB
          7. imsenterprise-enrol.xml
            3 kB

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Oct/11