Permalink
Browse files

MDL-21761 - fix the statefulness of saving dataelements in scorm api 1.2

  • Loading branch information...
1 parent 939c648 commit b6ec0e79401db7af755e16d1ba60a0360d8744b2 @piersharding piersharding committed Jun 27, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 mod/scorm/datamodels/scorm_12.js.php
View
2 mod/scorm/datamodels/scorm_12.js.php
@@ -564,9 +564,11 @@ function CollectData(data,parent) {
if ((typeof eval('datamodel["'+elementmodel+'"].defaultvalue')) != "undefined") {
if (eval('datamodel["'+elementmodel+'"].defaultvalue') != data[property] || eval('typeof(datamodel["'+elementmodel+'"].defaultvalue)') != typeof(data[property])) {
datastring += elementstring;
+ eval('datamodel["'+elementmodel+'"].defaultvalue=data[property];');
}
} else {
datastring += elementstring;
+ eval('datamodel["'+elementmodel+'"].defaultvalue=data[property];');
}
}
}

0 comments on commit b6ec0e7

Please sign in to comment.