Permalink
Browse files

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

  • Loading branch information...
1 parent b2d9913 commit fcf35014374fefeecce70470c7cb0eef59bd1f07 @danmarsden danmarsden committed Nov 24, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/scorm/datamodels/aicclib.php
@@ -215,7 +215,9 @@ function scorm_parse_aicc($pkgdir,$scormid) {
//print_r($sco);
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]);
} else {
$id = insert_record('scorm_scoes',addslashes_recursive($sco));

0 comments on commit fcf3501

Please sign in to comment.