|
|
|
@ -72,7 +72,7 @@ class learnpath { |
|
|
|
|
public $lp_view_session_id =0; // The specific view might be bound to a session. |
|
|
|
|
|
|
|
|
|
public $prerequisite = 0; |
|
|
|
|
public $use_max_score = 100; //Should work as usual |
|
|
|
|
public $use_max_score = 1; // 1 or 0 |
|
|
|
|
|
|
|
|
|
public $created_on = ''; |
|
|
|
|
public $modified_on = ''; |
|
|
|
@ -143,6 +143,7 @@ class learnpath { |
|
|
|
|
$this->preview_image = $row['preview_image']; |
|
|
|
|
$this->author = $row['author']; |
|
|
|
|
$this->lp_session_id = $row['session_id']; |
|
|
|
|
$this->use_max_score = $row['use_max_score']; |
|
|
|
|
|
|
|
|
|
$this->created_on = $row['created_on']; |
|
|
|
|
$this->modified_on = $row['modified_on']; |
|
|
|
@ -4055,18 +4056,13 @@ class learnpath { |
|
|
|
|
public function set_use_max_score($use_max_score = 1) { |
|
|
|
|
if ($this->debug > 0) { |
|
|
|
|
error_log('New LP - In learnpath::set_use_max_score()', 0); |
|
|
|
|
} |
|
|
|
|
if ($use_max_score) { |
|
|
|
|
$use_max_score = 1; |
|
|
|
|
} else { |
|
|
|
|
$use_max_score = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$this->use_max_score = $this->escape_string($use_max_score); |
|
|
|
|
} |
|
|
|
|
$use_max_score = intval($use_max_score); |
|
|
|
|
$this->use_max_score = $use_max_score; |
|
|
|
|
$lp_table = Database :: get_course_table(TABLE_LP_MAIN); |
|
|
|
|
$lp_id = $this->get_id(); |
|
|
|
|
$sql = "UPDATE $lp_table SET use_max_score = '" . $this->use_max_score . "' WHERE id = '$lp_id'"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($this->debug > 2) { |
|
|
|
|
error_log('New LP - lp updated with new use_max_score : ' . $this->use_max_score, 0); |
|
|
|
|
} |
|
|
|
|