Browse Source

Scorm time : avoid chamilo to update the scorm time with incoherent value at initalisation

Noel Dieschburg 13 years ago
parent
commit
184a7f26c3
1 changed files with 5 additions and 1 deletions
  1. 5 1
      main/newscorm/learnpathItem.class.php

+ 5 - 1
main/newscorm/learnpathItem.class.php

@@ -1656,6 +1656,10 @@ class learnpathItem {
     public function restart()
     {
 		if(self::debug>0){error_log('New LP - In learnpathItem::restart()',0);}
+      if ($this->type == 'sco') { //If this is a sco, chamilo can't update the time without explicit scorm call
+        $this->current_start_time = 0;
+        $this->curtrent_stop_time = 0; //Those 0 value have this effect
+      }
 		$this->save();
 		$allowed = $this->is_restart_allowed();
 		if($allowed === -1){
@@ -2525,4 +2529,4 @@ class learnpathItem {
 		if(self::debug>2){error_log('New LP - End of learnpathItem::write_to_db()',0);}
      	return true;
      }
-}
+}