Browse Source

Corrections pour CM-02a

Mael ETIENNE 3 years ago
parent
commit
fff1c84769

+ 1
- 0
LearningModels/SCORM2004/SequencingNavigation/SeqNavRequest.php View File

@@ -231,6 +231,7 @@ class SeqNavRequest implements ContainerAwareInterface
231 231
                                 if (!$objectiveProgressStatus) {
232 232
                                     $objectiveInformationsWrite = $scorm2004ObjectiveProgressInformationRepository->findLocalInfoByObjectiveAndAttempt($rollupObjective, $itemLastAttempt, $this->scorm2004Track, false);
233 233
                                     $objectiveInformationsWrite->setProgressStatus(true);
234
+                                    $objectiveInformationsWrite->setSatisfiedStatus(true);
234 235
                                     // mise à jour
235 236
                                     $em->persist($objectiveInformationsWrite);
236 237
                                 }

+ 2
- 2
LearningModels/SCORM2004/SequencingNavigation/SequencingRequest.php View File

@@ -189,7 +189,7 @@ class SequencingRequest extends SeqNavRequest
189 189
         // Si pas d'item identifié
190 190
         if (!$itemExist) {
191 191
             // on retourne l'exception si il y en a une
192
-            if ($continueItem['exception']) {
192
+            if (!empty($continueItem['exception'])) {
193 193
                 $this->exception = $continueItem['exception'];
194 194
                 return;
195 195
             }
@@ -229,7 +229,7 @@ class SequencingRequest extends SeqNavRequest
229 229
         // on remonte dans l'arbre jusqu'à trouver un item livrable
230 230
         $previousItem = $this->getItemFromTreeflow($this->currentItem, SCORM2004_TRAVERSE_BACKWARD, false);
231 231
 
232
-        if (!$previousItem['deliverable']) {
232
+        if (empty($previousItem['deliverable'])) {
233 233
             $this->exception = $previousItem['exception'];
234 234
             return;
235 235
         }

+ 4
- 4
Resources/public/js/scorm2004.js View File

@@ -655,24 +655,24 @@ ScormApi.prototype.LMSCommit = (function() {
655 655
 	this.end_time_passed_on_sco  = new Date();
656 656
 	this.printConsoleLog("Commite lancé .. ");
657 657
 	if (arguments.length > 1) {
658
-		// Too many arguments REQ_8.1.1
658
+		this.printConsoleLog("Too many arguments REQ_8.1.1");
659 659
 		return 'false';
660 660
 	}
661 661
 	var argument = arguments[0];
662 662
 	if (argument != "")
663 663
 	{
664
-		// REQ_8.1.1
664
+		this.printConsoleLog("argument not null REQ_8.1.1");
665 665
 		return 'false';
666 666
 	}
667 667
 
668 668
 	if (!this.initialized) {
669
-		// Not initialized REQ_8.4
669
+		this.printConsoleLog("Not initialized REQ_8.4");
670 670
 		this.setError(gCommitBeforeInitialization);
671 671
 		return 'false';
672 672
 	}
673 673
 
674 674
 	if (this.terminated) {
675
-		// already terminated REQ_8.5
675
+		this.printConsoleLog("already terminated REQ_8.5");
676 676
 		this.setError(gCommitAfterTermination);
677 677
 		return 'false';
678 678
 	}

Loading…
Cancel
Save