@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | null, |
36 | 36 | api_get_group_id() |
37 | 37 | ); |
38 | -if (!api_is_allowed_to_edit(null, true) && intval($visibility) == 0 ) { |
|
38 | +if (!api_is_allowed_to_edit(null, true) && intval($visibility) == 0) { |
|
39 | 39 | api_not_allowed(); |
40 | 40 | } |
41 | 41 | |
@@ -73,22 +73,22 @@ discard block |
||
73 | 73 | $html = ''; |
74 | 74 | $step = 1; |
75 | 75 | foreach ($list as $toc) { |
76 | - $x = 1000*$step; |
|
76 | + $x = 1000 * $step; |
|
77 | 77 | $html .= '<div id="step-'.$step.'" class="step slide" data-x="'.$x.'" data-y="-1500" >'; |
78 | 78 | $html .= '<div class="impress-content">'; |
79 | 79 | $src = $_SESSION['oLP']->get_link('http', $toc['id']); |
80 | 80 | if ($toc['type'] !== 'dir') { |
81 | 81 | //just showing the src in a iframe ... |
82 | 82 | $html .= '<h2>'.$toc['title'].'</h2>'; |
83 | - $html .= '<iframe border="0" frameborder="0" style="width:100%;height:600px" src="' . $src . '"></iframe>'; |
|
84 | - }else{ |
|
83 | + $html .= '<iframe border="0" frameborder="0" style="width:100%;height:600px" src="'.$src.'"></iframe>'; |
|
84 | + } else { |
|
85 | 85 | $html .= "<div class='impress-title'>"; |
86 | 86 | $html .= '<h1>'.$toc['title'].'</h1>'; |
87 | 87 | $html .= "</div>"; |
88 | 88 | } |
89 | 89 | $html .= "</div>"; |
90 | 90 | $html .= "</div>"; |
91 | - $step ++; |
|
91 | + $step++; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | //Setting the template |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | require_once __DIR__.'/../inc/global.inc.php'; |
27 | 27 | |
28 | -$file = (empty($_SESSION['file'])?'':$_SESSION['file']); |
|
28 | +$file = (empty($_SESSION['file']) ? '' : $_SESSION['file']); |
|
29 | 29 | /** @var learnpath $oLP */ |
30 | 30 | $oLP = unserialize($_SESSION['lpobject']); |
31 | 31 | /** @var learnpathItem $oItem */ |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | header('Content-type: text/javascript'); |
43 | 43 | |
44 | -?>var scorm_logs=<?php echo ((empty($oLP->scorm_debug) or (!api_is_course_admin() && !api_is_platform_admin()) )?'0':'3');?>; //debug log level for SCORM. 0 = none, 1=light, 2=a lot, 3=all - displays logs in log frame |
|
44 | +?>var scorm_logs=<?php echo ((empty($oLP->scorm_debug) or (!api_is_course_admin() && !api_is_platform_admin())) ? '0' : '3'); ?>; //debug log level for SCORM. 0 = none, 1=light, 2=a lot, 3=all - displays logs in log frame |
|
45 | 45 | var lms_logs = 0; //debug log level for LMS actions. 0=none, 1=light, 2=a lot, 3=all |
46 | 46 | |
47 | 47 | // API Object initialization (eases access later on) |
@@ -144,25 +144,25 @@ discard block |
||
144 | 144 | olms.statusSignalReceived = 0; |
145 | 145 | |
146 | 146 | // Strictly scorm variables |
147 | -olms.score=<?php echo $oItem->get_score();?>; |
|
148 | -olms.max='<?php echo $oItem->get_max();?>'; |
|
149 | -olms.min='<?php echo $oItem->get_min();?>'; |
|
150 | -olms.lesson_status='<?php echo $oItem->get_status();?>'; |
|
151 | -olms.session_time='<?php echo $oItem->get_scorm_time('js');?>'; |
|
152 | -olms.suspend_data = '<?php echo $oItem->get_suspend_data();?>'; |
|
153 | -olms.lesson_location = '<?php echo $oItem->get_lesson_location();?>'; |
|
154 | -olms.total_time = '<?php echo $oItem->get_scorm_time('js');?>'; |
|
155 | -olms.mastery_score = '<?php echo $oItem->get_mastery_score();?>'; |
|
147 | +olms.score=<?php echo $oItem->get_score(); ?>; |
|
148 | +olms.max='<?php echo $oItem->get_max(); ?>'; |
|
149 | +olms.min='<?php echo $oItem->get_min(); ?>'; |
|
150 | +olms.lesson_status='<?php echo $oItem->get_status(); ?>'; |
|
151 | +olms.session_time='<?php echo $oItem->get_scorm_time('js'); ?>'; |
|
152 | +olms.suspend_data = '<?php echo $oItem->get_suspend_data(); ?>'; |
|
153 | +olms.lesson_location = '<?php echo $oItem->get_lesson_location(); ?>'; |
|
154 | +olms.total_time = '<?php echo $oItem->get_scorm_time('js'); ?>'; |
|
155 | +olms.mastery_score = '<?php echo $oItem->get_mastery_score(); ?>'; |
|
156 | 156 | olms.launch_data = '<?php echo $oItem->get_launch_data(); ?>'; |
157 | -olms.max_time_allowed = '<?php echo $oItem->get_max_time_allowed();?>'; |
|
158 | -olms.interactions = new Array(<?php echo $oItem->get_interactions_js_array();?>); |
|
157 | +olms.max_time_allowed = '<?php echo $oItem->get_max_time_allowed(); ?>'; |
|
158 | +olms.interactions = new Array(<?php echo $oItem->get_interactions_js_array(); ?>); |
|
159 | 159 | olms.item_objectives = new Array(); |
160 | 160 | olms.info_lms_item = new Array(); |
161 | 161 | |
162 | 162 | // Chamilo internal variables (not SCORM) |
163 | 163 | // olms.saved_lesson_status = 'not attempted'; |
164 | -olms.lms_lp_id = <?php echo $oLP->get_id();?>; |
|
165 | -olms.lms_item_id = <?php echo $oItem->get_id();?>; |
|
164 | +olms.lms_lp_id = <?php echo $oLP->get_id(); ?>; |
|
165 | +olms.lms_item_id = <?php echo $oItem->get_id(); ?>; |
|
166 | 166 | olms.lms_initialized = 0; |
167 | 167 | // switch_finished indicates if the switch process is finished (if it has gone |
168 | 168 | // through LMSInitialize() for the new item. Until then, all LMSSetValue() |
@@ -171,26 +171,26 @@ discard block |
||
171 | 171 | olms.switch_finished = 0; |
172 | 172 | |
173 | 173 | //olms.lms_total_lessons = <?php echo $oLP->get_total_items_count(); ?>; |
174 | -//olms.lms_complete_lessons = <?php echo $oLP->get_complete_items_count();?>; |
|
175 | -//olms.lms_progress_bar_mode = '<?php echo $oLP->progress_bar_mode;?>'; |
|
174 | +//olms.lms_complete_lessons = <?php echo $oLP->get_complete_items_count(); ?>; |
|
175 | +//olms.lms_progress_bar_mode = '<?php echo $oLP->progress_bar_mode; ?>'; |
|
176 | 176 | //if(lms_progress_bar_mode == ''){lms_progress_bar_mode='%';} |
177 | 177 | |
178 | -olms.lms_view_id = '<?php echo $oLP->get_view();?>'; |
|
178 | +olms.lms_view_id = '<?php echo $oLP->get_view(); ?>'; |
|
179 | 179 | if(olms.lms_view_id == ''){ olms.lms_view_id = 1;} |
180 | -olms.lms_user_id = '<?php echo $userId;?>'; |
|
181 | -olms.lms_next_item = '<?php echo $oLP->get_next_item_id();?>'; |
|
182 | -olms.lms_previous_item = '<?php echo $oLP->get_previous_item_id();?>'; |
|
183 | -olms.lms_lp_type = '<?php echo $oLP->get_type();?>'; |
|
184 | -olms.lms_item_type = '<?php echo $oItem->get_type();?>'; |
|
185 | -olms.lms_item_credit = '<?php echo $oItem->get_credit();?>'; |
|
186 | -olms.lms_item_lesson_mode = '<?php echo $oItem->get_lesson_mode();?>'; |
|
187 | -olms.lms_item_launch_data = '<?php echo addslashes($oItem->get_launch_data());?>'; |
|
188 | -olms.lms_item_core_exit = '<?php echo $oItem->get_core_exit();?>'; |
|
180 | +olms.lms_user_id = '<?php echo $userId; ?>'; |
|
181 | +olms.lms_next_item = '<?php echo $oLP->get_next_item_id(); ?>'; |
|
182 | +olms.lms_previous_item = '<?php echo $oLP->get_previous_item_id(); ?>'; |
|
183 | +olms.lms_lp_type = '<?php echo $oLP->get_type(); ?>'; |
|
184 | +olms.lms_item_type = '<?php echo $oItem->get_type(); ?>'; |
|
185 | +olms.lms_item_credit = '<?php echo $oItem->get_credit(); ?>'; |
|
186 | +olms.lms_item_lesson_mode = '<?php echo $oItem->get_lesson_mode(); ?>'; |
|
187 | +olms.lms_item_launch_data = '<?php echo addslashes($oItem->get_launch_data()); ?>'; |
|
188 | +olms.lms_item_core_exit = '<?php echo $oItem->get_core_exit(); ?>'; |
|
189 | 189 | olms.lms_course_id = '<?php echo $oLP->get_course_int_id(); ?>'; |
190 | 190 | olms.lms_session_id = '<?php echo api_get_session_id(); ?>'; |
191 | 191 | olms.lms_course_code = '<?php echo $oLP->getCourseCode(); ?>'; |
192 | 192 | olms.lms_course_id = '<?php echo $oLP->get_course_int_id(); ?>'; |
193 | -<?php echo $oLP->get_items_details_as_js('olms.lms_item_types');?> |
|
193 | +<?php echo $oLP->get_items_details_as_js('olms.lms_item_types'); ?> |
|
194 | 194 | |
195 | 195 | // Following definition of cmi.core.score.raw in SCORM 1.2, "LMS should |
196 | 196 | // initialize this to an empty string ("") upon initial launch of a SCO. The |
@@ -227,8 +227,8 @@ discard block |
||
227 | 227 | logit_scorm('Other SCORM calls are shown in orange.', 1); |
228 | 228 | logit_lms('To add new messages to these logs, use logit_lms() or logit_scorm().'); |
229 | 229 | |
230 | - olms.info_lms_item[0] = '<?php echo $oItem->get_id();?>'; |
|
231 | - olms.info_lms_item[1] = '<?php echo $oItem->get_id();?>'; |
|
230 | + olms.info_lms_item[0] = '<?php echo $oItem->get_id(); ?>'; |
|
231 | + olms.info_lms_item[1] = '<?php echo $oItem->get_id(); ?>'; |
|
232 | 232 | |
233 | 233 | $("#content_id").load(function() { |
234 | 234 | logit_lms('#content_id load event starts'); |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | result = 'id,score,status'; |
500 | 500 | } else if(param == 'cmi.objectives._count'){ |
501 | 501 | // ---- cmi.objectives._count |
502 | - //result='<?php echo $oItem->get_view_count();?>'; |
|
502 | + //result='<?php echo $oItem->get_view_count(); ?>'; |
|
503 | 503 | result = olms.item_objectives.length; |
504 | 504 | } else if(param.substring(0,15)== 'cmi.objectives.'){ |
505 | 505 | var myres = ''; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | /* Header and action code */ |
19 | 19 | $htmlHeadXtra[] = '<script>'. |
20 | -$_SESSION['oLP']->get_js_dropdown_array() . |
|
20 | +$_SESSION['oLP']->get_js_dropdown_array(). |
|
21 | 21 | " |
22 | 22 | function load_cbo(id) { |
23 | 23 | if (!id) { |
@@ -41,13 +41,13 @@ discard block |
||
41 | 41 | $('#previous').selectpicker('refresh'); |
42 | 42 | } |
43 | 43 | " . |
44 | -"\n" . |
|
45 | -'$().ready(function() {'."\n" . |
|
46 | - 'if ($(\'#previous\')) {'."\n" . |
|
44 | +"\n". |
|
45 | +'$().ready(function() {'."\n". |
|
46 | + 'if ($(\'#previous\')) {'."\n". |
|
47 | 47 | 'if(\'parent is\'+$(\'#idParent\').val()) {'. |
48 | - 'load_cbo($(\'#idParent\').val());'."\n" . |
|
49 | - '}}'."\n" . |
|
50 | -'});</script>'."\n" ; |
|
48 | + 'load_cbo($(\'#idParent\').val());'."\n". |
|
49 | + '}}'."\n". |
|
50 | +'});</script>'."\n"; |
|
51 | 51 | |
52 | 52 | /* Constants and variables */ |
53 | 53 | |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | /* SHOWING THE ADMIN TOOLS */ |
82 | 82 | |
83 | 83 | if (isset($_SESSION['gradebook'])) { |
84 | - $gradebook= $_SESSION['gradebook']; |
|
84 | + $gradebook = $_SESSION['gradebook']; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | if (!empty($gradebook) && $gradebook == 'view') { |
88 | - $interbreadcrumb[] = array ( |
|
88 | + $interbreadcrumb[] = array( |
|
89 | 89 | 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
90 | 90 | 'name' => get_lang('ToolGradebook') |
91 | 91 | ); |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | ///learning_path/ppt_dirname directory |
59 | 59 | $this->created_dir = $result['dir']; |
60 | 60 | if (substr($this->created_dir, -1, 1) == '/') { |
61 | - $this->file_path = $this->created_dir . api_replace_dangerous_char($file['name']); |
|
61 | + $this->file_path = $this->created_dir.api_replace_dangerous_char($file['name']); |
|
62 | 62 | } else { |
63 | - $this->file_path = $this->created_dir . '/' . api_replace_dangerous_char($file['name']); |
|
63 | + $this->file_path = $this->created_dir.'/'.api_replace_dangerous_char($file['name']); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | //var_dump($this->file_name, $this->file_path, $this->base_work_dir, $this->created_dir); |
@@ -104,18 +104,18 @@ discard block |
||
104 | 104 | $perm = api_get_setting('permissions_for_new_files'); |
105 | 105 | |
106 | 106 | if (IS_WINDOWS_OS) { // IS_WINDOWS_OS has been defined in main_api.lib.php |
107 | - $converter_path = str_replace('/', '\\', api_get_path(SYS_PATH) . 'main/inc/lib/ppt2png'); |
|
108 | - $class_path = $converter_path . ';' . $converter_path . '/jodconverter-2.2.2.jar;' . $converter_path . '/jodconverter-cli-2.2.2.jar'; |
|
107 | + $converter_path = str_replace('/', '\\', api_get_path(SYS_PATH).'main/inc/lib/ppt2png'); |
|
108 | + $class_path = $converter_path.';'.$converter_path.'/jodconverter-2.2.2.jar;'.$converter_path.'/jodconverter-cli-2.2.2.jar'; |
|
109 | 109 | //$cmd = 'java -cp "'.$class_path.'" DokeosConverter'; |
110 | - $cmd = 'java -Dfile.encoding=UTF-8 -cp "' . $class_path . '" DokeosConverter'; |
|
110 | + $cmd = 'java -Dfile.encoding=UTF-8 -cp "'.$class_path.'" DokeosConverter'; |
|
111 | 111 | } else { |
112 | - $converter_path = api_get_path(SYS_PATH) . 'main/inc/lib/ppt2png'; |
|
112 | + $converter_path = api_get_path(SYS_PATH).'main/inc/lib/ppt2png'; |
|
113 | 113 | //$class_path = '-cp .:jodconverter-2.2.1.jar:jodconverter-cli-2.2.1.jar'; |
114 | 114 | $class_path = ' -Dfile.encoding=UTF-8 -cp .:jodconverter-2.2.2.jar:jodconverter-cli-2.2.2.jar'; |
115 | - $cmd = 'cd ' . $converter_path . ' && java ' . $class_path . ' DokeosConverter'; |
|
115 | + $cmd = 'cd '.$converter_path.' && java '.$class_path.' DokeosConverter'; |
|
116 | 116 | } |
117 | 117 | |
118 | - $cmd .= ' -p ' . api_get_setting('service_ppt2lp', 'port'); |
|
118 | + $cmd .= ' -p '.api_get_setting('service_ppt2lp', 'port'); |
|
119 | 119 | // Call to the function implemented by child. |
120 | 120 | $cmd .= $this->add_command_parameters(); |
121 | 121 | // To allow openoffice to manipulate docs. |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | @chmod($this->base_work_dir.$this->file_path, 0777); |
125 | 125 | |
126 | 126 | $locale = $this->original_locale; // TODO: Improve it because we're not sure this locale is present everywhere. |
127 | - putenv('LC_ALL=' . $locale); |
|
127 | + putenv('LC_ALL='.$locale); |
|
128 | 128 | |
129 | 129 | $files = array(); |
130 | 130 | $return = 0; |
@@ -150,12 +150,12 @@ discard block |
||
150 | 150 | $result = $this->_get_remote_ppt2lp_files($file, $size); |
151 | 151 | $result = unserialize($result); |
152 | 152 | // Save remote images to server |
153 | - chmod($this->base_work_dir . $this->created_dir, api_get_permissions_for_new_directories()); |
|
153 | + chmod($this->base_work_dir.$this->created_dir, api_get_permissions_for_new_directories()); |
|
154 | 154 | if (!empty($result['images'])) { |
155 | 155 | foreach ($result['images'] as $image => $img_data) { |
156 | 156 | $image_path = $this->base_work_dir.$this->created_dir; |
157 | - @file_put_contents($image_path . '/' . $image, base64_decode($img_data)); |
|
158 | - @chmod($image_path . '/' . $image, 0777); |
|
157 | + @file_put_contents($image_path.'/'.$image, base64_decode($img_data)); |
|
158 | + @chmod($image_path.'/'.$image, 0777); |
|
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $uri = ''; |
200 | 200 | $result = preg_match('/^([a-zA-Z0-9]*):\/\/([^\/]*)\//', $ppt2lp_host, $matches); |
201 | 201 | if ($result) { |
202 | - $uri = $matches[1] . '://' . $matches[2] . '/'; |
|
202 | + $uri = $matches[1].'://'.$matches[2].'/'; |
|
203 | 203 | } else { |
204 | 204 | $uri = $ppt2lp_host; |
205 | 205 | } |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 9, |
219 | 219 | ); |
220 | 220 | if (substr($ppt2lp_host, 0, 5) === 'https') { |
221 | - $options['ssl_method'] = SOAP_SSL_METHOD_TLS; |
|
221 | + $options['ssl_method'] = SOAP_SSL_METHOD_TLS; |
|
222 | 222 | // If using SSL, please note that *not* supporting the SSLv2 |
223 | 223 | // (broken in terms of security), the server tends to generate |
224 | 224 | // the following issue: |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | //error_log('['.time().'] Calling wsConvertPpt webservice on ' . $ppt2lp_host); |
244 | 244 | $result = $client->__call('wsConvertPpt', array('pptData' => $params)); |
245 | 245 | } catch (Exception $e) { |
246 | - error_log('['.time().'] Chamilo SOAP call error: ' . $e->getMessage()); |
|
246 | + error_log('['.time().'] Chamilo SOAP call error: '.$e->getMessage()); |
|
247 | 247 | } |
248 | 248 | // Make sure we destroy the SOAP client as it may generate SSL connection |
249 | 249 | // binding issue (if using SSL) |
@@ -276,38 +276,38 @@ discard block |
||
276 | 276 | $ppt2lpHost = api_get_setting('service_ppt2lp', 'host'); |
277 | 277 | $permissionFile = api_get_permissions_for_new_files(); |
278 | 278 | $permissionFolder = api_get_permissions_for_new_directories(); |
279 | - if (file_exists($this->base_work_dir . '/' . $this->created_dir)) { |
|
279 | + if (file_exists($this->base_work_dir.'/'.$this->created_dir)) { |
|
280 | 280 | |
281 | 281 | return $ids; |
282 | 282 | } |
283 | 283 | |
284 | 284 | if ($ppt2lpHost == 'localhost') { |
285 | 285 | if (IS_WINDOWS_OS) { // IS_WINDOWS_OS has been defined in main_api.lib.php |
286 | - $converterPath = str_replace('/', '\\', api_get_path(SYS_PATH) . 'main/inc/lib/ppt2png'); |
|
287 | - $classPath = $converterPath . ';' . $converterPath . '/jodconverter-2.2.2.jar;' . $converterPath . '/jodconverter-cli-2.2.2.jar'; |
|
288 | - $cmd = 'java -Dfile.encoding=UTF-8 -jar "' . $classPath . '/jodconverter-2.2.2.jar"'; |
|
286 | + $converterPath = str_replace('/', '\\', api_get_path(SYS_PATH).'main/inc/lib/ppt2png'); |
|
287 | + $classPath = $converterPath.';'.$converterPath.'/jodconverter-2.2.2.jar;'.$converterPath.'/jodconverter-cli-2.2.2.jar'; |
|
288 | + $cmd = 'java -Dfile.encoding=UTF-8 -jar "'.$classPath.'/jodconverter-2.2.2.jar"'; |
|
289 | 289 | } else { |
290 | - $converterPath = api_get_path(SYS_PATH) . 'main/inc/lib/ppt2png'; |
|
290 | + $converterPath = api_get_path(SYS_PATH).'main/inc/lib/ppt2png'; |
|
291 | 291 | $classPath = ' -Dfile.encoding=UTF-8 -jar jodconverter-cli-2.2.2.jar'; |
292 | - $cmd = 'cd ' . $converterPath . ' && java ' . $classPath . ' '; |
|
292 | + $cmd = 'cd '.$converterPath.' && java '.$classPath.' '; |
|
293 | 293 | } |
294 | 294 | |
295 | - $cmd .= ' -p ' . api_get_setting('service_ppt2lp', 'port'); |
|
295 | + $cmd .= ' -p '.api_get_setting('service_ppt2lp', 'port'); |
|
296 | 296 | // Call to the function implemented by child. |
297 | - $cmd .= ' "' . $this->base_work_dir . '/' . $this->file_path . '" "' . $this->base_work_dir . '/' . $this->created_dir . '"'; |
|
297 | + $cmd .= ' "'.$this->base_work_dir.'/'.$this->file_path.'" "'.$this->base_work_dir.'/'.$this->created_dir.'"'; |
|
298 | 298 | // To allow openoffice to manipulate docs. |
299 | 299 | @chmod($this->base_work_dir, $permissionFolder); |
300 | - @chmod($this->base_work_dir . '/' . $this->file_path, $permissionFile); |
|
300 | + @chmod($this->base_work_dir.'/'.$this->file_path, $permissionFile); |
|
301 | 301 | |
302 | 302 | $locale = $this->original_locale; // TODO: Improve it because we're not sure this locale is present everywhere. |
303 | - putenv('LC_ALL=' . $locale); |
|
303 | + putenv('LC_ALL='.$locale); |
|
304 | 304 | |
305 | 305 | $files = array(); |
306 | 306 | $return = 0; |
307 | 307 | $shell = exec($cmd, $files, $return); |
308 | 308 | // TODO: Chown is not working, root keep user privileges, should be www-data |
309 | - @chown($this->base_work_dir . '/' . $this->created_dir, 'www-data'); |
|
310 | - @chmod($this->base_work_dir . '/' . $this->created_dir, $permissionFile); |
|
309 | + @chown($this->base_work_dir.'/'.$this->created_dir, 'www-data'); |
|
310 | + @chmod($this->base_work_dir.'/'.$this->created_dir, $permissionFile); |
|
311 | 311 | |
312 | 312 | if ($return != 0) { // If the java application returns an error code. |
313 | 313 | switch ($return) { |
@@ -346,14 +346,14 @@ discard block |
||
346 | 346 | */ |
347 | 347 | } |
348 | 348 | |
349 | - if (file_exists($this->base_work_dir . '/' . $this->created_dir)) { |
|
349 | + if (file_exists($this->base_work_dir.'/'.$this->created_dir)) { |
|
350 | 350 | |
351 | 351 | // Register Files to Document tool |
352 | 352 | $ids[] = add_document( |
353 | 353 | $_course, |
354 | - '/' . $this->created_dir, |
|
354 | + '/'.$this->created_dir, |
|
355 | 355 | 'file', |
356 | - filesize($this->base_work_dir . '/' . $this->created_dir), |
|
356 | + filesize($this->base_work_dir.'/'.$this->created_dir), |
|
357 | 357 | $convertedTitle, |
358 | 358 | sprintf( |
359 | 359 | get_lang('FileConvertedFromXToY'), |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | //$_user = $_SESSION['_user']; |
58 | 58 | $file = Session::read('file'); |
59 | 59 | $oLP = unserialize(Session::read('lpobject')); |
60 | -$oItem =& $oLP->items[$oLP->current]; |
|
60 | +$oItem = & $oLP->items[$oLP->current]; |
|
61 | 61 | if (!is_object($oItem)) { |
62 | 62 | error_log('New LP - aicc_hacp - Could not load oItem item', 0); |
63 | 63 | exit; |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | 'evaluation' => array(), |
72 | 72 | 'student_data' => array(), |
73 | 73 | ); |
74 | -$convert_enc = array('%25','%0D','%0A','%09','%20','%2D','%2F','%3B','%3F','%7B','%7D','%7C','%5C','%5E','%7E','%5B','%5D','%60','%23','%3E','%3C','%22'); |
|
75 | -$convert_dec = array('%',"\r","\n","\t",' ','-','/',';','?','{','}','|','\\','^','~','[',']','`','#','>','<','"'); |
|
74 | +$convert_enc = array('%25', '%0D', '%0A', '%09', '%20', '%2D', '%2F', '%3B', '%3F', '%7B', '%7D', '%7C', '%5C', '%5E', '%7E', '%5B', '%5D', '%60', '%23', '%3E', '%3C', '%22'); |
|
75 | +$convert_dec = array('%', "\r", "\n", "\t", ' ', '-', '/', ';', '?', '{', '}', '|', '\\', '^', '~', '[', ']', '`', '#', '>', '<', '"'); |
|
76 | 76 | $crlf = "\r\n"; |
77 | 77 | //$tab = "\t"; |
78 | 78 | $tab = ""; |
@@ -23,25 +23,25 @@ discard block |
||
23 | 23 | case 'thematic_add' : |
24 | 24 | case 'thematic_import_select' : |
25 | 25 | echo '<a href="index.php?'.api_get_cidreq().'">'. |
26 | - Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('ThematicDetails'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
26 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('ThematicDetails'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
27 | 27 | break; |
28 | 28 | case 'thematic_list' : |
29 | 29 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'. |
30 | - Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
30 | + Display::return_icon('new_course_progress.png', get_lang('NewThematicSection'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
31 | 31 | break; |
32 | 32 | case 'thematic_details' : |
33 | 33 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'. |
34 | - Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
34 | + Display::return_icon('new_course_progress.png', get_lang('NewThematicSection'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
35 | 35 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_import_select'.$url_token.'">'. |
36 | - Display::return_icon('import_csv.png',get_lang('ImportThematic'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
36 | + Display::return_icon('import_csv.png', get_lang('ImportThematic'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
37 | 37 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_export'.$url_token.'">'. |
38 | - Display::return_icon('export_csv.png',get_lang('ExportThematic'),'', ICON_SIZE_MEDIUM).'</a>'; |
|
38 | + Display::return_icon('export_csv.png', get_lang('ExportThematic'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
39 | 39 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_export_pdf'.$url_token.'">'. |
40 | - Display::return_icon('pdf.png',get_lang('ExportToPDF'),'', ICON_SIZE_MEDIUM).'</a>'; |
|
40 | + Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
41 | 41 | break; |
42 | 42 | default : |
43 | 43 | echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'. |
44 | - Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
44 | + Display::return_icon('new_course_progress.png', get_lang('NewThematicSection'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
45 | 45 | } |
46 | 46 | echo '</div>'; |
47 | 47 | } |
@@ -57,10 +57,10 @@ discard block |
||
57 | 57 | $parameters['action'] = $action; |
58 | 58 | $table->set_additional_parameters($parameters); |
59 | 59 | $table->set_header(0, '', false, array('style'=>'width:20px;')); |
60 | - $table->set_header(1, get_lang('Title'), false ); |
|
60 | + $table->set_header(1, get_lang('Title'), false); |
|
61 | 61 | if (api_is_allowed_to_edit(null, true)) { |
62 | - $table->set_header(2, get_lang('Actions'), false,array('style'=>'text-align:center;width:40%;')); |
|
63 | - $table->set_form_actions(array ('thematic_delete_select' => get_lang('DeleteAllThematics'))); |
|
62 | + $table->set_header(2, get_lang('Actions'), false, array('style'=>'text-align:center;width:40%;')); |
|
63 | + $table->set_form_actions(array('thematic_delete_select' => get_lang('DeleteAllThematics'))); |
|
64 | 64 | } |
65 | 65 | $table->display(); |
66 | 66 | |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | |
73 | 73 | if (isset($last_id) && $last_id) { |
74 | 74 | $link_to_thematic_plan = '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$last_id.'">'. |
75 | - Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>'; |
|
75 | + Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), array('style'=>'vertical-align:middle;float:none;'), ICON_SIZE_SMALL).'</a>'; |
|
76 | 76 | $link_to_thematic_advance = '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$last_id.'">'. |
77 | - Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>'; |
|
77 | + Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), array('style'=>'vertical-align:middle;float:none;'), ICON_SIZE_SMALL).'</a>'; |
|
78 | 78 | Display::display_confirmation_message( |
79 | - get_lang('ThematicSectionHasBeenCreatedSuccessfull').'<br />'.sprintf(get_lang('NowYouShouldAddThematicPlanXAndThematicAdvanceX'),$link_to_thematic_plan, $link_to_thematic_advance), |
|
79 | + get_lang('ThematicSectionHasBeenCreatedSuccessfull').'<br />'.sprintf(get_lang('NowYouShouldAddThematicPlanXAndThematicAdvanceX'), $link_to_thematic_plan, $link_to_thematic_advance), |
|
80 | 80 | false |
81 | 81 | ); |
82 | 82 | } |
@@ -113,27 +113,27 @@ discard block |
||
113 | 113 | $actions_first_col = ''; |
114 | 114 | if (api_is_allowed_to_edit(null, true)) { |
115 | 115 | // Thematic title |
116 | - $actions_first_col = Display::url( |
|
116 | + $actions_first_col = Display::url( |
|
117 | 117 | Display::return_icon('cd.gif', get_lang('Copy')), |
118 | 118 | 'index.php?'.api_get_cidreq().'&action=thematic_copy&thematic_id='.$my_thematic_id.$params.$url_token |
119 | 119 | ); |
120 | - if (api_get_session_id() == 0 ) { |
|
120 | + if (api_get_session_id() == 0) { |
|
121 | 121 | |
122 | 122 | if ($thematic['display_order'] > 1) { |
123 | - $actions_first_col .= ' <a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('up.png', get_lang('Up'),'',ICON_SIZE_SMALL).'</a>'; |
|
123 | + $actions_first_col .= ' <a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('up.png', get_lang('Up'), '', ICON_SIZE_SMALL).'</a>'; |
|
124 | 124 | } else { |
125 | - $actions_first_col .= ' '.Display::return_icon('up_na.png',' ','',ICON_SIZE_SMALL); |
|
125 | + $actions_first_col .= ' '.Display::return_icon('up_na.png', ' ', '', ICON_SIZE_SMALL); |
|
126 | 126 | } |
127 | 127 | if (isset($thematic['max_thematic_item']) && $thematic['display_order'] < $thematic['max_thematic_item']) { |
128 | - $actions_first_col .= ' <a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('down.png',get_lang('Down'),'',ICON_SIZE_SMALL).'</a>'; |
|
128 | + $actions_first_col .= ' <a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('down.png', get_lang('Down'), '', ICON_SIZE_SMALL).'</a>'; |
|
129 | 129 | } else { |
130 | - $actions_first_col .= ' '.Display::return_icon('down_na.png',' ','',ICON_SIZE_SMALL); |
|
130 | + $actions_first_col .= ' '.Display::return_icon('down_na.png', ' ', '', ICON_SIZE_SMALL); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | } |
134 | 134 | if (api_get_session_id() == $thematic['session_id']) { |
135 | - $actions_first_col .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'; |
|
136 | - $actions_first_col .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
135 | + $actions_first_col .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'; |
|
136 | + $actions_first_col .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$my_thematic_id.$params.$url_token.'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | $actions_first_col = Display::div($actions_first_col, array('id'=>'thematic_id_content_'.$thematic['id'], 'class'=>'thematic_tools')); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | //if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) { |
150 | 150 | if (api_is_allowed_to_edit(null, true)) { |
151 | 151 | echo '<div style="text-align:right"><a href="index.php?'.api_get_cidreq().'&origin=thematic_details&action=thematic_plan_list&thematic_id='.$thematic['id'].'&width=700&height=500">'. |
152 | - Display::return_icon('edit.png', get_lang('EditThematicPlan'), array('style'=>'vertical-align:middle'),ICON_SIZE_MEDIUM).'</a></div><br />'; |
|
152 | + Display::return_icon('edit.png', get_lang('EditThematicPlan'), array('style'=>'vertical-align:middle'), ICON_SIZE_MEDIUM).'</a></div><br />'; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | if (empty($thematic_plan_div[$thematic['id']])) { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | //if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) { |
166 | 166 | if (api_is_allowed_to_edit(null, true)) { |
167 | 167 | echo '<div style="text-align:right"><a href="index.php?'.api_get_cidreq().'&action=thematic_advance_add&thematic_id='.$thematic['id'].'">'. |
168 | - Display::return_icon('add.png',get_lang('NewThematicAdvance'),'',ICON_SIZE_MEDIUM).'</a></div>'; |
|
168 | + Display::return_icon('add.png', get_lang('NewThematicAdvance'), '', ICON_SIZE_MEDIUM).'</a></div>'; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | //if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) { |
@@ -187,23 +187,23 @@ discard block |
||
187 | 187 | [], |
188 | 188 | ICON_SIZE_SMALL |
189 | 189 | ), |
190 | - 'index.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
190 | + 'index.php?'.api_get_cidreq().'&'.http_build_query([ |
|
191 | 191 | 'action' => 'thematic_advance_edit', |
192 | 192 | 'thematic_id' => $thematic['id'], |
193 | 193 | 'thematic_advance_id' => $thematic_advance['id'] |
194 | 194 | ]) |
195 | 195 | ); |
196 | - $edit_link .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic['id'].'&thematic_advance_id='.$thematic_advance['id'].'">'. |
|
197 | - Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a></center>'; |
|
196 | + $edit_link .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic['id'].'&thematic_advance_id='.$thematic_advance['id'].'">'. |
|
197 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a></center>'; |
|
198 | 198 | |
199 | 199 | //Links |
200 | 200 | $edit_link = Display::div( |
201 | - Display::div($edit_link , array('id'=>'thematic_advance_tools_'.$thematic_advance['id'], 'class'=>'thematic_advance_actions')), |
|
201 | + Display::div($edit_link, array('id'=>'thematic_advance_tools_'.$thematic_advance['id'], 'class'=>'thematic_advance_actions')), |
|
202 | 202 | array('style'=>'height:20px;') |
203 | 203 | ); |
204 | 204 | } |
205 | 205 | |
206 | - $thematic_advance_item = isset($thematic_advance_div[$thematic['id']][$thematic_advance['id']]) ? $thematic_advance_div[$thematic['id']][$thematic_advance['id']] : null; |
|
206 | + $thematic_advance_item = isset($thematic_advance_div[$thematic['id']][$thematic_advance['id']]) ? $thematic_advance_div[$thematic['id']][$thematic_advance['id']] : null; |
|
207 | 207 | echo Display::div($thematic_advance_item, array('id'=>'thematic_advance_'.$thematic_advance['id'])); |
208 | 208 | echo $edit_link; |
209 | 209 | echo '</td>'; |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | } elseif ($action == 'thematic_add' || $action == 'thematic_edit') { |
249 | 249 | |
250 | 250 | // Display form |
251 | - $form = new FormValidator('thematic_add','POST','index.php?action=thematic_add&'.api_get_cidreq()); |
|
251 | + $form = new FormValidator('thematic_add', 'POST', 'index.php?action=thematic_add&'.api_get_cidreq()); |
|
252 | 252 | |
253 | 253 | if ($action == 'thematic_edit') { |
254 | 254 | $form->addElement('header', '', get_lang('EditThematicSection')); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $form->addElement('hidden', 'action', $action); |
259 | 259 | |
260 | 260 | if (!empty($thematic_id)) { |
261 | - $form->addElement('hidden', 'thematic_id',$thematic_id); |
|
261 | + $form->addElement('hidden', 'thematic_id', $thematic_id); |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | $form->addText('title', get_lang('Title'), true, array('size'=>'50')); |
@@ -270,8 +270,8 @@ discard block |
||
270 | 270 | if (!empty($thematic_data)) { |
271 | 271 | if (api_get_session_id()) { |
272 | 272 | if ($thematic_data['session_id'] != api_get_session_id()) { |
273 | - $show_form = false; |
|
274 | - Display::display_error_message(get_lang('NotAllowedClickBack'),false); |
|
273 | + $show_form = false; |
|
274 | + Display::display_error_message(get_lang('NotAllowedClickBack'), false); |
|
275 | 275 | } |
276 | 276 | } |
277 | 277 | // set default values |
@@ -282,14 +282,14 @@ discard block |
||
282 | 282 | |
283 | 283 | // error messages |
284 | 284 | if (isset($error)) { |
285 | - Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false); |
|
285 | + Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false); |
|
286 | 286 | } |
287 | 287 | if ($show_form) { |
288 | 288 | $form->display(); |
289 | 289 | } |
290 | 290 | } elseif ($action == 'thematic_import_select') { |
291 | 291 | // Create form to upload csv file. |
292 | - $form = new FormValidator('thematic_import','POST','index.php?action=thematic_import&'.api_get_cidreq().$url_token); |
|
292 | + $form = new FormValidator('thematic_import', 'POST', 'index.php?action=thematic_import&'.api_get_cidreq().$url_token); |
|
293 | 293 | $form->addElement('header', get_lang('ImportThematic')); |
294 | 294 | $form->addElement('file', 'file'); |
295 | 295 | $form->addElement('checkbox', 'replace', null, get_lang('DeleteAllThematic')); |
@@ -217,20 +217,20 @@ discard block |
||
217 | 217 | continue; |
218 | 218 | } |
219 | 219 | |
220 | - $plan_html .= '<strong>' . $plan['title'] . '</strong><br /> ' . $plan['description'] . '<br />'; |
|
220 | + $plan_html .= '<strong>'.$plan['title'].'</strong><br /> '.$plan['description'].'<br />'; |
|
221 | 221 | } |
222 | 222 | } |
223 | 223 | $data = $thematic->get_thematic_advance_by_thematic_id($theme['id']); |
224 | 224 | $advance_html = null; |
225 | 225 | if (!empty($data)) { |
226 | 226 | foreach ($data as $advance) { |
227 | - $advance_html .= api_convert_and_format_date($advance['start_date'], DATE_FORMAT_LONG) . ' ('.$advance['duration'].' '.get_lang('HourShort').')<br />'.$advance['content'].'<br />'; |
|
227 | + $advance_html .= api_convert_and_format_date($advance['start_date'], DATE_FORMAT_LONG).' ('.$advance['duration'].' '.get_lang('HourShort').')<br />'.$advance['content'].'<br />'; |
|
228 | 228 | } |
229 | 229 | } |
230 | 230 | $table[] = array($theme['title'], $plan_html, $advance_html); |
231 | 231 | } |
232 | 232 | $params = array( |
233 | - 'filename' => get_lang('Thematic') . '-' . api_get_local_time(), |
|
233 | + 'filename' => get_lang('Thematic').'-'.api_get_local_time(), |
|
234 | 234 | 'pdf_title' => get_lang('Thematic'), |
235 | 235 | 'add_signatures' => true, |
236 | 236 | 'format' => 'A4-L', |
@@ -327,9 +327,9 @@ discard block |
||
327 | 327 | unset($_SESSION['thematic_plan_token']); |
328 | 328 | $data['message'] = 'ok'; |
329 | 329 | |
330 | - $saveRedirect = api_get_path(WEB_PATH) . 'main/course_progress/index.php?'; |
|
331 | - $saveRedirect.= api_get_cidreq() . '&'; |
|
332 | - $saveRedirect.= 'thematic_plan_save_message=ok'; |
|
330 | + $saveRedirect = api_get_path(WEB_PATH).'main/course_progress/index.php?'; |
|
331 | + $saveRedirect .= api_get_cidreq().'&'; |
|
332 | + $saveRedirect .= 'thematic_plan_save_message=ok'; |
|
333 | 333 | |
334 | 334 | header("Location: $saveRedirect"); |
335 | 335 | exit; |
@@ -4,9 +4,9 @@ |
||
4 | 4 | * @package chamilo.messages |
5 | 5 | */ |
6 | 6 | require_once __DIR__.'/../inc/global.inc.php'; |
7 | -if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') { |
|
7 | +if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') { |
|
8 | 8 | header('Location:inbox.php?f=social'); |
9 | -} elseif ( api_get_setting('allow_message_tool')=='true') { |
|
9 | +} elseif (api_get_setting('allow_message_tool') == 'true') { |
|
10 | 10 | header('Location:inbox.php'); |
11 | 11 | } |
12 | 12 | exit; |
@@ -6,22 +6,22 @@ discard block |
||
6 | 6 | $cidReset = true; |
7 | 7 | require_once __DIR__.'/../inc/global.inc.php'; |
8 | 8 | api_block_anonymous_users(); |
9 | -if (api_get_setting('allow_message_tool')!='true') { |
|
9 | +if (api_get_setting('allow_message_tool') != 'true') { |
|
10 | 10 | api_not_allowed(); |
11 | 11 | } |
12 | 12 | |
13 | 13 | if (isset($_REQUEST['f']) && $_REQUEST['f'] == 'social') { |
14 | 14 | $this_section = SECTION_SOCIAL; |
15 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
16 | - $interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox')); |
|
15 | + $interbreadcrumb[] = array('url' => api_get_path(WEB_PATH).'main/social/home.php', 'name' => get_lang('Social')); |
|
16 | + $interbreadcrumb[] = array('url' => 'inbox.php?f=social', 'name' => get_lang('Inbox')); |
|
17 | 17 | } else { |
18 | 18 | $this_section = SECTION_MYPROFILE; |
19 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
19 | + $interbreadcrumb[] = array('url' => api_get_path(WEB_PATH).'main/auth/profile.php', 'name' => get_lang('Profile')); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | $social_right_content = ''; |
23 | 23 | |
24 | -if (isset($_GET['f']) && $_GET['f']=='social') { |
|
24 | +if (isset($_GET['f']) && $_GET['f'] == 'social') { |
|
25 | 25 | $social_parameter = '?f=social'; |
26 | 26 | } else { |
27 | 27 | if (api_get_setting('extended_profile') == 'true') { |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | } |
34 | 34 | if (api_get_setting('allow_message_tool') === 'true') { |
35 | 35 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'. |
36 | - Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>'; |
|
36 | + Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>'; |
|
37 | 37 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'. |
38 | - Display::return_icon('inbox.png',get_lang('Inbox')).'</a>'; |
|
38 | + Display::return_icon('inbox.png', get_lang('Inbox')).'</a>'; |
|
39 | 39 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'. |
40 | - Display::return_icon('outbox.png',get_lang('Outbox')).'</a>'; |
|
40 | + Display::return_icon('outbox.png', get_lang('Outbox')).'</a>'; |
|
41 | 41 | } |
42 | 42 | $social_right_content .= '</div>'; |
43 | 43 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $show_menu = 'messages_inbox'; |
54 | 54 | } |
55 | 55 | |
56 | -$message = ''; |
|
56 | +$message = ''; |
|
57 | 57 | |
58 | 58 | // LEFT COLUMN |
59 | 59 | if (api_get_setting('allow_social_tool') === 'true') { |