Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed some problems with the variables stored in scorm_scoes_track an…

…d the last two functions have been commented and we are going to use scorm_seq_is() instead of them.
  • Loading branch information...
commit 980c089bfaa885ad3e2013b84d5dd1decebfd02b 1 parent 36e298b
authored

Showing 1 changed file with 64 additions and 69 deletions. Show diff stats Hide diff stats

  1. 133  mod/scorm/datamodels/sequencinglib.php
133  mod/scorm/datamodels/sequencinglib.php
@@ -5,14 +5,17 @@ function scorm_seq_evaluate($scoid,$usertracks) {
5 5
     return true;
6 6
 }
7 7
 
8  
-function scorm_seq_overall ($scoid,$userid,$request) {
9  
-    $seq = scorm_seq_navigation($scoid,$userid,$request);
  8
+function scorm_seq_overall ($scoid,$userid,$request,$attempt) {
  9
+    $seq = scorm_seq_navigation($scoid,$userid,$request,$attempt);
10 10
     if ($seq->navigation) {
11 11
         if ($seq->termination != null) {
12 12
             $seq = scorm_seq_termination($scoid,$userid,$seq);
13 13
         }
14 14
         if ($seq->sequencing != null) {
15 15
             $seq = scorm_seq_sequencing($scoid,$userid,$seq);
  16
+			if($seq->sequencing == 'exit'){//return the control to the LTS
  17
+				return true;
  18
+			}
16 19
         }
17 20
         if ($seq->delivery != null) {
18 21
             $seq = scorm_sequencing_delivery($scoid,$userid,$seq);
@@ -25,13 +28,14 @@ function scorm_seq_overall ($scoid,$userid,$request) {
25 28
 }
26 29
 
27 30
 
28  
-function scorm_seq_navigation ($scoid,$userid,$request) {
  31
+function scorm_seq_navigation ($scoid,$userid,$request,$attempt=0) {
29 32
     /// Sequencing structure
30 33
     $seq = new stdClass();
31 34
     $seq->currentactivity = scorm_get_sco($scoid);
32 35
 	$seq->traversaldir = null;
33 36
 	$seq->nextactivity = null;
34 37
 	$seq->deliveryvalid = null;
  38
+	$seq->attempt = $attempt;
35 39
 	
36 40
 	$seq->identifiedactivity = null;
37 41
 	$seq->delivery = null;
@@ -75,24 +79,7 @@ function scorm_seq_navigation ($scoid,$userid,$request) {
75 79
                 $sco = $seq->currentactivity;
76 80
                 if ($sco->parent != '/') {
77 81
                     if ($parentsco = scorm_get_parent($sco)) {
78  
-						//BOBO'S CODE
79  
-                       /* if (isset($parentsco->flow) && ($parent->flow == true)) {//I think it's parentsco
80  
-                            // Current activity is active !
81  
-                            if ($request == 'continue_') {
82  
-                                $seq->navigation = true;
83  
-                                $seq->termination = 'exit';
84  
-                                $seq->sequencing = 'continue';
85  
-                            } else {
86  
-                                if (isset($parentsco->forwardonly) && ($parent->forwardonly == false)) {
87  
-                                    $seq->navigation = true;
88  
-                                    $seq->termination = 'exit';
89  
-                                    $seq->sequencing = 'previous';
90  
-                                } else {
91  
-                                    $seq->exception = 'NB.2.1-5'; /// Violates control mode
92  
-                                }
93  
-                            }
94  
-                        }*/
95  
-						// CARLOS' CODE
  82
+						
96 83
 						 if (!isset($parentsco->flow) || ($parentsco->flow == true)) {//I think it's parentsco
97 84
                             // Current activity is active !
98 85
 							if (scorm_seq_is('active',$sco->id,$userid)) {
@@ -217,7 +204,7 @@ function scorm_seq_termination ($seq,$userid) {
217 204
     }
218 205
     switch ($seq->termination) {
219 206
         case 'exit':
220  
-            scorm_seq_end_attempt($sco,$userid);
  207
+            scorm_seq_end_attempt($sco,$userid,$seq);
221 208
             $seq = scorm_seq_exit_action_rules($seq,$userid);
222 209
             do {
223 210
                 $exit = false;// I think this is false. Originally this was true
@@ -227,7 +214,7 @@ function scorm_seq_termination ($seq,$userid) {
227 214
                         $sco = scorm_get_parent($sco);
228 215
                         $seq->currentactivity = $sco;
229 216
                         $seq->active = scorm_seq_is('active',$sco->id,$userid);
230  
-                        scorm_seq_end_attempt($sco,$userid);
  217
+                        scorm_seq_end_attempt($sco,$userid,$seq);
231 218
                         $exit = true;//I think it's true. Originally this was false
232 219
                     } else {
233 220
                         $seq->termination = false;
@@ -242,14 +229,14 @@ function scorm_seq_termination ($seq,$userid) {
242 229
             }
243 230
         case 'exitall':
244 231
             if ($seq->active) {
245  
-                scorm_seq_end_attempt($sco,$userid);
  232
+                scorm_seq_end_attempt($sco,$userid,$seq);
246 233
             }
247 234
             /// Terminate Descendent Attempts Process
248 235
 
249 236
 			
250 237
             if ($ancestors = scorm_get_ancestors($sco)) { 
251 238
                 foreach ($ancestors as $ancestor) {
252  
-                    scorm_seq_end_attempt($ancestor,$userid);
  239
+                    scorm_seq_end_attempt($ancestor,$userid,$seq);
253 240
                     $seq->currentactivity = $ancestor;
254 241
                 }
255 242
             }
@@ -310,13 +297,13 @@ function scorm_seq_termination ($seq,$userid) {
310 297
     return $seq;
311 298
 }
312 299
 
313  
-function scorm_seq_end_attempt($sco,$userid) {
  300
+function scorm_seq_end_attempt($sco,$userid,$seq) {
314 301
     if (scorm_is_leaf($sco)) {
315 302
         if (!isset($sco->tracked) || ($sco->tracked == 1)) {
316 303
             if (!scorm_seq_is('suspended',$sco->id,$userid)) {
317 304
                 if (!isset($sco->completionsetbycontent) || ($sco->completionsetbycontent == 0)) {
318  
-                   // if (!scorm_seq_is('attemptprogressstatus',$sco->id,$userid,$attempt)) {
319  
-                   if (!scorm_seq_is('attemptprogressstatus',$sco->id,$userid)) { 
  305
+                    if (!scorm_seq_is('attemptprogressstatus',$sco->id,$userid,$seq->attempt)) {
  306
+                  // if (!scorm_seq_is('attemptprogressstatus',$sco->id,$userid)) { 
320 307
                         scorm_seq_set('attemptprogressstatus',$sco->id,$userid);
321 308
                         scorm_seq_set('attemptcompletionstatus',$sco->id,$userid);
322 309
                     }
@@ -326,7 +313,7 @@ function scorm_seq_end_attempt($sco,$userid) {
326 313
                         foreach ($objectives as $objective) {
327 314
                             if ($objective->primaryobj) {
328 315
                                 //if (!scorm_seq_objective_progress_status($sco,$userid,$objective)) {
329  
-                                if (!scorm_seq_objective_progress_status($sco,$userid)) {
  316
+                                if (!scorm_seq_is('objectiveprogressstatus',$sco->id,$userid)) {
330 317
                                     scorm_seq_set('objectiveprogressstatus',$sco->id,$userid);
331 318
                                     scorm_seq_set('objectivesatisfiedstatus',$sco->id,$userid);
332 319
                                 }
@@ -356,21 +343,21 @@ function scorm_seq_end_attempt($sco,$userid) {
356 343
     scorm_seq_overall_rollup($sco,$userid);
357 344
 }
358 345
 
359  
-//function scorm_seq_is($what, $scoid, $userid, $attempt=0) {
360  
-function scorm_seq_is($what, $scoid, $userid) {
  346
+function scorm_seq_is($what, $scoid, $userid, $attempt=0) {
  347
+
361 348
     /// Check if passed activity $what is active
362 349
     $active = false;
363  
-    if ($track = get_record('scorm_scoes_track','scoid',$scoid,'userid',$userid,'element',$what)) {
  350
+    if ($track = get_record('scorm_scoes_track','scoid',$scoid,'userid',$userid,'attempt',$attempt,'element',$what)) {
364 351
         $active = true;
365 352
     }
366 353
     return $active;
367 354
 }
368 355
 
369  
-//function scorm_seq_set($what, $scoid, $userid, $attempt=0, $value='true') {
370  
-function scorm_seq_set($what, $scoid, $userid, $value='true') {
  356
+function scorm_seq_set($what, $scoid, $userid, $attempt=0, $value='true') {
  357
+
371 358
     /// set passed activity to active or not
372 359
     if ($value == false) {
373  
-        delete_record('scorm_scoes_track','scoid',$scoid,'userid',$userid,'element',$what);
  360
+        delete_record('scorm_scoes_track','scoid',$scoid,'userid',$userid,'attempt',$attempt,'element',$what);
374 361
     } else {
375 362
         $sco = scorm_get_sco($scoid);
376 363
         scorm_insert_track($userid, $sco->scorm, $sco->id, 0, $what, $value);
@@ -394,7 +381,7 @@ function scorm_seq_exit_action_rules($seq,$userid) {
394 381
         if ($commons) { 
395 382
             foreach ($commons as $ancestor) {
396 383
 				
397  
-                scorm_seq_end_attempt($ancestor,$userid);
  384
+                scorm_seq_end_attempt($ancestor,$userid,$seq->attempt);
398 385
                 $seq->currentactivity = $ancestor;
399 386
             }
400 387
         }
@@ -530,7 +517,7 @@ function scorm_seq_measure_rollup($sco,$userid){
530 517
 
531 518
 					$measureweight = get_record('scorm_scoes_track','scoid',$child->id,'userid',$userid,'element','objectivemeasureweight');
532 519
 					$countedmeasures = $countedmeasures + ($measureweight->value);
533  
-					if (!scorm_seq_objective_measure_status($sco,$userid)) {
  520
+					if (!scorm_seq_is('objectivemeasurestatus',$sco->id,$userid)) {
534 521
 						$normalizedmeasure = get_record('scorm_scoes_track','scoid',$child->id,'userid',$userid,'element','objectivenormalizedmeasure');
535 522
 						$totalmeasure = $totalmeasure + (($normalizedmeasure->value) * ($measureweight->value));
536 523
 						$valid = true;
@@ -581,19 +568,25 @@ function scorm_seq_objective_rollup_measure($sco,$userid){
581 568
 		if($targetobjective->satisfiedbymeasure){
582 569
 
583 570
             
584  
-            if (!scorm_seq_objective_progress_status($sco,$userid)) {
  571
+            if (!scorm_seq_is('objectiveprogressstatus',$sco->id,$userid)) {
585 572
 
586 573
                 scorm_seq_set('objectiveprogressstatus',$sco->id,$userid,false);
587 574
                                 
588 575
             }
589 576
 
590 577
 			else{
591  
-				$active = get_record('scorm_scoes_track','scoid',$sco->id,'userid',$userid,'element','active');
592  
-				$isactive = $active->value;
  578
+				if (scorm_seq_is('active',$sco->id,$userid)) {
  579
+				    $isactive = true;
  580
+				}
  581
+				else{
  582
+					$isactive = false;
  583
+				}
593 584
 
594 585
 				$normalizedmeasure = get_record('scorm_scoes_track','scoid',$sco->id,'userid',$userid,'element','objectivenormalizedmeasure');
595 586
 
596  
-				if (!$isactive || ($isactive &&//measuresatisfactionif )){//This condition is really odd. It's in the SeqNav.pdf on page 193, line 3.1.2.1
  587
+				$sco = scorm_get_sco ($sco->id);
  588
+
  589
+				if (!$isactive || ($isactive && (!isset($sco->measuresatisfactionifactive) || $sco->measuresatisfactionifactive == true))){//This condition is really odd. It's in the SeqNav.pdf on page 193, line 3.1.2.1
597 590
 				    if($normalizedmeasure->value >= $targetobjective->minnormalizedmeasure){
598 591
 					    scorm_seq_set('objectiveprogressstatus',$sco->id,$userid);
599 592
 					    scorm_seq_set('objectivesatisfiedstatus',$sco->id,$userid);
@@ -647,14 +640,14 @@ function scorm_seq_activity_progress_rollup ($sco, $userid){
647 640
 
648 641
 	if(scorm_seq_rollup_rule_check($sco,$userid,'incomplete')){
649 642
 		//incomplete rollup action
650  
-		scorm_seq_set('attemptcompletionstatus',$sco->id,$userid,false);
651  
-		scorm_seq_set('attemptprogressstatus',$sco->id,$userid);
  643
+		scorm_seq_set('attemptcompletionstatus',$sco->id,$userid,false,$seq->attempt);
  644
+		scorm_seq_set('attemptprogressstatus',$sco->id,$userid,true,$seq->attempt);
652 645
 
653 646
 	}
654 647
     if(scorm_seq_rollup_rule_check($sco,$userid,'completed')){
655 648
 		//incomplete rollup action
656  
-		scorm_seq_set('attemptcompletionstatus',$sco->id,$userid);
657  
-		scorm_seq_set('attemptprogressstatus',$sco->id,$userid);
  649
+		scorm_seq_set('attemptcompletionstatus',$sco->id,true,$userid);
  650
+		scorm_seq_set('attemptprogressstatus',$sco->id,true,$userid);
658 651
 	}
659 652
 
660 653
 }
@@ -938,11 +931,12 @@ function scorm_evaluate_condition ($rolluprulecond,$sco,$userid){
938 931
 
939 932
 function scorm_seq_check_child ($sco, $action, $userid){
940 933
 	$included = false;
  934
+	$sco=scorm_get_sco($sco->id);
941 935
 	$r = get_record('scorm_scoes_track','scoid',$sco->id,'userid',$userid,'element','activityattemptcount');
942 936
 	if ($action == 'satisfied' || $action == 'notsatisfied'){
943 937
 	  if (!scorm_seq_is('rollupobjectivesatisfied',$sco->id,$userid){
944 938
 		$included = true;
945  
-		if (($action == 'satisfied' //&& adlseqRequiredforSatisfied == 'ifNotSuspended') || ($action == 'notsatisfied' && adlseqRequiredforNotSatisfied == 'ifNotSuspended')){
  939
+		if (($action == 'satisfied' && $sco->requiredforsatisfied == 'ifnotsuspended') || ($action == 'notsatisfied' && $sco->requiredfornotsatisfied == 'ifnotsuspended')){
946 940
 			
947 941
 			if (!scorm_seq_is('activityprogressstatus',$sco->id,$userid) || ((($r->value)>0)&& !scorm_seq_is('suspended',$sco->id,$userid))){
948 942
 				$included = false;
@@ -950,13 +944,13 @@ function scorm_seq_check_child ($sco, $action, $userid){
950 944
 
951 945
 		}
952 946
 		else{
953  
-			if (($action == 'satisfied' //&& adlseqRequiredforSatisfied == 'ifAttempted') || ($action == 'notsatisfied' && adlseqRequiredforNotSatisfied == 'ifAttempted')){
  947
+			if (($action == 'satisfied' && $sco->requiredforsatisfied == 'ifattempted') || ($action == 'notsatisfied' && $sco->requiredfornotsatisfied == 'ifattempted')){
954 948
 			    if (!scorm_seq_is('activityprogressstatus',$sco->id,$userid) || (($r->value) == 0)){{
955 949
 				    $included = false;
956 950
 			    }
957 951
             }
958 952
 			else{
959  
-				if (($action == 'satisfied' //&& adlseqRequiredforSatisfied == 'ifNotSkipped') || ($action == 'notsatisfied' && adlseqRequiredforNotSatisfied == 'ifNotSkipped')){
  953
+				if (($action == 'satisfied' && $sco->requiredforsatisfied == 'ifnotskipped') || ($action == 'notsatisfied' && $sco->requiredfornotsatisfied == 'ifnotskipped')){
960 954
 					$rulch = scorm_seq_rules_check($sco, 'skip');
961 955
 					if ($rulch != null){
962 956
 						$included = false;
@@ -970,7 +964,7 @@ function scorm_seq_check_child ($sco, $action, $userid){
970 964
 		if (!scorm_seq_is('rollupprogresscompletion',$sco->id,$userid){
971 965
 		    $included = true;
972 966
 
973  
-            if (($action == 'completed' //&& adlseqRequiredForCompleted == 'ifNotSuspended') || ($action == 'incomplete' && adlseqRequiredForIncomplete == 'ifNotSuspended')){
  967
+            if (($action == 'completed' && $sco->requiredforcompleted == 'ifnotsuspended') || ($action == 'incomplete' && $sco->requiredforincomplete == 'ifnotsuspended')){
974 968
 
975 969
 			    if (!scorm_seq_is('activityprogressstatus',$sco->id,$userid) || ( (($r->value)>0)&& !scorm_seq_is('suspended',$sco->id,$userid))){
976 970
 				    $included = false;
@@ -979,15 +973,14 @@ function scorm_seq_check_child ($sco, $action, $userid){
979 973
 		    }
980 974
 			else{
981 975
 				
982  
-				if (($action == 'completed' //&& adlseqRequiredForCompleted == 'ifAttempted') || ($action == 'incomplete' && adlseqRequiredForIncomplete == 'ifAttempted')){
983  
-
  976
+				if (($action == 'completed' && $sco->requiredforcompleted == 'ifattempted') || ($action == 'incomplete' && $sco->requiredforincomplete == 'ifattempted')){
984 977
 			        if (!scorm_seq_is('activityprogressstatus',$sco->id,$userid) || (($r->value)==0)){
985 978
 				        $included = false;
986 979
 			        }
987 980
 
988 981
 		        }
989 982
 				else{
990  
-					if (($action == 'completed' //&& adlseqRequiredforSatisfied == 'ifNotSkipped') || ($action == 'incomplete' && adlseqRequiredforNotSatisfied == 'ifNotSkipped')){
  983
+					if (($action == 'completed' && $sco->requiredforsatisfied == 'ifnotskipped') || ($action == 'incomplete' && $sco->requiredfornotsatisfied == 'ifnotskipped')){
991 984
 					    $rulch = scorm_seq_rules_check($sco, 'skip');
992 985
 					    if ($rulch != null){
993 986
 						    $included = false;
@@ -1627,8 +1620,8 @@ function scorm_seq_choice_sequencing($sco,$userid,$seq){
1627 1620
 			    $seq->delivery = null;
1628 1621
 			    return $seq;
1629 1622
 		    }
1630  
-
1631  
-			if(scorm_seq_is('active',$act->id,$userid) && ($act->id != $comancestor->id && $seq->prevact)){//adlseq:can i write it like another property for the $seq object?
  1623
+            $act = scorm_get_sco ($acti->id);
  1624
+			if(scorm_seq_is('active',$act->id,$userid) && ($act->id != $comancestor->id && $act->preventactivation)){//adlseq:can i write it like another property for the $seq object?
1632 1625
 				$seq->delivery = null;
1633 1626
 		        $seq->exception = 'SB.2.9-6';
1634 1627
 		        return $seq;
@@ -1675,13 +1668,14 @@ function scorm_seq_choice_sequencing($sco,$userid,$seq){
1675 1668
 
1676 1669
 		$constrained = null;
1677 1670
 		foreach ($curcommon as $acti){
1678  
-			if ( (isset($activ->choiceexit) && ($activ->choiceexit == false)){
  1671
+			$acti = scorm_get_sco($acti->id);
  1672
+			if ( (isset($acti->choiceexit) && ($acti->choiceexit == false)){
1679 1673
 					$seq->delivery = null;
1680 1674
 		            $seq->exception = 'SB.2.9-7';
1681 1675
 		            return $seq;
1682 1676
 			}
1683 1677
 			if ($constrained == null){
1684  
-				if($seq->constrainedchoice){
  1678
+				if($acti->constrainedchoice){
1685 1679
 					$constrained = $acti;//adlseq:can i write it like another property for the $seq object?
1686 1680
 				}
1687 1681
 			}
@@ -1728,8 +1722,8 @@ function scorm_seq_choice_sequencing($sco,$userid,$seq){
1728 1722
 			        $seq->delivery = null;
1729 1723
 			        return $seq;
1730 1724
 		        }
1731  
-
1732  
-			    if(scorm_seq_is('active',$act->id,$userid) && ($act->id != $comancestor->id && $seq->prevact)){//adlseq:can i write it like another property for the $seq object?
  1725
+                $act = scorm_get_sco($act->id);
  1726
+			    if(scorm_seq_is('active',$act->id,$userid) && ($act->id != $comancestor->id && $act->preventactivation)){//adlseq:can i write it like another property for the $seq object?
1733 1727
 				    $seq->delivery = null;
1734 1728
 		            $seq->exception = 'SB.2.9-6';
1735 1729
 		            return $seq;
@@ -1739,7 +1733,8 @@ function scorm_seq_choice_sequencing($sco,$userid,$seq){
1739 1733
 		}
1740 1734
 		else{
1741 1735
 			foreach ($comtarget as $act){
1742  
-			    if(scorm_seq_is('active',$act->id,$userid) && ($act->id != $comancestor->id && $seq->prevact)){//adlseq:can i write it like another property for the $seq object?
  1736
+				$act = scorm_get_sco($act->id);
  1737
+			    if(scorm_seq_is('active',$act->id,$userid) && ($act->id != $comancestor->id && $act->preventactivation)){
1743 1738
 				    $seq->delivery = null;
1744 1739
 		            $seq->exception = 'SB.2.9-6';
1745 1740
 		            return $seq;
@@ -1757,8 +1752,8 @@ function scorm_seq_choice_sequencing($sco,$userid,$seq){
1757 1752
 
1758 1753
     $seq = scorm_seq_flow ($sco,'forward',$seq,true,$userid);
1759 1754
     if ($seq->deliverable == false){
1760  
-		scorm_terminate_descendent_attempts($comancestor,$userid);
1761  
-		scorm_seq_end_attempt($comancestor,$userid);
  1755
+		scorm_terminate_descendent_attempts($comancestor,$userid,$seq);
  1756
+		scorm_seq_end_attempt($comancestor,$userid,$seq->attempt);
1762 1757
 		$seq->currentactivity = $sco;
1763 1758
 		$seq->delivery = null;
1764 1759
 		$seq->exception = 'SB.2.9-9';
@@ -1817,7 +1812,7 @@ function scorm_seq_choice_flow_tree ($constrained, $traverse, $seq){
1817 1812
 	if ($traverse== 'backward'){
1818 1813
 		if($constrained->parent == '/' ){
1819 1814
 			$seq->nextactivity = null;
1820  
-			return $seq;;
  1815
+			return $seq;
1821 1816
 		}
1822 1817
 
1823 1818
 		$avchildren = scorm_get_available_children ($parent);//available children
@@ -1827,13 +1822,13 @@ function scorm_seq_choice_flow_tree ($constrained, $traverse, $seq){
1827 1822
 		}
1828 1823
 		else{
1829 1824
 			$i=sizeof($avchildren)-1;
1830  
-			while(i >=0){
  1825
+			while($i >=0){
1831 1826
 				if ($avchildren [i]->id == $constrained->id){
1832 1827
 					$seq->nextactivity = $avchildren [i-1];
1833 1828
 					return $seq;
1834 1829
 				}
1835 1830
 				else{
1836  
-					i--;
  1831
+					$i--;
1837 1832
 				}
1838 1833
 			}
1839 1834
 		}
@@ -1918,7 +1913,7 @@ function scorm_content_delivery_environment ($seq,$userid){
1918 1913
 		$seq = scorm_clear_suspended_activity($seq->delivery, $seq);
1919 1914
 
1920 1915
 	}
1921  
-	$seq = scorm_terminate_descendent_attempts ($seq->delivery,$userid);
  1916
+	$seq = scorm_terminate_descendent_attempts ($seq->delivery,$userid,$seq);
1922 1917
 	$ancestors = scorm_get_ancestors($seq->delivery);
1923 1918
     $arrpath = array_reverse($ancestors);
1924 1919
 	array_push ($arrpath,$seq->delivery);
@@ -2085,7 +2080,7 @@ function scorm_randomize_children_process($scoid,$userid){
2085 2080
 	}
2086 2081
 }
2087 2082
 
2088  
-function scorm_terminate_descendent_attempts ($activity,$userid){
  2083
+function scorm_terminate_descendent_attempts ($activity,$userid,$seq){
2089 2084
 	$ancestors = scorm_get_ancestors($seq->currentactivity);
2090 2085
     $commonpos = scorm_find_common_ancestor($ancestors,$activity);
2091 2086
         if ($commonpos !== false) {
@@ -2093,14 +2088,14 @@ function scorm_terminate_descendent_attempts ($activity,$userid){
2093 2088
 				if (!empty ($activitypath)){
2094 2089
 
2095 2090
                     foreach ($activitypath as $sco) {
2096  
-						scorm_seq_end_attempt($sco,$userid);
  2091
+						scorm_seq_end_attempt($sco,$userid,$seq->attempt);
2097 2092
 					   
2098 2093
 				    }
2099 2094
 				}
2100 2095
 			}
2101 2096
 		}
2102 2097
 }
2103  
-
  2098
+/*
2104 2099
 
2105 2100
 function scorm_seq_objective_progress_status($sco,$userid){
2106 2101
 	$res = get_record('scorm_scoes_track','scoid',$scoid,'userid',$userid,'element','objectiveprogressstatus');
@@ -2121,6 +2116,6 @@ function scorm_seq_objective_measure_status($sco,$userid){
2121 2116
 		return false;
2122 2117
 	}
2123 2118
 }
2124  
-
  2119
+*/
2125 2120
 
2126 2121
 ?>

0 notes on commit 980c089

Please sign in to comment.
Something went wrong with that request. Please try again.