From cc312e3871528317b75d78324e53be35ebb474d3 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 22 Nov 2006 17:42:07 +0100 Subject: [PATCH] [svn r10119] Small coherence fixes --- main/newscorm/learnpathItem.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main/newscorm/learnpathItem.class.php b/main/newscorm/learnpathItem.class.php index 769fb748bd..eb02f235b3 100644 --- a/main/newscorm/learnpathItem.class.php +++ b/main/newscorm/learnpathItem.class.php @@ -319,7 +319,8 @@ class learnpathItem{ function get_lesson_mode(){ $mode = 'normal'; if($this->get_prevent_reinit() != 0){ //if prevent_reinit == 0 - if($this->status != $this->possible_status[0] AND $this->status != $this->possible_status[1]){ + $my_status = $this->get_status(); + if($my_status != $this->possible_status[0] AND $my_status != $this->possible_status[1]){ $mode = 'review'; } } @@ -418,12 +419,14 @@ class learnpathItem{ */ function get_score(){ if($this->debug>0){error_log('New LP - In learnpathItem::get_score()',0);} + $res = 0; if(!empty($this->current_score)) { - return $this->current_score; + $res = $this->current_score; } //TODO check this return value is valid for children classes (SCORM?) - return 0; + if($this->debug>1){error_log('New LP - Out of learnpathItem::get_score() - returning '.$res,0);} + return $res; } /** * Gets the item status