mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
SCORM MDL-20955 fix bad use of update_record - thanks Petr
This commit is contained in:
parent
b2d99131e8
commit
fcf3501437
1 changed files with 3 additions and 1 deletions
|
@ -215,7 +215,9 @@ function scorm_parse_aicc($pkgdir,$scormid) {
|
||||||
|
|
||||||
//print_r($sco);
|
//print_r($sco);
|
||||||
if (get_record('scorm_scoes','scorm',$scormid,'identifier',$sco->identifier)) {
|
if (get_record('scorm_scoes','scorm',$scormid,'identifier',$sco->identifier)) {
|
||||||
$id = update_record('scorm_scoes',addslashes_recursive($sco));
|
if (update_record('scorm_scoes',addslashes_recursive($sco))) {
|
||||||
|
$id = $oldscoes[$id]->id;
|
||||||
|
}
|
||||||
unset($oldscoes[$id]);
|
unset($oldscoes[$id]);
|
||||||
} else {
|
} else {
|
||||||
$id = insert_record('scorm_scoes',addslashes_recursive($sco));
|
$id = insert_record('scorm_scoes',addslashes_recursive($sco));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue