From 32fcc57fbd2fdf0ed666414f07ed4c70612785b6 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Fri, 7 Jul 2017 11:09:23 +0200 Subject: [PATCH] Minor - format code --- .../lib/be/forumthreadlink.class.php | 60 +++++++++---------- main/lp/aicc_api.php | 22 +++---- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/main/gradebook/lib/be/forumthreadlink.class.php b/main/gradebook/lib/be/forumthreadlink.class.php index 1b5cb05110..2b3e9349d3 100755 --- a/main/gradebook/lib/be/forumthreadlink.class.php +++ b/main/gradebook/lib/be/forumthreadlink.class.php @@ -51,9 +51,9 @@ class ForumThreadLink extends AbstractLink $tbl_grade_links = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINK); $sql = 'SELECT thread_id,thread_title,thread_title_qualify FROM '.$this->get_forum_thread_table().' - forum_thread WHERE thread_id NOT IN - ( - SELECT ref_id FROM '.$tbl_grade_links.' + forum_thread WHERE thread_id NOT IN + ( + SELECT ref_id FROM '.$tbl_grade_links.' WHERE type = '.LINK_FORUM_THREAD.' AND c_id = '.intval($this->course_id).' @@ -76,31 +76,31 @@ class ForumThreadLink extends AbstractLink return $cats; } - /** - * Generate an array of all exercises available. - * @return array 2-dimensional array - every element contains 2 subelements (id, name) - */ - public function get_all_links() - { - if (empty($this->course_code)) { - return []; - } - - $tbl_grade_links = Database::get_course_table(TABLE_FORUM_THREAD); - $tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY); - $session_id = api_get_session_id(); - - if ($session_id) { - $session_condition = 'tl.session_id='.api_get_session_id(); - } else { - $session_condition = '(tl.session_id = 0 OR tl.session_id IS NULL)'; - } - - $sql = 'SELECT tl.thread_id, tl.thread_title, tl.thread_title_qualify - FROM '.$tbl_grade_links.' tl INNER JOIN '.$tbl_item_property.' ip - ON (tl.thread_id = ip.ref AND tl.c_id = ip.c_id) - WHERE - tl.c_id = '.$this->course_id.' AND + /** + * Generate an array of all exercises available. + * @return array 2-dimensional array - every element contains 2 subelements (id, name) + */ + public function get_all_links() + { + if (empty($this->course_code)) { + return []; + } + + $tbl_grade_links = Database::get_course_table(TABLE_FORUM_THREAD); + $tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY); + $session_id = api_get_session_id(); + + if ($session_id) { + $session_condition = 'tl.session_id='.api_get_session_id(); + } else { + $session_condition = '(tl.session_id = 0 OR tl.session_id IS NULL)'; + } + + $sql = 'SELECT tl.thread_id, tl.thread_title, tl.thread_title_qualify + FROM '.$tbl_grade_links.' tl INNER JOIN '.$tbl_item_property.' ip + ON (tl.thread_id = ip.ref AND tl.c_id = ip.c_id) + WHERE + tl.c_id = '.$this->course_id.' AND ip.c_id = '.$this->course_id.' AND ip.tool = "forum_thread" AND ip.visibility <> 2 AND @@ -359,7 +359,7 @@ class ForumThreadLink extends AbstractLink return 'forum'; } - function save_linked_data() + public function save_linked_data() { $weight = $this->get_weight(); $ref_id = $this->get_ref_id(); @@ -372,7 +372,7 @@ class ForumThreadLink extends AbstractLink } } - function delete_linked_data() + public function delete_linked_data() { $ref_id = $this->get_ref_id(); if (!empty($ref_id)) { diff --git a/main/lp/aicc_api.php b/main/lp/aicc_api.php index 9eabd3d2d1..73b69b068a 100755 --- a/main/lp/aicc_api.php +++ b/main/lp/aicc_api.php @@ -4,14 +4,14 @@ use ChamiloSession as Session; /** - * API event handler functions for AICC / CMIv4 in API communication mode + * API event handler functions for AICC / CMIv4 in API communication mode * - * @author Denes Nagy - * @author Yannick Warnier - * @version v 1.0 - * @access public - * @package chamilo.learnpath - * @license GNU/GPL + * @author Denes Nagy + * @author Yannick Warnier + * @version v 1.0 + * @access public + * @package chamilo.learnpath + * @license GNU/GPL */ /** @@ -141,10 +141,10 @@ function LMSGetValue(param) { }else if(param == 'cmi.core.student_id'){ result=''; }else if(param == 'cmi.core.student_name'){ - + }else if(param == 'cmi.core.lesson_location'){ result=lesson_location; }else if(param == 'cmi.core.total_time'){