Permalink
Browse files

Changed Ojective Rollup Process

  • Loading branch information...
1 parent 0506995 commit 33cf55bf96bc607f5356ce26f40c316e6e0c64b1 csantossaenz committed May 8, 2007
Showing with 28 additions and 0 deletions.
  1. +28 −0 mod/scorm/datamodels/sequencinglib.php
@@ -551,7 +551,12 @@ function scorm_seq_measure_rollup($sco,$userid){
}
function scorm_seq_objective_rollup($sco,$userid){
+
+ scorm_seq_objective_rollup_measure($sco,$userid);
+ scorm_seq_objective_rollup_rules($sco,$userid);
+ scorm_seq_objective_rollup_default($sco,$userid);
+/*
if($targetobjective->satisfiedbymeasure){
scorm_seq_objective_rollup_measure($sco,$userid);
}
@@ -577,6 +582,7 @@ function scorm_seq_objective_rollup($sco,$userid){
}
}
+*/
}
function scorm_seq_objective_rollup_measure($sco,$userid){
@@ -634,6 +640,28 @@ function scorm_seq_objective_rollup_measure($sco,$userid){
}
+function scorm_seq_objective_rollup_default($sco,$userid){
+ if (!(scorm_seq_rollup_rule_check($sco,$userid,'incomplete')) && !(scorm_seq_rollup_rule_check($sco,$userid,'completed'))){
+
+ $rolluprules = get_record('scorm_seq_rolluprule','scoid',$sco->id,'userid',$userid);
+ foreach($rolluprules as $rolluprule){
+ $rollupruleconds = get_records('scorm_seq_rolluprulecond','rollupruleid',$rolluprule->id);
+ foreach($rollupruleconds as $rolluprulecond){
+
+ switch ($rolluprulecond->cond!='satisfied' && $rolluprulecond->cond!='completed' && $rolluprulecond->cond!='attempted'){
+
+ scorm_seq_set('objectivesatisfiedstatus',$sco->id,$userid, false);
+
+ break;
+ }
+ }
+
+
+ }
+ }
+
+}
+
function scorm_seq_objective_rollup_rules($sco,$userid){
$targetobjective = null;

0 comments on commit 33cf55b

Please sign in to comment.