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

IMS Enterprise crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 2.0.5, 2.1.2
    • 2.0, 2.1.1, 2.2
    • Enrolments
    • MySQL
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • master_MDL-28962
    • 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))){
    • 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

    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.

      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

              danmarsden Dan Marsden
              pagagnon Patrick Gagnon
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Rossiani Wijaya Rossiani Wijaya
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.