Permalink
Browse files

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

  • Loading branch information...
1 parent 54add7c commit 51e0609e4ac02b6d8fa5a98d2dd1d848a7dc3f84 @danmarsden danmarsden committed Nov 24, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/scorm/datamodels/aicclib.php
@@ -245,7 +245,9 @@ function scorm_parse_aicc($pkgdir,$scormid) {
$id = null;
if ($oldscoid = scorm_array_search('identifier',$sco->identifier,$oldscoes)) {
$sco->id = $oldscoid;
- $id = update_record('scorm_scoes',addslashes_recursive($sco));
+ if(update_record('scorm_scoes',addslashes_recursive($sco))) {
+ $id = $oldscoid;
+ }
delete_records('scorm_scoes_data','scoid',$oldscoid);
unset($oldscoes[$oldscoid]);
} else {

0 comments on commit 51e0609

Please sign in to comment.