浏览代码

Should fix big date issues when adding a hotpotatoe in a LP see #3343

Julio Montoya 12 年之前
父节点
当前提交
0209d0603e
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      main/newscorm/learnpath.class.php

+ 8 - 1
main/newscorm/learnpath.class.php

@@ -268,6 +268,7 @@ class learnpath {
                         error_log('New LP - learnpath::__construct() ' . __LINE__ . ' - calling learnpathItem', 0);
                     }
                     $oItem = new learnpathItem($row['id'], $user_id, $course_id, $row);
+                    
                     if ($this->debug > 2) {
                         error_log('New LP - learnpath::__construct() ' . __LINE__ . ' - end calling learnpathItem', 0);
                     }
@@ -306,7 +307,11 @@ class learnpath {
             // Setting the view in the item object.
             if (is_object($this->items[$row['id']])) {
                 $this->items[$row['id']]->set_lp_view($this->lp_view_id, $course_id);
-            }
+                if ($this->items[$row['id']]->get_type() == TOOL_HOTPOTATOES) {
+                    $this->items[$row['id']]->current_start_time = 0;
+                    $this->items[$row['id']]->current_stop_time	= 0;                    
+                }
+            }        
         }
         
         if ($this->debug > 2) {
@@ -368,6 +373,8 @@ class learnpath {
         if ($this->debug > 2) {
             error_log('New LP - learnpath::__construct() ' . __LINE__ . ' - End of learnpath constructor for learnpath ' . $this->get_id(), 0);
         }
+      
+        
     }
 
     /**