Passed
Push — 1.10.x ( f9cbcd...83c791 )
by Yannick
657:30 queued 614:41
created
main/mySpace/myStudents.php 1 patch
Spacing   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -63,53 +63,53 @@  discard block
 block discarded – undo
63 63
     if ($origin == 'user_course') {
64 64
         $course_info = CourseManager :: get_course_information($get_course_code);
65 65
         if (empty ($cidReq)) {
66
-            $interbreadcrumb[] = array (
67
-                "url" => api_get_path(WEB_COURSE_PATH) . $course_info['directory'],
66
+            $interbreadcrumb[] = array(
67
+                "url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'],
68 68
                 'name' => $course_info['title']
69 69
             );
70 70
         }
71
-        $interbreadcrumb[] = array (
72
-            "url" => "../user/user.php?cidReq=" . $get_course_code,
71
+        $interbreadcrumb[] = array(
72
+            "url" => "../user/user.php?cidReq=".$get_course_code,
73 73
             "name" => get_lang("Users")
74 74
         );
75 75
     } else
76 76
         if ($origin == 'tracking_course') {
77 77
             $course_info = CourseManager :: get_course_information($get_course_code);
78
-            $interbreadcrumb[] = array (
79
-                "url" => "../tracking/courseLog.php?cidReq=".$get_course_code.'&id_session=' . api_get_session_id(),
78
+            $interbreadcrumb[] = array(
79
+                "url" => "../tracking/courseLog.php?cidReq=".$get_course_code.'&id_session='.api_get_session_id(),
80 80
                 "name" => get_lang("Tracking")
81 81
             );
82 82
         } else
83 83
             if ($origin == 'resume_session') {
84
-                $interbreadcrumb[] = array (
84
+                $interbreadcrumb[] = array(
85 85
                     'url' => "../session/session_list.php",
86 86
                     "name" => get_lang('SessionList')
87 87
                 );
88
-                $interbreadcrumb[] = array (
89
-                    'url' => "../session/resume_session.php?id_session=" . $sessionId,
88
+                $interbreadcrumb[] = array(
89
+                    'url' => "../session/resume_session.php?id_session=".$sessionId,
90 90
                     "name" => get_lang('SessionOverview')
91 91
                 );
92 92
             } else {
93
-                $interbreadcrumb[] = array (
93
+                $interbreadcrumb[] = array(
94 94
                     "url" => "index.php",
95 95
                     "name" => get_lang('MySpace')
96 96
                 );
97 97
                 if (isset ($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
98
-                    $interbreadcrumb[] = array (
99
-                        "url" => "student.php?id_coach=" . Security :: remove_XSS($_GET['id_coach']),
98
+                    $interbreadcrumb[] = array(
99
+                        "url" => "student.php?id_coach=".Security :: remove_XSS($_GET['id_coach']),
100 100
                         "name" => get_lang("CoachStudents")
101 101
                     );
102
-                    $interbreadcrumb[] = array (
103
-                        "url" => "myStudents.php?student=" . Security :: remove_XSS($_GET['student']) . '&id_coach=' . Security :: remove_XSS($_GET['id_coach']),
102
+                    $interbreadcrumb[] = array(
103
+                        "url" => "myStudents.php?student=".Security :: remove_XSS($_GET['student']).'&id_coach='.Security :: remove_XSS($_GET['id_coach']),
104 104
                         "name" => get_lang("StudentDetails")
105 105
                     );
106 106
                 } else {
107
-                    $interbreadcrumb[] = array (
107
+                    $interbreadcrumb[] = array(
108 108
                         "url" => "student.php",
109 109
                         "name" => get_lang("MyStudents")
110 110
                     );
111
-                    $interbreadcrumb[] = array (
112
-                        "url" => "myStudents.php?student=" . Security :: remove_XSS($_GET['student']),
111
+                    $interbreadcrumb[] = array(
112
+                        "url" => "myStudents.php?student=".Security :: remove_XSS($_GET['student']),
113 113
                         "name" => get_lang("StudentDetails")
114 114
                     );
115 115
                 }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     $nameTools = get_lang("DetailsStudentInCourse");
118 118
 } else {
119 119
     if ($origin == 'resume_session') {
120
-        $interbreadcrumb[] = array (
120
+        $interbreadcrumb[] = array(
121 121
             'url' => "../session/session_list.php",
122 122
             "name" => get_lang('SessionList')
123 123
         );
@@ -128,24 +128,24 @@  discard block
 block discarded – undo
128 128
             );
129 129
         }
130 130
     } else {
131
-        $interbreadcrumb[] = array (
131
+        $interbreadcrumb[] = array(
132 132
             "url" => "index.php",
133 133
             "name" => get_lang('MySpace')
134 134
         );
135 135
         if (isset ($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
136 136
             if ($sessionId) {
137
-                $interbreadcrumb[] = array (
138
-                    "url" => "student.php?id_coach=" . Security :: remove_XSS($_GET['id_coach']) . "&id_session=" . $sessionId,
137
+                $interbreadcrumb[] = array(
138
+                    "url" => "student.php?id_coach=".Security :: remove_XSS($_GET['id_coach'])."&id_session=".$sessionId,
139 139
                     "name" => get_lang("CoachStudents")
140 140
                 );
141 141
             } else {
142
-                $interbreadcrumb[] = array (
143
-                    "url" => "student.php?id_coach=" . Security :: remove_XSS($_GET['id_coach']),
142
+                $interbreadcrumb[] = array(
143
+                    "url" => "student.php?id_coach=".Security :: remove_XSS($_GET['id_coach']),
144 144
                     "name" => get_lang("CoachStudents")
145 145
                 );
146 146
             }
147 147
         } else {
148
-            $interbreadcrumb[] = array (
148
+            $interbreadcrumb[] = array(
149 149
                 "url" => "student.php",
150 150
                 "name" => get_lang("MyStudents")
151 151
             );
@@ -316,28 +316,28 @@  discard block
 block discarded – undo
316 316
     // Actions bar
317 317
     echo '<div class="actions">';
318 318
     echo '<a href="javascript: window.history.go(-1);">'.
319
-            Display::return_icon('back.png', get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
319
+            Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
320 320
 
321 321
     echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'.
322
-            Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>';
322
+            Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
323 323
 
324
-    echo '<a href="' . api_get_self() . '?' . Security :: remove_XSS($_SERVER['QUERY_STRING']) . '&export=csv">'.
325
-            Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).'</a> ';
324
+    echo '<a href="'.api_get_self().'?'.Security :: remove_XSS($_SERVER['QUERY_STRING']).'&export=csv">'.
325
+            Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a> ';
326 326
 
327
-    echo '<a href="' . api_get_self() . '?' . Security :: remove_XSS($_SERVER['QUERY_STRING']) . '&export=xls">'.
328
-    Display::return_icon('export_excel.png', get_lang('ExportAsXLS'),'',ICON_SIZE_MEDIUM).'</a> ';
327
+    echo '<a href="'.api_get_self().'?'.Security :: remove_XSS($_SERVER['QUERY_STRING']).'&export=xls">'.
328
+    Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'</a> ';
329 329
 
330 330
     if (!empty ($user_info['email'])) {
331 331
         $send_mail = '<a href="mailto:'.$user_info['email'].'">'.
332
-            Display :: return_icon('mail_send.png', get_lang('SendMail'),'',ICON_SIZE_MEDIUM).'</a>';
332
+            Display :: return_icon('mail_send.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM).'</a>';
333 333
     } else {
334
-        $send_mail = Display :: return_icon('mail_send_na.png', get_lang('SendMail'),'',ICON_SIZE_MEDIUM);
334
+        $send_mail = Display :: return_icon('mail_send_na.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM);
335 335
     }
336 336
     echo $send_mail;
337 337
     if (!empty($student_id) && !empty($_GET['course'])) {
338 338
         // Only show link to connection details if course and student were defined in the URL
339
-        echo '<a href="access_details.php?student=' . $student_id . '&course=' . Security :: remove_XSS($_GET['course']) . '&origin=' . $origin. '&cidReq='.Security::remove_XSS($_GET['course']).'&id_session='.$sessionId.'">'.
340
-            Display :: return_icon('statistics.png', get_lang('AccessDetails'),'',ICON_SIZE_MEDIUM).'</a>';
339
+        echo '<a href="access_details.php?student='.$student_id.'&course='.Security :: remove_XSS($_GET['course']).'&origin='.$origin.'&cidReq='.Security::remove_XSS($_GET['course']).'&id_session='.$sessionId.'">'.
340
+            Display :: return_icon('statistics.png', get_lang('AccessDetails'), '', ICON_SIZE_MEDIUM).'</a>';
341 341
     }
342 342
     if (api_can_login_as($student_id)) {
343 343
         echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_list.php?action=login_as&user_id='.$student_id.'&sec_token='.$token.'">'.
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
     $csv_content[] = array(
407 407
         get_lang('Information', '')
408 408
     );
409
-    $csv_content[] = array (
409
+    $csv_content[] = array(
410 410
         get_lang('Name', ''),
411 411
         get_lang('Email', ''),
412 412
         get_lang('Tel', '')
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
         strip_tags($first_connection_date),
435 435
         strip_tags($last_connection_date),
436 436
         $time_spent_on_the_course,
437
-        $avg_student_progress . '%',
437
+        $avg_student_progress.'%',
438 438
         $avg_student_score
439 439
     );
440 440
 
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
             foreach ($course_coachs as $course_coach) {
455 455
                 $info_tutor_name[] = api_get_person_name($course_coach['firstname'], $course_coach['lastname']);
456 456
             }
457
-            $info_course['tutor_name'] = implode(",",$info_tutor_name);
457
+            $info_course['tutor_name'] = implode(",", $info_tutor_name);
458 458
         } elseif ($session_coach_id != 0) {
459 459
             $session_coach_id = intval($session_info['id_coach']);
460 460
             $coach_info = api_get_user_info($session_coach_id);
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
         $session_name = $session_info['name'];
465 465
     } // end
466 466
 
467
-    $info_course  = CourseManager :: get_course_information($get_course_code);
467
+    $info_course = CourseManager :: get_course_information($get_course_code);
468 468
     $table_title = Display::return_icon('user.png', get_lang('User'), array(), ICON_SIZE_SMALL).$user_info['complete_name'];
469 469
 
470 470
     echo Display::page_subheader($table_title);
@@ -482,19 +482,19 @@  discard block
 block discarded – undo
482 482
             </thead>
483 483
             <tbody>
484 484
             <tr>
485
-                <td><?php echo get_lang('Name') . ' : '.$user_info['complete_name']; ?></td>
485
+                <td><?php echo get_lang('Name').' : '.$user_info['complete_name']; ?></td>
486 486
             </tr>
487 487
             <tr>
488
-                <td><?php echo get_lang('Email') . ' : ';
488
+                <td><?php echo get_lang('Email').' : ';
489 489
                     if (!empty ($user_info['email'])) {
490
-                        echo '<a href="mailto:' . $user_info['email'] . '">' . $user_info['email'] . '</a>';
490
+                        echo '<a href="mailto:'.$user_info['email'].'">'.$user_info['email'].'</a>';
491 491
                     } else {
492 492
                         echo get_lang('NoEmail');
493 493
                     } ?>
494 494
                 </td>
495 495
             </tr>
496 496
             <tr>
497
-                <td> <?php echo get_lang('Tel') . ' : ';
497
+                <td> <?php echo get_lang('Tel').' : ';
498 498
                     if (!empty ($user_info['phone'])) {
499 499
                         echo $user_info['phone'];
500 500
                     } else {
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
                 </td>
505 505
             </tr>
506 506
             <tr>
507
-                <td> <?php echo get_lang('OfficialCode') . ' : ';
507
+                <td> <?php echo get_lang('OfficialCode').' : ';
508 508
                     if (!empty ($user_info['official_code'])) {
509 509
                         echo $user_info['official_code'];
510 510
                     } else {
@@ -514,13 +514,13 @@  discard block
 block discarded – undo
514 514
                 </td>
515 515
             </tr>
516 516
             <tr>
517
-                <td><?php echo get_lang('OnLine') . ' : '.$online; ?> </td>
517
+                <td><?php echo get_lang('OnLine').' : '.$online; ?> </td>
518 518
             </tr>
519 519
             <?php
520 520
 
521 521
             // Display timezone if the user selected one and if the admin allows the use of user's timezone
522 522
             $timezone = null;
523
-            $timezone_user = UserManager::get_extra_user_data_by_field($user_info['user_id'],'timezone');
523
+            $timezone_user = UserManager::get_extra_user_data_by_field($user_info['user_id'], 'timezone');
524 524
             $use_users_timezone = api_get_setting('use_users_timezone', 'timezones');
525 525
             if ($timezone_user['timezone'] != null && $use_users_timezone == 'true') {
526 526
                 $timezone = $timezone_user['timezone'];
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
             if ($timezone !== null) {
529 529
                 ?>
530 530
                 <tr>
531
-                    <td> <?php echo get_lang('Timezone') . ' : '.$timezone; ?> </td>
531
+                    <td> <?php echo get_lang('Timezone').' : '.$timezone; ?> </td>
532 532
                 </tr>
533 533
             <?php
534 534
             }
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
                     <td align="right">
561 561
                         <?php
562 562
                         echo get_lang('Progress').' ';
563
-                        Display :: display_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array ('align' => 'absmiddle', 'hspace' => '3px'));?>
563
+                        Display :: display_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')); ?>
564 564
                     </td>
565 565
                     <td align="left"><?php echo $avg_student_progress.'%' ?></td>
566 566
                 </tr>
@@ -568,9 +568,9 @@  discard block
 block discarded – undo
568 568
                     <td align="right">
569 569
                         <?php
570 570
                         echo get_lang('Score').' ';
571
-                        Display :: display_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array ('align' => 'absmiddle', 'hspace' => '3px')); ?>
571
+                        Display :: display_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')); ?>
572 572
                     </td>
573
-                    <td align="left"><?php if (is_numeric($avg_student_score)) { echo $avg_student_score.'%';} else { echo $avg_student_score ;}  ?></td>
573
+                    <td align="left"><?php if (is_numeric($avg_student_score)) { echo $avg_student_score.'%'; } else { echo $avg_student_score; }  ?></td>
574 574
                 </tr>
575 575
                 <?php
576 576
                 if (!empty($nb_login)) {
@@ -588,10 +588,10 @@  discard block
 block discarded – undo
588 588
     $table_title = '';
589 589
     if (!empty($sessionId)) {
590 590
         $session_name = api_get_session_name($sessionId);
591
-        $table_title  = $session_name ? Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.' ':'';
591
+        $table_title  = $session_name ? Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.' ' : '';
592 592
     }
593 593
     if (!empty($info_course['title'])) {
594
-        $table_title .= $info_course ? Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$info_course['title'].'  ':'';
594
+        $table_title .= $info_course ? Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$info_course['title'].'  ' : '';
595 595
     }
596 596
 
597 597
     echo Display::page_subheader($table_title);
@@ -629,13 +629,13 @@  discard block
 block discarded – undo
629 629
             }
630 630
             $date_session = '';
631 631
             if (!empty($access_start_date) && !empty($access_end_date)) {
632
-                $date_session = get_lang('From') . ' ' . $access_start_date . ' ' . get_lang('Until') . ' ' . $access_end_date;
632
+                $date_session = get_lang('From').' '.$access_start_date.' '.get_lang('Until').' '.$access_end_date;
633 633
             }
634 634
             $title = '';
635 635
             if (empty($sessionId)) {
636 636
                 $title = Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_SMALL).' '.get_lang('Courses');
637 637
             } else {
638
-                $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session?' ('.$date_session.')':'');
638
+                $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session ? ' ('.$date_session.')' : '');
639 639
             }
640 640
 
641 641
             // Courses
@@ -686,15 +686,15 @@  discard block
 block discarded – undo
686 686
                         $scoretotal = array();
687 687
                         if (isset($cats) && isset($cats[0])) {
688 688
                             if (!empty($sessionId)) {
689
-                                $scoretotal= $cats[0]->calc_score($student_id, null, $course_code, $sessionId);
689
+                                $scoretotal = $cats[0]->calc_score($student_id, null, $course_code, $sessionId);
690 690
                             } else {
691
-                                $scoretotal= $cats[0]->calc_score($student_id, null, $course_code);
691
+                                $scoretotal = $cats[0]->calc_score($student_id, null, $course_code);
692 692
                             }
693 693
                         }
694 694
 
695 695
                         $scoretotal_display = '0/0 (0%)';
696 696
                         if (!empty($scoretotal)) {
697
-                            $scoretotal_display =  round($scoretotal[0],1).'/'.round($scoretotal[1],1).' ('.round(($scoretotal[0] / $scoretotal[1]) * 100,2) . ' %)';
697
+                            $scoretotal_display = round($scoretotal[0], 1).'/'.round($scoretotal[1], 1).' ('.round(($scoretotal[0] / $scoretotal[1]) * 100, 2).' %)';
698 698
                         }
699 699
 
700 700
                         $progress = Tracking::get_avg_student_progress($user_info['user_id'], $course_code, null, $sessionId);
@@ -713,8 +713,8 @@  discard block
 block discarded – undo
713 713
                         );
714 714
 
715 715
                         echo '<tr>
716
-                        <td ><a href="' . api_get_path(WEB_COURSE_PATH) . $course_info['directory'] .'/?id_session=' . $sessionId . '">'.$course_info['title'].'</a></td>
717
-                        <td >'.$time_spent_on_course .'</td>
716
+                        <td ><a href="' . api_get_path(WEB_COURSE_PATH).$course_info['directory'].'/?id_session='.$sessionId.'">'.$course_info['title'].'</a></td>
717
+                        <td >'.$time_spent_on_course.'</td>
718 718
                         <td >'.$progress.'</td>
719 719
                         <td >'.$score.'</td>
720 720
                         <td >'.$attendances_faults_avg.'</td>
@@ -780,22 +780,22 @@  discard block
 block discarded – undo
780 780
                 <table class="table table-striped table-hover">
781 781
                 <thead>
782 782
                 <tr>
783
-                    <th><?php echo get_lang('Learnpaths');?></th>
783
+                    <th><?php echo get_lang('Learnpaths'); ?></th>
784 784
                     <th><?php
785 785
                         echo get_lang('Time').' ';
786
-                        Display :: display_icon('info3.gif', get_lang('TotalTimeByCourse'), array ('align' => 'absmiddle', 'hspace' => '3px')); ?></th>
786
+                        Display :: display_icon('info3.gif', get_lang('TotalTimeByCourse'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th>
787 787
                     <th><?php
788 788
                         echo get_lang('AverageScore').' ';
789
-                        Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInAllAttempts'), array ( 'align' => 'absmiddle', 'hspace' => '3px')); ?></th>
789
+                        Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInAllAttempts'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th>
790 790
                     <th><?php
791 791
                         echo get_lang('LatestAttemptAverageScore').' ';
792
-                        Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInTheLatestAttempts'), array ( 'align' => 'absmiddle', 'hspace' => '3px')); ?></th>
792
+                        Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInTheLatestAttempts'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th>
793 793
                     <th><?php
794 794
                         echo get_lang('Progress').' ';
795
-                        Display :: display_icon('info3.gif', get_lang('LPProgressScore'), array ('align' => 'absmiddle','hspace' => '3px')); ?></th>
795
+                        Display :: display_icon('info3.gif', get_lang('LPProgressScore'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th>
796 796
                     <th><?php
797 797
                         echo get_lang('LastConnexion').' ';
798
-                        Display :: display_icon('info3.gif', get_lang('LastTimeTheCourseWasUsed'), array ('align' => 'absmiddle','hspace' => '3px')); ?></th>
798
+                        Display :: display_icon('info3.gif', get_lang('LastTimeTheCourseWasUsed'), array('align' => 'absmiddle', 'hspace' => '3px')); ?></th>
799 799
                     <?php
800 800
                     echo '<th>'.get_lang('Details').'</th>';
801 801
                     if (api_is_allowed_to_edit()) {
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
 
824 824
                     if ($progress === null) {
825 825
                         $progress = '0%';
826
-                    }  else {
826
+                    } else {
827 827
                         $any_result = true;
828 828
                     }
829 829
 
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
                     if (!empty($start_time)) {
851 851
                         $start_time = api_convert_and_format_date($start_time, DATE_TIME_FORMAT_LONG);
852 852
                     } else {
853
-                        $start_time =  '-';
853
+                        $start_time = '-';
854 854
                     }
855 855
 
856 856
                     if (!empty($total_time)) $any_result = true;
@@ -879,11 +879,11 @@  discard block
 block discarded – undo
879 879
                     $i++;
880 880
 
881 881
                     // csv export content
882
-                    $csv_content[] = array (
882
+                    $csv_content[] = array(
883 883
                         api_html_entity_decode(stripslashes($lp_name), ENT_QUOTES, $charset),
884 884
                         api_time_to_hms($total_time),
885
-                        $score . '%',
886
-                        $score_latest . '%',
885
+                        $score.'%',
886
+                        $score_latest.'%',
887 887
                         $progress.'%',
888 888
                         $start_time
889 889
                     );
@@ -921,7 +921,7 @@  discard block
 block discarded – undo
921 921
                     if ($any_result === true) {
922 922
                         $from = '';
923 923
                         if ($from_myspace) {
924
-                            $from ='&from=myspace';
924
+                            $from = '&from=myspace';
925 925
                         }
926 926
                         $link = Display::url(
927 927
                             '<img src="../img/icons/22/2rightarrow.png" border="0" />',
@@ -934,14 +934,14 @@  discard block
 block discarded – undo
934 934
                         echo '<td>';
935 935
                         if ($any_result === true) {
936 936
                             echo '<a href="myStudents.php?action=reset_lp&sec_token='.$token.'&cidReq='.Security::remove_XSS($_GET['course']).'&course='.Security::remove_XSS($_GET['course']).'&details='.Security::remove_XSS($_GET['details']).'&origin='.$origin.'&lp_id='.$learnpath->getId().'&student='.$user_info['user_id'].'&details=true&id_session='.$sessionId.'">';
937
-                            echo Display::return_icon('clean.png',get_lang('Clean'),'',ICON_SIZE_SMALL).'</a>';
937
+                            echo Display::return_icon('clean.png', get_lang('Clean'), '', ICON_SIZE_SMALL).'</a>';
938 938
                             echo '</a>';
939 939
                         }
940 940
                         echo '</td>';
941 941
                         echo '</tr>';
942 942
                     }
943 943
                     $data_learnpath[$i][] = $lp_name;
944
-                    $data_learnpath[$i][] = $progress . '%';
944
+                    $data_learnpath[$i][] = $progress.'%';
945 945
                 }
946 946
             } else {
947 947
                 //echo '<tr><td colspan="6">'.get_lang('NoLearnpath').'</td></tr>';
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
         <thead>
959 959
         <tr>
960 960
             <th><?php echo get_lang('Exercises'); ?></th>
961
-            <th><?php echo get_lang('LearningPath');?></th>
961
+            <th><?php echo get_lang('LearningPath'); ?></th>
962 962
             <th><?php echo get_lang('AvgCourseScore').' '.Display :: return_icon('info3.gif', get_lang('AverageScore'), array('align' => 'absmiddle', 'hspace' => '3px')) ?></th>
963 963
             <th><?php echo get_lang('Attempts'); ?></th>
964 964
             <th><?php echo get_lang('LatestAttempt'); ?></th>
@@ -977,7 +977,7 @@  discard block
 block discarded – undo
977 977
         );
978 978
 
979 979
         $t_quiz = Database :: get_course_table(TABLE_QUIZ_TEST);
980
-        $sql = "SELECT quiz.title, id FROM " . $t_quiz . " AS quiz
980
+        $sql = "SELECT quiz.title, id FROM ".$t_quiz." AS quiz
981 981
                 WHERE
982 982
                     quiz.c_id =  ".$info_course['real_id']." AND
983 983
                     (quiz.session_id = $sessionId OR quiz.session_id = 0) AND
@@ -1020,7 +1020,7 @@  discard block
 block discarded – undo
1020 1020
                 echo '<td>';
1021 1021
 
1022 1022
                 if ($count_attempts > 0) {
1023
-                    echo $score_percentage . '%';
1023
+                    echo $score_percentage.'%';
1024 1024
                 } else {
1025 1025
                     echo '-';
1026 1026
                     $score_percentage = 0;
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
                 echo '<td>'.$count_attempts.'</td>';
1031 1031
                 echo '<td>';
1032 1032
 
1033
-                $sql = 'SELECT exe_id FROM ' . $tbl_stats_exercices . '
1033
+                $sql = 'SELECT exe_id FROM '.$tbl_stats_exercices.'
1034 1034
                          WHERE
1035 1035
                             exe_exo_id      ="'.$exercise_id.'" AND
1036 1036
                             exe_user_id     ="'.$student_id.'" AND
@@ -1043,18 +1043,18 @@  discard block
 block discarded – undo
1043 1043
                 if (Database :: num_rows($result_last_attempt) > 0) {
1044 1044
                     $id_last_attempt = Database :: result($result_last_attempt, 0, 0);
1045 1045
                     if ($count_attempts > 0)
1046
-                        echo '<a href="../exercice/exercise_show.php?id=' . $id_last_attempt . '&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin)?'tracking':$origin).'">
1047
-                        <img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" border="0" /> </a>';
1046
+                        echo '<a href="../exercice/exercise_show.php?id='.$id_last_attempt.'&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin) ? 'tracking' : $origin).'">
1047
+                        <img src="' . api_get_path(WEB_IMG_PATH).'quiz.gif" border="0" /> </a>';
1048 1048
                 }
1049 1049
                 echo '</td>';
1050 1050
 
1051 1051
                 echo '<td>';
1052 1052
                 $all_attempt_url = "../exercice/exercise_report.php?exerciseId=$exercise_id&cidReq=$course_code&filter_by_user=$student_id&id_session=$sessionId";
1053
-                echo Display::url(Display::return_icon('test_results.png', get_lang('AllAttempts'), array(), ICON_SIZE_SMALL), $all_attempt_url );
1053
+                echo Display::url(Display::return_icon('test_results.png', get_lang('AllAttempts'), array(), ICON_SIZE_SMALL), $all_attempt_url);
1054 1054
 
1055 1055
                 echo '</td></tr>';
1056 1056
                 $data_exercices[$i][] = $exercices['title'];
1057
-                $data_exercices[$i][] = $score_percentage . '%';
1057
+                $data_exercices[$i][] = $score_percentage.'%';
1058 1058
                 $data_exercices[$i][] = $count_attempts;
1059 1059
 
1060 1060
                 $csv_content[] = array(
@@ -1082,7 +1082,7 @@  discard block
 block discarded – undo
1082 1082
             $survey_list = SurveyManager::get_surveys($course_code, $sessionId);
1083 1083
 
1084 1084
             $survey_data = array();
1085
-            foreach($survey_list as $survey) {
1085
+            foreach ($survey_list as $survey) {
1086 1086
                 $user_list = SurveyManager::get_people_who_filled_survey($survey['survey_id'], false, $info_course['real_id']);
1087 1087
                 $survey_done = Display::return_icon("accept_na.png", get_lang('NoAnswer'), array(), ICON_SIZE_SMALL);
1088 1088
                 if (in_array($student_id, $user_list)) {
@@ -1107,7 +1107,7 @@  discard block
 block discarded – undo
1107 1107
                         $column = 0;
1108 1108
                         $table->setCellContents($row, $column, $data);
1109 1109
                         $class = 'class="row_odd"';
1110
-                        if($row % 2) {
1110
+                        if ($row % 2) {
1111 1111
                             $class = 'class="row_even"';
1112 1112
                         }
1113 1113
                         $table->setRowAttributes($row, $class, true);
@@ -1130,13 +1130,13 @@  discard block
 block discarded – undo
1130 1130
             </thead>
1131 1131
             <tbody>
1132 1132
         <?php
1133
-        $csv_content[] = array ();
1134
-        $nb_assignments 		= Tracking::count_student_assignments($student_id, $course_code, $sessionId);
1133
+        $csv_content[] = array();
1134
+        $nb_assignments = Tracking::count_student_assignments($student_id, $course_code, $sessionId);
1135 1135
         $messages 				= Tracking::count_student_messages($student_id, $course_code, $sessionId);
1136
-        $links 					= Tracking::count_student_visited_links($student_id, $info_course['real_id'], $sessionId);
1137
-        $chat_last_connection 	= Tracking::chat_last_connection($student_id, $info_course['real_id'], $sessionId);
1136
+        $links = Tracking::count_student_visited_links($student_id, $info_course['real_id'], $sessionId);
1137
+        $chat_last_connection = Tracking::chat_last_connection($student_id, $info_course['real_id'], $sessionId);
1138 1138
         $documents				= Tracking::count_student_downloaded_documents($student_id, $info_course['real_id'], $sessionId);
1139
-        $uploaded_documents		= Tracking::count_student_uploaded_documents($student_id, $course_code, $sessionId);
1139
+        $uploaded_documents = Tracking::count_student_uploaded_documents($student_id, $course_code, $sessionId);
1140 1140
 
1141 1141
         $csv_content[] = array(
1142 1142
             get_lang('OtherTools')
Please login to merge, or discard this patch.
main/mySpace/user_import.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 $tool_name = get_lang('ImportUserListXMLCSV');
16 16
 api_block_anonymous_users();
17 17
 
18
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('MySpace'));
18
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('MySpace'));
19 19
 $id_session = '';
20 20
 if (isset($_GET['id_session']) && $_GET['id_session'] != '') {
21 21
  	$id_session = intval($_GET['id_session']);
22
-	$interbreadcrumb[] = array ('url' => 'session.php', 'name' => get_lang('Sessions'));
23
-	$interbreadcrumb[] = array ('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course'));
22
+	$interbreadcrumb[] = array('url' => 'session.php', 'name' => get_lang('Sessions'));
23
+	$interbreadcrumb[] = array('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course'));
24 24
 }
25 25
 
26 26
 // Set this option to true to enforce strict purification for usenames.
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
         if (count($errors) == 0) {
64 64
             if (!empty($id_session)) {
65
-                $tbl_session_rel_course	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
65
+                $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
66 66
                 // Selecting all the courses from the session id requested.
67 67
                 $sql = "SELECT c_id FROM $tbl_session_rel_course WHERE session_id ='$id_session'";
68 68
                 $result = Database::query($sql);
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
 
104 104
 $form = new FormValidator('user_import');
105 105
 $form->addElement('hidden', 'formSent');
106
-$form->addElement('hidden', 'id_session',$id_session);
106
+$form->addElement('hidden', 'id_session', $id_session);
107 107
 $form->addElement('file', 'import_file', get_lang('ImportFileLocation'));
108 108
 $form->addRule('import_file', get_lang('ThisFieldIsRequired'), 'required');
109
-$allowed_file_types = array ('xml', 'csv');
109
+$allowed_file_types = array('xml', 'csv');
110 110
 $form->addRule('import_file', get_lang('InvalidExtension').' ('.implode(',', $allowed_file_types).')', 'filetype', $allowed_file_types);
111 111
 $form->addElement('radio', 'file_type', get_lang('FileType'), 'XML (<a href="../admin/example.xml" target="_blank">'.get_lang('ExampleXMLFile').'</a>)', 'xml');
112 112
 $form->addElement('radio', 'file_type', null, 'CSV (<a href="../admin/example.csv" target="_blank">'.get_lang('ExampleCSVFile').'</a>)', 'csv');
Please login to merge, or discard this patch.
main/mySpace/course.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 $sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : null;
17 17
 
18 18
 api_block_anonymous_users();
19
-$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
19
+$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
20 20
 
21 21
 if (isset($_GET["id_session"]) && $_GET["id_session"] != "") {
22 22
     $interbreadcrumb[] = array("url" => "session.php", "name" => get_lang('Sessions'));
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $user_id = intval($_GET['user_id']);
68 68
             $user_info = api_get_user_info($user_id);
69 69
             $title = get_lang('AssignedCoursesTo').' '.api_get_person_name($user_info['firstname'], $user_info['lastname']);
70
-            $courses  = CourseManager::get_course_list_of_user_as_course_admin($user_id);
70
+            $courses = CourseManager::get_course_list_of_user_as_course_admin($user_id);
71 71
         } else {
72 72
             $title = get_lang('YourCourseList');
73 73
             $courses = CourseManager::get_courses_followed_by_drh(api_get_user_id());
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     if (!api_is_session_admin()) {
84 84
         $menu_items[] = Display::url(
85
-            Display::return_icon('stats.png', get_lang('MyStats'),'',ICON_SIZE_MEDIUM),
85
+            Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM),
86 86
             api_get_path(WEB_CODE_PATH)."auth/my_progress.php"
87 87
         );
88 88
         $menu_items[] = Display::url(
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
        
126 126
     }
127 127
     
128
-    $toolbar = Display::toolbarAction('toolbar-course', $content = array( 0 => $actionsLeft, 1 => $actionsRight ));
128
+    $toolbar = Display::toolbarAction('toolbar-course', $content = array(0 => $actionsLeft, 1 => $actionsRight));
129 129
 
130 130
     echo $toolbar;
131 131
     
Please login to merge, or discard this patch.
main/mySpace/student.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 
20 20
 $this_section = SECTION_TRACKING;
21 21
 
22
-$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
22
+$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
23 23
 
24 24
 if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && !isset($_GET["type"])) {
25
-    $interbreadcrumb[] = array ("url" => "teachers.php", "name" => get_lang('Teachers'));
25
+    $interbreadcrumb[] = array("url" => "teachers.php", "name" => get_lang('Teachers'));
26 26
 }
27 27
 
28
-if (isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_GET["type"] == "coach") {
29
-    $interbreadcrumb[] = array ("url" => "coaches.php", "name" => get_lang('Tutors'));
28
+if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && isset($_GET["type"]) && $_GET["type"] == "coach") {
29
+    $interbreadcrumb[] = array("url" => "coaches.php", "name" => get_lang('Tutors'));
30 30
 }
31 31
 
32 32
 function get_count_users()
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
                 $courseInfo = api_get_course_info($course_code);
122 122
                 $courseId = $courseInfo['real_id'];
123 123
                 if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) {
124
-                    $avg_time_spent 	+= Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']);
125
-                    $my_average 		 = Tracking :: get_avg_student_score($student_id, $course_code);
124
+                    $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']);
125
+                    $my_average = Tracking :: get_avg_student_score($student_id, $course_code);
126 126
                     if (is_numeric($my_average)) {
127 127
                         $avg_student_score += $my_average;
128 128
                     }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             $detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$_GET['id_session'].'">
162 162
 				          <img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>';
163 163
         } else {
164
-            $detailsLink =  '<a href="myStudents.php?student='.$student_id.'">
164
+            $detailsLink = '<a href="myStudents.php?student='.$student_id.'">
165 165
 				             <img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>';
166 166
         }
167 167
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
 if (api_is_drh()) {
192 192
     $menu_items = array(
193
-        Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ),
193
+        Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php"),
194 194
         Display::url(Display::return_icon('user_na.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), '#'),
195 195
         Display::url(Display::return_icon('teacher.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'),
196 196
         Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'),
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     );
219 219
     $actionsLeft .= Display::url(
220 220
         Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM),
221
-        api_get_path(WEB_CODE_PATH) . "mySpace/company_reports.php"
221
+        api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php"
222 222
     );
223 223
     $actionsLeft .= Display::url(
224 224
         Display::return_icon(
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             [],
228 228
             ICON_SIZE_MEDIUM
229 229
         ),
230
-        api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php"
230
+        api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php"
231 231
     );
232 232
 }
233 233
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 );
243 243
 
244 244
 
245
-$toolbar = Display::toolbarAction('toolbar-student', $content = array( 0 => $actionsLeft, 1 => $actionsRight ));
245
+$toolbar = Display::toolbarAction('toolbar-student', $content = array(0 => $actionsLeft, 1 => $actionsRight));
246 246
 
247 247
 $table = new SortableTable(
248 248
     'tracking_student',
Please login to merge, or discard this patch.
main/mySpace/admin.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
 }
36 36
 $sql = "SELECT user.user_id,lastname,firstname,email
37 37
         FROM $tbl_user as user, $tbl_admin as admin
38
-        WHERE admin.user_id=user.user_id" . $order_clause;
38
+        WHERE admin.user_id=user.user_id".$order_clause;
39 39
 $result_admins = Database::query($sql);
40 40
 
41 41
 if (api_is_western_name_order()) {
42
-    echo '<table class="data_table"><tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>';
42
+    echo '<table class="data_table"><tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>';
43 43
 } else {
44
-    echo '<table class="data_table"><tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>';
44
+    echo '<table class="data_table"><tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>';
45 45
 }
46 46
 
47 47
 if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) {
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
             $css_class = "row_odd";
66 66
             if ($i % 20 == 0 && $i != 0) {
67 67
                 if (api_is_western_name_order()) {
68
-                    echo '<tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>';
68
+                    echo '<tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>';
69 69
                 } else {
70
-                    echo '<tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>';
70
+                    echo '<tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>';
71 71
                 }
72 72
             }
73 73
         } else {
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
         $i++;
78 78
 
79 79
         if (api_is_western_name_order()) {
80
-            echo "<tr class=" . $css_class . "><td>$firstname</td><td>$lastname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>";
80
+            echo "<tr class=".$css_class."><td>$firstname</td><td>$lastname</td><td><a href='mailto:".$email."'>$email</a></td></tr>";
81 81
         } else {
82
-            echo "<tr class=" . $css_class . "><td>$lastname</td><td>$firstname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>";
82
+            echo "<tr class=".$css_class."><td>$lastname</td><td>$firstname</td><td><a href='mailto:".$email."'>$email</a></td></tr>";
83 83
         }
84 84
 
85 85
         if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     }
94 94
 } else {
95 95
     // No results
96
-    echo '<tr><td colspan="3">' . get_lang('NoResults') . '</td></tr>';
96
+    echo '<tr><td colspan="3">'.get_lang('NoResults').'</td></tr>';
97 97
 }
98 98
 echo '</table>';
99 99
 
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 echo "
105 105
     <br /><br />
106 106
     <form method='post' action='admin.php'>
107
-        <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'>
108
-            " . get_lang('ExportExcel') . "
107
+        <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel')."'>
108
+            " . get_lang('ExportExcel')."
109 109
         </button>
110 110
     <form>
111 111
 ";
Please login to merge, or discard this patch.
main/mySpace/teachers.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 
21 21
 $this_section = SECTION_TRACKING;
22 22
 
23
-$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
23
+$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
24 24
 
25 25
 if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && !isset($_GET["type"])) {
26
-    $interbreadcrumb[] = array ("url" => "teachers.php", "name" => get_lang('Teachers'));
26
+    $interbreadcrumb[] = array("url" => "teachers.php", "name" => get_lang('Teachers'));
27 27
 }
28 28
 
29
-if (isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_GET["type"] == "coach") {
30
-    $interbreadcrumb[] = array ("url" => "coaches.php", "name" => get_lang('Tutors'));
29
+if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && isset($_GET["type"]) && $_GET["type"] == "coach") {
30
+    $interbreadcrumb[] = array("url" => "coaches.php", "name" => get_lang('Tutors'));
31 31
 }
32 32
 
33 33
 function get_count_users()
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
                 $courseInfo = api_get_course_info($course_code);
123 123
                 $courseId = $courseInfo['real_id'];
124 124
                 if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) {
125
-                    $avg_time_spent 	+= Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']);
126
-                    $my_average 		 = Tracking :: get_avg_student_score($student_id, $course_code);
125
+                    $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']);
126
+                    $my_average = Tracking :: get_avg_student_score($student_id, $course_code);
127 127
                     if (is_numeric($my_average)) {
128 128
                         $avg_student_score += $my_average;
129 129
                     }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             $detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$_GET['id_session'].'">
163 163
 				          '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>';
164 164
         } else {
165
-            $detailsLink =  '<a href="myStudents.php?student='.$student_id.'">
165
+            $detailsLink = '<a href="myStudents.php?student='.$student_id.'">
166 166
 				            '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>';
167 167
         }
168 168
         $row[] = $detailsLink;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 $actionsLeft = '';
182 182
 if (api_is_drh()) {
183 183
     $menu_items = array(
184
-        Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ),
184
+        Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php"),
185 185
         Display::url(Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), 'student.php'),
186 186
         Display::url(Display::return_icon('teacher_na.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'),
187 187
         Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'),
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 );
209 209
 
210 210
 
211
-$toolbar = Display::toolbarAction('toolbar-teachers', $content = array( 0 => $actionsLeft, 1 => $actionsRight ));
211
+$toolbar = Display::toolbarAction('toolbar-teachers', $content = array(0 => $actionsLeft, 1 => $actionsRight));
212 212
 
213 213
 $table = new SortableTable(
214 214
     'tracking_teachers',
Please login to merge, or discard this patch.
main/mySpace/access_details.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
     </div><br />
139 139
     <div id="cev_cont_stats">
140 140
     <?php
141
-    if ($result_to_print != "")  {
141
+    if ($result_to_print != "") {
142 142
         $rst = get_stats($user_id, $courseId);
143 143
         $foo_stats = '<strong>'.get_lang('Total').': </strong>'.$rst['total'].'<br />';
144 144
         $foo_stats .= '<strong>'.get_lang('Average').': </strong>'.$rst['avg'].'<br />';
Please login to merge, or discard this patch.
main/wiki/diff.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -137,19 +137,19 @@  discard block
 block discarded – undo
137 137
     switch ($type) {
138 138
         case DIFF_EQUAL:
139 139
             // return $line. ' : ' . ' = <span class="diffEqual" >' . $value . '</span><br />' . "\n" ;
140
-            return '<span class="diffEqual" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color
140
+            return '<span class="diffEqual" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color
141 141
             break;
142 142
         case DIFF_MOVED:
143 143
             //return $line. ' : ' . ' M <span class="diffMoved" >' . $value . '</span><br />' . "\n" ; //juan carlos ra�a  la sustitye la inverior
144
-            return '<span class="diffMoved" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color
144
+            return '<span class="diffMoved" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color
145 145
             break;
146 146
         case DIFF_ADDED:
147 147
             //return $line . ' : ' . ' + <span class="diffAdded" >' . $value . '</span><br />' . "\n" ;
148
-            return '<span class="diffAdded" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color
148
+            return '<span class="diffAdded" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color
149 149
             break;
150 150
         case DIFF_DELETED:
151 151
             //return $line . ' : ' . ' - <span class="diffDeleted" >' . $value . '</span><br />' . "\n" ; //juan carlos ra�a  la sustitye la inverior
152
-            return '<span class="diffDeleted" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color
152
+            return '<span class="diffDeleted" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color
153 153
             break;
154 154
     }
155 155
 }
@@ -169,19 +169,19 @@  discard block
 block discarded – undo
169 169
     switch ($type) {
170 170
         case DIFF_EQUAL:
171 171
             //return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;=</td><td><span class="diffEqual" >'                    . $value . '</span></td></tr>' . "\n"; //juan carlos comentado
172
-            return '<tr><td></td><td bgcolor="#FFFFFF">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
172
+            return '<tr><td></td><td bgcolor="#FFFFFF">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
173 173
             break;
174 174
         case DIFF_MOVED:
175 175
             // return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;M</td><td><span class="diffMoved" >'                    . $value . '</span></td></tr>' . "\n" //juan carlos comenta
176 176
 
177
-            return '<tr><td></td><td bgcolor="#FFFFAA">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
177
+            return '<tr><td></td><td bgcolor="#FFFFAA">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
178 178
             break;
179 179
         case DIFF_ADDED:
180 180
             // return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;+</td><td><span class="diffAdded" >'                    . $value . '</span></td></tr>' . "\n" ; //juan carlos comentado
181
-            return '<tr><td></td><td bgcolor="#CCFFCC">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
181
+            return '<tr><td></td><td bgcolor="#CCFFCC">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
182 182
             break;
183 183
         case DIFF_DELETED:
184 184
             // return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;-</td><td><span class="diffDeleted" >'                    . $value . '</span></td></tr>' . "\n" ; //juan carlos comentado
185
-            return '<tr><td></td><td bgcolor="#FFAAAA">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
185
+            return '<tr><td></td><td bgcolor="#FFAAAA">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
186 186
     }
187 187
 }
Please login to merge, or discard this patch.
main/wiki/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 // section (for the tabs)
20 20
 $this_section = SECTION_COURSES;
21
-$current_course_tool  = TOOL_WIKI;
21
+$current_course_tool = TOOL_WIKI;
22 22
 
23 23
 $course_id = api_get_course_int_id();
24 24
 $session_id = api_get_session_id();
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 $groupId = api_get_group_id();
28 28
 
29 29
 // additional style information
30
-$htmlHeadXtra[] ='<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'wiki/css/default.css"/>';
30
+$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'wiki/css/default.css"/>';
31 31
 
32 32
 // javascript for advanced parameters menu
33 33
 $htmlHeadXtra[] = '<script>
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     //ensure this tool in groups whe it's private or deactivated
73 73
     if ($group_properties['wiki_state'] == 0) {
74 74
         api_not_allowed();
75
-    } elseif ($group_properties['wiki_state']==2) {
75
+    } elseif ($group_properties['wiki_state'] == 2) {
76 76
         if (!api_is_allowed_to_edit(false, true) and
77 77
             !GroupManager :: is_user_in_group(api_get_user_id(), api_get_group_id())
78 78
         ) {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 $is_allowed_to_edit = api_is_allowed_to_edit(false, true);
85 85
 
86 86
 // The page we are dealing with
87
-$page = isset($_GET['title']) ? $_GET['title']: 'index';
87
+$page = isset($_GET['title']) ? $_GET['title'] : 'index';
88 88
 $action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'showpage';
89 89
 $view = isset($_GET['view']) ? Security::remove_XSS($_GET['view']) : null;
90 90
 
Please login to merge, or discard this patch.