Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed problem with the update of cmi.entry adding conditions in the f…

…irst php block
  • Loading branch information...
commit 8e5d604263922f1ca372ccd20a2fd497278da94e 1 parent f16242c
csantossaenz authored
Showing with 9 additions and 5 deletions.
  1. +9 −5 mod/scorm/datamodels/scorm_13.js.php
View
14 mod/scorm/datamodels/scorm_13.js.php
@@ -1,9 +1,9 @@
<?php
if (isset($userdata->status)) {
- if ($userdata->status == '') {
- $userdata->entry = 'ab-initio';
+ if ($userdata->status == ''&& (!(($userdata->{'cmi.exit'} == 'suspend') || ($userdata->{'cmi.exit'} == 'logout'))&& !($userdata->{'adl.nav.request'} == 'suspendAll'))||($userdata->{'cmi.exit'} == 'normal')) { //antes solo llegaba esta línea hasta el &&
+ $userdata->entry = 'ab-initio';
} else {
- if (isset($userdata->{'cmi.exit'}) && (($userdata->{'cmi.exit'} == 'suspend') || ($userdata->{'cmi.exit'} == 'logout'))) {
+ if ((isset($userdata->{'cmi.exit'}) && (($userdata->{'cmi.exit'} == 'suspend') || ($userdata->{'cmi.exit'} == 'logout')))||(($userdata->{'adl.nav.request'} == 'suspendAll')&& isset($userdata->{'adl.nav.request'}) )) {
$userdata->entry = 'resume';
} else {
$userdata->entry = '';
@@ -446,6 +446,10 @@ function SetValue (element,value) {
subobject = eval(subelement);
subobject.objectives = new Object();
subobject.objectives._count = 0;
+ subobject.correct_responses = new Object();//añadido
+ subobject.correct_responses._count = 0;//añadido
+
+
}
} else {
errorCode="351";
@@ -458,8 +462,8 @@ function SetValue (element,value) {
maxmodel = 'cmi.interactions.Nxxx.type';
if ((elemlen <= maxmodel.length) && (element.substr(elemlen-4) == 'type') && (errorCode=="0")) {
subobject = eval(subelement);
- subobject.correct_responses = new Object();
- subobject.correct_responses._count = 0;
+ //subobject.correct_responses = new Object();
+ //subobject.correct_responses._count = 0;
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.