@@ -8,47 +8,47 @@ discard block |
||
8 | 8 | */ |
9 | 9 | exit(); //not yet functional, needs to be revised |
10 | 10 | |
11 | -$cidReset=true; |
|
11 | +$cidReset = true; |
|
12 | 12 | |
13 | 13 | require('../inc/global.inc.php'); |
14 | 14 | $libpath = api_get_path(LIBRARY_PATH); |
15 | 15 | require_once('../auth/ldap/authldap.php'); |
16 | -$annee_base=date('Y'); |
|
16 | +$annee_base = date('Y'); |
|
17 | 17 | // setting the section (for the tabs) |
18 | 18 | $this_section = SECTION_PLATFORM_ADMIN; |
19 | 19 | //api_protect_admin_script(); // on vire la secu... qui n'a pas lieu d'etre ici (script de synchro) |
20 | 20 | |
21 | 21 | // setting breadcrumbs |
22 | -$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin')); |
|
23 | -$interbreadcrumb[]=array('url' => api_get_self(),"name" => "Liste des sessions"); |
|
22 | +$interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin')); |
|
23 | +$interbreadcrumb[] = array('url' => api_get_self(), "name" => "Liste des sessions"); |
|
24 | 24 | |
25 | 25 | // Database Table Definitions |
26 | 26 | $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
27 | -$tbl_session_rel_class = Database::get_main_table(TABLE_MAIN_SESSION_CLASS); |
|
28 | -$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
29 | -$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
30 | -$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE); |
|
31 | -$tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
|
32 | -$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER); |
|
33 | -$tbl_class = Database::get_main_table(TABLE_MAIN_CLASS); |
|
34 | -$tbl_class_user = Database::get_main_table(TABLE_MAIN_CLASS_USER); |
|
27 | +$tbl_session_rel_class = Database::get_main_table(TABLE_MAIN_SESSION_CLASS); |
|
28 | +$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
|
29 | +$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
|
30 | +$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE); |
|
31 | +$tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
|
32 | +$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER); |
|
33 | +$tbl_class = Database::get_main_table(TABLE_MAIN_CLASS); |
|
34 | +$tbl_class_user = Database::get_main_table(TABLE_MAIN_CLASS_USER); |
|
35 | 35 | |
36 | -$tbl_session_rel_etape = "session_rel_etape"; |
|
36 | +$tbl_session_rel_etape = "session_rel_etape"; |
|
37 | 37 | |
38 | -$message=""; |
|
38 | +$message = ""; |
|
39 | 39 | |
40 | -$result=Database::query("SELECT id, name FROM $tbl_session"); |
|
41 | -$Sessions=Database::store_result($result); |
|
40 | +$result = Database::query("SELECT id, name FROM $tbl_session"); |
|
41 | +$Sessions = Database::store_result($result); |
|
42 | 42 | |
43 | -$result=Database::query($sql); |
|
44 | -$users=Database::store_result($result); |
|
43 | +$result = Database::query($sql); |
|
44 | +$users = Database::store_result($result); |
|
45 | 45 | |
46 | -foreach($Sessions as $session){ |
|
46 | +foreach ($Sessions as $session) { |
|
47 | 47 | $id_session = $session['id']; |
48 | 48 | $name_session = $session['name']; |
49 | - $UserList=array(); |
|
50 | - $UserUpdate=array(); |
|
51 | - $UserAdd=array(); |
|
49 | + $UserList = array(); |
|
50 | + $UserUpdate = array(); |
|
51 | + $UserAdd = array(); |
|
52 | 52 | |
53 | 53 | // Parse des code etape de la session |
54 | 54 | /* |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | { |
66 | 66 | $r = false; |
67 | 67 | $res = ldap_handle_bind($ds, $r); |
68 | - $UserList=array(); |
|
69 | - if($result !== false) |
|
68 | + $UserList = array(); |
|
69 | + if ($result !== false) |
|
70 | 70 | { |
71 | 71 | //while($row = Database::fetch_array($result)) |
72 | 72 | //{ |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | //$sr = @ ldap_search($ds, "ou=people,$LDAPbasedn", "edupersonorgunitdn=ou=$etape,ou=$annee,ou=diploma,$LDAPbasedn"); |
82 | 82 | $sr = @ ldap_search($ds, $ldap_basedn, '(uid=*)'); |
83 | 83 | $info = ldap_get_entries($ds, $sr); |
84 | - for ($key = 0; $key < $info["count"]; $key ++) |
|
84 | + for ($key = 0; $key < $info["count"]; $key++) |
|
85 | 85 | { |
86 | 86 | echo "<pre>"; |
87 | 87 | print_r($info[$key]); |
@@ -90,28 +90,28 @@ discard block |
||
90 | 90 | $firstname = api_utf8_decode($info[$key]["givenname"][0]); |
91 | 91 | $email = $info[$key]["mail"][0]; |
92 | 92 | // Get uid from dn |
93 | - $dn_array=ldap_explode_dn($info[$key]["dn"],1); |
|
93 | + $dn_array = ldap_explode_dn($info[$key]["dn"], 1); |
|
94 | 94 | $username = $dn_array[0]; // uid is first key |
95 | 95 | $outab[] = $info[$key]["edupersonprimaryaffiliation"][0]; // Ici "student" |
96 | 96 | $val = ldap_get_values_len($ds, $sr, "userPassword"); |
97 | 97 | $password = $val[0]; |
98 | 98 | // Pour faciliter la gestion on ajoute le code "etape-annee" |
99 | - $official_code=$etape."-".$annee; |
|
100 | - $auth_source="ldap"; |
|
99 | + $official_code = $etape."-".$annee; |
|
100 | + $auth_source = "ldap"; |
|
101 | 101 | // Pas de date d'expiration d'etudiant (a recuperer par rapport au shadow expire LDAP) |
102 | - $expiration_date=''; |
|
103 | - $active=1; |
|
102 | + $expiration_date = ''; |
|
103 | + $active = 1; |
|
104 | 104 | // Ajout de l'utilisateur |
105 | 105 | if (UserManager::is_username_available($username)) { |
106 | - $user_id = UserManager::create_user($firstname,$lastname,$status,$email,$username,$password,$official_code,api_get_setting('platformLanguage'),$phone,$picture_uri,$auth_source,$expiration_date,$active); |
|
107 | - $UserAdd[]=$user_id; |
|
106 | + $user_id = UserManager::create_user($firstname, $lastname, $status, $email, $username, $password, $official_code, api_get_setting('platformLanguage'), $phone, $picture_uri, $auth_source, $expiration_date, $active); |
|
107 | + $UserAdd[] = $user_id; |
|
108 | 108 | } else { |
109 | 109 | $user = api_get_user_info_from_username($username); |
110 | - $user_id=$user['user_id']; |
|
110 | + $user_id = $user['user_id']; |
|
111 | 111 | UserManager::update_user($user_id, $firstname, $lastname, $username, null, null, $email, $status, $official_code, $phone, $picture_uri, $expiration_date, $active); |
112 | - $UserUpdate[]=$user_id; |
|
112 | + $UserUpdate[] = $user_id; |
|
113 | 113 | } |
114 | - $UserList[]=$user_id; |
|
114 | + $UserList[] = $user_id; |
|
115 | 115 | } |
116 | 116 | //} |
117 | 117 | } |
@@ -125,10 +125,10 @@ discard block |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | // Une fois les utilisateurs importer dans la base des utilisateurs, on peux les affecter la session |
128 | - $result=Database::query("SELECT c_id FROM $tbl_session_rel_course WHERE session_id='$id_session'"); |
|
129 | - $CourseList=array(); |
|
130 | - while($row=Database::fetch_array($result)) { |
|
131 | - $CourseList[]= $row['c_id']; |
|
128 | + $result = Database::query("SELECT c_id FROM $tbl_session_rel_course WHERE session_id='$id_session'"); |
|
129 | + $CourseList = array(); |
|
130 | + while ($row = Database::fetch_array($result)) { |
|
131 | + $CourseList[] = $row['c_id']; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | foreach ($CourseList as $enreg_course) { |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | VALUES('$id_session','$enreg_course','$enreg_user')"; |
139 | 139 | Database::query($sql); |
140 | 140 | } |
141 | - $sql = "SELECT COUNT(user_id) as nbUsers " . |
|
142 | - "FROM $tbl_session_rel_course_rel_user " . |
|
141 | + $sql = "SELECT COUNT(user_id) as nbUsers ". |
|
142 | + "FROM $tbl_session_rel_course_rel_user ". |
|
143 | 143 | "WHERE session_id='$id_session' AND c_id='$enreg_course'"; |
144 | 144 | $rs = Database::query($sql); |
145 | 145 | list($nbr_users) = Database::fetch_array($rs); |
@@ -148,13 +148,13 @@ discard block |
||
148 | 148 | Database::query($sql); |
149 | 149 | } |
150 | 150 | // On ajoute la relation entre l'utilisateur et la session |
151 | - foreach($UserList as $enreg_user){ |
|
152 | - $sql = "INSERT IGNORE INTO $tbl_session_rel_user(session_id, user_id, registered_at) " . |
|
153 | - "VALUES('$id_session','$enreg_user', '" . api_get_utc_datetime() . "')"; |
|
151 | + foreach ($UserList as $enreg_user) { |
|
152 | + $sql = "INSERT IGNORE INTO $tbl_session_rel_user(session_id, user_id, registered_at) ". |
|
153 | + "VALUES('$id_session','$enreg_user', '".api_get_utc_datetime()."')"; |
|
154 | 154 | Database::query($sql); |
155 | 155 | } |
156 | - $sql = "SELECT COUNT(user_id) as nbUsers " . |
|
157 | - "FROM $tbl_session_rel_user " . |
|
156 | + $sql = "SELECT COUNT(user_id) as nbUsers ". |
|
157 | + "FROM $tbl_session_rel_user ". |
|
158 | 158 | "WHERE session_id='$id_session' AND relation_type<>".SESSION_RELATION_TYPE_RRHH.""; |
159 | 159 | $rs = Database::query($sql); |
160 | 160 | list($nbr_users) = Database::fetch_array($rs); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | return $this->render( |
44 | 44 | '@ChamiloPage/latest.html.twig', |
45 | - [ 'pages' => $pagesToShow ] |
|
45 | + ['pages' => $pagesToShow] |
|
46 | 46 | ); |
47 | 47 | } |
48 | 48 | } |
49 | 49 | \ No newline at end of file |
@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | |
20 | 20 | public function get_foruns_id($username, $password, $course_code) |
21 | 21 | { |
22 | - if($this->verifyUserPass($username, $password) == "valid") |
|
22 | + if ($this->verifyUserPass($username, $password) == "valid") |
|
23 | 23 | { |
24 | 24 | $course_db = CourseManager::get_course_information($course_code); |
25 | - $foruns_info = get_forums($id='', $course_db['code']); |
|
25 | + $foruns_info = get_forums($id = '', $course_db['code']); |
|
26 | 26 | $foruns_id = '#'; |
27 | 27 | foreach ($foruns_info as $forum) |
28 | 28 | { |
29 | - if( isset($forum['forum_id'])) |
|
29 | + if (isset($forum['forum_id'])) |
|
30 | 30 | { |
31 | 31 | $foruns_id .= $forum['forum_id']."#"; |
32 | 32 | } |
@@ -38,18 +38,18 @@ discard block |
||
38 | 38 | |
39 | 39 | public function get_forum_title($username, $password, $course_code, $forum_id) |
40 | 40 | { |
41 | - if($this->verifyUserPass($username, $password) == "valid") |
|
41 | + if ($this->verifyUserPass($username, $password) == "valid") |
|
42 | 42 | { |
43 | 43 | $course_db = CourseManager::get_course_information($course_code); |
44 | 44 | $table_forums = Database :: get_course_table(TABLE_FORUM, $course_db['db_name']); |
45 | 45 | $table_item_property = Database :: get_course_table(TABLE_ITEM_PROPERTY, $course_db['db_name']); |
46 | 46 | |
47 | - $sql="SELECT * FROM ".$table_forums." forums, ".$table_item_property." item_properties |
|
47 | + $sql = "SELECT * FROM ".$table_forums." forums, ".$table_item_property." item_properties |
|
48 | 48 | WHERE item_properties.tool='".TOOL_FORUM."' |
49 | 49 | AND item_properties.ref='".Database::escape_string($forum_id)."' |
50 | 50 | AND forums.forum_id='".Database::escape_string($forum_id)."'"; |
51 | - $result=Database::query($sql); |
|
52 | - $forum_info=Database::fetch_array($result); |
|
51 | + $result = Database::query($sql); |
|
52 | + $forum_info = Database::fetch_array($result); |
|
53 | 53 | $forum_info['approval_direct_post'] = 0; // we can't anymore change this option, so it should always be activated |
54 | 54 | |
55 | 55 | $forum_title = utf8_decode($forum_info['forum_title']); |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | |
61 | 61 | public function get_forum_threads_id($username, $password, $course_code, $forum_id) |
62 | 62 | { |
63 | - if($this->verifyUserPass($username, $password) == "valid") { |
|
63 | + if ($this->verifyUserPass($username, $password) == "valid") { |
|
64 | 64 | $threads_info = get_threads($forum_id, $course_code); |
65 | 65 | $threads_id = '#'; |
66 | 66 | foreach ($threads_info as $thread) |
67 | 67 | { |
68 | - if( isset($thread['thread_id'])) |
|
68 | + if (isset($thread['thread_id'])) |
|
69 | 69 | { |
70 | 70 | $threads_id .= $thread['thread_id']."#"; |
71 | 71 | } |
@@ -79,18 +79,18 @@ discard block |
||
79 | 79 | |
80 | 80 | public function get_forum_thread_data($username, $password, $course_code, $thread_id, $field) |
81 | 81 | { |
82 | - if($this->verifyUserPass($username, $password) == "valid") |
|
82 | + if ($this->verifyUserPass($username, $password) == "valid") |
|
83 | 83 | { |
84 | 84 | $course_db = CourseManager::get_course_information($course_code); |
85 | 85 | $table_item_property = Database :: get_course_table(TABLE_ITEM_PROPERTY, $course_db['db_name']); |
86 | 86 | $table_threads = Database :: get_course_table(TABLE_FORUM_THREAD, $course_db['db_name']); |
87 | 87 | |
88 | - $sql="SELECT * FROM ".$table_threads." threads, ".$table_item_property." item_properties |
|
88 | + $sql = "SELECT * FROM ".$table_threads." threads, ".$table_item_property." item_properties |
|
89 | 89 | WHERE item_properties.tool='".TOOL_FORUM_THREAD."' |
90 | 90 | AND item_properties.ref='".Database::escape_string($thread_id)."' |
91 | 91 | AND threads.thread_id='".Database::escape_string($thread_id)."'"; |
92 | - $result=Database::query($sql); |
|
93 | - $thread_info=Database::fetch_array($result); |
|
92 | + $result = Database::query($sql); |
|
93 | + $thread_info = Database::fetch_array($result); |
|
94 | 94 | |
95 | 95 | switch ($field) |
96 | 96 | { |
@@ -121,18 +121,18 @@ discard block |
||
121 | 121 | |
122 | 122 | public function get_forum_thread_title($username, $password, $course_code, $thread_id) |
123 | 123 | { |
124 | - if($this->verifyUserPass($username, $password) == "valid") |
|
124 | + if ($this->verifyUserPass($username, $password) == "valid") |
|
125 | 125 | { |
126 | 126 | $course_db = CourseManager::get_course_information($course_code); |
127 | 127 | $table_item_property = Database :: get_course_table(TABLE_ITEM_PROPERTY, $course_db['db_name']); |
128 | 128 | $table_threads = Database :: get_course_table(TABLE_FORUM_THREAD, $course_db['db_name']); |
129 | 129 | |
130 | - $sql="SELECT * FROM ".$table_threads." threads, ".$table_item_property." item_properties |
|
130 | + $sql = "SELECT * FROM ".$table_threads." threads, ".$table_item_property." item_properties |
|
131 | 131 | WHERE item_properties.tool='".TOOL_FORUM_THREAD."' |
132 | 132 | AND item_properties.ref='".Database::escape_string($thread_id)."' |
133 | 133 | AND threads.thread_id='".Database::escape_string($thread_id)."'"; |
134 | - $result=Database::query($sql); |
|
135 | - $thread_info=Database::fetch_array($result); |
|
134 | + $result = Database::query($sql); |
|
135 | + $thread_info = Database::fetch_array($result); |
|
136 | 136 | |
137 | 137 | $htmlcode = true; |
138 | 138 | $field_table = "thread_title"; |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | public function get_posts_id($username, $password, $course_code, $thread_id) |
148 | 148 | { |
149 | - if($this->verifyUserPass($username, $password) == "valid") |
|
149 | + if ($this->verifyUserPass($username, $password) == "valid") |
|
150 | 150 | { |
151 | 151 | $course_db = CourseManager::get_course_information($course_code); |
152 | 152 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $table_posts = Database :: get_course_table(TABLE_FORUM_POST, $course_db['db_name']); |
155 | 155 | |
156 | 156 | // note: change these SQL so that only the relevant fields of the user table are used |
157 | - if (api_is_allowed_to_edit(null,true)) { |
|
157 | + if (api_is_allowed_to_edit(null, true)) { |
|
158 | 158 | $sql = "SELECT * FROM $table_posts posts |
159 | 159 | LEFT JOIN $table_users users |
160 | 160 | ON posts.poster_id=users.user_id |
@@ -169,16 +169,16 @@ discard block |
||
169 | 169 | AND posts.visible='1' |
170 | 170 | ORDER BY posts.post_id ASC"; |
171 | 171 | } |
172 | - $result=Database::query($sql); |
|
173 | - while ($row=Database::fetch_array($result)) { |
|
174 | - $posts_info[]=$row; |
|
172 | + $result = Database::query($sql); |
|
173 | + while ($row = Database::fetch_array($result)) { |
|
174 | + $posts_info[] = $row; |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | $posts_id = '#'; |
178 | 178 | |
179 | 179 | foreach ($posts_info as $post) |
180 | 180 | { |
181 | - if( isset($post['post_id'])) |
|
181 | + if (isset($post['post_id'])) |
|
182 | 182 | { |
183 | 183 | $posts_id .= $post['post_id']."#"; |
184 | 184 | } |
@@ -190,16 +190,16 @@ discard block |
||
190 | 190 | |
191 | 191 | public function get_post_data($username, $password, $course_code, $post_id, $field) |
192 | 192 | { |
193 | - if($this->verifyUserPass($username, $password) == "valid") |
|
193 | + if ($this->verifyUserPass($username, $password) == "valid") |
|
194 | 194 | { |
195 | 195 | $course_db = CourseManager::get_course_information($course_code); |
196 | 196 | |
197 | 197 | $table_posts = Database :: get_course_table(TABLE_FORUM_POST, $course_db['db_name']); |
198 | 198 | $table_users = Database :: get_main_table(TABLE_MAIN_USER); |
199 | 199 | |
200 | - $sql="SELECT * FROM ".$table_posts."posts, ".$table_users." users WHERE posts.poster_id=users.user_id AND posts.post_id='".Database::escape_string($post_id)."'"; |
|
201 | - $result=Database::query($sql); |
|
202 | - $post_info =Database::fetch_array($result); |
|
200 | + $sql = "SELECT * FROM ".$table_posts."posts, ".$table_users." users WHERE posts.poster_id=users.user_id AND posts.post_id='".Database::escape_string($post_id)."'"; |
|
201 | + $result = Database::query($sql); |
|
202 | + $post_info = Database::fetch_array($result); |
|
203 | 203 | |
204 | 204 | $htmlcode = false; |
205 | 205 | switch ($field) |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | |
233 | 233 | public function send_post($username, $password, $course_code, $forum_id, $thread_id, $title, $content) |
234 | 234 | { |
235 | - if($this->verifyUserPass($username, $password) == "valid") |
|
235 | + if ($this->verifyUserPass($username, $password) == "valid") |
|
236 | 236 | { |
237 | 237 | $em = Database::getManager(); |
238 | 238 | $course_db = CourseManager::get_course_information($course_code); |
@@ -241,9 +241,9 @@ discard block |
||
241 | 241 | $table_threads = Database :: get_course_table(TABLE_FORUM_THREAD, $course_db['db_name']); |
242 | 242 | $forum_table_attachment = Database :: get_course_table(TABLE_FORUM_ATTACHMENT, $course_db['db_name']); |
243 | 243 | $table_posts = Database :: get_course_table(TABLE_FORUM_POST, $course_db['db_name']); |
244 | - $post_date=date('Y-m-d H:i:s'); |
|
245 | - $visible=1; |
|
246 | - $has_attachment=false; |
|
244 | + $post_date = date('Y-m-d H:i:s'); |
|
245 | + $visible = 1; |
|
246 | + $has_attachment = false; |
|
247 | 247 | $my_post = ''; |
248 | 248 | $post_notification = ''; |
249 | 249 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $indent = $post['indent_cnt']; |
57 | 57 | |
58 | 58 | $html = ''; |
59 | - $html .= '<div class="col-md-offset-' . $indent . '" >'; |
|
59 | + $html .= '<div class="col-md-offset-'.$indent.'" >'; |
|
60 | 60 | $html .= '<div class="panel panel-default forum-post">'; |
61 | 61 | $html .= '<div class="panel-body">'; |
62 | 62 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | if ($origin != 'learnpath') { |
75 | 75 | if (api_get_course_setting('allow_user_image_forum')) { |
76 | - $html .= '<div class="thumbnail">' . display_user_image($post['user_id'], $name, $origin) . '</div>'; |
|
76 | + $html .= '<div class="thumbnail">'.display_user_image($post['user_id'], $name, $origin).'</div>'; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | $html .= Display::tag( |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | ); |
84 | 84 | } else { |
85 | 85 | if (api_get_course_setting('allow_user_image_forum')) { |
86 | - $html .= '<div class="thumbnail">' . display_user_image($post['user_id'], $name, $origin) . '</div>'; |
|
86 | + $html .= '<div class="thumbnail">'.display_user_image($post['user_id'], $name, $origin).'</div>'; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | $html .= Display::tag( |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)) |
125 | 125 | ) { |
126 | 126 | if ($locked == false) { |
127 | - $iconEdit .= "<a href=\"editpost.php?" . api_get_cidreq() |
|
127 | + $iconEdit .= "<a href=\"editpost.php?".api_get_cidreq() |
|
128 | 128 | . "&forum=$clean_forum_id&thread=$clean_thread_id&post={$post['post_id']}&id_attach=$id_attach" |
129 | 129 | . "\">" |
130 | 130 | . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | !(api_is_course_coach() && $current_forum['session_id'] != $sessionId) |
139 | 139 | ) { |
140 | 140 | if ($locked == false) { |
141 | - $deleteUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
141 | + $deleteUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
142 | 142 | 'forum' => $clean_forum_id, |
143 | 143 | 'thread' => $clean_thread_id, |
144 | 144 | 'action' => 'delete', |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | ); |
177 | 177 | |
178 | 178 | if ($count > 0) { |
179 | - $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq() |
|
179 | + $iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq() |
|
180 | 180 | . "&forum=$clean_forum_id&thread=$clean_thread_id&action=move&origin=$origin&post={$post['post_id']}" |
181 | - . "\">" . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) . "</a>"; |
|
181 | + . "\">".Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL)."</a>"; |
|
182 | 182 | } |
183 | 183 | } |
184 | 184 | |
@@ -197,11 +197,11 @@ discard block |
||
197 | 197 | '1', $post['user_id'], $_GET['thread'] |
198 | 198 | ); |
199 | 199 | if ($locked == false) { |
200 | - $iconEdit .= "<a href=\"forumqualify.php?" . api_get_cidreq() |
|
200 | + $iconEdit .= "<a href=\"forumqualify.php?".api_get_cidreq() |
|
201 | 201 | . "&forum=$clean_forum_id&thread=$clean_thread_id&action=list&post={$post['post_id']}" |
202 | 202 | . "&user={$post['user_id']}&user_id={$post['user_id']}&origin=$origin" |
203 | 203 | . "&idtextqualify=$current_qualify_thread" |
204 | - . "\" >" . Display::return_icon('quiz.gif', get_lang('Qualify')) . "</a>"; |
|
204 | + . "\" >".Display::return_icon('quiz.gif', get_lang('Qualify'))."</a>"; |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $statusIcon = getPostStatus($current_forum, $post); |
210 | 210 | |
211 | 211 | if ($iconEdit != '') { |
212 | - $html .= '<div class="tools-icons">' . $iconEdit . ' '.$statusIcon.'</div>'; |
|
212 | + $html .= '<div class="tools-icons">'.$iconEdit.' '.$statusIcon.'</div>'; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | if (($current_forum_category && $current_forum_category['locked'] == 0) && |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) { |
220 | 220 | $buttonReply = Display::toolbarButton( |
221 | 221 | get_lang('ReplyToMessage'), |
222 | - 'reply.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
222 | + 'reply.php?'.api_get_cidreq().'&'.http_build_query([ |
|
223 | 223 | 'forum' => $clean_forum_id, |
224 | 224 | 'thread' => $clean_thread_id, |
225 | 225 | 'post' => $post['post_id'], |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | |
233 | 233 | $buttonQuote = Display::toolbarButton( |
234 | 234 | get_lang('QuoteMessage'), |
235 | - 'reply.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
235 | + 'reply.php?'.api_get_cidreq().'&'.http_build_query([ |
|
236 | 236 | 'forum' => $clean_forum_id, |
237 | 237 | 'thread' => $clean_thread_id, |
238 | 238 | 'post' => $post['post_id'], |
@@ -248,21 +248,21 @@ discard block |
||
248 | 248 | if ($current_forum_category && $current_forum_category['locked'] == 1) { |
249 | 249 | $closedPost = Display::tag( |
250 | 250 | 'div', |
251 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumcategoryLocked'), |
|
251 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumcategoryLocked'), |
|
252 | 252 | array('class' => 'alert alert-warning post-closed') |
253 | 253 | ); |
254 | 254 | } |
255 | 255 | if ($current_forum['locked'] == 1) { |
256 | 256 | $closedPost = Display::tag( |
257 | 257 | 'div', |
258 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumLocked'), |
|
258 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumLocked'), |
|
259 | 259 | array('class' => 'alert alert-warning post-closed') |
260 | 260 | ); |
261 | 261 | } |
262 | 262 | if ($current_thread['locked'] == 1) { |
263 | 263 | $closedPost = Display::tag( |
264 | 264 | 'div', |
265 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ThreadLocked'), |
|
265 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ThreadLocked'), |
|
266 | 266 | array('class' => 'alert alert-warning post-closed') |
267 | 267 | ); |
268 | 268 | } |
@@ -314,24 +314,24 @@ discard block |
||
314 | 314 | $html .= Display::return_icon('attachment.gif', get_lang('Attachment')); |
315 | 315 | $html .= '<a href="download.php?file='; |
316 | 316 | $html .= $realname; |
317 | - $html .= ' "> ' . $user_filename . ' </a>'; |
|
318 | - $html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>'; |
|
317 | + $html .= ' "> '.$user_filename.' </a>'; |
|
318 | + $html .= '<span class="forum_attach_comment" >'.$attachment['comment'].'</span>'; |
|
319 | 319 | if (($current_forum['allow_edit'] == 1 && $post['user_id'] == $userId) || |
320 | 320 | (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)) |
321 | 321 | ) { |
322 | - $html .= ' <a href="' . api_get_self() . '?' . api_get_cidreq() . '&origin=' |
|
323 | - . Security::remove_XSS($_GET['origin']) . '&action=delete_attach&id_attach=' |
|
324 | - . $attachment['iid'] . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id |
|
322 | + $html .= ' <a href="'.api_get_self().'?'.api_get_cidreq().'&origin=' |
|
323 | + . Security::remove_XSS($_GET['origin']).'&action=delete_attach&id_attach=' |
|
324 | + . $attachment['iid'].'&forum='.$clean_forum_id.'&thread='.$clean_thread_id |
|
325 | 325 | . '" onclick="javascript:if(!confirm(\'' |
326 | - . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)) . '\')) return false;">' |
|
327 | - . Display::return_icon('delete.gif', get_lang('Delete')) . '</a><br />'; |
|
326 | + . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)).'\')) return false;">' |
|
327 | + . Display::return_icon('delete.gif', get_lang('Delete')).'</a><br />'; |
|
328 | 328 | } |
329 | 329 | } |
330 | 330 | } |
331 | 331 | |
332 | 332 | $html .= '</div>'; |
333 | 333 | $html .= '<div class="col-md-6 text-right">'; |
334 | - $html .= $buttonReply . ' ' . $buttonQuote; |
|
334 | + $html .= $buttonReply.' '.$buttonQuote; |
|
335 | 335 | $html .= '</div>'; |
336 | 336 | $html .= '</div>'; |
337 | 337 | // The post has been displayed => it can be removed from the what's new array |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) { |
65 | 65 | $buttonReply = Display::toolbarButton( |
66 | 66 | get_lang('ReplyToMessage'), |
67 | - 'reply.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
67 | + 'reply.php?'.api_get_cidreq().'&'.http_build_query([ |
|
68 | 68 | 'forum' => $clean_forum_id, |
69 | 69 | 'thread' => $clean_thread_id, |
70 | 70 | 'post' => $row['post_id'], |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | $buttonQuote = Display::toolbarButton( |
79 | 79 | get_lang('QuoteMessage'), |
80 | - 'reply.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
80 | + 'reply.php?'.api_get_cidreq().'&'.http_build_query([ |
|
81 | 81 | 'forum' => $clean_forum_id, |
82 | 82 | 'thread' => $clean_thread_id, |
83 | 83 | 'post' => $row['post_id'], |
@@ -94,21 +94,21 @@ discard block |
||
94 | 94 | if (($current_forum_category && $current_forum_category['locked'] == 1)) { |
95 | 95 | $closedPost = Display::tag( |
96 | 96 | 'div', |
97 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumcategoryLocked'), |
|
97 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumcategoryLocked'), |
|
98 | 98 | array('class' => 'alert alert-warning post-closed') |
99 | 99 | ); |
100 | 100 | } |
101 | 101 | if ($current_forum['locked'] == 1) { |
102 | 102 | $closedPost = Display::tag( |
103 | 103 | 'div', |
104 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumLocked'), |
|
104 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumLocked'), |
|
105 | 105 | array('class' => 'alert alert-warning post-closed') |
106 | 106 | ); |
107 | 107 | } |
108 | 108 | if ($current_thread['locked'] == 1) { |
109 | 109 | $closedPost = Display::tag( |
110 | 110 | 'div', |
111 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ThreadLocked'), |
|
111 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ThreadLocked'), |
|
112 | 112 | array('class' => 'alert alert-warning post-closed') |
113 | 113 | ); |
114 | 114 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | if ($origin != 'learnpath') { |
125 | 125 | if (api_get_course_setting('allow_user_image_forum')) { |
126 | - $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>'; |
|
126 | + $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name, $origin).'</div>'; |
|
127 | 127 | } |
128 | 128 | $html .= Display::tag( |
129 | 129 | 'h4', |
@@ -132,9 +132,9 @@ discard block |
||
132 | 132 | ); |
133 | 133 | } else { |
134 | 134 | if (api_get_course_setting('allow_user_image_forum')) { |
135 | - $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>'; |
|
135 | + $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name, $origin).'</div>'; |
|
136 | 136 | } |
137 | - $name = Display::tag('strong', "#" . $postCount--, ['class' => 'text-info']) . " | $name"; |
|
137 | + $name = Display::tag('strong', "#".$postCount--, ['class' => 'text-info'])." | $name"; |
|
138 | 138 | $html .= Display::tag( |
139 | 139 | 'p', |
140 | 140 | $name, |
@@ -176,10 +176,10 @@ discard block |
||
176 | 176 | ) { |
177 | 177 | if (api_is_allowed_to_session_edit(false, true)) { |
178 | 178 | if ($locked == false) { |
179 | - $iconEdit .= "<a href=\"editpost.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id |
|
180 | - . "&thread=" . $clean_thread_id . "&post=" . $row['post_id'] . "&origin=" |
|
181 | - . $origin . "&edit=edition&id_attach=" . $id_attach . "\">" |
|
182 | - . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . "</a>"; |
|
179 | + $iconEdit .= "<a href=\"editpost.php?".api_get_cidreq()."&forum=".$clean_forum_id |
|
180 | + . "&thread=".$clean_thread_id."&post=".$row['post_id']."&origin=" |
|
181 | + . $origin."&edit=edition&id_attach=".$id_attach."\">" |
|
182 | + . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)."</a>"; |
|
183 | 183 | } |
184 | 184 | } |
185 | 185 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | ) { |
192 | 192 | |
193 | 193 | if ($locked == false) { |
194 | - $deleteUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
194 | + $deleteUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
195 | 195 | 'forum' => $clean_forum_id, |
196 | 196 | 'thread' => $clean_thread_id, |
197 | 197 | 'action' => 'delete', |
@@ -227,9 +227,9 @@ discard block |
||
227 | 227 | ); |
228 | 228 | $iconEdit .= ""; |
229 | 229 | if ($increment > 0) { |
230 | - $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id |
|
231 | - . "&thread=" . $clean_thread_id . "&action=move&post=" . $row['post_id'] |
|
232 | - . "&origin=" . $origin . "\">" |
|
230 | + $iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq()."&forum=".$clean_forum_id |
|
231 | + . "&thread=".$clean_thread_id."&action=move&post=".$row['post_id'] |
|
232 | + . "&origin=".$origin."\">" |
|
233 | 233 | . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) |
234 | 234 | . "</a>"; |
235 | 235 | } |
@@ -256,16 +256,16 @@ discard block |
||
256 | 256 | $userCanEdit = true; |
257 | 257 | } |
258 | 258 | if ($increment > 0 && $locked == false && $userCanEdit) { |
259 | - $iconEdit .= "<a href=\"forumqualify.php?" . api_get_cidreq() . "&forum=" . $my_forum_id |
|
260 | - . "&thread=" . $clean_thread_id . "&action=list&post=" . $row['post_id'] |
|
261 | - . "&user=" . $row['poster_id'] . "&user_id=" . $row['poster_id'] |
|
262 | - . "&origin=" . $origin . "&idtextqualify=" . $current_qualify_thread . "\" >" |
|
259 | + $iconEdit .= "<a href=\"forumqualify.php?".api_get_cidreq()."&forum=".$my_forum_id |
|
260 | + . "&thread=".$clean_thread_id."&action=list&post=".$row['post_id'] |
|
261 | + . "&user=".$row['poster_id']."&user_id=".$row['poster_id'] |
|
262 | + . "&origin=".$origin."&idtextqualify=".$current_qualify_thread."\" >" |
|
263 | 263 | . Display::return_icon('quiz.gif', get_lang('Qualify')) |
264 | 264 | . "</a> "; |
265 | 265 | } |
266 | 266 | } |
267 | 267 | if ($iconEdit != '') { |
268 | - $html .= '<div class="tools-icons">' . $iconEdit . $statusIcon.'</div>'; |
|
268 | + $html .= '<div class="tools-icons">'.$iconEdit.$statusIcon.'</div>'; |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | |
@@ -327,27 +327,27 @@ discard block |
||
327 | 327 | $realname = $attachment['path']; |
328 | 328 | $user_filename = $attachment['filename']; |
329 | 329 | $html .= Display::return_icon('attachment.gif', get_lang('Attachment')); |
330 | - $html .= '<a href="download.php?file=' . $realname . '"> ' . $user_filename . ' </a>'; |
|
330 | + $html .= '<a href="download.php?file='.$realname.'"> '.$user_filename.' </a>'; |
|
331 | 331 | |
332 | 332 | if (($current_forum['allow_edit'] == 1 && $row['user_id'] == $_user['user_id']) || |
333 | 333 | (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)) |
334 | 334 | ) { |
335 | - $html .= ' <a href="' . api_get_self() . '?' . api_get_cidreq() . '&origin=' |
|
336 | - . Security::remove_XSS($origin) . '&action=delete_attach&id_attach=' |
|
337 | - . $attachment['iid'] . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id |
|
335 | + $html .= ' <a href="'.api_get_self().'?'.api_get_cidreq().'&origin=' |
|
336 | + . Security::remove_XSS($origin).'&action=delete_attach&id_attach=' |
|
337 | + . $attachment['iid'].'&forum='.$clean_forum_id.'&thread='.$clean_thread_id |
|
338 | 338 | . '" onclick="javascript:if(!confirm(\'' |
339 | 339 | . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)) |
340 | 340 | . '\')) return false;">' |
341 | 341 | . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) |
342 | 342 | . '</a><br />'; |
343 | 343 | } |
344 | - $html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>'; |
|
344 | + $html .= '<span class="forum_attach_comment" >'.$attachment['comment'].'</span>'; |
|
345 | 345 | } |
346 | 346 | } |
347 | 347 | |
348 | 348 | $html .= '</div>'; |
349 | 349 | $html .= '<div class="col-md-5 text-right">'; |
350 | - $html .= $buttonReply . ' ' . $buttonQuote; |
|
350 | + $html .= $buttonReply.' '.$buttonQuote; |
|
351 | 351 | $html .= '</div>'; |
352 | 352 | $html .= '</div>'; |
353 | 353 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $iso = api_get_language_isocode(api_get_interface_language()); |
26 | 26 | $languageCondition = ''; |
27 | 27 | |
28 | - if (file_exists(api_get_path(SYS_PATH) . "web/assets/select2/dist/js/i18n/$iso.js")) { |
|
28 | + if (file_exists(api_get_path(SYS_PATH)."web/assets/select2/dist/js/i18n/$iso.js")) { |
|
29 | 29 | $html .= api_get_asset("select2/dist/js/i18n/$iso.js"); |
30 | 30 | $languageCondition = "language: '$iso',"; |
31 | 31 | } |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | //Get the minimumInputLength for select2 |
52 | 52 | $minimumInputLength = $this->getAttribute('minimumInputLength') > 3 ? |
53 | - $this->getAttribute('minimumInputLength') : |
|
54 | - 3 |
|
53 | + $this->getAttribute('minimumInputLength') : 3 |
|
55 | 54 | ; |
56 | 55 | |
57 | 56 | $plHolder = $this->getAttribute('placeholder'); |
@@ -81,7 +80,7 @@ discard block |
||
81 | 80 | $multiple = $multiple ? 'true' : 'false'; |
82 | 81 | |
83 | 82 | $max = $this->getAttribute('maximumSelectionLength'); |
84 | - $max = !empty($max) ? "maximumSelectionLength: $max, ": ''; |
|
83 | + $max = !empty($max) ? "maximumSelectionLength: $max, " : ''; |
|
85 | 84 | |
86 | 85 | $html .= <<<JS |
87 | 86 | <script> |
@@ -125,7 +124,7 @@ discard block |
||
125 | 124 | $this->removeAttribute('url_function'); |
126 | 125 | $this->setAttribute('style', 'width: 100%;'); |
127 | 126 | |
128 | - return parent::toHtml() . $html; |
|
127 | + return parent::toHtml().$html; |
|
129 | 128 | } |
130 | 129 | |
131 | 130 | /** |
@@ -20,37 +20,37 @@ discard block |
||
20 | 20 | if (api_is_allowed_to_edit(null, true)) { |
21 | 21 | $header = '<div class="actions">'; |
22 | 22 | if ($page != 'statistics') { |
23 | - $header .= '<a href="' . Security::remove_XSS($_SESSION['gradebook_dest']) . '?selectcat=' . $selectcat . '&'.api_get_cidreq().'">' . |
|
24 | - Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
23 | + $header .= '<a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).'?selectcat='.$selectcat.'&'.api_get_cidreq().'">'. |
|
24 | + Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
25 | 25 | if ($evalobj->get_course_code() == null) { |
26 | 26 | |
27 | 27 | } elseif (!$evalobj->has_results()) { |
28 | - $header .= '<a href="gradebook_add_result.php?'.api_get_cidreq().'&selectcat=' . $selectcat . '&selecteval=' . $evalobj->get_id() . '"> |
|
29 | - ' . Display::return_icon('evaluation_rate.png', get_lang('AddResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
28 | + $header .= '<a href="gradebook_add_result.php?'.api_get_cidreq().'&selectcat='.$selectcat.'&selecteval='.$evalobj->get_id().'"> |
|
29 | + ' . Display::return_icon('evaluation_rate.png', get_lang('AddResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | if (api_is_platform_admin() || $evalobj->is_locked() == false) { |
33 | - $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '&import=">' . |
|
34 | - Display::return_icon('import_evaluation.png', get_lang('ImportResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
33 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'&import=">'. |
|
34 | + Display::return_icon('import_evaluation.png', get_lang('ImportResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | if ($evalobj->has_results()) { |
38 | - $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '&export=">' . |
|
39 | - Display::return_icon('export_evaluation.png', get_lang('ExportResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
38 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'&export=">'. |
|
39 | + Display::return_icon('export_evaluation.png', get_lang('ExportResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
40 | 40 | |
41 | 41 | if (api_is_platform_admin() || $evalobj->is_locked() == false) { |
42 | - $header .= '<a href="gradebook_edit_result.php?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '">' . |
|
43 | - Display::return_icon('edit.png', get_lang('EditResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
44 | - $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '&deleteall=" onclick="return confirmationall();">' . |
|
45 | - Display::return_icon('delete.png', get_lang('DeleteResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
42 | + $header .= '<a href="gradebook_edit_result.php?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'">'. |
|
43 | + Display::return_icon('edit.png', get_lang('EditResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
44 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'&deleteall=" onclick="return confirmationall();">'. |
|
45 | + Display::return_icon('delete.png', get_lang('DeleteResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | |
49 | - $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&print=&selecteval=' . $evalobj->get_id() . '" target="_blank">' . |
|
50 | - Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
49 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&print=&selecteval='.$evalobj->get_id().'" target="_blank">'. |
|
50 | + Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
51 | 51 | } else { |
52 | - $header .= '<a href="gradebook_view_result.php?'.api_get_cidreq().'&selecteval=' . Security::remove_XSS($_GET['selecteval']) . '"> ' . |
|
53 | - Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
52 | + $header .= '<a href="gradebook_view_result.php?'.api_get_cidreq().'&selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '. |
|
53 | + Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
54 | 54 | } |
55 | 55 | $header .= '</div>'; |
56 | 56 | } |
@@ -69,17 +69,17 @@ discard block |
||
69 | 69 | $score = $evalobj->calc_score(); |
70 | 70 | |
71 | 71 | if ($score != null) { |
72 | - $average = get_lang('Average') . ' :<b> ' . $scoredisplay->display_score($score, SCORE_AVERAGE) . '</b>'; |
|
72 | + $average = get_lang('Average').' :<b> '.$scoredisplay->display_score($score, SCORE_AVERAGE).'</b>'; |
|
73 | 73 | $student_score = $evalobj->calc_score(api_get_user_id()); |
74 | 74 | $student_score = Display::tag( |
75 | 75 | 'h3', |
76 | - get_lang('Score') . ': ' . $scoredisplay->display_score($student_score, SCORE_DIV_PERCENT) |
|
76 | + get_lang('Score').': '.$scoredisplay->display_score($student_score, SCORE_DIV_PERCENT) |
|
77 | 77 | ); |
78 | 78 | } |
79 | 79 | } |
80 | 80 | $description = ""; |
81 | 81 | if (!$evalobj->get_description() == '') { |
82 | - $description = get_lang('Description') . ' :<b> ' . $evalobj->get_description() . '</b><br>'; |
|
82 | + $description = get_lang('Description').' :<b> '.$evalobj->get_description().'</b><br>'; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | if ($evalobj->get_course_code() == null) { |
@@ -89,17 +89,17 @@ discard block |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | $evalinfo = '<table width="100%" border="0"><tr><td>'; |
92 | - $evalinfo .= '<h2>' . $evalobj->get_name() . '</h2><hr>'; |
|
92 | + $evalinfo .= '<h2>'.$evalobj->get_name().'</h2><hr>'; |
|
93 | 93 | $evalinfo .= $description; |
94 | - $evalinfo .= get_lang('Course') . ' :<b> ' . $course . '</b><br />'; |
|
95 | - $evalinfo .= get_lang('QualificationNumeric') . ' :<b> ' . $evalobj->get_max() . '</b><br>' . $average; |
|
94 | + $evalinfo .= get_lang('Course').' :<b> '.$course.'</b><br />'; |
|
95 | + $evalinfo .= get_lang('QualificationNumeric').' :<b> '.$evalobj->get_max().'</b><br>'.$average; |
|
96 | 96 | |
97 | 97 | if (!api_is_allowed_to_edit()) { |
98 | 98 | $evalinfo .= $student_score; |
99 | 99 | } |
100 | 100 | |
101 | 101 | if (!$evalobj->has_results()) { |
102 | - $evalinfo .= '<br /><i>' . get_lang('NoResultsInEvaluation') . '</i>'; |
|
102 | + $evalinfo .= '<br /><i>'.get_lang('NoResultsInEvaluation').'</i>'; |
|
103 | 103 | } elseif ($scoredisplay->is_custom() && api_get_self() != '/main/gradebook/gradebook_statistics.php') { |
104 | 104 | if (api_is_allowed_to_edit(null, true)) { |
105 | 105 | if ($page != 'statistics') { |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | } |
110 | 110 | if ($page != 'statistics') { |
111 | 111 | if (api_is_allowed_to_edit(null, true)) { |
112 | - $evalinfo .= '<br /><a href="gradebook_statistics.php?' . api_get_cidreq() . '&selecteval=' . Security::remove_XSS($_GET['selecteval']) . '"> ' . |
|
113 | - Display::return_icon('statistics.png', get_lang('ViewStatistics'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
112 | + $evalinfo .= '<br /><a href="gradebook_statistics.php?'.api_get_cidreq().'&selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '. |
|
113 | + Display::return_icon('statistics.png', get_lang('ViewStatistics'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | $evalinfo .= '</td><td>'.Display::return_icon('tutorial.gif', '', ['style' => 'float:right; position:relative;']).'</td></table>'; |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | public function display_header_flatview($catobj, $showeval, $showlink, $simple_search_form) |
128 | 128 | { |
129 | 129 | $header = '<table border="0" cellpadding="5">'; |
130 | - $header .= '<td style="vertical-align: top;"><a href="' . Security::remove_XSS($_SESSION['gradebook_dest']) . '?selectcat=' . Security::remove_XSS($_GET['selectcat']) . '">' . Display::return_icon('gradebook.gif') . get_lang('Gradebook') . '</a></td>'; |
|
131 | - $header .= '<td style="vertical-align: top;">' . get_lang('FilterCategory') . '</td><td style="vertical-align: top;"><form name="selector"><select name="selectcat" onchange="document.selector.submit()">'; |
|
130 | + $header .= '<td style="vertical-align: top;"><a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).'?selectcat='.Security::remove_XSS($_GET['selectcat']).'">'.Display::return_icon('gradebook.gif').get_lang('Gradebook').'</a></td>'; |
|
131 | + $header .= '<td style="vertical-align: top;">'.get_lang('FilterCategory').'</td><td style="vertical-align: top;"><form name="selector"><select name="selectcat" onchange="document.selector.submit()">'; |
|
132 | 132 | $cats = Category :: load(); |
133 | 133 | $tree = $cats[0]->get_tree(); |
134 | 134 | unset($cats); |
@@ -137,35 +137,35 @@ discard block |
||
137 | 137 | $line .= '—'; |
138 | 138 | } |
139 | 139 | if ($_GET['selectcat'] == $cat[0]) { |
140 | - $header .= '<option selected="selected" value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
140 | + $header .= '<option selected="selected" value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
|
141 | 141 | } else { |
142 | - $header .= '<option value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
142 | + $header .= '<option value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
|
143 | 143 | } |
144 | 144 | $line = ''; |
145 | 145 | } |
146 | 146 | $header .= '</td></select></form>'; |
147 | 147 | if (!$catobj->get_id() == '0') { |
148 | - $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">'; |
|
148 | + $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?selectcat='.$catobj->get_parent_id().'">'; |
|
149 | 149 | $header .= Display::return_icon('gradebook.gif', get_lang('Up')); |
150 | 150 | $header .= '</a></td>'; |
151 | 151 | } |
152 | - $header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</td>'; |
|
152 | + $header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>'; |
|
153 | 153 | $header .= '<td style="vertical-align: top;"> |
154 | - <a href="' . api_get_self() . '?exportpdf=&offset=' . Security::remove_XSS($_GET['offset']) . '&search=' . Security::remove_XSS($_GET['search']) . '&selectcat=' . $catobj->get_id() . '"> |
|
154 | + <a href="' . api_get_self().'?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search='.Security::remove_XSS($_GET['search']).'&selectcat='.$catobj->get_id().'"> |
|
155 | 155 | '.Display::return_icon('pdf.png', get_lang('ExportPDF'), [], ICON_SIZE_MEDIUM).' |
156 | - ' . get_lang('ExportPDF') . '</a>'; |
|
156 | + ' . get_lang('ExportPDF').'</a>'; |
|
157 | 157 | $header .= '<td style="vertical-align: top;"> |
158 | - <a href="' . api_get_self() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank"> |
|
158 | + <a href="' . api_get_self().'?print=&selectcat='.$catobj->get_id().'" target="_blank"> |
|
159 | 159 | '.Display::return_icon('printer.png', get_lang('Print'), [], ICON_SIZE_MEDIUM).' |
160 | - ' . get_lang('Print') . '</a>'; |
|
160 | + ' . get_lang('Print').'</a>'; |
|
161 | 161 | $header .= '</td></tr></table>'; |
162 | 162 | if (!$catobj->get_id() == '0') { |
163 | - $header .= '<table border="0" cellpadding="5"><tr><td><form name="itemfilter" method="post" action="' . api_get_self() . '?selectcat=' . $catobj->get_id() . '"> |
|
164 | - <input type="checkbox" name="showeval" onclick="document.itemfilter.submit()" ' . (($showeval == '1') ? 'checked' : '') . '>Show Evaluations '; |
|
165 | - $header .= '<input type="checkbox" name="showlink" onclick="document.itemfilter.submit()" ' . (($showlink == '1') ? 'checked' : '') . '>' . get_lang('ShowLinks') . '</form></td></tr></table>'; |
|
163 | + $header .= '<table border="0" cellpadding="5"><tr><td><form name="itemfilter" method="post" action="'.api_get_self().'?selectcat='.$catobj->get_id().'"> |
|
164 | + <input type="checkbox" name="showeval" onclick="document.itemfilter.submit()" ' . (($showeval == '1') ? 'checked' : '').'>Show Evaluations '; |
|
165 | + $header .= '<input type="checkbox" name="showlink" onclick="document.itemfilter.submit()" '.(($showlink == '1') ? 'checked' : '').'>'.get_lang('ShowLinks').'</form></td></tr></table>'; |
|
166 | 166 | } |
167 | 167 | if (isset($_GET['search'])) { |
168 | - $header .= '<b>' . get_lang('SearchResults') . ' :</b>'; |
|
168 | + $header .= '<b>'.get_lang('SearchResults').' :</b>'; |
|
169 | 169 | } |
170 | 170 | echo $header; |
171 | 171 | } |
@@ -186,14 +186,14 @@ discard block |
||
186 | 186 | $select_cat = $catobj->get_parent_id(); |
187 | 187 | $url = 'gradebook_flatview.php'; |
188 | 188 | } |
189 | - $header .= '<a href="' . $url . '?' . api_get_cidreq() . '&selectcat=' . $select_cat . '">' . |
|
190 | - Display::return_icon('back.png', get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
189 | + $header .= '<a href="'.$url.'?'.api_get_cidreq().'&selectcat='.$select_cat.'">'. |
|
190 | + Display::return_icon('back.png', get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
191 | 191 | |
192 | 192 | $pageNum = isset($_GET['flatviewlist_page_nr']) ? intval($_GET['flatviewlist_page_nr']) : null; |
193 | 193 | $perPage = isset($_GET['flatviewlist_per_page']) ? intval($_GET['flatviewlist_per_page']) : null; |
194 | 194 | $offset = isset($_GET['offset']) ? $_GET['offset'] : '0'; |
195 | 195 | |
196 | - $exportCsvUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
196 | + $exportCsvUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
197 | 197 | 'export_format' => 'csv', |
198 | 198 | 'export_report' => 'export_report', |
199 | 199 | 'selectcat' => $catobj->get_id() |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $exportCsvUrl |
205 | 205 | ); |
206 | 206 | |
207 | - $exportXlsUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
207 | + $exportXlsUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
208 | 208 | 'export_format' => 'xls', |
209 | 209 | 'export_report' => 'export_report', |
210 | 210 | 'selectcat' => $catobj->get_id() |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $exportXlsUrl |
216 | 216 | ); |
217 | 217 | |
218 | - $exportDocUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
218 | + $exportDocUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
219 | 219 | 'export_format' => 'doc', |
220 | 220 | 'export_report' => 'export_report', |
221 | 221 | 'selectcat' => $catobj->get_id() |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $exportDocUrl |
227 | 227 | ); |
228 | 228 | |
229 | - $exportPrintUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
229 | + $exportPrintUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
230 | 230 | 'print' => '', |
231 | 231 | 'selectcat' => $catobj->get_id(), |
232 | 232 | ]); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | ['target' => '_blank'] |
238 | 238 | ); |
239 | 239 | |
240 | - $exportPdfUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
240 | + $exportPdfUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
241 | 241 | 'exportpdf' => '', |
242 | 242 | 'selectcat' => $catobj->get_id(), |
243 | 243 | 'offset' => $offset, |
@@ -290,8 +290,8 @@ discard block |
||
290 | 290 | $item = $evals_links[$count]; |
291 | 291 | $score = $item->calc_score($user_id); |
292 | 292 | $my_score_denom = ($score[1] == 0) ? 1 : $score[1]; |
293 | - $item_value+=$score[0] / $my_score_denom * $item->get_weight(); |
|
294 | - $item_total+=$item->get_weight(); |
|
293 | + $item_value += $score[0] / $my_score_denom * $item->get_weight(); |
|
294 | + $item_total += $item->get_weight(); |
|
295 | 295 | } |
296 | 296 | $item_value = number_format($item_value, 2, '.', ' '); |
297 | 297 | $total_score = array($item_value, $item_total); |
@@ -300,9 +300,9 @@ discard block |
||
300 | 300 | $cattotal = Category :: load(0); |
301 | 301 | $scoretotal = $cattotal[0]->calc_score(api_get_user_id()); |
302 | 302 | $scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal, SCORE_PERCENT) : get_lang('NoResultsAvailable')); |
303 | - $scoreinfo = get_lang('StatsStudent') . ' :<b> ' . api_get_person_name($user['firstname'], $user['lastname']) . '</b><br />'; |
|
303 | + $scoreinfo = get_lang('StatsStudent').' :<b> '.api_get_person_name($user['firstname'], $user['lastname']).'</b><br />'; |
|
304 | 304 | if ((!$catobj->get_id() == '0') && (!isset($_GET['studentoverview'])) && (!isset($_GET['search']))) { |
305 | - $scoreinfo.= '<h2>' . get_lang('Total') . ' : ' . $scorecourse_display . '</h2>'; |
|
305 | + $scoreinfo .= '<h2>'.get_lang('Total').' : '.$scorecourse_display.'</h2>'; |
|
306 | 306 | } |
307 | 307 | Display :: display_normal_message($scoreinfo, false); |
308 | 308 | } |
@@ -312,9 +312,9 @@ discard block |
||
312 | 312 | if (($showtree == '1') || (isset($_GET['studentoverview']))) { |
313 | 313 | $header .= '<tr>'; |
314 | 314 | if (!$selectcat == '0') { |
315 | - $header .= '<td style=" "><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('RootCat'), '', ICON_SIZE_MEDIUM) . '</a></td>'; |
|
315 | + $header .= '<td style=" "><a href="'.api_get_self().'?selectcat='.$catobj->get_parent_id().'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('RootCat'), '', ICON_SIZE_MEDIUM).'</a></td>'; |
|
316 | 316 | } |
317 | - $header .= '<td style=" ">' . get_lang('CurrentCategory') . '</td>' . |
|
317 | + $header .= '<td style=" ">'.get_lang('CurrentCategory').'</td>'. |
|
318 | 318 | '<td style=" "><form name="selector"><select name="selectcat" onchange="document.selector.submit()">'; |
319 | 319 | $cats = Category :: load(); |
320 | 320 | |
@@ -327,15 +327,15 @@ discard block |
||
327 | 327 | } |
328 | 328 | $line = isset($line) ? $line : ''; |
329 | 329 | if (isset($_GET['selectcat']) && $_GET['selectcat'] == $cat[0]) { |
330 | - $header .= '<option selected value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
330 | + $header .= '<option selected value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
|
331 | 331 | } else { |
332 | - $header .= '<option value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
332 | + $header .= '<option value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
|
333 | 333 | } |
334 | 334 | $line = ''; |
335 | 335 | } |
336 | 336 | $header .= '</select></form></td>'; |
337 | 337 | if (!empty($simple_search_form) && $message_resource === false) { |
338 | - $header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</td>'; |
|
338 | + $header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>'; |
|
339 | 339 | } else { |
340 | 340 | $header .= '<td></td>'; |
341 | 341 | } |
@@ -345,13 +345,13 @@ discard block |
||
345 | 345 | } elseif (!(isset($_GET['studentoverview']))) { |
346 | 346 | |
347 | 347 | } else { |
348 | - $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"> |
|
348 | + $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank"> |
|
349 | 349 | '.Display::return_icon('pdf.png', get_lang('ExportPDF'), [], ICON_SIZE_MEDIUM).' |
350 | - ' . get_lang('ExportPDF') . '</a>'; |
|
350 | + ' . get_lang('ExportPDF').'</a>'; |
|
351 | 351 | } |
352 | 352 | $header .= '</td></tr>'; |
353 | 353 | } |
354 | - $header.='</table></div>'; |
|
354 | + $header .= '</table></div>'; |
|
355 | 355 | |
356 | 356 | // for course admin & platform admin add item buttons are added to the header |
357 | 357 | $header .= '<div class="actions">'; |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | $my_category = $catobj->shows_all_information_an_category($catobj->get_id()); |
372 | 372 | $my_api_cidreq = api_get_cidreq(); |
373 | 373 | if ($my_api_cidreq == '') { |
374 | - $my_api_cidreq = 'cidReq=' . $my_category['course_code']; |
|
374 | + $my_api_cidreq = 'cidReq='.$my_category['course_code']; |
|
375 | 375 | } |
376 | 376 | |
377 | 377 | if (!$message_resource) { |
@@ -380,24 +380,24 @@ discard block |
||
380 | 380 | $my_course_id = api_get_course_id(); |
381 | 381 | $my_file = substr($_SESSION['gradebook_dest'], 0, 5); |
382 | 382 | |
383 | - $header .= '<td style="vertical-align: top;"><a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
384 | - Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
385 | - $header .= '<td style="vertical-align: top;"><a href="gradebook_display_certificate.php?' . $my_api_cidreq . '&cat_id=' . (int) $_GET['selectcat'] . '">' . |
|
386 | - Display::return_icon('certificate_list.png', get_lang('GradebookSeeListOfStudentsCertificates'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
383 | + $header .= '<td style="vertical-align: top;"><a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
384 | + Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
385 | + $header .= '<td style="vertical-align: top;"><a href="gradebook_display_certificate.php?'.$my_api_cidreq.'&cat_id='.(int) $_GET['selectcat'].'">'. |
|
386 | + Display::return_icon('certificate_list.png', get_lang('GradebookSeeListOfStudentsCertificates'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
387 | 387 | |
388 | 388 | $visibility_icon = ($catobj->is_visible() == 0) ? 'invisible' : 'visible'; |
389 | 389 | $visibility_command = ($catobj->is_visible() == 0) ? 'set_visible' : 'set_invisible'; |
390 | 390 | |
391 | 391 | //Right icons |
392 | - $modify_icons = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' . Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
392 | + $modify_icons = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
393 | 393 | if ($catobj->get_name() != api_get_course_id()) { |
394 | - $modify_icons .= ' <a href="' . api_get_self() . '?deletecat=' . $catobj->get_id() . '&selectcat=0&cidReq=' . $catobj->get_course_code() . '" onclick="return confirmation();">' . Display::return_icon('delete.png', get_lang('DeleteAll'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
394 | + $modify_icons .= ' <a href="'.api_get_self().'?deletecat='.$catobj->get_id().'&selectcat=0&cidReq='.$catobj->get_course_code().'" onclick="return confirmation();">'.Display::return_icon('delete.png', get_lang('DeleteAll'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
395 | 395 | } |
396 | 396 | $header .= Display::div($modify_icons, array('class' => 'right')); |
397 | 397 | } |
398 | 398 | } |
399 | 399 | } elseif (isset($_GET['search'])) { |
400 | - $header .= '<b>' . get_lang('SearchResults') . ' :</b>'; |
|
400 | + $header .= '<b>'.get_lang('SearchResults').' :</b>'; |
|
401 | 401 | } |
402 | 402 | $header .= '</div>'; |
403 | 403 | echo $header; |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | $aditionalButtons .= isset($certificateLinkInfo['badge_link']) ? $certificateLinkInfo['badge_link'] : ''; |
510 | 510 | $aditionalButtons .= '</div>'; |
511 | 511 | } |
512 | - $scoreinfo .= '<strong>' . sprintf(get_lang('TotalX'), $scorecourse_display . $aditionalButtons). '</strong>'; |
|
512 | + $scoreinfo .= '<strong>'.sprintf(get_lang('TotalX'), $scorecourse_display.$aditionalButtons).'</strong>'; |
|
513 | 513 | |
514 | 514 | } |
515 | 515 | Display :: display_normal_message($scoreinfo, false); |
@@ -520,10 +520,10 @@ discard block |
||
520 | 520 | $header = '<div class="actions"><table>'; |
521 | 521 | $header .= '<tr>'; |
522 | 522 | if (!$selectcat == '0') { |
523 | - $header .= '<td><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">' . |
|
524 | - Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('RootCat'), '', ICON_SIZE_MEDIUM) . '</a></td>'; |
|
523 | + $header .= '<td><a href="'.api_get_self().'?selectcat='.$catobj->get_parent_id().'">'. |
|
524 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('RootCat'), '', ICON_SIZE_MEDIUM).'</a></td>'; |
|
525 | 525 | } |
526 | - $header .= '<td>' . get_lang('CurrentCategory') . '</td>' . |
|
526 | + $header .= '<td>'.get_lang('CurrentCategory').'</td>'. |
|
527 | 527 | '<td><form name="selector"><select name="selectcat" onchange="document.selector.submit()">'; |
528 | 528 | $cats = Category :: load(); |
529 | 529 | |
@@ -536,15 +536,15 @@ discard block |
||
536 | 536 | } |
537 | 537 | $line = isset($line) ? $line : ''; |
538 | 538 | if (isset($_GET['selectcat']) && $_GET['selectcat'] == $cat[0]) { |
539 | - $header .= '<option selected value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
539 | + $header .= '<option selected value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
|
540 | 540 | } else { |
541 | - $header .= '<option value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
541 | + $header .= '<option value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
|
542 | 542 | } |
543 | 543 | $line = ''; |
544 | 544 | } |
545 | 545 | $header .= '</select></form></td>'; |
546 | 546 | if (!empty($simple_search_form) && $message_resource === false) { |
547 | - $header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</td>'; |
|
547 | + $header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>'; |
|
548 | 548 | } else { |
549 | 549 | $header .= '<td></td>'; |
550 | 550 | } |
@@ -555,9 +555,9 @@ discard block |
||
555 | 555 | } elseif (!(isset($_GET['studentoverview']))) { |
556 | 556 | |
557 | 557 | } else { |
558 | - $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"> |
|
558 | + $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank"> |
|
559 | 559 | '.Display::return_icon('pdf.png', get_lang('ExportPDF'), [], ICON_SIZE_MEDIUM).' |
560 | - ' . get_lang('ExportPDF') . '</a>'; |
|
560 | + ' . get_lang('ExportPDF').'</a>'; |
|
561 | 561 | } |
562 | 562 | $header .= '</td></tr>'; |
563 | 563 | $header .= '</table></div>'; |
@@ -572,33 +572,33 @@ discard block |
||
572 | 572 | |
573 | 573 | if (api_is_allowed_to_edit(null, true)) { |
574 | 574 | if (empty($grade_model_id) || $grade_model_id == -1) { |
575 | - $actionsLeft .= '<a href="gradebook_add_cat.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . |
|
576 | - Display::return_icon('new_folder.png', get_lang('AddGradebook'), array(), ICON_SIZE_MEDIUM) . '</a></td>'; |
|
575 | + $actionsLeft .= '<a href="gradebook_add_cat.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'. |
|
576 | + Display::return_icon('new_folder.png', get_lang('AddGradebook'), array(), ICON_SIZE_MEDIUM).'</a></td>'; |
|
577 | 577 | } |
578 | 578 | if ($selectcat == '0') { |
579 | 579 | |
580 | 580 | } else { |
581 | 581 | $my_category = $catobj->shows_all_information_an_category($catobj->get_id()); |
582 | 582 | if ($my_api_cidreq == '') { |
583 | - $my_api_cidreq = 'cidReq=' . $my_category['course_code']; |
|
583 | + $my_api_cidreq = 'cidReq='.$my_category['course_code']; |
|
584 | 584 | } |
585 | 585 | if ($show_add_link && !$message_resource) { |
586 | - $actionsLeft .= '<a href="gradebook_add_eval.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '" >' . |
|
587 | - Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
586 | + $actionsLeft .= '<a href="gradebook_add_eval.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'" >'. |
|
587 | + Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
588 | 588 | $cats = Category :: load($selectcat); |
589 | 589 | |
590 | 590 | if ($cats[0]->get_course_code() != null && !$message_resource) { |
591 | - $actionsLeft .= '<a href="gradebook_add_link.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
592 | - Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
591 | + $actionsLeft .= '<a href="gradebook_add_link.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
592 | + Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
593 | 593 | } else { |
594 | - $actionsLeft .= '<a href="gradebook_add_link_select_course.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
595 | - Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
594 | + $actionsLeft .= '<a href="gradebook_add_link_select_course.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
595 | + Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
596 | 596 | } |
597 | 597 | } |
598 | 598 | |
599 | 599 | if (!$message_resource) { |
600 | - $actionsLeft .= '<a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
601 | - Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
600 | + $actionsLeft .= '<a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
601 | + Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
602 | 602 | |
603 | 603 | if ($my_category['generate_certificates'] == 1) { |
604 | 604 | $actionsLeft .= Display::url( |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | '', |
609 | 609 | ICON_SIZE_MEDIUM |
610 | 610 | ), |
611 | - "gradebook_display_certificate.php?$my_api_cidreq&cat_id=" . intval($_GET['selectcat']) |
|
611 | + "gradebook_display_certificate.php?$my_api_cidreq&cat_id=".intval($_GET['selectcat']) |
|
612 | 612 | ); |
613 | 613 | } |
614 | 614 | |
@@ -619,30 +619,30 @@ discard block |
||
619 | 619 | '', |
620 | 620 | ICON_SIZE_MEDIUM |
621 | 621 | ), |
622 | - "gradebook_display_summary.php?$my_api_cidreq&selectcat=" . intval($_GET['selectcat']) |
|
622 | + "gradebook_display_summary.php?$my_api_cidreq&selectcat=".intval($_GET['selectcat']) |
|
623 | 623 | ); |
624 | 624 | |
625 | 625 | |
626 | 626 | // Right icons |
627 | - $actionsRight = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' . |
|
628 | - Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
629 | - $actionsRight .= '<a href="../document/document.php?curdirpath=/certificates&' . $my_api_cidreq . '&origin=gradebook&selectcat=' . $catobj->get_id() . '">' . |
|
630 | - Display::return_icon('certificate.png', get_lang('AttachCertificate'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
627 | + $actionsRight = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'. |
|
628 | + Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
629 | + $actionsRight .= '<a href="../document/document.php?curdirpath=/certificates&'.$my_api_cidreq.'&origin=gradebook&selectcat='.$catobj->get_id().'">'. |
|
630 | + Display::return_icon('certificate.png', get_lang('AttachCertificate'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
631 | 631 | |
632 | 632 | if (empty($categories)) { |
633 | - $actionsRight .= '<a href="gradebook_edit_all.php?id_session=' . api_get_session_id() . '&' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
634 | - Display::return_icon('percentage.png', get_lang('EditAllWeights'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
633 | + $actionsRight .= '<a href="gradebook_edit_all.php?id_session='.api_get_session_id().'&'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
634 | + Display::return_icon('percentage.png', get_lang('EditAllWeights'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
635 | 635 | } |
636 | 636 | $score_display_custom = api_get_setting('gradebook_score_display_custom'); |
637 | 637 | if (api_get_setting('teachers_can_change_score_settings') == 'true' && $score_display_custom['my_display_custom'] == 'true') { |
638 | - $actionsRight .= '<a href="gradebook_scoring_system.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
639 | - Display::return_icon('ranking.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
638 | + $actionsRight .= '<a href="gradebook_scoring_system.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
639 | + Display::return_icon('ranking.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
640 | 640 | } |
641 | 641 | |
642 | 642 | } |
643 | 643 | } |
644 | 644 | } elseif (isset($_GET['search'])) { |
645 | - echo $header = '<b>' . get_lang('SearchResults') . ' :</b>'; |
|
645 | + echo $header = '<b>'.get_lang('SearchResults').' :</b>'; |
|
646 | 646 | } |
647 | 647 | |
648 | 648 | $isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh( |
@@ -651,26 +651,26 @@ discard block |
||
651 | 651 | ); |
652 | 652 | |
653 | 653 | if ($isDrhOfCourse) { |
654 | - $$actionsLeft .= '<a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
655 | - Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
654 | + $$actionsLeft .= '<a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
655 | + Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
656 | 656 | } |
657 | 657 | |
658 | - if (api_is_allowed_to_edit(null, true)){ |
|
659 | - echo $toolbar = Display::toolbarAction('gradebook-actions', array(0 => $actionsLeft, 1 => $actionsRight )); |
|
658 | + if (api_is_allowed_to_edit(null, true)) { |
|
659 | + echo $toolbar = Display::toolbarAction('gradebook-actions', array(0 => $actionsLeft, 1 => $actionsRight)); |
|
660 | 660 | } |
661 | 661 | |
662 | 662 | if (api_is_allowed_to_edit(null, true)) { |
663 | 663 | $weight = intval($catobj->get_weight()) > 0 ? $catobj->get_weight() : 0; |
664 | - $weight = '<strong>' . get_lang('TotalWeight') . ' : </strong>' . $weight; |
|
664 | + $weight = '<strong>'.get_lang('TotalWeight').' : </strong>'.$weight; |
|
665 | 665 | |
666 | 666 | $min_certification = (intval($catobj->get_certificate_min_score() > 0) ? $catobj->get_certificate_min_score() : 0); |
667 | - $min_certification = get_lang('CertificateMinScore') . ' : ' . $min_certification; |
|
668 | - $edit_icon = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' . |
|
669 | - Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>'; |
|
667 | + $min_certification = get_lang('CertificateMinScore').' : '.$min_certification; |
|
668 | + $edit_icon = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'. |
|
669 | + Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>'; |
|
670 | 670 | //$msg = Display::tag('h3', $weight.' - '.$min_certification); |
671 | - $msg = $weight . ' - ' . $min_certification . $edit_icon; |
|
671 | + $msg = $weight.' - '.$min_certification.$edit_icon; |
|
672 | 672 | //@todo show description |
673 | - $description = (($catobj->get_description() == "" || is_null($catobj->get_description())) ? '' : '<strong>' . get_lang('GradebookDescriptionLog') . '</strong>' . ': ' . $catobj->get_description()); |
|
673 | + $description = (($catobj->get_description() == "" || is_null($catobj->get_description())) ? '' : '<strong>'.get_lang('GradebookDescriptionLog').'</strong>'.': '.$catobj->get_description()); |
|
674 | 674 | Display::display_normal_message($msg, false); |
675 | 675 | if (!empty($description)) { |
676 | 676 | echo Display::div($description, array()); |
@@ -698,24 +698,24 @@ discard block |
||
698 | 698 | $cattotal = Category :: load(0); |
699 | 699 | $scoretotal = $cattotal[0]->calc_score(api_get_user_id()); |
700 | 700 | $scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal, SCORE_PERCENT) : get_lang('NoResultsAvailable')); |
701 | - $scoreinfo = get_lang('StatsStudent') . ' :<b> ' . $user['complete_name']. '</b><br />'; |
|
701 | + $scoreinfo = get_lang('StatsStudent').' :<b> '.$user['complete_name'].'</b><br />'; |
|
702 | 702 | if ((!$catobj->get_id() == '0') && (!isset($_GET['studentoverview'])) && (!isset($_GET['search']))) |
703 | - $scoreinfo.= '<br />' . get_lang('TotalForThisCategory') . ' : <b>' . $scorecourse_display . '</b>'; |
|
704 | - $scoreinfo.= '<br />' . get_lang('Total') . ' : <b>' . $scoretotal_display . '</b>'; |
|
703 | + $scoreinfo .= '<br />'.get_lang('TotalForThisCategory').' : <b>'.$scorecourse_display.'</b>'; |
|
704 | + $scoreinfo .= '<br />'.get_lang('Total').' : <b>'.$scoretotal_display.'</b>'; |
|
705 | 705 | Display :: display_normal_message($scoreinfo, false); |
706 | 706 | } |
707 | 707 | // show navigation tree and buttons? |
708 | 708 | $header = '<div class="actions">'; |
709 | 709 | |
710 | 710 | if ($is_course_admin) { |
711 | - $header .= '<a href="gradebook_flatview.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
712 | - $header .= '<a href="gradebook_scoring_system.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('settings.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
711 | + $header .= '<a href="gradebook_flatview.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
712 | + $header .= '<a href="gradebook_scoring_system.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.Display::return_icon('settings.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
713 | 713 | } elseif (!(isset($_GET['studentoverview']))) { |
714 | - $header .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('view_list.gif', get_lang('FlatView')) . ' ' . get_lang('FlatView') . '</a>'; |
|
714 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat='.$catobj->get_id().'">'.Display::return_icon('view_list.gif', get_lang('FlatView')).' '.get_lang('FlatView').'</a>'; |
|
715 | 715 | } else { |
716 | - $header .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">' . Display::return_icon('pdf.png', get_lang('ExportPDF'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
716 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank">'.Display::return_icon('pdf.png', get_lang('ExportPDF'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
717 | 717 | } |
718 | - $header.='</div>'; |
|
718 | + $header .= '</div>'; |
|
719 | 719 | echo $header; |
720 | 720 | } |
721 | 721 | |
@@ -742,8 +742,8 @@ discard block |
||
742 | 742 | $item = $evals_links[$count]; |
743 | 743 | $score = $item->calc_score($user_id); |
744 | 744 | $my_score_denom = ($score[1] == 0) ? 1 : $score[1]; |
745 | - $item_value+=$score[0] / $my_score_denom * $item->get_weight(); |
|
746 | - $item_total+=$item->get_weight(); |
|
745 | + $item_value += $score[0] / $my_score_denom * $item->get_weight(); |
|
746 | + $item_total += $item->get_weight(); |
|
747 | 747 | //$row[] = $scoredisplay->display_score($score,SCORE_DIV_PERCENT); |
748 | 748 | } |
749 | 749 | $item_value = number_format($item_value, 2, '.', ' '); |
@@ -758,17 +758,17 @@ discard block |
||
758 | 758 | $imageUrl = UserManager::getUserPicture($userid); |
759 | 759 | |
760 | 760 | $info = '<div class="row"><div class="col-md-3">'; |
761 | - $info .= '<div class="thumbnail"><img src="' . $imageUrl . '" /></div>'; |
|
761 | + $info .= '<div class="thumbnail"><img src="'.$imageUrl.'" /></div>'; |
|
762 | 762 | $info .= '</div>'; |
763 | 763 | $info .= '<div class="col-md-6">'; |
764 | - $info .= get_lang('Name') . ' : <a target="_blank" href="' . api_get_path(WEB_CODE_PATH) . 'social/profile.php?u=' . $userid . '"> ' . |
|
765 | - $user['complete_name'] . '</a><br />'; |
|
764 | + $info .= get_lang('Name').' : <a target="_blank" href="'.api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$userid.'"> '. |
|
765 | + $user['complete_name'].'</a><br />'; |
|
766 | 766 | |
767 | 767 | if (api_get_setting('show_email_addresses') == 'true') { |
768 | - $info .= get_lang('Email') . ' : <a href="mailto:' . $user['email'] . '">' . $user['email'] . '</a><br />'; |
|
768 | + $info .= get_lang('Email').' : <a href="mailto:'.$user['email'].'">'.$user['email'].'</a><br />'; |
|
769 | 769 | } |
770 | 770 | |
771 | - $info .= get_lang('TotalUser') . ' : <b>' . $scorecourse_display . '</b>'; |
|
771 | + $info .= get_lang('TotalUser').' : <b>'.$scorecourse_display.'</b>'; |
|
772 | 772 | $info .= '</div>'; |
773 | 773 | $info .= '</div>'; |
774 | 774 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | require_once '../inc/global.inc.php'; |
9 | 9 | require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/fe/exportgradebook.php'; |
10 | 10 | |
11 | -$current_course_tool = TOOL_GRADEBOOK; |
|
11 | +$current_course_tool = TOOL_GRADEBOOK; |
|
12 | 12 | |
13 | 13 | api_protect_course_script(true); |
14 | 14 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | null, |
75 | 75 | 'simple_search_form', |
76 | 76 | null, |
77 | - api_get_self() . '?selectcat=' . $category_id |
|
77 | + api_get_self().'?selectcat='.$category_id |
|
78 | 78 | ); |
79 | 79 | $values = $simple_search_form->exportValues(); |
80 | 80 | |
@@ -148,15 +148,15 @@ discard block |
||
148 | 148 | } |
149 | 149 | } |
150 | 150 | |
151 | -if (isset($_GET['exportpdf'])) { |
|
152 | - $interbreadcrumb[] = array ( |
|
153 | - 'url' => api_get_self().'?selectcat=' . Security::remove_XSS($_GET['selectcat']).'&'.api_get_cidreq(), |
|
151 | +if (isset($_GET['exportpdf'])) { |
|
152 | + $interbreadcrumb[] = array( |
|
153 | + 'url' => api_get_self().'?selectcat='.Security::remove_XSS($_GET['selectcat']).'&'.api_get_cidreq(), |
|
154 | 154 | 'name' => get_lang('FlatView') |
155 | 155 | ); |
156 | 156 | |
157 | 157 | $pageNum = isset($_GET['flatviewlist_page_nr']) ? intval($_GET['flatviewlist_page_nr']) : null; |
158 | 158 | $perPage = isset($_GET['flatviewlist_per_page']) ? intval($_GET['flatviewlist_per_page']) : null; |
159 | - $url = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
159 | + $url = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
160 | 160 | 'exportpdf' => '', |
161 | 161 | 'offset' => $offset, |
162 | 162 | 'selectcat' => intval($_GET['selectcat']), |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | } |
196 | 196 | } |
197 | 197 | |
198 | -if (isset($_GET['print'])) { |
|
198 | +if (isset($_GET['print'])) { |
|
199 | 199 | $printable_data = GradebookUtils::get_printable_data( |
200 | 200 | $cat[0], |
201 | 201 | $users, |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | require_once '../inc/global.inc.php'; |
15 | 15 | $this_section = SECTION_COURSES; |
16 | -$current_course_tool = TOOL_GROUP; |
|
16 | +$current_course_tool = TOOL_GROUP; |
|
17 | 17 | |
18 | 18 | // Notice for unauthorized people. |
19 | 19 | api_protect_course_script(true); |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | $current_group = GroupManager :: get_group_properties($group_id); |
23 | 23 | |
24 | 24 | $nameTools = get_lang('EditGroup'); |
25 | -$interbreadcrumb[] = array ('url' => 'group.php?'.api_get_cidreq(), 'name' => get_lang('Groups')); |
|
26 | -$interbreadcrumb[] = array ('url' => 'group_space.php?'.api_get_cidreq(), 'name' => $current_group['name']); |
|
25 | +$interbreadcrumb[] = array('url' => 'group.php?'.api_get_cidreq(), 'name' => get_lang('Groups')); |
|
26 | +$interbreadcrumb[] = array('url' => 'group_space.php?'.api_get_cidreq(), 'name' => $current_group['name']); |
|
27 | 27 | |
28 | 28 | $is_group_member = GroupManager :: is_tutor_of_group(api_get_user_id(), $group_id); |
29 | 29 |