|
@@ -79,7 +79,7 @@ class ApiScorm2004 implements ContainerAwareInterface
|
79
|
79
|
|
80
|
80
|
// Progress Information
|
81
|
81
|
$attemptInfoRepository = $em->getRepository(Scorm2004AttemptProgressInformation:: class);
|
82
|
|
- $attemptProgressInfo = $attemptInfoRepository->findOneBy(array('scorm2004Track' => $track, 'item_identifier' => $item));
|
|
82
|
+ $attemptProgressInfo = $attemptInfoRepository->findOneBy(array('scorm2004Track' => $track, 'item_identifier' => $item), array('attempt_id' => 'desc'));
|
83
|
83
|
|
84
|
84
|
//Nom de l'apprenant
|
85
|
85
|
$learner_name = $this->jsEscape($learner->getFamilyName().' '.$learner->getGivenName());
|
|
@@ -176,7 +176,7 @@ class ApiScorm2004 implements ContainerAwareInterface
|
176
|
176
|
// Le sco est responsable de determiner le scaled score.
|
177
|
177
|
// le mappage pour le score.scaled est fait avec measure_status et normalized_measure.
|
178
|
178
|
$objectiveInfoRepository = $em->getRepository(Scorm2004ObjectiveProgressInformation::class);
|
179
|
|
- $primaryInfo = $objectiveInfoRepository->findOneBy(array('scorm2004Track' => $track, 'itemIdentifier' => $item, 'isPrimary' => true));
|
|
179
|
+ $primaryInfo = $objectiveInfoRepository->findLastLocalInfoByObjective($primaryObjective, $track, true, $dom);
|
180
|
180
|
|
181
|
181
|
$score_scaled = null;
|
182
|
182
|
|
|
@@ -312,9 +312,10 @@ class ApiScorm2004 implements ContainerAwareInterface
|
312
|
312
|
$scoreScaled = 0.0;
|
313
|
313
|
|
314
|
314
|
foreach ($itemObjectives as $itemObjective) {
|
315
|
|
- $itemObjectiveInfos = $objectiveInfoRepository->findOneBy(array('objectiveIdentifier' => $itemObjective['objective'], 'itemIdentifier' => $itemObjective['item'], 'isPrimary' => $itemObjective['isPrimary']));
|
|
315
|
+ // $itemObjectiveInfos = $objectiveInfoRepository->findOneBy(array('objectiveIdentifier' => $itemObjective['objective'], 'itemIdentifier' => $itemObjective['item'], 'isPrimary' => $itemObjective['isPrimary']));
|
|
316
|
+ $itemObjectiveInfos = $objectiveInfoRepository->findLocalInfoByObjectiveAndAttempt($itemObjective, $attemptProgressInfo, $track, true, $dom);
|
316
|
317
|
|
317
|
|
- // si on a pas le bean contenant les progess infos de l'objectif: un problème.
|
|
318
|
+ // si on a pas d'objectiveInfo de l'objectif: un problème.
|
318
|
319
|
if (!$itemObjectiveInfos) {
|
319
|
320
|
return ;
|
320
|
321
|
}
|
|
@@ -741,7 +742,14 @@ EOT;
|
741
|
742
|
EOT;
|
742
|
743
|
$index++;
|
743
|
744
|
}
|
744
|
|
-
|
|
745
|
+
|
|
746
|
+/* $apiString .=<<<EOT
|
|
747
|
+ window.setInterval(periodical, 20000);
|
|
748
|
+ function periodical() {
|
|
749
|
+ API_1484_11.Commit("");
|
|
750
|
+ }
|
|
751
|
+EOT; */
|
|
752
|
+
|
745
|
753
|
/* // 4.3 Gestion de la fermeture de la page
|
746
|
754
|
$apiString .=<<<EOT
|
747
|
755
|
|