|
|
|
|
@ -124,6 +124,7 @@ class ForumThreadLink extends AbstractLink |
|
|
|
|
public function calc_score($stud_id = null) { |
|
|
|
|
$course_info = Database :: get_course_info($this->get_course_code()); |
|
|
|
|
$database_name = (empty($course_info['db_name']))?$course_info['dbName']:$course_info['db_name']; |
|
|
|
|
if ($database_name!="") { |
|
|
|
|
$thread_qualify = Database :: get_course_table('forum_thread_qualify', $database_name); |
|
|
|
|
|
|
|
|
|
$sql = 'SELECT thread_qualify_max FROM '.Database :: get_course_table(TABLE_FORUM_THREAD, $database_name)." WHERE thread_id = '".$this->get_ref_id()."'"; |
|
|
|
|
@ -173,6 +174,7 @@ class ForumThreadLink extends AbstractLink |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// INTERNAL FUNCTIONS |
|
|
|
|
|
|
|
|
|
@ -248,6 +250,7 @@ class ForumThreadLink extends AbstractLink |
|
|
|
|
public function get_link() { |
|
|
|
|
//it was extracts the forum id |
|
|
|
|
$tbl_name=$this->get_forum_thread_table(); |
|
|
|
|
if ($tbl_name!="") { |
|
|
|
|
$sql = 'SELECT * FROM '.$this->get_forum_thread_table()." WHERE thread_id = '".$this->get_ref_id()."'"; |
|
|
|
|
$result = api_sql_query($sql,__FILE__,__LINE__); |
|
|
|
|
$row = Database::fetch_array($result,'ASSOC'); |
|
|
|
|
@ -257,6 +260,7 @@ class ForumThreadLink extends AbstractLink |
|
|
|
|
.'main/forum/viewthread.php?cidReq='.$this->get_course_code().'&thread='.$this->get_ref_id().'&gradebook=view&forum='.$forum_id; |
|
|
|
|
return $url; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
private function get_exercise_data() { |
|
|
|
|
$tbl_name=$this->get_forum_thread_table(); |
|
|
|
|
if ($tbl_name=='') { |
|
|
|
|
|