Bug found in IMS Enterprise

Bug found in IMS Enterprise

by Patrick Gagnon -
Number of replies: 2

Hello,

I writing this post here because I don't know anywhere else to post about bugs in Moodle.

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.

Thank you

Patrick Gagnon

 

Average of ratings: Useful (1)