|
@@ 11197-11210 (lines=14) @@
|
| 11194 |
|
* @param int $value (0 = false, 1 = true) |
| 11195 |
|
* @return bool |
| 11196 |
|
*/ |
| 11197 |
|
public function setSubscribeUsers($value) |
| 11198 |
|
{ |
| 11199 |
|
if ($this->debug > 0) { |
| 11200 |
|
error_log('New LP - In learnpath::set_subscribe_users()', 0); |
| 11201 |
|
} |
| 11202 |
|
$this->subscribeUsers = (int) $value; |
| 11203 |
|
$lp_table = Database::get_course_table(TABLE_LP_MAIN); |
| 11204 |
|
$lp_id = $this->get_id(); |
| 11205 |
|
$sql = "UPDATE $lp_table SET subscribe_users = ".$this->subscribeUsers." |
| 11206 |
|
WHERE c_id = ".$this->course_int_id." AND id = $lp_id"; |
| 11207 |
|
Database::query($sql); |
| 11208 |
|
|
| 11209 |
|
return true; |
| 11210 |
|
} |
| 11211 |
|
|
| 11212 |
|
/** |
| 11213 |
|
* Calculate the count of stars for a user in this LP |
|
@@ 11764-11777 (lines=14) @@
|
| 11761 |
|
* @param int $value (0 = false, 1 = true) |
| 11762 |
|
* @return bool Always returns true |
| 11763 |
|
*/ |
| 11764 |
|
public function setAccumulateScormTime($value) |
| 11765 |
|
{ |
| 11766 |
|
if ($this->debug > 0) { |
| 11767 |
|
error_log('New LP - In learnpath::setAccumulateScormTime()', 0); |
| 11768 |
|
} |
| 11769 |
|
$this->accumulateScormTime = intval($value); |
| 11770 |
|
$lp_table = Database::get_course_table(TABLE_LP_MAIN); |
| 11771 |
|
$lp_id = $this->get_id(); |
| 11772 |
|
$sql = "UPDATE $lp_table SET accumulate_scorm_time = ".$this->accumulateScormTime." |
| 11773 |
|
WHERE c_id = ".$this->course_int_id." AND id = $lp_id"; |
| 11774 |
|
Database::query($sql); |
| 11775 |
|
|
| 11776 |
|
return true; |
| 11777 |
|
} |
| 11778 |
|
|
| 11779 |
|
/** |
| 11780 |
|
* Returns an HTML-formatted link to a resource, to incorporate directly into |