Completed
Push — 1.11.x ( d84d27...922b6f )
by José
30:17
created
src/Chamilo/ThemeBundle/EventListener/NavbarMessageListDemoListener.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@
 block discarded – undo
16 16
 
17 17
     public function onListMessages(MessageListEvent $event) {
18 18
 
19
-        foreach($this->getMessages() as $msg) {
19
+        foreach ($this->getMessages() as $msg) {
20 20
             $event->addMessage($msg);
21 21
         }
22 22
     }
23 23
 
24 24
     protected function getMessages() {
25 25
         return array(
26
-            new MessageModel(new UserModel('Karl kettenkit'),'Dude! do something!', new \DateTime('-3 days')),
27
-            new MessageModel(new UserModel('Jack Trockendoc'),'This is some subject', new \DateTime('-10 month')),
26
+            new MessageModel(new UserModel('Karl kettenkit'), 'Dude! do something!', new \DateTime('-3 days')),
27
+            new MessageModel(new UserModel('Jack Trockendoc'), 'This is some subject', new \DateTime('-10 month')),
28 28
         );
29 29
     }
30 30
 
Please login to merge, or discard this patch.
Chamilo/ThemeBundle/EventListener/NavbarNotificationListDemoListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
     public function onListNotifications(NotificationListEvent $event) {
18 18
 
19
-        foreach($this->getNotifications() as $notify){
19
+        foreach ($this->getNotifications() as $notify) {
20 20
             $event->addNotification($notify);
21 21
         }
22 22
 
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Admin/UserGroupAdmin.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             ->add('users', 'sonata_type_collection', array(
29 29
                     'cascade_validation' => true,
30 30
                 ), array(
31
-                   // 'allow_delete' => true,
31
+                    // 'allow_delete' => true,
32 32
                     'by_reference' => false,
33 33
                     'edit'              => 'inline',
34 34
                     'inline'            => 'table',
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/DependencyInjection/ChamiloCoreExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         $loader = new Loader\YamlFileLoader(
24 24
             $container,
25
-            new FileLocator(__DIR__ . '/../Resources/config')
25
+            new FileLocator(__DIR__.'/../Resources/config')
26 26
         );
27 27
 
28 28
         $loader->load('services.yml');
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/Skill.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -222,14 +222,14 @@
 block discarded – undo
222 222
                 return \Display::return_icon('badges-default.png', null, null, ICON_SIZE_BIG, null, true);
223 223
             }
224 224
 
225
-            return api_get_path(WEB_UPLOAD_PATH) . 'badges/' . sha1($this->name) . '-small.png';
225
+            return api_get_path(WEB_UPLOAD_PATH).'badges/'.sha1($this->name).'-small.png';
226 226
         }
227 227
 
228 228
         if (empty($this->icon)) {
229 229
             return \Display::return_icon('badges-default.png', null, null, ICON_SIZE_HUGE, null, true);
230 230
         }
231 231
 
232
-        return api_get_path(WEB_UPLOAD_PATH) . "badges/{$this->icon}";
232
+        return api_get_path(WEB_UPLOAD_PATH)."badges/{$this->icon}";
233 233
     }
234 234
 
235 235
     /**
Please login to merge, or discard this patch.
main/admin/user_update_import.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
             // We are sure that the extra field exists.
216 216
             foreach ($extra_fields as $extras) {
217 217
                 if (isset($user[$extras[1]])) {
218
-                    $key 	= $extras[1];
219
-                    $value 	= $user[$extras[1]];
218
+                    $key = $extras[1];
219
+                    $value = $user[$extras[1]];
220 220
                     UserManager::update_extra_field_value($user_id, $key, $value);
221 221
                 }
222 222
             }
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     global $current_tag;
254 254
     switch ($data) {
255 255
         case 'Contact':
256
-            $user = array ();
256
+            $user = array();
257 257
             break;
258 258
         default:
259 259
             $current_tag = $data;
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 
351 351
     if (in_array($ext_import_file, $allowed_file_mimetype)) {
352 352
         if (strcmp($file_type, 'csv') === 0 && $ext_import_file == $allowed_file_mimetype[0]) {
353
-            $users	= parse_csv_data($_FILES['import_file']['tmp_name']);
353
+            $users = parse_csv_data($_FILES['import_file']['tmp_name']);
354 354
             $errors = validate_data($users);
355 355
             $error_kind_file = false;
356 356
         } elseif (strcmp($file_type, 'xml') === 0 && $ext_import_file == $allowed_file_mimetype[1]) {
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -454,7 +454,10 @@
 block discarded – undo
454 454
     <blockquote>
455 455
         <pre>
456 456
             <b>UserName</b>;LastName;FirstName;Email;NewUserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;Active;Language;Courses;ClassId;
457
-            xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;0/1;xxx;<span style="color:red;"><?php if (count($list_reponse) > 0) echo implode(';', $list_reponse).';'; ?></span>xxx1|xxx2|xxx3;1;<br />
457
+            xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;0/1;xxx;<span style="color:red;"><?php if (count($list_reponse) > 0) {
458
+    echo implode(';', $list_reponse).';';
459
+}
460
+?></span>xxx1|xxx2|xxx3;1;<br />
458 461
         </pre>
459 462
     </blockquote>
460 463
 <p><?php
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@
 block discarded – undo
60 60
                     $user['error'] = get_lang('UserNameNotAvailable');
61 61
                     $errors[] = $user;
62 62
                 }
63
-             }
64
-          }
63
+                }
64
+            }
65 65
 
66 66
         // 3. Check status.
67 67
         if (isset($user['Status']) && !api_status_exists($user['Status'])) {
Please login to merge, or discard this patch.
main/social/my_skills_report.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 $isDRH = api_is_drh();
13 13
 
14 14
 if (!$isStudent && !$isStudentBoss && !$isDRH) {
15
-    header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/skills_wheel.php');
15
+    header('Location: '.api_get_path(WEB_CODE_PATH).'social/skills_wheel.php');
16 16
     exit;
17 17
 }
18 18
 
Please login to merge, or discard this patch.
main/course_progress/thematic_plan.php 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -47,15 +47,15 @@
 block discarded – undo
47 47
         $form->addElement('hidden', 'description_type['.$id.']', $id);
48 48
         $form->addText('title['.$id.']', get_lang('Title'), false, array('size'=>'50'));
49 49
         $form->addHtmlEditor(
50
-           'description['.$id.']',
51
-           get_lang('Description'),
52
-           false,
53
-           false,
54
-           array(
55
-               'ToolbarStartExpanded' => 'false',
56
-               'ToolbarSet' => 'TrainingDescription',
57
-               'Height' => '150'
58
-           )
50
+            'description['.$id.']',
51
+            get_lang('Description'),
52
+            false,
53
+            false,
54
+            array(
55
+                'ToolbarStartExpanded' => 'false',
56
+                'ToolbarSet' => 'TrainingDescription',
57
+                'Height' => '150'
58
+            )
59 59
         );
60 60
 
61 61
         if (!empty($thematic_simple_list) && in_array($id, $thematic_simple_list)) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 // actions menu
11 11
 $new_thematic_plan_data = array();
12 12
 if (!empty($thematic_plan_data))
13
-foreach($thematic_plan_data as $thematic_item) {
13
+foreach ($thematic_plan_data as $thematic_item) {
14 14
     $thematic_simple_list[] = $thematic_item['description_type'];
15 15
     $new_thematic_plan_data[$thematic_item['description_type']] = $thematic_item;
16 16
 }
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     }
26 26
 }
27 27
 
28
-$i=1;
28
+$i = 1;
29 29
 
30 30
 echo Display::tag('h2', $thematic_data['title']);
31 31
 echo $thematic_data['content'];
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
             $thematic_plan = null;
68 68
         } else {
69 69
             $thematic_plan = null;
70
-            $default['title['.$id.']']       = $title;
71
-            $default['description['.$id.']']= '';
70
+            $default['title['.$id.']'] = $title;
71
+            $default['description['.$id.']'] = '';
72 72
         }
73 73
         $form->setDefaults($default);
74 74
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,9 +9,10 @@
 block discarded – undo
9 9
 
10 10
 // actions menu
11 11
 $new_thematic_plan_data = array();
12
-if (!empty($thematic_plan_data))
13
-foreach($thematic_plan_data as $thematic_item) {
12
+if (!empty($thematic_plan_data)) {
13
+    foreach($thematic_plan_data as $thematic_item) {
14 14
     $thematic_simple_list[] = $thematic_item['description_type'];
15
+}
15 16
     $new_thematic_plan_data[$thematic_item['description_type']] = $thematic_item;
16 17
 }
17 18
 
Please login to merge, or discard this patch.
main/inc/lib/exercise_show_functions.lib.php 4 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -434,8 +434,7 @@
 block discarded – undo
434 434
             } else {
435 435
                 echo $question->options[2];
436 436
             }
437
-        }
438
-        else {
437
+        } else {
439 438
             echo '-';
440 439
         }
441 440
         ?>
Please login to merge, or discard this patch.
Indentation   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -17,25 +17,25 @@  discard block
 block discarded – undo
17 17
  */
18 18
 class ExerciseShowFunctions
19 19
 {
20
-	/**
21
-	 * Shows the answer to a fill-in-the-blanks question, as HTML
20
+    /**
21
+     * Shows the answer to a fill-in-the-blanks question, as HTML
22 22
      * @param int $feedbackType
23
-	 * @param string    $answer
24
-	 * @param int $id       Exercise ID
25
-	 * @param int $questionId      Question ID
23
+     * @param string    $answer
24
+     * @param int $id       Exercise ID
25
+     * @param int $questionId      Question ID
26 26
      * @param int $resultsDisabled
27 27
      * @param string $originalStudentAnswer
28 28
      *
29
-	 * @return void
30
-	 */
31
-	public static function display_fill_in_blanks_answer(
32
-	    $feedbackType,
33
-	    $answer,
34
-	    $id,
35
-	    $questionId,
36
-	    $resultsDisabled,
37
-	    $originalStudentAnswer = '',
38
-	    $showTotalScoreAndUserChoices
29
+     * @return void
30
+     */
31
+    public static function display_fill_in_blanks_answer(
32
+        $feedbackType,
33
+        $answer,
34
+        $id,
35
+        $questionId,
36
+        $resultsDisabled,
37
+        $originalStudentAnswer = '',
38
+        $showTotalScoreAndUserChoices
39 39
     ) {
40 40
         $answerHTML = FillBlanks::getHtmlDisplayForAnswer($answer, $resultsDisabled, $showTotalScoreAndUserChoices);
41 41
         if (strpos($originalStudentAnswer, 'font color') !== false) {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             </tr>
65 65
         <?php
66 66
         }
67
-	}
67
+    }
68 68
 
69 69
     /**
70 70
      * Shows the answer to a calculated question, as HTML
@@ -105,20 +105,20 @@  discard block
 block discarded – undo
105 105
         }
106 106
     }
107 107
 
108
-	/**
109
-	 * Shows the answer to a free-answer question, as HTML
110
-	 * @param string    Answer text
111
-	 * @param int       Exercise ID
112
-	 * @param int       Question ID
113
-	 * @return void
114
-	 */
115
-	public static function display_free_answer(
116
-	    $feedback_type,
117
-	    $answer,
118
-	    $exe_id,
119
-	    $questionId,
120
-	    $questionScore = null,
121
-	    $results_disabled = 0
108
+    /**
109
+     * Shows the answer to a free-answer question, as HTML
110
+     * @param string    Answer text
111
+     * @param int       Exercise ID
112
+     * @param int       Question ID
113
+     * @return void
114
+     */
115
+    public static function display_free_answer(
116
+        $feedback_type,
117
+        $answer,
118
+        $exe_id,
119
+        $questionId,
120
+        $questionScore = null,
121
+        $results_disabled = 0
122 122
     ) {
123 123
         $comments = Event::get_comments($exe_id, $questionId);
124 124
 
@@ -136,17 +136,17 @@  discard block
 block discarded – undo
136 136
                 echo '</tr>';
137 137
             }
138 138
         }
139
-	}
139
+    }
140 140
 
141 141
     /**
142
-    * @param $feedback_type
143
-    * @param $answer
144
-    * @param $id
145
-    * @param $questionId
146
-    * @param null $nano
147
-    * @param int $results_disabled
142
+     * @param $feedback_type
143
+     * @param $answer
144
+     * @param $id
145
+     * @param $questionId
146
+     * @param null $nano
147
+     * @param int $results_disabled
148 148
      */
149
-	public static function display_oral_expression_answer($feedback_type, $answer, $id, $questionId, $fileUrl = null, $results_disabled = 0)
149
+    public static function display_oral_expression_answer($feedback_type, $answer, $id, $questionId, $fileUrl = null, $results_disabled = 0)
150 150
     {
151 151
         if (isset($fileUrl)) {
152 152
             echo '
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
         }
185 185
     }
186 186
 
187
-	/**
188
-	 * Displays the answer to a hotspot question
187
+    /**
188
+     * Displays the answer to a hotspot question
189 189
      * @param int $feedback_type
190 190
      * @param int $answerId
191 191
      * @param string $answer
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      * @param int $resultsDisabled
195 195
      * @param int $orderColor
196 196
      */
197
-	public static function display_hotspot_answer(
197
+    public static function display_hotspot_answer(
198 198
         $feedback_type,
199 199
         $answerId,
200 200
         $answer,
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             }
218 218
         }
219 219
 
220
-		$hotspot_colors = array(
220
+        $hotspot_colors = array(
221 221
             "", // $i starts from 1 on next loop (ugly fix)
222 222
             "#4271B5",
223 223
             "#FE8E16",
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
             "#F7BDE2"
235 235
         );
236 236
 
237
-		?>
237
+        ?>
238 238
 		<table class="data_table">
239 239
 		<tr>
240 240
             <td class="text-center" width="5%">
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
 			<td class="text-left" width="10%">
247 247
 				<?php
248 248
                 if (!$hide_expected_answer) {
249
-    				$my_choice = $studentChoice ? get_lang('Correct') : get_lang('Fault');
250
-    				echo $my_choice;
249
+                    $my_choice = $studentChoice ? get_lang('Correct') : get_lang('Fault');
250
+                    echo $my_choice;
251 251
                 }
252
-				?>
252
+                ?>
253 253
 			</td>
254 254
 			<?php if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { ?>
255 255
 			<td class="text-left" width="60%">
@@ -257,29 +257,29 @@  discard block
 block discarded – undo
257 257
                 if ($studentChoice) {
258 258
                     echo '<span style="font-weight: bold; color: #008000;">'.nl2br($answerComment).'</span>';
259 259
                 }
260
-				?>
260
+                ?>
261 261
 			</td>
262 262
 			<?php } else { ?>
263 263
 				<td class="text-left" width="60%">&nbsp;</td>
264 264
 			<?php } ?>
265 265
 		</tr>
266 266
 		<?php
267
-	}
268
-
269
-	/**
270
-	 * Display the answers to a multiple choice question
271
-	 * @param int $feedback_type Feedback type
272
-	 * @param integer Answer type
273
-	 * @param integer Student choice
274
-	 * @param string  Textual answer
275
-	 * @param string  Comment on answer
276
-	 * @param string  Correct answer comment
277
-	 * @param integer Exercise ID
278
-	 * @param integer Question ID
279
-	 * @param boolean Whether to show the answer comment or not
280
-	 * @return void
281
-	 */
282
-	public static function display_unique_or_multiple_answer(
267
+    }
268
+
269
+    /**
270
+     * Display the answers to a multiple choice question
271
+     * @param int $feedback_type Feedback type
272
+     * @param integer Answer type
273
+     * @param integer Student choice
274
+     * @param string  Textual answer
275
+     * @param string  Comment on answer
276
+     * @param string  Correct answer comment
277
+     * @param integer Exercise ID
278
+     * @param integer Question ID
279
+     * @param boolean Whether to show the answer comment or not
280
+     * @return void
281
+     */
282
+    public static function display_unique_or_multiple_answer(
283 283
         $feedback_type,
284 284
         $answerType,
285 285
         $studentChoice,
@@ -307,14 +307,14 @@  discard block
 block discarded – undo
307 307
         }
308 308
 
309 309
         $icon = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio':'checkbox';
310
-		$icon .= $studentChoice?'_on':'_off';
311
-		$icon .= '.gif';
310
+        $icon .= $studentChoice?'_on':'_off';
311
+        $icon .= '.gif';
312 312
 
313
-		$iconAnswer = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio':'checkbox';
314
-		$iconAnswer .= $answerCorrect?'_on':'_off';
315
-		$iconAnswer .= '.gif';
313
+        $iconAnswer = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio':'checkbox';
314
+        $iconAnswer .= $answerCorrect?'_on':'_off';
315
+        $iconAnswer .= '.gif';
316 316
 
317
-		?>
317
+        ?>
318 318
 		<tr>
319 319
 		<td width="5%">
320 320
 			<?php echo Display::return_icon($icon); ?>
@@ -328,39 +328,39 @@  discard block
 block discarded – undo
328 328
 		</td>
329 329
 		<td width="40%">
330 330
 			<?php
331
-			echo $answer;
332
-			?>
331
+            echo $answer;
332
+            ?>
333 333
 		</td>
334 334
 
335 335
 		<?php if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { ?>
336 336
 		<td width="20%">
337 337
 			<?php
338 338
             if ($studentChoice) {
339
-				if ($answerCorrect) {
339
+                if ($answerCorrect) {
340 340
                     $color = 'green';
341
-					//echo '<span style="font-weight: bold; color: #008000;">'.nl2br($answerComment).'</span>';
342
-				} else {
341
+                    //echo '<span style="font-weight: bold; color: #008000;">'.nl2br($answerComment).'</span>';
342
+                } else {
343 343
                     $color = 'black';
344 344
                     //echo '<span style="font-weight: bold; color: #FF0000;">'.nl2br($answerComment).'</span>';
345
-				}
346
-				if ($hide_expected_answer) {
347
-				    $color = '';
348
-				}
345
+                }
346
+                if ($hide_expected_answer) {
347
+                    $color = '';
348
+                }
349 349
                 echo '<span style="font-weight: bold; color: '.$color.';">'.nl2br($answerComment).'</span>';
350
-			}
351
-			?>
350
+            }
351
+            ?>
352 352
 		</td>
353 353
 			<?php
354
-		    if ($ans==1) {
355
-		        $comm = Event::get_comments($id,$questionId);
356
-			}
357
-		    ?>
354
+            if ($ans==1) {
355
+                $comm = Event::get_comments($id,$questionId);
356
+            }
357
+            ?>
358 358
 		 <?php } else { ?>
359 359
 			<td>&nbsp;</td>
360 360
 		<?php } ?>
361 361
 		</tr>
362 362
 		<?php
363
-	}
363
+    }
364 364
 
365 365
     /**
366 366
      * Display the answers to a multiple choice question
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
         if (isset($new_options[$studentChoice])) {
414 414
             echo get_lang($new_options[$studentChoice]['name']);
415 415
         } else {
416
-        	echo '-';
416
+            echo '-';
417 417
         }
418 418
 
419 419
         ?>
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
         <td width="5%">
422 422
         <?php
423 423
 
424
-		//Expected choice
424
+        //Expected choice
425 425
         if (!$hide_expected_answer) {
426 426
             if (isset($new_options[$answerCorrect])) {
427 427
                 echo get_lang($new_options[$answerCorrect]['name']);
@@ -447,8 +447,8 @@  discard block
 block discarded – undo
447 447
                 }
448 448
 
449 449
                 if ($hide_expected_answer) {
450
-				    $color = '';
451
-				}
450
+                    $color = '';
451
+                }
452 452
 
453 453
                 echo '<span style="font-weight: bold; color: '.$color.';">'.nl2br($answerComment).'</span>';
454 454
             }
@@ -466,19 +466,19 @@  discard block
 block discarded – undo
466 466
         <?php
467 467
     }
468 468
 
469
-     /**
470
-     * Display the answers to a multiple choice question
471
-     *
472
-     * @param integer Answer type
473
-     * @param integer Student choice
474
-     * @param string  Textual answer
475
-     * @param string  Comment on answer
476
-     * @param string  Correct answer comment
477
-     * @param integer Exercise ID
478
-     * @param integer Question ID
479
-     * @param boolean Whether to show the answer comment or not
480
-     * @return void
481
-     */
469
+        /**
470
+         * Display the answers to a multiple choice question
471
+         *
472
+         * @param integer Answer type
473
+         * @param integer Student choice
474
+         * @param string  Textual answer
475
+         * @param string  Comment on answer
476
+         * @param string  Correct answer comment
477
+         * @param integer Exercise ID
478
+         * @param integer Question ID
479
+         * @param boolean Whether to show the answer comment or not
480
+         * @return void
481
+         */
482 482
     public static function display_multiple_answer_combination_true_false(
483 483
         $feedback_type,
484 484
         $answerType,
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
         <tr>
510 510
         <td width="5%">
511 511
         <?php
512
-		//Your choice
512
+        //Your choice
513 513
         $question = new MultipleAnswerCombinationTrueFalse();
514 514
         if (isset($question->options[$studentChoice])) {
515 515
             echo $question->options[$studentChoice];
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
         </td>
521 521
         <td width="5%">
522 522
         <?php
523
-		//Expected choice
523
+        //Expected choice
524 524
         if (!$hide_expected_answer) {
525 525
             if (isset($question->options[$answerCorrect])) {
526 526
                 echo $question->options[$answerCorrect];
@@ -545,14 +545,14 @@  discard block
 block discarded – undo
545 545
             <?php
546 546
             //@todo replace this harcoded value
547 547
             if ($studentChoice) {
548
-                 $color = "black";
548
+                    $color = "black";
549 549
                 if ($studentChoice == $answerCorrect) {
550 550
                     $color = "green";
551 551
                 }
552
-            	//echo '<span style="font-weight: bold; color: #000;">'.nl2br($answerComment).'</span>';
552
+                //echo '<span style="font-weight: bold; color: #000;">'.nl2br($answerComment).'</span>';
553 553
                 if ($hide_expected_answer) {
554 554
                     $color = '';
555
-				}
555
+                }
556 556
                 echo '<span style="font-weight: bold; color: '.$color.';">'.nl2br($answerComment).'</span>';
557 557
             }
558 558
             ?>
Please login to merge, or discard this 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.
Doc Comments   +36 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,6 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * @param int $questionId      Question ID
26 26
      * @param int $resultsDisabled
27 27
      * @param string $originalStudentAnswer
28
+     * @param boolean $showTotalScoreAndUserChoices
28 29
      *
29 30
 	 * @return void
30 31
 	 */
@@ -71,6 +72,11 @@  discard block
 block discarded – undo
71 72
      * @param string    Answer text
72 73
      * @param int       Exercise ID
73 74
      * @param int       Question ID
75
+     * @param integer $feedback_type
76
+     * @param string $answer
77
+     * @param integer $id
78
+     * @param integer $questionId
79
+     * @param boolean|string $showTotalScoreAndUserChoices
74 80
      * @return void
75 81
      */
76 82
     public static function display_calculated_answer(
@@ -110,6 +116,9 @@  discard block
 block discarded – undo
110 116
 	 * @param string    Answer text
111 117
 	 * @param int       Exercise ID
112 118
 	 * @param int       Question ID
119
+	 * @param integer $feedback_type
120
+	 * @param integer $exe_id
121
+	 * @param integer $questionId
113 122
 	 * @return void
114 123
 	 */
115 124
 	public static function display_free_answer(
@@ -139,11 +148,10 @@  discard block
 block discarded – undo
139 148
 	}
140 149
 
141 150
     /**
142
-    * @param $feedback_type
151
+    * @param integer $feedback_type
143 152
     * @param $answer
144
-    * @param $id
145
-    * @param $questionId
146
-    * @param null $nano
153
+    * @param integer $id
154
+    * @param integer $questionId
147 155
     * @param int $results_disabled
148 156
      */
149 157
 	public static function display_oral_expression_answer($feedback_type, $answer, $id, $questionId, $fileUrl = null, $results_disabled = 0)
@@ -193,6 +201,7 @@  discard block
 block discarded – undo
193 201
      * @param string $answerComment
194 202
      * @param int $resultsDisabled
195 203
      * @param int $orderColor
204
+     * @param boolean $showTotalScoreAndUserChoices
196 205
      */
197 206
 	public static function display_hotspot_answer(
198 207
         $feedback_type,
@@ -277,6 +286,13 @@  discard block
 block discarded – undo
277 286
 	 * @param integer Exercise ID
278 287
 	 * @param integer Question ID
279 288
 	 * @param boolean Whether to show the answer comment or not
289
+	 * @param integer $answerType
290
+	 * @param string $answer
291
+	 * @param string $answerComment
292
+	 * @param integer $answerCorrect
293
+	 * @param integer $id
294
+	 * @param integer $questionId
295
+	 * @param boolean $showTotalScoreAndUserChoices
280 296
 	 * @return void
281 297
 	 */
282 298
 	public static function display_unique_or_multiple_answer(
@@ -373,6 +389,14 @@  discard block
 block discarded – undo
373 389
      * @param integer Exercise ID
374 390
      * @param integer Question ID
375 391
      * @param boolean Whether to show the answer comment or not
392
+     * @param integer $feedback_type
393
+     * @param integer $answerType
394
+     * @param string $answer
395
+     * @param string $answerComment
396
+     * @param integer $answerCorrect
397
+     * @param integer $id
398
+     * @param integer $questionId
399
+     * @param boolean $showTotalScoreAndUserChoices
376 400
      * @return void
377 401
      */
378 402
     public static function display_multiple_answer_true_false(
@@ -477,6 +501,14 @@  discard block
 block discarded – undo
477 501
      * @param integer Exercise ID
478 502
      * @param integer Question ID
479 503
      * @param boolean Whether to show the answer comment or not
504
+     * @param integer $feedback_type
505
+     * @param integer $answerType
506
+     * @param string $answer
507
+     * @param string $answerComment
508
+     * @param integer $answerCorrect
509
+     * @param integer $id
510
+     * @param integer $questionId
511
+     * @param boolean $showTotalScoreAndUserChoices
480 512
      * @return void
481 513
      */
482 514
     public static function display_multiple_answer_combination_true_false(
Please login to merge, or discard this patch.