From 1a974dc983d2ed2318afe839b1cfbc9e0afc55ff Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 6 Dec 2006 01:08:31 +0100 Subject: [PATCH] [svn r10331] Restricted write_to_db() checks to only sco-type elements --- main/newscorm/learnpathItem.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/newscorm/learnpathItem.class.php b/main/newscorm/learnpathItem.class.php index d094e58a0e..06b9488b66 100644 --- a/main/newscorm/learnpathItem.class.php +++ b/main/newscorm/learnpathItem.class.php @@ -1215,7 +1215,7 @@ class learnpathItem{ function set_time($scorm_time,$format='scorm') { if($this->debug>0){error_log('New LP - In learnpathItem::set_time('.$scorm_time.')',0);} - if($scorm_time == 0 and ($this->type=='asset' or $this->type=='doc') and $this->current_start_time!=0){ + if($scorm_time == 0 and ($this->type!='sco') and $this->current_start_time!=0){ $my_time = time() - $this->current_start_time; if($my_time > 0){ $this->update_time($my_time); @@ -1326,7 +1326,7 @@ class learnpathItem{ if($this->debug>0){error_log('New LP - In learnpathItem::write_to_db()',0);} $mode = $this->get_lesson_mode(); $credit = $this->get_credit(); - if($credit == 'no-credit' OR $mode == 'review' OR $mode == 'browse') + if(($this->type == 'sco') && ($credit == 'no-credit' OR $mode == 'review' OR $mode == 'browse')) { //this info shouldn't be saved as the credit or lesson mode info prevent it if($this->debug>1){error_log('New LP - In learnpathItem::write_to_db() - credit('.$credit.') or lesson_mode('.$mode.') prevent recording!',0);}