Completed
Push — 1.11.x ( 79bd65...73103f )
by José
30:45
created
main/badge/issued_all.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 $skillId = isset($_GET['skill']) ? intval($_GET['skill']) : 0;
14 14
 
15 15
 if (!$userId || !$skillId) {
16
-    header('Location: ' . api_get_path(WEB_PATH));
16
+    header('Location: '.api_get_path(WEB_PATH));
17 17
     exit;
18 18
 }
19 19
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         Display::return_message(get_lang('NoResults'), 'error')
32 32
     );
33 33
 
34
-    header('Location: ' . api_get_path(WEB_PATH));
34
+    header('Location: '.api_get_path(WEB_PATH));
35 35
     exit;
36 36
 }
37 37
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $entityManager->persist($skillIssue);
168 168
         $entityManager->flush();
169 169
 
170
-        header("Location: " . $skillIssue->getIssueUrlAll());
170
+        header("Location: ".$skillIssue->getIssueUrlAll());
171 171
         exit;
172 172
     }
173 173
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         $entityManager->persist($skillUserComment);
199 199
         $entityManager->flush();
200 200
 
201
-        header("Location: " . $skillIssue->getIssueUrlAll());
201
+        header("Location: ".$skillIssue->getIssueUrlAll());
202 202
         exit;
203 203
     }
204 204
 
@@ -214,11 +214,11 @@  discard block
 block discarded – undo
214 214
             $backpack = $configBackpack;
215 215
         }
216 216
 
217
-        $htmlHeadXtra[] = '<script src="' . $backpack . 'issuer.js"></script>';
217
+        $htmlHeadXtra[] = '<script src="'.$backpack.'issuer.js"></script>';
218 218
         $objSkill = new Skill();
219 219
         $assertionUrl = $skillIssueInfo['badge_assertion'];
220 220
         $skills = $objSkill->get($skillId);
221
-        $unbakedBadge = api_get_path(SYS_UPLOAD_PATH) . "badges/".$skills['icon'];
221
+        $unbakedBadge = api_get_path(SYS_UPLOAD_PATH)."badges/".$skills['icon'];
222 222
         if (!is_file($unbakedBadge)) {
223 223
             $unbakedBadge = api_get_path(WEB_CODE_PATH).'img/icons/128/badges-default.png';
224 224
         }
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
                 mkdir($bakedBadge, api_get_permissions_for_new_directories(), true);
237 237
             }
238 238
             $skillRelUserId = $skillIssueInfo['id'];
239
-            if (!file_exists($bakedBadge . "/badge_" . $skillRelUserId)) {
240
-                file_put_contents($bakedBadge . "/badge_" . $skillRelUserId . ".png", $bakedInfo);
239
+            if (!file_exists($bakedBadge."/badge_".$skillRelUserId)) {
240
+                file_put_contents($bakedBadge."/badge_".$skillRelUserId.".png", $bakedInfo);
241 241
             }
242 242
 
243 243
             //Process to validate a baked badge
244
-            $badgeContent = file_get_contents($bakedBadge . "/badge_" . $skillRelUserId . ".png");
244
+            $badgeContent = file_get_contents($bakedBadge."/badge_".$skillRelUserId.".png");
245 245
             $verifyBakedBadge = $png->extractBadgeInfo($badgeContent);
246 246
             if (!is_array($verifyBakedBadge)) {
247 247
                 $badgeInfoError = true;
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 
250 250
             if (!$badgeInfoError) {
251 251
                 $personalBadge = UserManager::getUserPathById($userId, "web");
252
-                $personalBadge = $personalBadge."badges/badge_" . $skillRelUserId . ".png";
252
+                $personalBadge = $personalBadge."badges/badge_".$skillRelUserId.".png";
253 253
             }
254 254
         }
255 255
     }
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/SkillRelUser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
      */
456 456
     public function getIssueUrl()
457 457
     {
458
-        return api_get_path(WEB_PATH) . "badge/{$this->id}";
458
+        return api_get_path(WEB_PATH)."badge/{$this->id}";
459 459
     }
460 460
 
461 461
     /**
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
      */
465 465
     public function getIssueUrlAll()
466 466
     {
467
-        return api_get_path(WEB_PATH) . "skill/{$this->skill->getId()}/user/{$this->user->getId()}";
467
+        return api_get_path(WEB_PATH)."skill/{$this->skill->getId()}/user/{$this->user->getId()}";
468 468
     }
469 469
 
470 470
     /**
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
      */
474 474
     public function getAssertionUrl()
475 475
     {
476
-        $url = api_get_path(WEB_CODE_PATH) . "badge/assertion.php?";
476
+        $url = api_get_path(WEB_CODE_PATH)."badge/assertion.php?";
477 477
 
478 478
         $url .= http_build_query(array(
479 479
             'user' => $this->user->getId(),
Please login to merge, or discard this patch.
main/document/edit_draw.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 $dir = str_replace('\\', '/', $dir);
38 38
 
39 39
 /* Constants & Variables */
40
-$current_session_id=api_get_session_id();
40
+$current_session_id = api_get_session_id();
41 41
 $group_id = api_get_group_id();
42 42
 
43 43
 //path for svg-edit save
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 $file = basename($get_file);
51 51
 $temp_file = explode(".", $file);
52 52
 $filename = $temp_file[0];
53
-$nameTools = get_lang('EditDocument') . ': ' . $filename;
54
-$courseDir = $_course['path'] . '/document';
53
+$nameTools = get_lang('EditDocument').': '.$filename;
54
+$courseDir = $_course['path'].'/document';
55 55
 $is_allowed_to_edit = api_is_allowed_to_edit(null, true);
56 56
 
57 57
 /*	Other initialization code */
@@ -125,15 +125,15 @@  discard block
 block discarded – undo
125 125
 Display :: display_header($nameTools, 'Doc');
126 126
 echo '<div class="actions">';
127 127
 echo '<a href="document.php?id='.$parent_id.'">'.
128
-    Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
128
+    Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
129 129
 echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.'&origin=editdraw">'.
130
-    Display::return_icon('edit.png',get_lang('Rename').'/'.get_lang('Comments'),'',ICON_SIZE_MEDIUM).'</a>';
130
+    Display::return_icon('edit.png', get_lang('Rename').'/'.get_lang('Comments'), '', ICON_SIZE_MEDIUM).'</a>';
131 131
 echo '</div>';
132 132
 
133 133
 if (api_browser_support('svg')) {
134 134
 	//automatic loading the course language
135 135
 	$svgedit_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn');
136
-	$langsvgedit  = api_get_language_isocode();
136
+	$langsvgedit = api_get_language_isocode();
137 137
 	$langsvgedit = isset($svgedit_code_translation_table[$langsvgedit]) ? $svgedit_code_translation_table[$langsvgedit] : $langsvgedit;
138 138
 	$langsvgedit = file_exists(api_get_path(LIBRARY_PATH).'javascript/svgedit/locale/lang.'.$langsvgedit.'.js') ? $langsvgedit : 'en';
139 139
 	$svg_url = api_get_path(WEB_LIBRARY_PATH).'javascript/svgedit/svg-editor.php?url=../../../../../courses/'.$courseDir.$dir.$file.'&lang='.$langsvgedit;
Please login to merge, or discard this patch.
main/inc/lib/diagnoser.lib.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 {
16 16
     const STATUS_OK = 1;
17 17
     const STATUS_WARNING = 2;
18
-    const STATUS_ERROR 	= 3;
18
+    const STATUS_ERROR = 3;
19 19
     const STATUS_INFORMATION = 4;
20 20
 
21 21
     /**
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
                 $html .= '<li>';
43 43
             }
44 44
             $params['section'] = $section;
45
-            $html .='<a href="system_status.php?section='.$section.'">'.get_lang($section).'</a></li>';
45
+            $html .= '<a href="system_status.php?section='.$section.'">'.get_lang($section).'</a></li>';
46 46
         }
47 47
 
48 48
         $html .= '</ul><div class="tab-pane">';
49 49
 
50
-        $data = call_user_func(array($this, 'get_' . $currentSection . '_data'));
50
+        $data = call_user_func(array($this, 'get_'.$currentSection.'_data'));
51 51
         echo $html;
52 52
 
53 53
         if ($currentSection != 'paths') {
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
     {
115 115
         $array = array();
116 116
         $writable_folders = array(
117
-            api_get_path(SYS_APP_PATH) .'cache',
117
+            api_get_path(SYS_APP_PATH).'cache',
118 118
             api_get_path(SYS_COURSE_PATH),
119
-            api_get_path(SYS_APP_PATH) .'home',
120
-            api_get_path(SYS_APP_PATH) .'upload/users/',
121
-            api_get_path(SYS_PATH) .'main/default_course_document/images/',
119
+            api_get_path(SYS_APP_PATH).'home',
120
+            api_get_path(SYS_APP_PATH).'upload/users/',
121
+            api_get_path(SYS_PATH).'main/default_course_document/images/',
122 122
         );
123 123
         foreach ($writable_folders as $index => $folder) {
124 124
             $writable = is_writable($folder);
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
 
138 138
         $exists = file_exists(api_get_path(SYS_CODE_PATH).'install');
139 139
         $status = $exists ? self :: STATUS_WARNING : self :: STATUS_OK;
140
-        $array[] = $this->build_setting($status, '[FILES]', get_lang('DirectoryExists') . ': /install', 'http://be2.php.net/file_exists', $exists, 0, 'yes_no', get_lang('DirectoryShouldBeRemoved'));
140
+        $array[] = $this->build_setting($status, '[FILES]', get_lang('DirectoryExists').': /install', 'http://be2.php.net/file_exists', $exists, 0, 'yes_no', get_lang('DirectoryShouldBeRemoved'));
141 141
 
142 142
         $app_version = api_get_setting('chamilo_database_version');
143
-        $array[] = $this->build_setting(self :: STATUS_INFORMATION, '[DB]', 'chamilo_database_version', '#', $app_version, 0, null,  'Chamilo DB version');
143
+        $array[] = $this->build_setting(self :: STATUS_INFORMATION, '[DB]', 'chamilo_database_version', '#', $app_version, 0, null, 'Chamilo DB version');
144 144
 
145 145
         $access_url_id = api_get_current_access_url_id();
146 146
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                     $message2 .= get_lang('SpaceUsedOnSystemCannotBeMeasuredOnWindows');
153 153
                 } else {
154 154
                     $dir = api_get_path(SYS_PATH);
155
-                    $du = exec('du -sh ' . $dir, $err);
155
+                    $du = exec('du -sh '.$dir, $err);
156 156
                     list($size, $none) = explode("\t", $du);
157 157
                     $limit = $_configuration[$access_url_id]['hosting_limit_disk_space'];
158 158
                     $message2 .= sprintf(get_lang('TotalSpaceUsedByPortalXLimitIsYMB'), $size, $limit);
@@ -236,33 +236,33 @@  discard block
 block discarded – undo
236 236
         $array[] = $this->build_setting($status, '[INI]', 'default_charset', 'http://www.php.net/manual/en/ini.core.php#ini.default-charset', $setting, $req_setting, null, get_lang('DefaultCharsetInfo'));
237 237
 
238 238
         $setting = ini_get('max_execution_time');
239
-        $req_setting = '300 (' . get_lang('Minimum') . ')';
239
+        $req_setting = '300 ('.get_lang('Minimum').')';
240 240
         $status = $setting >= 300 ? self :: STATUS_OK : self :: STATUS_WARNING;
241 241
         $array[] = $this->build_setting($status, '[INI]', 'max_execution_time', 'http://www.php.net/manual/en/ini.core.php#ini.max-execution-time', $setting, $req_setting, null, get_lang('MaxExecutionTimeInfo'));
242 242
 
243 243
         $setting = ini_get('max_input_time');
244
-        $req_setting = '300 (' . get_lang('Minimum') . ')';
244
+        $req_setting = '300 ('.get_lang('Minimum').')';
245 245
         $status = $setting >= 300 ? self :: STATUS_OK : self :: STATUS_WARNING;
246 246
         $array[] = $this->build_setting($status, '[INI]', 'max_input_time', 'http://www.php.net/manual/en/ini.core.php#ini.max-input-time', $setting, $req_setting, null, get_lang('MaxInputTimeInfo'));
247 247
 
248 248
         $setting = ini_get('memory_limit');
249 249
         $req_setting = '>= '.REQUIRED_MIN_MEMORY_LIMIT.'M';
250 250
         $status = self :: STATUS_ERROR;
251
-        if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT)
251
+        if ((float) $setting >= REQUIRED_MIN_MEMORY_LIMIT)
252 252
             $status = self :: STATUS_OK;
253 253
         $array[] = $this->build_setting($status, '[INI]', 'memory_limit', 'http://www.php.net/manual/en/ini.core.php#ini.memory-limit', $setting, $req_setting, null, get_lang('MemoryLimitInfo'));
254 254
 
255 255
         $setting = ini_get('post_max_size');
256 256
         $req_setting = '>= '.REQUIRED_MIN_POST_MAX_SIZE.'M';
257 257
         $status = self :: STATUS_ERROR;
258
-        if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE)
258
+        if ((float) $setting >= REQUIRED_MIN_POST_MAX_SIZE)
259 259
             $status = self :: STATUS_OK;
260 260
         $array[] = $this->build_setting($status, '[INI]', 'post_max_size', 'http://www.php.net/manual/en/ini.core.php#ini.post-max-size', $setting, $req_setting, null, get_lang('PostMaxSizeInfo'));
261 261
 
262 262
         $setting = ini_get('upload_max_filesize');
263 263
         $req_setting = '>= '.REQUIRED_MIN_UPLOAD_MAX_FILESIZE.'M';
264 264
         $status = self :: STATUS_ERROR;
265
-        if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE)
265
+        if ((float) $setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE)
266 266
             $status = self :: STATUS_OK;
267 267
         $array[] = $this->build_setting($status, '[INI]', 'upload_max_filesize', 'http://www.php.net/manual/en/ini.core.php#ini.upload_max_filesize', $setting, $req_setting, null, get_lang('UploadMaxFilesizeInfo'));
268 268
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING;
277 277
         $array[] = $this->build_setting($status, '[SESSION]', 'session.gc_maxlifetime', 'http://www.php.net/manual/en/ini.core.php#session.gc-maxlifetime', $setting, $req_setting, null, get_lang('SessionGCMaxLifetimeInfo'));
278 278
 
279
-        if (api_check_browscap()){$setting = true;}else{$setting=false;}
279
+        if (api_check_browscap()) {$setting = true; } else {$setting = false; }
280 280
         $req_setting = true;
281 281
         $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING;
282 282
         $array[] = $this->build_setting($status, '[INI]', 'browscap', 'http://www.php.net/manual/en/misc.configuration.php#ini.browscap', $setting, $req_setting, 'on_off', get_lang('BrowscapInfo'));
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 
333 333
             $loaded = extension_loaded($extension);
334 334
             $status = $loaded ? self :: STATUS_OK : self :: STATUS_ERROR;
335
-            $array[] = $this->build_setting($status, '[EXTENSION]', get_lang('LoadedExtension') . ': ' . $extension, $url, $loaded, $expected_value, 'yes_no_optional', $comment);
335
+            $array[] = $this->build_setting($status, '[EXTENSION]', get_lang('LoadedExtension').': '.$extension, $url, $loaded, $expected_value, 'yes_no_optional', $comment);
336 336
         }
337 337
 
338 338
         return $array;
@@ -455,9 +455,9 @@  discard block
 block discarded – undo
455 455
         $formatted_expected_value = $expected_value;
456 456
 
457 457
         if ($formatter) {
458
-            if (method_exists($this, 'format_' . $formatter)) {
459
-                $formatted_current_value = call_user_func(array($this, 'format_' . $formatter), $current_value);
460
-                $formatted_expected_value = call_user_func(array($this, 'format_' . $formatter), $expected_value);
458
+            if (method_exists($this, 'format_'.$formatter)) {
459
+                $formatted_current_value = call_user_func(array($this, 'format_'.$formatter), $current_value);
460
+                $formatted_expected_value = call_user_func(array($this, 'format_'.$formatter), $expected_value);
461 461
             }
462 462
         }
463 463
 
@@ -472,13 +472,13 @@  discard block
 block discarded – undo
472 472
      */
473 473
     public function get_link($title, $url)
474 474
     {
475
-        return '<a href="' . $url . '" target="about:bank">' . $title . '</a>';
475
+        return '<a href="'.$url.'" target="about:bank">'.$title.'</a>';
476 476
     }
477 477
 
478 478
     public function format_yes_no_optional($value)
479 479
     {
480 480
     	$return = '';
481
-    	switch($value) {
481
+    	switch ($value) {
482 482
      		case 0:
483 483
      			$return = get_lang('No');
484 484
      			break;
Please login to merge, or discard this patch.
main/inc/lib/exercise_show_functions.lib.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 </td>
55 55
 
56 56
                 <?php
57
-                if (!api_is_allowed_to_edit(null,true) && $feedbackType != EXERCISE_FEEDBACK_TYPE_EXAM) { ?>
57
+                if (!api_is_allowed_to_edit(null, true) && $feedbackType != EXERCISE_FEEDBACK_TYPE_EXAM) { ?>
58 58
                     <td>
59 59
                         <?php
60 60
                         $comm = Event::get_comments($id, $questionId);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $showTotalScoreAndUserChoices
83 83
     ) {
84 84
         if (empty($id)) {
85
-            echo '<tr><td>'. Security::remove_XSS($answer).'</td></tr>';
85
+            echo '<tr><td>'.Security::remove_XSS($answer).'</td></tr>';
86 86
         } else {
87 87
         ?>
88 88
             <tr>
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
                 </td>
94 94
 
95 95
             <?php
96
-            if (!api_is_allowed_to_edit(null,true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { ?>
96
+            if (!api_is_allowed_to_edit(null, true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { ?>
97 97
                 <td>
98 98
                     <?php
99
-                    $comm = Event::get_comments($id,$questionId);
99
+                    $comm = Event::get_comments($id, $questionId);
100 100
                     ?>
101 101
                 </td>
102 102
             <?php } ?>
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         if (isset($fileUrl)) {
152 152
             echo '
153 153
                 <tr>
154
-                    <td><audio src="' . $fileUrl . '" controls></audio></td>
154
+                    <td><audio src="' . $fileUrl.'" controls></audio></td>
155 155
                 </tr>
156 156
             ';
157 157
         }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             echo '</tr>';
163 163
             if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
164 164
                 echo '<tr>';
165
-                echo Display::tag('td',get_lang('notCorrectedYet'), array('width'=>'45%'));
165
+                echo Display::tag('td', get_lang('notCorrectedYet'), array('width'=>'45%'));
166 166
                 echo '</tr>';
167 167
             } else {
168 168
                 echo '<tr><td>&nbsp;</td></tr>';
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
             }
176 176
             echo '</td>';
177 177
 
178
-            if (!api_is_allowed_to_edit(null,true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
178
+            if (!api_is_allowed_to_edit(null, true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
179 179
                 echo '<td>';
180
-                $comm = Event::get_comments($id,$questionId);
180
+                $comm = Event::get_comments($id, $questionId);
181 181
                 echo '</td>';
182 182
             }
183 183
             echo '</tr>';
@@ -306,12 +306,12 @@  discard block
 block discarded – undo
306 306
             }
307 307
         }
308 308
 
309
-        $icon = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio':'checkbox';
310
-		$icon .= $studentChoice?'_on':'_off';
309
+        $icon = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio' : 'checkbox';
310
+		$icon .= $studentChoice ? '_on' : '_off';
311 311
 		$icon .= '.gif';
312 312
 
313
-		$iconAnswer = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio':'checkbox';
314
-		$iconAnswer .= $answerCorrect?'_on':'_off';
313
+		$iconAnswer = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio' : 'checkbox';
314
+		$iconAnswer .= $answerCorrect ? '_on' : '_off';
315 315
 		$iconAnswer .= '.gif';
316 316
 
317 317
 		?>
@@ -351,8 +351,8 @@  discard block
 block discarded – undo
351 351
 			?>
352 352
 		</td>
353 353
 			<?php
354
-		    if ($ans==1) {
355
-		        $comm = Event::get_comments($id,$questionId);
354
+		    if ($ans == 1) {
355
+		        $comm = Event::get_comments($id, $questionId);
356 356
 			}
357 357
 		    ?>
358 358
 		 <?php } else { ?>
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
             ?>
456 456
         </td>
457 457
             <?php
458
-            if ($ans==1) {
458
+            if ($ans == 1) {
459 459
                 $comm = Event::get_comments($id, $questionId);
460 460
             }
461 461
             ?>
@@ -558,8 +558,8 @@  discard block
 block discarded – undo
558 558
             ?>
559 559
         </td>
560 560
             <?php
561
-            if ($ans==1) {
562
-                $comm = Event::get_comments($id,$questionId);
561
+            if ($ans == 1) {
562
+                $comm = Event::get_comments($id, $questionId);
563 563
             }
564 564
             ?>
565 565
          <?php } else { ?>
Please login to merge, or discard this patch.
plugin/courseblock/install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For license terms, see /license.txt */
3 3
 
4
-require_once dirname(__FILE__) . '/config.php';
4
+require_once dirname(__FILE__).'/config.php';
5 5
 
6 6
 if (!api_is_platform_admin()) {
7 7
     die ('You must have admin permissions to install plugins');
Please login to merge, or discard this patch.
main/inc/lib/surveymanager.lib.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -47,20 +47,20 @@  discard block
 block discarded – undo
47 47
         $res = Database::query($sql);
48 48
         $refs = array();
49 49
         $list = array();
50
-        $plain_array=array();
50
+        $plain_array = array();
51 51
 
52 52
         while ($survey = Database::fetch_array($res, 'ASSOC')) {
53
-            $plain_array[$survey['survey_id']]=$survey;
54
-            $surveys_parents[]=$survey['survey_version'];
55
-            $thisref = &$refs[ $survey['survey_id'] ];
53
+            $plain_array[$survey['survey_id']] = $survey;
54
+            $surveys_parents[] = $survey['survey_version'];
55
+            $thisref = &$refs[$survey['survey_id']];
56 56
             $thisref['parent_id'] = $survey['parent_id'];
57 57
             $thisref['name'] = $survey['name'];
58 58
             $thisref['id'] = $survey['survey_id'];
59 59
             $thisref['survey_version'] = $survey['survey_version'];
60 60
             if ($survey['parent_id'] == 0) {
61
-                $list[ $survey['survey_id'] ] = &$thisref;
61
+                $list[$survey['survey_id']] = &$thisref;
62 62
             } else {
63
-                $refs[ $survey['parent_id'] ]['children'][ $survey['survey_id'] ] = &$thisref;
63
+                $refs[$survey['parent_id']]['children'][$survey['survey_id']] = &$thisref;
64 64
             }
65 65
         }
66 66
         $this->surveylist = $list;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function getParentId($id)
80 80
     {
81 81
         $node = $this->plainsurveylist[$id];
82
-        if (is_array($node)&& !empty($node['parent_id'])) {
82
+        if (is_array($node) && !empty($node['parent_id'])) {
83 83
             return $node['parent_id'];
84 84
         } else {
85 85
             return -1;
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
         if (is_array($list)) {
100 100
             foreach ($list as $key => $node) {
101 101
                 if (isset($node['children']) && is_array($node['children'])) {
102
-                    $result[$key]= $node['name'];
102
+                    $result[$key] = $node['name'];
103 103
                     $re = self::createList($node['children']);
104 104
                     if (!empty($re)) {
105 105
                         if (is_array($re)) {
106 106
                             foreach ($re as $key => $r) {
107
-                                $result[$key] = '' . $r;
107
+                                $result[$key] = ''.$r;
108 108
                             }
109 109
                         } else {
110 110
                             $result[] = $re;
Please login to merge, or discard this patch.
main/survey/preview.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 						survey_question_option.c_id = $course_id
155 155
 					WHERE
156 156
 					    survey_question.survey_id = '".intval($survey_id)."' AND
157
-						survey_question.question_id IN (".Database::escape_string(implode(',',$paged_questions[$_GET['show']]), null, false).") AND
157
+						survey_question.question_id IN (".Database::escape_string(implode(',', $paged_questions[$_GET['show']]), null, false).") AND
158 158
 						survey_question.c_id =  $course_id
159 159
 					ORDER BY survey_question.sort, survey_question_option.sort ASC";
160 160
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 
192 192
 	// Displaying the form with the questions
193 193
 	if (isset($_GET['show'])) {
194
-		$show = (int)$_GET['show'] + 1;
194
+		$show = (int) $_GET['show'] + 1;
195 195
 	} else {
196 196
 		$show = 0;
197 197
 	}
Please login to merge, or discard this patch.
main/ticket/tutor_report.lib.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     $table_post = Database::get_course_table(TABLE_FORUM_POST);
22 22
     $table_work = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
23 23
     $course_code = Database::escape_string($course_code);
24
-    $res = Database::query("SELECT COUNT(*) as cant FROM $table_reporte_semanas WHERE course_code = '" . $course_code . "'");
24
+    $res = Database::query("SELECT COUNT(*) as cant FROM $table_reporte_semanas WHERE course_code = '".$course_code."'");
25 25
     $sqlWeeks = "SELECT semanas FROM $table_semanas_curso WHERE course_code = '$course_code'";
26 26
     $resWeeks = Database::query($sqlWeeks);
27 27
     $weeks = Database::fetch_object($resWeeks);
@@ -105,52 +105,52 @@  discard block
 block discarded – undo
105 105
     $lineHeaderExport = array(null, null);
106 106
     $lineHeaderExport2 = array(null, ull);
107 107
     while ($rowe = Database::fetch_assoc($resultHeader)) {
108
-        $lineHeaderExport[] = utf8_decode('Work' . $rowe['week_id']);
109
-        $lineHeaderExport[] = utf8_decode('Forum' . $rowe['week_id']);
108
+        $lineHeaderExport[] = utf8_decode('Work'.$rowe['week_id']);
109
+        $lineHeaderExport[] = utf8_decode('Forum'.$rowe['week_id']);
110 110
         //$fila_export_encabezado[] =  utf8_decode('Eval'.$rowe['week_id']);
111 111
         //$fila_export_encabezado[] =  utf8_decode('PC'.$rowe['week_id']);
112 112
         $lineHeaderExport2[] = utf8_decode($rowe['work_title']);
113 113
         $lineHeaderExport2[] = utf8_decode($rowe['thread_title']);
114 114
         //$fila_export_encabezado2[] = utf8_decode($rowe['eval_title']);
115 115
         //$fila_export_encabezado2[] = utf8_decode($rowe['pc_title']);
116
-        $fila_export = array('Work' . $rowe['week_id'], 'Forum' . $rowe['week_id'], 'Eval' . $rowe['week_id'], 'PC' . $rowe['week_id']);
116
+        $fila_export = array('Work'.$rowe['week_id'], 'Forum'.$rowe['week_id'], 'Eval'.$rowe['week_id'], 'PC'.$rowe['week_id']);
117 117
         if ($rowe['week_id'] > (($page - 1) * 7) && $rowe['week_id'] <= (7 * $page)) {
118 118
             $ids[$rowe['week_id']] = $rowe['id'];
119
-            $line.='<th>
120
-                <a href="#" onClick="showContent(' . "'tarea" . $rowe['week_id'] . "'" . ');">Work' . $rowe['week_id'] . '
121
-                        <div class="blackboard_hide" id="tarea' . $rowe['week_id'] . '">' . $rowe['work_title'] . '</div>
119
+            $line .= '<th>
120
+                <a href="#" onClick="showContent(' . "'tarea".$rowe['week_id']."'".');">Work'.$rowe['week_id'].'
121
+                        <div class="blackboard_hide" id="tarea' . $rowe['week_id'].'">'.$rowe['work_title'].'</div>
122 122
                 </a></th>';
123
-            $line.= '<th>
124
-                <a href="#" onClick="showContent(' . "'foro" . $rowe['week_id'] . "'" . ');">Forum' . $rowe['week_id'] . '
125
-                        <div class="blackboard_hide" id="foro' . $rowe['week_id'] . '">' . $rowe['thread_title'] . '</div>
123
+            $line .= '<th>
124
+                <a href="#" onClick="showContent(' . "'foro".$rowe['week_id']."'".');">Forum'.$rowe['week_id'].'
125
+                        <div class="blackboard_hide" id="foro' . $rowe['week_id'].'">'.$rowe['thread_title'].'</div>
126 126
                 </a>
127 127
                 </th>';
128 128
         }
129 129
     }
130 130
     $tableExport[] = $lineHeaderExport;
131 131
     $tableExport[] = $lineHeaderExport2;
132
-    $line.= '</tr>';
132
+    $line .= '</tr>';
133 133
 
134 134
     $html = '<form action="tutor.php" name="semanas" id="semanas" method="POST">
135 135
             <div class="row">
136
-            ' . get_lang('SelectWeeksSpan') . '
136
+            ' . get_lang('SelectWeeksSpan').'
137 137
             <select name="weeksNumber" id="weeksNumber" onChange="submit();">
138
-            <option value="7" ' . (($weeksCount == 7) ? 'selected="selected"' : "") . '>7 weeks</option>
139
-            <option value="14" ' . (($weeksCount == 14) ? 'selected="selected"' : "") . '>14 weeks</option>
138
+            <option value="7" ' . (($weeksCount == 7) ? 'selected="selected"' : "").'>7 weeks</option>
139
+            <option value="14" ' . (($weeksCount == 14) ? 'selected="selected"' : "").'>14 weeks</option>
140 140
             </select>';
141 141
 
142 142
 
143 143
     if ($weeksCount == 14) {
144
-        $html .= '<span style="float:right;"><a href="tutor.php?page=' . (($page == 1) ? 2 : 1) . '">' . (($page == 1) ? "Siguiente" : "Anterior") . '</a></span>';
144
+        $html .= '<span style="float:right;"><a href="tutor.php?page='.(($page == 1) ? 2 : 1).'">'.(($page == 1) ? "Siguiente" : "Anterior").'</a></span>';
145 145
     }
146
-    $html .= '<span style="float:right;"><a href="' . api_get_self() . '?action=export' . $get_parameter . $get_parameter2 . '">' . Display::return_icon('export_excel.png', get_lang('Export'), '', '32') . '</a></span>';
146
+    $html .= '<span style="float:right;"><a href="'.api_get_self().'?action=export'.$get_parameter.$get_parameter2.'">'.Display::return_icon('export_excel.png', get_lang('Export'), '', '32').'</a></span>';
147 147
 
148 148
     $html .= '</form>';
149 149
     $html .= '<table class="reports">';
150 150
     $html .= '<tr>
151 151
             <th ></th>';
152 152
     for ($i = (7 * $page - 6); $i <= $page * 7; $i++) {
153
-        $html .= '<th colspan="2">Week ' . $i . '<a href="assign_tickets.php?id=' . $ids[$i] . '" class="ajax">' . Display::return_icon('edit.png', get_lang('Edit'), array('width' => '16', 'height' => '16'), 22) . '</a></th>';
153
+        $html .= '<th colspan="2">Week '.$i.'<a href="assign_tickets.php?id='.$ids[$i].'" class="ajax">'.Display::return_icon('edit.png', get_lang('Edit'), array('width' => '16', 'height' => '16'), 22).'</a></th>';
154 154
     }
155 155
     $html .= '</tr>';
156 156
     $html .= $line;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         if ($row['week_id'] > (($page - 1) * 7) && $row['week_id'] <= (7 * $page)) {
168 168
             $results[$row['username']][$row['week_id']] = $row;
169 169
             if (count($results[$row['username']]) == 7) {
170
-                $html.= showStudentResult($results[$row['username']], $page);
170
+                $html .= showStudentResult($results[$row['username']], $page);
171 171
             }
172 172
         }
173 173
         if (count($resultadose[$row['username']]) == $weeksCount) {
@@ -190,12 +190,12 @@  discard block
 block discarded – undo
190 190
     $inicio = (7 * $pagina - 6);
191 191
     $fila = '<tr>';
192 192
 
193
-    $fila.= '<td><a href="' . api_get_path(WEB_CODE_PATH) . 'user/userInfo.php?' . api_get_cidreq() . '&uInfo=' . $datos[$inicio]['user_id'] . '">' . $datos[$inicio]['username'] . '</a></td>';
193
+    $fila .= '<td><a href="'.api_get_path(WEB_CODE_PATH).'user/userInfo.php?'.api_get_cidreq().'&uInfo='.$datos[$inicio]['user_id'].'">'.$datos[$inicio]['username'].'</a></td>';
194 194
     foreach ($datos as $dato) {
195
-        $fila.= '<td align="center">' . (($dato['work_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')) . '</td>';
196
-        $fila.= '<td align="center">' . (($dato['thread_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')) . '</td>';
195
+        $fila .= '<td align="center">'.(($dato['work_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')).'</td>';
196
+        $fila .= '<td align="center">'.(($dato['thread_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')).'</td>';
197 197
     }
198
-    $fila.= '</tr>';
198
+    $fila .= '</tr>';
199 199
     return $fila;
200 200
 }
201 201
 
Please login to merge, or discard this patch.