SCORM MDL-20955 fix bad use of update_record - thanks Petr

This commit is contained in:
Dan Marsden 2009-11-24 21:03:46 +00:00
parent 05b0bdc6f8
commit ad97538d8a

View File

@ -266,7 +266,9 @@ function scorm_parse_aicc($scorm) {
$id = null;
if ($oldscoid = scorm_array_search('identifier',$sco->identifier,$oldscoes)) {
$sco->id = $oldscoid;
$id = $DB->update_record('scorm_scoes',$sco);
if ($DB->update_record('scorm_scoes',$sco)) {
$id = $oldscoid;
}
$DB->delete_records('scorm_scoes_data', array('scoid'=>$oldscoid));
unset($oldscoes[$oldscoid]);
} else {