mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
SCORM MDL-20955 fix bad use of update_record - thanks Petr
This commit is contained in:
parent
05b0bdc6f8
commit
ad97538d8a
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user