* lp_item defines items belonging to a learnpath. Each item has a name,
* a score, a use time and additional information that enables tracking a user's
* progress in a learning path
* @package chamilo.learnpath
* @author Yannick Warnier <ywarnier@beeznest.org>
* @package chamilo.learnpath
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
class learnpathItem
{
@ -2823,8 +2823,9 @@ class learnpathItem
/**
* Saves data in the database
* @param boolean Save from URL params (1) or from object attributes (0)
* @param boolean The results of a check on prerequisites for this item. True if prerequisites are completed, false otherwise. Defaults to false. Only used if not sco or au
* @param boolean $from_outside Save from URL params (1) or from object attributes (0)
* @param boolean $prereqs_complete The results of a check on prerequisites for this item.
* True if prerequisites are completed, false otherwise. Defaults to false. Only used if not sco or au
* @return boolean True on success, false on failure
*/
public function save($from_outside = true, $prereqs_complete = false)
@ -2992,19 +2993,20 @@ class learnpathItem
break;
}
}
//$time = $this->time
if (self::debug > 1) {
error_log(
'New LP - End of learnpathItem::save() - Calling write_to_db()',
0
);
}
return $this->write_to_db();
}
/**
* Sets the number of attempt_id to a given value
* @param integer The given value to set attempt_id to
* @param integer $num The given value to set attempt_id to
* @return boolean TRUE on success, FALSE otherwise
*/
public function set_attempt_id($num)
@ -3021,7 +3023,7 @@ class learnpathItem
/**
* Sets the core_exit value to the one given
* @return bool True (always)
* @return bool $value True (always)
*/
public function set_core_exit($value)
{
@ -3041,7 +3043,8 @@ class learnpathItem
/**
* Sets the item's description
* @param string Description
* @param string $string Description
*
* @return void
*/
public function set_description($string = '')
@ -3056,7 +3059,7 @@ class learnpathItem
/**
* Sets the lesson_location value
* @param string lesson_location as provided by the SCO
* @param string $location lesson_location as provided by the SCO
* @return boolean True on success, false otherwise
*/
public function set_lesson_location($location)
@ -3073,7 +3076,7 @@ class learnpathItem
/**
* Sets the item's depth level in the LP tree (0 is at root)
* @param integer Level
* @param integer $int Level
* @return void
*/
public function set_level($int = 0)
@ -3088,7 +3091,7 @@ class learnpathItem
/**
* Sets the lp_view id this item view is registered to
* @param integer lp_view DB ID
* @param int $lp_view_id lp_view DB ID
* @param int $course_id
* @return void
* @todo //todo insert into lp_item_view if lp_view not exists