Passed
Push — 1.10.x ( f9cbcd...83c791 )
by Yannick
657:30 queued 614:41
created
main/attendance/attendance_sheet.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     $form = new FormValidator(
25 25
             'filter',
26 26
             'post',
27
-            'index.php?action=attendance_sheet_list&' . api_get_cidreq().'&attendance_id=' . $attendance_id,
27
+            'index.php?action=attendance_sheet_list&'.api_get_cidreq().'&attendance_id='.$attendance_id,
28 28
             null,
29 29
             array(),
30 30
             'inline'
@@ -107,14 +107,14 @@  discard block
 block discarded – undo
107 107
     if (!$is_locked_attendance || api_is_platform_admin()) {
108 108
 
109 109
         $actionsLeft = '<a style="float:left;" href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">'.
110
-            Display::return_icon('attendance_calendar.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).'</a>';
110
+            Display::return_icon('attendance_calendar.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).'</a>';
111 111
         $actionsLeft .= '<a id="pdf_export" style="float:left;"  href="index.php?'.api_get_cidreq().'&action=attendance_sheet_export_to_pdf&attendance_id='.$attendance_id.'&filter='.$default_filter.'&group_id='.$groupId.'">'.
112
-            Display::return_icon('pdf.png',get_lang('ExportToPDF'),'',ICON_SIZE_MEDIUM).'</a>';
112
+            Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>';
113 113
         //if (count($users_in_course) > 0) {
114 114
         $actionsRight = $form->returnForm();
115 115
         //}
116 116
 
117
-        $toolbar = Display::toolbarAction('toolbar-attendance', array(0 => $actionsLeft, 1 => $actionsRight), 2 , false);
117
+        $toolbar = Display::toolbarAction('toolbar-attendance', array(0 => $actionsLeft, 1 => $actionsRight), 2, false);
118 118
         echo $toolbar;
119 119
     }
120 120
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
                             <th width="100px"><?php echo get_lang('AttendancesFaults')?></th>
221 221
                         </tr>
222 222
                         <tr class="tableFloatingHeaderOriginal" >
223
-                            <th width="10px"><?php echo '#';?></th>
223
+                            <th width="10px"><?php echo '#'; ?></th>
224 224
                             <th width="10px"><?php echo get_lang('Photo')?></th>
225 225
                             <th width="150px"><?php echo get_lang('LastName')?></th>
226 226
                             <th width="140px"><?php echo get_lang('FirstName')?></th>
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
                         foreach ($users_in_course as $data) {
235 235
                             $faults = 0;
236 236
                             if ($i % 2 == 0) {
237
-                                $class='row_odd';
237
+                                $class = 'row_odd';
238 238
                             } else {
239
-                                $class='row_even';
239
+                                $class = 'row_even';
240 240
                             }
241 241
                             $username = api_htmlentities(sprintf(get_lang('LoginX'), $data['username']), ENT_QUOTES);
242 242
                             ?>
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                                 <td><span title="<?php echo $username ?>"><?php echo $data['lastname'] ?></span></td>
247 247
                                 <td><?php echo $data['firstname'] ?></td>
248 248
                                 <td>
249
-                                    <div class="attendance-faults-bar" style="background-color:<?php echo (!empty($data['result_color_bar'])?$data['result_color_bar']:'none') ?>">
249
+                                    <div class="attendance-faults-bar" style="background-color:<?php echo (!empty($data['result_color_bar']) ? $data['result_color_bar'] : 'none') ?>">
250 250
                                         <?php echo $data['attendance_result'] ?>
251 251
                                     </div>
252 252
                                 </td>
@@ -264,30 +264,30 @@  discard block
 block discarded – undo
264 264
                 echo '<table class="tableWithFloatingHeader data_table" width="100%">';
265 265
                 echo '<thead>';
266 266
                 $result = null;
267
-                if (count($attendant_calendar) > 0 ) {
267
+                if (count($attendant_calendar) > 0) {
268 268
                     foreach ($attendant_calendar as $calendar) {
269 269
                         $date = $calendar['date'];
270 270
                         $time = $calendar['time'];
271
-                        $datetime = '<div class="grey">'. $date . ' - ' . $time . '</div>';
271
+                        $datetime = '<div class="grey">'.$date.' - '.$time.'</div>';
272 272
 
273
-                        $img_lock = Display::return_icon('lock-closed.png',get_lang('DateUnLock'),array('class'=>'img_lock','id'=>'datetime_column_'.$calendar['id']));
273
+                        $img_lock = Display::return_icon('lock-closed.png', get_lang('DateUnLock'), array('class'=>'img_lock', 'id'=>'datetime_column_'.$calendar['id']));
274 274
 
275
-                        if (!empty($calendar['done_attendance'])){
276
-                            $datetime = '<div class="blue">' . $date . ' - ' . $time . '</div>';
275
+                        if (!empty($calendar['done_attendance'])) {
276
+                            $datetime = '<div class="blue">'.$date.' - '.$time.'</div>';
277 277
                         }
278 278
                         $disabled_check = 'disabled = "true"';
279 279
                         $input_hidden = '<input type="hidden" id="hidden_input_'.$calendar['id'].'" name="hidden_input[]" value="" disabled />';
280 280
                         if ($next_attendance_calendar_id == $calendar['id']) {
281 281
                             $input_hidden = '<input type="hidden" id="hidden_input_'.$calendar['id'].'" name="hidden_input[]" value="'.$calendar['id'].'" />';
282 282
                             $disabled_check = '';
283
-                            $img_lock = Display::return_icon('lock-closed.png',get_lang('DateLock'),array('class'=>'img_unlock','id'=>'datetime_column_'.$calendar['id']));
283
+                            $img_lock = Display::return_icon('lock-closed.png', get_lang('DateLock'), array('class'=>'img_unlock', 'id'=>'datetime_column_'.$calendar['id']));
284 284
                         }
285 285
 
286 286
                         $result .= '<th>';
287 287
                         $result .= '<div class="date-attendance">'.$datetime.'&nbsp;';
288 288
 
289 289
                         if (api_is_allowed_to_edit(null, true)) {
290
-                            $result .= '<span id="attendance_lock" style="cursor:pointer">'.(!$is_locked_attendance || api_is_platform_admin()?$img_lock:'').'</span>';
290
+                            $result .= '<span id="attendance_lock" style="cursor:pointer">'.(!$is_locked_attendance || api_is_platform_admin() ? $img_lock : '').'</span>';
291 291
                         }
292 292
 
293 293
                         if ($is_locked_attendance == false) {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
                     }
299 299
                 } else {
300 300
                     $result  = '<th width="2000px"><span><a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">';
301
-                    $result .= Display::return_icon('attendance_calendar.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).' '.get_lang('GoToAttendanceCalendar').'</a></span></th>';
301
+                    $result .= Display::return_icon('attendance_calendar.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).' '.get_lang('GoToAttendanceCalendar').'</a></span></th>';
302 302
                 }
303 303
 
304 304
                 echo '<tr class="tableFloatingHeader row_odd" style="position: absolute; top: 0px; left: 0px; visibility: hidden; margin:0px;padding:0px">';
@@ -312,14 +312,14 @@  discard block
 block discarded – undo
312 312
                 $i = 0;
313 313
                 foreach ($users_in_course as $user) {
314 314
                     $class = '';
315
-                    if ($i%2 == 0) {
315
+                    if ($i % 2 == 0) {
316 316
                         $class = 'row_even';
317 317
                     } else {
318 318
                         $class = 'row_odd';
319 319
                     }
320 320
                     echo '<tr class="'.$class.'">';
321 321
 
322
-                    if (count($attendant_calendar) > 0 ) {
322
+                    if (count($attendant_calendar) > 0) {
323 323
                         foreach ($attendant_calendar as $calendar) {
324 324
                             $checked = 'checked';
325 325
                             $presence = -1;
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
                             $style_td = '';
344 344
 
345 345
                             if ($next_attendance_calendar_id == $calendar['id']) {
346
-                                if ($i%2==0)
346
+                                if ($i % 2 == 0)
347 347
                                     $style_td = 'background-color:#eee;';
348 348
                                 else
349 349
                                     $style_td = 'background-color:#dcdcdc;';
@@ -358,15 +358,15 @@  discard block
 block discarded – undo
358 358
                                     echo '<input type="checkbox" name="check_presence['.$calendar['id'].'][]" value="'.$user['user_id'].'" '.$disabled.' '.$checked.' />';
359 359
                                     echo '<span class="anchor_'.$calendar['id'].'"></span>';
360 360
                                 } else {
361
-                                    echo $presence ? Display::return_icon('checkbox_on.gif',get_lang('Presence')) : Display::return_icon('checkbox_off.gif',get_lang('Presence'));
361
+                                    echo $presence ? Display::return_icon('checkbox_on.gif', get_lang('Presence')) : Display::return_icon('checkbox_off.gif', get_lang('Presence'));
362 362
                                 }
363 363
                             } else {
364 364
                                 switch ($presence) {
365 365
                                     case 1:
366
-                                        echo Display::return_icon('accept.png',get_lang('Attended'));
366
+                                        echo Display::return_icon('accept.png', get_lang('Attended'));
367 367
                                         break;
368 368
                                     case 0:
369
-                                        echo Display::return_icon('exclamation.png',get_lang('NotAttended'));
369
+                                        echo Display::return_icon('exclamation.png', get_lang('NotAttended'));
370 370
                                         break;
371 371
                                     case -1:
372 372
                                         //echo Display::return_icon('warning.png',get_lang('NotAttended'));
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
                         </td>';
390 390
                     }
391 391
                     echo '</tr>';
392
-                    $i++ ;
392
+                    $i++;
393 393
                 }
394 394
                 echo '</tbody></table>';
395 395
                 echo '</div></div>';
@@ -414,13 +414,13 @@  discard block
 block discarded – undo
414 414
     echo Display::page_header(get_lang('AttendanceSheetReport'));
415 415
     // View for students
416 416
     ?>
417
-    <?php if(!empty($users_presence)) { ?>
417
+    <?php if (!empty($users_presence)) { ?>
418 418
         <div>
419 419
             <table width="250px;">
420 420
                 <tr>
421 421
                     <td><?php echo get_lang('ToAttend').': ' ?></td>
422 422
                     <td>
423
-                        <center><div class="attendance-faults-bar" style="background-color:<?php echo (!empty($faults['color_bar'])?$faults['color_bar']:'none') ?>">
423
+                        <center><div class="attendance-faults-bar" style="background-color:<?php echo (!empty($faults['color_bar']) ? $faults['color_bar'] : 'none') ?>">
424 424
                         <?php echo $faults['faults'].'/'.$faults['total'].' ('.$faults['faults_porcent'].'%)' ?></div></center>
425 425
                     </td>
426 426
                 </tr>
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
             $i = 0;
438 438
             foreach ($users_presence[$user_id] as $presence) {
439 439
                 $class = '';
440
-                if ($i%2==0) {
440
+                if ($i % 2 == 0) {
441 441
                     $class = 'row_even';
442 442
                 } else {
443 443
                     $class = 'row_odd';
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
                 ?>
446 446
                 <tr class="<?php echo $class ?>">
447 447
                     <td>
448
-                        <?php echo $presence['presence'] ? Display::return_icon('checkbox_on.gif',get_lang('Presence')) : Display::return_icon('checkbox_off.gif',get_lang('Presence')) ?>
448
+                        <?php echo $presence['presence'] ? Display::return_icon('checkbox_on.gif', get_lang('Presence')) : Display::return_icon('checkbox_off.gif', get_lang('Presence')) ?>
449 449
                         <?php echo "&nbsp; ".$presence['date_time'] ?>
450 450
                     </td>
451 451
                 </tr>
Please login to merge, or discard this patch.
main/attendance/attendance_controller.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                     $attendance->set_attendance_qualify_title($_POST['attendance_qualify_title']);
61 61
                     $attendance->set_attendance_weight($_POST['attendance_weight']);
62 62
                     $link_to_gradebook = false;
63
-                    if ( isset($_POST['attendance_qualify_gradebook']) && $_POST['attendance_qualify_gradebook'] == 1 ) {
63
+                    if (isset($_POST['attendance_qualify_gradebook']) && $_POST['attendance_qualify_gradebook'] == 1) {
64 64
                         $link_to_gradebook = true;
65 65
                     }
66 66
                     $attendance->category_id = $_POST['category_id'];
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                     ) {
113 113
                         $link_to_gradebook = true;
114 114
                     }
115
-                    $attendance->attendance_edit($attendance_id,$link_to_gradebook);
115
+                    $attendance->attendance_edit($attendance_id, $link_to_gradebook);
116 116
                     Security::clear_token();
117 117
                     header('location:index.php?action=attendance_list&'.api_get_cidreq());
118 118
                     exit;
@@ -543,17 +543,17 @@  discard block
 block discarded – undo
543 543
             }
544 544
         }
545 545
         $max_cols_per_page = 12; //10 dates + 2 name and number
546
-        $max_dates_per_page = $max_dates_per_page_original = $max_cols_per_page - 2;//10
546
+        $max_dates_per_page = $max_dates_per_page_original = $max_cols_per_page - 2; //10
547 547
         $rows = count($data_table);
548 548
 
549 549
         if ($cols > $max_cols_per_page) {
550
-            $number_tables = round(($cols-2)/$max_dates_per_page);
550
+            $number_tables = round(($cols - 2) / $max_dates_per_page);
551 551
             $headers = $data_table[0];
552 552
             $all = array();
553 553
             $tables = array();
554 554
             $changed = 1;
555 555
 
556
-            for ($i= 0; $i <= $rows; $i++) {
556
+            for ($i = 0; $i <= $rows; $i++) {
557 557
                 $row = isset($data_table[$i]) ? $data_table[$i] : null;
558 558
                 $key = 1;
559 559
                 $max_dates_per_page = 10;
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
                     foreach ($item as $value) {
565 565
                         if ($count_j >= $max_dates_per_page) {
566 566
                             $key++;
567
-                            $max_dates_per_page = $max_dates_per_page_original*$key;
567
+                            $max_dates_per_page = $max_dates_per_page_original * $key;
568 568
                             //magic hack
569 569
                             $tables[$key][$i][] = $tables[1][$i][0];
570 570
                             $tables[$key][$i][] = $tables[1][$i][1];
@@ -622,8 +622,8 @@  discard block
 block discarded – undo
622 622
             $form = new FormValidator(
623 623
                 'search',
624 624
                 'post',
625
-                api_get_self() . '?' . api_get_cidreq(
626
-                ) . '&action=calendar_logins'
625
+                api_get_self().'?'.api_get_cidreq(
626
+                ).'&action=calendar_logins'
627 627
             );
628 628
             $form->addDateRangePicker('range', get_lang('DateRange'));
629 629
             $form->addButton('submit', get_lang('Submit'));
Please login to merge, or discard this patch.
main/attendance/attendance_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 if (api_is_allowed_to_edit(null, true)) {
14 14
     echo '<div class="actions">';
15 15
     echo '<a href="index.php?'.api_get_cidreq().'&action=attendance_add">'.
16
-        Display::return_icon('new_attendance_list.png', get_lang('CreateANewAttendance'),'',ICON_SIZE_MEDIUM).'</a>';
16
+        Display::return_icon('new_attendance_list.png', get_lang('CreateANewAttendance'), '', ICON_SIZE_MEDIUM).'</a>';
17 17
     echo '</div>';
18 18
 }
19 19
 $attendance = new Attendance();
Please login to merge, or discard this patch.
main/attendance/calendar_logins.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 // See AttendanceController::calendarLogins function
5 5
 echo '<div class="actions">';
6 6
 echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list">'.
7
-    Display::return_icon('back.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).'</a>';
7
+    Display::return_icon('back.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).'</a>';
8 8
 echo '</div>';
9 9
 
10 10
 echo $form;
Please login to merge, or discard this patch.
main/attendance/attendance_edit.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 // error messages
14 14
 if (isset($error)) {
15
-    Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
15
+    Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false);
16 16
 }
17 17
 
18 18
 if (!isset($error)) {
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $form->addElement('hidden', 'attendance_id', $attendance_id);
32 32
 
33 33
 $form->addText('title', get_lang('Title'), true);
34
-$form->applyFilter('title','html_filter');
34
+$form->applyFilter('title', 'html_filter');
35 35
 $form->addHtmlEditor(
36 36
     'description',
37 37
     get_lang('Description'),
@@ -49,28 +49,28 @@  discard block
 block discarded – undo
49 49
 if (Gradebook::is_active()) {
50 50
     if (!empty($attendance_qualify_title) || !empty($attendance_weight)) {
51 51
         $form->addButtonAdvancedSettings('id_qualify');
52
-        $form->addElement('html','<div id="id_qualify_options" style="display:block">');
53
-        $form->addElement('checkbox', 'attendance_qualify_gradebook', '', get_lang('QualifyAttendanceGradebook'),array('checked'=>'true','onclick'=>'javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}'));
54
-        $form->addElement('html','<div id="options_field" style="display:block">');
52
+        $form->addElement('html', '<div id="id_qualify_options" style="display:block">');
53
+        $form->addElement('checkbox', 'attendance_qualify_gradebook', '', get_lang('QualifyAttendanceGradebook'), array('checked'=>'true', 'onclick'=>'javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}'));
54
+        $form->addElement('html', '<div id="options_field" style="display:block">');
55 55
     } else {
56 56
         $form->addButtonAdvancedSettings('id_qualify');
57
-        $form->addElement('html','<div id="id_qualify_options" style="display:none">');
58
-        $form->addElement('checkbox', 'attendance_qualify_gradebook', '', get_lang('QualifyAttendanceGradebook'),'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"');
59
-        $form->addElement('html','<div id="options_field" style="display:none">');
57
+        $form->addElement('html', '<div id="id_qualify_options" style="display:none">');
58
+        $form->addElement('checkbox', 'attendance_qualify_gradebook', '', get_lang('QualifyAttendanceGradebook'), 'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"');
59
+        $form->addElement('html', '<div id="options_field" style="display:none">');
60 60
     }
61 61
     GradebookUtils::load_gradebook_select_in_tool($form);
62 62
     $form->addElement('text', 'attendance_qualify_title', get_lang('TitleColumnGradebook'));
63 63
     $form->applyFilter('attendance_qualify_title', 'html_filter');
64
-    $form->addElement('text', 'attendance_weight', get_lang('QualifyWeight'),'value="0.00" Style="width:40px" onfocus="javascript: this.select();"');
64
+    $form->addElement('text', 'attendance_weight', get_lang('QualifyWeight'), 'value="0.00" Style="width:40px" onfocus="javascript: this.select();"');
65 65
     $form->applyFilter('attendance_weight', 'html_filter');
66
-    $form->addElement('html','</div>');
67
-    $form->addElement('html','</div>');
66
+    $form->addElement('html', '</div>');
67
+    $form->addElement('html', '</div>');
68 68
 }
69 69
 $form->addButtonUpdate(get_lang('Save'));
70 70
 
71 71
 // set default values
72 72
 $default['title'] = Security::remove_XSS($title);
73
-$default['description'] = Security::remove_XSS($description,STUDENT);
73
+$default['description'] = Security::remove_XSS($description, STUDENT);
74 74
 $default['attendance_qualify_title'] = $attendance_qualify_title;
75 75
 $default['attendance_weight'] = $attendance_weight;
76 76
 
Please login to merge, or discard this patch.
main/attendance/attendance_calendar.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,15 +14,15 @@  discard block
 block discarded – undo
14 14
     echo '<div class="actions">';
15 15
     if ($action == 'calendar_add') {
16 16
         echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">'.
17
-            Display::return_icon('back.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).'</a>';
17
+            Display::return_icon('back.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).'</a>';
18 18
     } else {
19 19
         echo '<a href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id.'">'.
20
-            Display::return_icon('back.png',get_lang('AttendanceSheet'),'',ICON_SIZE_MEDIUM).'</a>';
20
+            Display::return_icon('back.png', get_lang('AttendanceSheet'), '', ICON_SIZE_MEDIUM).'</a>';
21 21
         if (api_is_allowed_to_edit()) {
22 22
             echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_add&attendance_id='.$attendance_id.'">'.
23
-                Display::return_icon('add.png',get_lang('AddDateAndTime'),'',ICON_SIZE_MEDIUM).'</a>';
23
+                Display::return_icon('add.png', get_lang('AddDateAndTime'), '', ICON_SIZE_MEDIUM).'</a>';
24 24
             echo '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDeleteAllDates').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=calendar_all_delete&attendance_id='.$attendance_id.'">'.
25
-                Display::return_icon('clean.png',get_lang('CleanCalendar'),'',ICON_SIZE_MEDIUM).'</a>';
25
+                Display::return_icon('clean.png', get_lang('CleanCalendar'), '', ICON_SIZE_MEDIUM).'</a>';
26 26
         }
27 27
     }
28 28
     echo '</div>';
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     $form = new FormValidator(
59 59
         'attendance_calendar_add',
60 60
         'POST',
61
-        'index.php?action=calendar_add&attendance_id='.$attendance_id.'&' . api_get_cidreq(),
61
+        'index.php?action=calendar_add&attendance_id='.$attendance_id.'&'.api_get_cidreq(),
62 62
         ''
63 63
     );
64 64
     $form->addElement('header', get_lang('AddADateTime'));
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         'weekly' => get_lang('RepeatWeekly'),
96 96
         'monthlyByDate' => get_lang('RepeatMonthlyByDate')
97 97
     );
98
-    $form->addElement('select', 'repeat_type', get_lang('RepeatType') , $a_repeat_type);
98
+    $form->addElement('select', 'repeat_type', get_lang('RepeatType'), $a_repeat_type);
99 99
 
100 100
     $form->addElement('date_picker', 'end_date_time', get_lang('RepeatEnd'), array('form_name'=>'attendance_calendar_add'));
101 101
     $defaults['end_date_time'] = date('Y-m-d');
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                 $form = new FormValidator(
132 132
                     'attendance_calendar_edit',
133 133
                     'POST',
134
-                    'index.php?action=calendar_edit&attendance_id=' . $attendance_id . '&calendar_id=' . $calendar_id . '&' . api_get_cidreq(),
134
+                    'index.php?action=calendar_edit&attendance_id='.$attendance_id.'&calendar_id='.$calendar_id.'&'.api_get_cidreq(),
135 135
                     ''
136 136
                 );
137 137
                 $form->addDateTimePicker('date_time', array(get_lang('Date')), array('form_name'=>'attendance_calendar_edit'), 5);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                     get_lang('DateTime'),
148 148
                         null,
149 149
                         ICON_SIZE_MEDIUM
150
-                ).' '.substr($calendar['date_time'], 0, strlen($calendar['date_time'])- 3) .'&nbsp;';
150
+                ).' '.substr($calendar['date_time'], 0, strlen($calendar['date_time']) - 3).'&nbsp;';
151 151
 
152 152
                 if (isset($calendar['groups']) && !empty($calendar['groups'])) {
153 153
                     foreach ($calendar['groups'] as $group) {
Please login to merge, or discard this patch.
main/attendance/attendance_add.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 // error messages
14 14
 if (isset($error)) {
15
-    Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
15
+    Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false);
16 16
 }
17 17
 
18 18
 if (!isset($error)) {
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 $form->addElement('hidden', 'sec_token', $token);
29 29
 
30 30
 $form->addText('title', get_lang('Title'), true);
31
-$form->applyFilter('title','html_filter');
31
+$form->applyFilter('title', 'html_filter');
32 32
 $form->addHtmlEditor(
33 33
     'description',
34 34
     get_lang('Description'),
@@ -41,21 +41,21 @@  discard block
 block discarded – undo
41 41
 if ((api_get_session_id() != 0 && Gradebook::is_active()) || api_get_session_id() == 0) {
42 42
     $form->addButtonAdvancedSettings('id_qualify');
43 43
 
44
-    $form->addElement('html','<div id="id_qualify_options" style="display:none">');
44
+    $form->addElement('html', '<div id="id_qualify_options" style="display:none">');
45 45
 
46 46
     // Qualify Attendance for gradebook option
47
-    $form->addElement('checkbox', 'attendance_qualify_gradebook', '', get_lang('QualifyAttendanceGradebook'),'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"');
48
-    $form->addElement('html','<div id="options_field" style="display:none">');
47
+    $form->addElement('checkbox', 'attendance_qualify_gradebook', '', get_lang('QualifyAttendanceGradebook'), 'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"');
48
+    $form->addElement('html', '<div id="options_field" style="display:none">');
49 49
 
50 50
     GradebookUtils::load_gradebook_select_in_tool($form);
51 51
 
52 52
     $form->addElement('text', 'attendance_qualify_title', get_lang('TitleColumnGradebook'));
53 53
     $form->applyFilter('attendance_qualify_title', 'html_filter');
54
-    $form->addElement('text', 'attendance_weight', get_lang('QualifyWeight'),'value="0.00" Style="width:40px" onfocus="javascript: this.select();"');
54
+    $form->addElement('text', 'attendance_weight', get_lang('QualifyWeight'), 'value="0.00" Style="width:40px" onfocus="javascript: this.select();"');
55 55
     $form->applyFilter('attendance_weight', 'html_filter');
56
-    $form->addElement('html','</div>');
56
+    $form->addElement('html', '</div>');
57 57
 
58
-    $form->addElement('html','</div>');
58
+    $form->addElement('html', '</div>');
59 59
 }
60 60
 $form->addButtonCreate(get_lang('Save'));
61 61
 $form->display();
Please login to merge, or discard this patch.
main/course_home/3column.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     $racine		= api_get_path(SYS_PATH).'/'.$currentCourseID.'/images/';
114 114
     $chemin		= $racine;
115 115
     $name		= $tool[1];
116
-    $image		= $tool[3];
116
+    $image = $tool[3];
117 117
 
118 118
     $content .= "<tr>\n".
119 119
         "<td colspan=\"4\">\n".
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
         "</td>\n".
127 127
         "<td>\n".
128 128
         "<select name=\"image\">\n".
129
-        "<option selected>". $image. "</option>\n";
129
+        "<option selected>".$image."</option>\n";
130 130
 
131 131
     if ($dir = @opendir($chemin)) {
132 132
         while ($file = readdir($dir)) {
133 133
             if ($file == '..' || $file == '.') {
134 134
                 unset($file);
135 135
             }
136
-            $content .= "<option>". $file. "</option>\n";
136
+            $content .= "<option>".$file."</option>\n";
137 137
         }
138 138
         closedir($dir);
139 139
     }
@@ -142,15 +142,15 @@  discard block
 block discarded – undo
142 142
         "</td>\n".
143 143
         "</tr>\n".
144 144
         "<tr>\n".
145
-        "<td>". get_lang('NameOfTheLink'). " : </td>\n".
146
-        "<td><input type=\"text\" name=\"name\" value=\"". $name. "\"></td>\n".
145
+        "<td>".get_lang('NameOfTheLink')." : </td>\n".
146
+        "<td><input type=\"text\" name=\"name\" value=\"".$name."\"></td>\n".
147 147
         "</tr>\n".
148 148
         "<tr>\n".
149 149
         "<td>Lien :</td>\n".
150
-        "<td><input type=\"text\" name=\"link\" value=\"". $link. "\"></td>\n".
150
+        "<td><input type=\"text\" name=\"link\" value=\"".$link."\"></td>\n".
151 151
         "</tr>\n".
152 152
         "<tr>\n".
153
-        "<td colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"". get_lang('Ok'). "\"></td>\n".
153
+        "<td colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"".get_lang('Ok')."\"></td>\n".
154 154
         "</tr>\n".
155 155
         "</form>\n".
156 156
         "</table>\n".
@@ -208,21 +208,21 @@  discard block
 block discarded – undo
208 208
         "<tr><td colspan=\"6\"><font color=\"#F66105\">\n".get_lang('CourseAdminOnly')."</font>
209 209
         </td></tr>\n";
210 210
     $content .= "<tr>\n<td colspan=\"6\">";
211
-    $content .=CourseHome::show_tool_3column('courseAdmin');
211
+    $content .= CourseHome::show_tool_3column('courseAdmin');
212 212
     $content .= "</td>\n</tr>\n";
213 213
 }
214 214
 
215 215
 /*	TOOLS FOR PLATFORM ADMIN ONLY */
216 216
 if (api_is_platform_admin() && api_is_allowed_to_edit(null, true) && !api_is_coach()) {
217
-    $content .=  "<tr>"."<td colspan=\"6\">".
217
+    $content .= "<tr>"."<td colspan=\"6\">".
218 218
         "<hr noshade size=\"1\" />".
219 219
         "</td>"."</tr>\n".
220 220
         "<tr>\n"."<td colspan=\"6\">\n".
221
-        "<font color=\"#F66105\" >". get_lang('PlatformAdminOnly'). "</font>\n".
221
+        "<font color=\"#F66105\" >".get_lang('PlatformAdminOnly')."</font>\n".
222 222
         "</td>\n"."</tr>\n";
223
-    $content .=  "<tr>\n<td colspan=\"6\">";
223
+    $content .= "<tr>\n<td colspan=\"6\">";
224 224
     $content .= CourseHome::show_tool_3column('platformAdmin');
225
-    $content .=  "</td>\n</tr>\n";
225
+    $content .= "</td>\n</tr>\n";
226 226
 }
227 227
 
228
-$content .=  "</table>\n";
228
+$content .= "</table>\n";
Please login to merge, or discard this patch.
main/course_home/vertical_activity.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     // Show message to confirm that a tool it to be hidden from available tools
39 39
     // visibility 0,1->2
40 40
     if (!empty($_GET['askDelete'])) {
41
-        $content .='<div id="toolhide">'.get_lang('DelLk').'<br />&nbsp;&nbsp;&nbsp;
41
+        $content .= '<div id="toolhide">'.get_lang('DelLk').'<br />&nbsp;&nbsp;&nbsp;
42 42
             <a href="'.api_get_self().'">'.get_lang('No').'</a>&nbsp;|&nbsp;
43 43
             <a href="'.api_get_self().'?delete=yes&id='.$id.'">'.get_lang('Yes').'</a>
44 44
         </div>';
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
 
57 57
 // Start of tools for CourseAdmins (teachers/tutors)
58 58
 if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
59
-    $content .=  '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;">
59
+    $content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;">
60 60
     <div class="normal-message" id="id_normal_message" style="display:none">';
61
-        $content .=  '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/>&nbsp;&nbsp;';
62
-        $content .=  get_lang('PleaseStandBy');
61
+        $content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/>&nbsp;&nbsp;';
62
+        $content .= get_lang('PleaseStandBy');
63 63
 
64
-    $content .=  '</div>
64
+    $content .= '</div>
65 65
         <div class="confirmation-message" id="id_confirmation_message" style="display:none"></div></div>';
66
-    $content .=  '<div id="activity-3col">';
66
+    $content .= '<div id="activity-3col">';
67 67
 
68 68
     if (api_get_setting('show_session_data') == 'true' && $session_id > 0) {
69 69
         $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span>
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
         $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span>
92 92
             <table width="100%">';
93 93
                 $content .= CourseHome::show_session_data($session_id);
94
-             $content .=  '</table></div>';
94
+             $content .= '</table></div>';
95 95
     }
96 96
 
97
-    $content .=  '<div class="Authoringview">';
97
+    $content .= '<div class="Authoringview">';
98 98
                 $my_list = CourseHome::get_tools_category(TOOL_STUDENT_VIEW);
99 99
                 $content .= CourseHome::show_tools_category($my_list);
100 100
     $content .= '</div>';
@@ -106,19 +106,19 @@  discard block
 block discarded – undo
106 106
         $content .= '<div class="course-student-view-activity-3col">';
107 107
         //ordering by get_lang name
108 108
         $order_tool_list = array();
109
-        foreach($my_list as $key=>$new_tool) {
109
+        foreach ($my_list as $key=>$new_tool) {
110 110
             $tool_name = CourseHome::translate_tool_name($new_tool);
111
-            $order_tool_list [$key]= $tool_name;
111
+            $order_tool_list [$key] = $tool_name;
112 112
         }
113 113
         natsort($order_tool_list);
114 114
         $my_temp_tool_array = array();
115
-        foreach($order_tool_list as $key=>$new_tool) {
115
+        foreach ($order_tool_list as $key=>$new_tool) {
116 116
             $my_temp_tool_array[] = $my_list[$key];
117 117
         }
118 118
         $my_list = $my_temp_tool_array;
119 119
 
120 120
         $i = 0;
121
-        foreach($my_list as $new_tool) {
121
+        foreach ($my_list as $new_tool) {
122 122
             if ($i >= 10) {
123 123
                 $my_list2[] = $new_tool;
124 124
             } else {
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
             }
127 127
             $i++;
128 128
         }
129
-        $content .=CourseHome::show_tools_category($my_list1);
130
-        $content .=CourseHome::show_tools_category($my_list2);
129
+        $content .= CourseHome::show_tools_category($my_list1);
130
+        $content .= CourseHome::show_tools_category($my_list2);
131 131
         $content .= '</div>';
132 132
     }
133 133
 }
Please login to merge, or discard this patch.