Completed
Push — 1.10.x ( a26f23...c6c321 )
by Julito
59:04
created
main/inc/lib/zombie/zombie_manager.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $count = intval($count);
80 80
         $from = intval($from);
81 81
 
82
-        $sql .=  " ORDER BY $column $direction";
82
+        $sql .= " ORDER BY $column $direction";
83 83
         $sql .= " LIMIT $count, $from ";
84 84
 
85 85
         $result = Database::query($sql);
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
     static function deactivate_zombies($ceiling)
94 94
     {
95 95
         $zombies = self::list_zombies($ceiling);
96
-        $ids  = array();
97
-        foreach($zombies as $zombie) {
96
+        $ids = array();
97
+        foreach ($zombies as $zombie) {
98 98
             $ids[] = $zombie['user_id'];
99 99
         }
100 100
         UserManager::deactivate_users($ids);
Please login to merge, or discard this patch.
main/inc/lib/userportal.lib.php 4 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -248,17 +248,17 @@  discard block
 block discarded – undo
248 248
                 }
249 249
             }
250 250
 
251
-			if (trim($home_top_temp) == '' && api_is_platform_admin()) {
252
-				$home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>';
253
-			} else {
254
-				$home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>';
255
-			}
256
-			$open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp);
257
-			$html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
258
-		}
259
-
260
-		return $html;
261
-	}
251
+            if (trim($home_top_temp) == '' && api_is_platform_admin()) {
252
+                $home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>';
253
+            } else {
254
+                $home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>';
255
+            }
256
+            $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp);
257
+            $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
258
+        }
259
+
260
+        return $html;
261
+    }
262 262
 
263 263
     function return_notice()
264 264
     {
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
                     $thereIsSubCat = true;
510 510
                 } elseif (api_get_setting('show_empty_course_categories') == 'true') {
511 511
                     /* End changed code to eliminate the (0 courses) after empty categories. */
512
-                      $htmlListCat .= '<li>';
512
+                        $htmlListCat .= '<li>';
513 513
                     $htmlListCat .= $catLine['name'];
514 514
                     $htmlListCat .= "</li>";
515 515
                     $thereIsSubCat = true;
@@ -639,11 +639,11 @@  discard block
 block discarded – undo
639 639
     }
640 640
 
641 641
     /**
642
-    * retrieves all the courses that the user has already subscribed to
643
-    * @author Patrick Cool <[email protected]>, Ghent University, Belgium
644
-    * @param int $user_id: the id of the user
645
-    * @return array an array containing all the information of the courses of the given user
646
-    */
642
+     * retrieves all the courses that the user has already subscribed to
643
+     * @author Patrick Cool <[email protected]>, Ghent University, Belgium
644
+     * @param int $user_id: the id of the user
645
+     * @return array an array containing all the information of the courses of the given user
646
+     */
647 647
     public function get_courses_of_user($user_id)
648 648
     {
649 649
         $table_course = Database::get_main_table(TABLE_MAIN_COURSE);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -338,7 +338,7 @@
 block discarded – undo
338 338
 
339 339
         if (empty($certificatesItem) && empty($searchItem)) {
340 340
             return null;
341
-        }else{
341
+        } else{
342 342
             $content.= $certificatesItem;
343 343
             $content.= $searchItem;
344 344
         }
Please login to merge, or discard this patch.
Spacing   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $exercise_list = array();
46 46
         if (!empty($personal_course_list)) {
47
-            foreach($personal_course_list as  $course_item) {
47
+            foreach ($personal_course_list as  $course_item) {
48 48
                 $course_code = $course_item['c'];
49 49
                 $session_id = $course_item['id_session'];
50 50
 
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
                     $session_id
54 54
                 );
55 55
 
56
-                foreach($exercises as $exercise_item) {
57
-                    $exercise_item['course_code']     = $course_code;
58
-                    $exercise_item['session_id']     = $session_id;
59
-                    $exercise_item['tms']     = api_strtotime($exercise_item['end_time'], 'UTC');
56
+                foreach ($exercises as $exercise_item) {
57
+                    $exercise_item['course_code'] = $course_code;
58
+                    $exercise_item['session_id'] = $session_id;
59
+                    $exercise_item['tms'] = api_strtotime($exercise_item['end_time'], 'UTC');
60 60
 
61 61
                     $exercise_list[] = $exercise_item;
62 62
                 }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                 }
172 172
             }
173 173
 
174
-            if ($show_menu && ($show_create_link || $show_course_link )) {
174
+            if ($show_menu && ($show_create_link || $show_course_link)) {
175 175
                 $show_menu = true;
176 176
             } else {
177 177
                 $show_menu = false;
@@ -183,14 +183,14 @@  discard block
 block discarded – undo
183 183
         if ($show_menu) {
184 184
             $html .= '<ul class="nav nav-pills nav-stacked">';
185 185
             if ($show_create_link) {
186
-                $html .= '<li class="add-course"><a href="' . api_get_path(WEB_CODE_PATH) . 'create_course/add_course.php">'.Display::return_icon('new-course.png',  get_lang('CourseCreate')).(api_get_setting('course_validation') == 'true' ? get_lang('CreateCourseRequest') : get_lang('CourseCreate')).'</a></li>';
186
+                $html .= '<li class="add-course"><a href="'.api_get_path(WEB_CODE_PATH).'create_course/add_course.php">'.Display::return_icon('new-course.png', get_lang('CourseCreate')).(api_get_setting('course_validation') == 'true' ? get_lang('CreateCourseRequest') : get_lang('CourseCreate')).'</a></li>';
187 187
             }
188 188
 
189 189
             if ($show_course_link) {
190 190
                 if (!api_is_drh() && !api_is_session_admin()) {
191
-                    $html .=  '<li class="list-course"><a href="'. api_get_path(WEB_CODE_PATH) . 'auth/courses.php">'. Display::return_icon('catalog-course.png', get_lang('CourseCatalog')) .get_lang('CourseCatalog').'</a></li>';
191
+                    $html .= '<li class="list-course"><a href="'.api_get_path(WEB_CODE_PATH).'auth/courses.php">'.Display::return_icon('catalog-course.png', get_lang('CourseCatalog')).get_lang('CourseCatalog').'</a></li>';
192 192
                 } else {
193
-                    $html .= '<li><a href="' . api_get_path(WEB_CODE_PATH) . 'dashboard/index.php">'.get_lang('Dashboard').'</a></li>';
193
+                    $html .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'dashboard/index.php">'.get_lang('Dashboard').'</a></li>';
194 194
                 }
195 195
             }
196 196
             $html .= '</ul>';
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         $html = '';
215 215
 
216 216
         if (!empty($_GET['include']) && preg_match('/^[a-zA-Z0-9_-]*\.html$/', $_GET['include'])) {
217
-            $open = @(string)file_get_contents(api_get_path(SYS_PATH).$this->home.$_GET['include']);
217
+            $open = @(string) file_get_contents(api_get_path(SYS_PATH).$this->home.$_GET['include']);
218 218
             $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
219 219
         } else {
220 220
             // Hiding home top when user not connected.
@@ -244,15 +244,15 @@  discard block
 block discarded – undo
244 244
                     $home_top_temp = file_get_contents($this->home.'home_top.html');
245 245
                 } else {
246 246
                     if (file_exists($this->default_home.'home_top.html')) {
247
-                        $home_top_temp = file_get_contents($this->default_home . 'home_top.html');
247
+                        $home_top_temp = file_get_contents($this->default_home.'home_top.html');
248 248
                     }
249 249
                 }
250 250
             }
251 251
 
252 252
 			if (trim($home_top_temp) == '' && api_is_platform_admin()) {
253
-				$home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>';
253
+				$home_top_temp = '<div class="welcome-mascot">'.get_lang('PortalHomepageDefaultIntroduction').'</div>';
254 254
 			} else {
255
-				$home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>';
255
+				$home_top_temp = '<div class="welcome-home-top-temp">'.$home_top_temp.'</div>';
256 256
 			}
257 257
 			$open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp);
258 258
 			$html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
@@ -268,9 +268,9 @@  discard block
 block discarded – undo
268 268
 
269 269
         $html = '';
270 270
         // Notice
271
-        $home_notice = @(string)file_get_contents($sys_path.$this->home.'home_notice_'.$user_selected_language.'.html');
271
+        $home_notice = @(string) file_get_contents($sys_path.$this->home.'home_notice_'.$user_selected_language.'.html');
272 272
         if (empty($home_notice)) {
273
-            $home_notice = @(string)file_get_contents($sys_path.$this->home.'home_notice.html');
273
+            $home_notice = @(string) file_get_contents($sys_path.$this->home.'home_notice.html');
274 274
         }
275 275
 
276 276
         if (!empty($home_notice)) {
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
         }
303 303
 
304 304
         $html = null;
305
-        $home_menu = @(string)file_get_contents($sys_path.$this->home.'home_menu_'.$user_selected_language.'.html');
305
+        $home_menu = @(string) file_get_contents($sys_path.$this->home.'home_menu_'.$user_selected_language.'.html');
306 306
         if (!empty($home_menu)) {
307 307
             $home_menu_content = '<ul class="nav nav-pills nav-stacked">';
308 308
             $home_menu_content .= api_to_system_encoding($home_menu, api_detect_encoding(strip_tags($home_menu)));
@@ -332,9 +332,9 @@  discard block
 block discarded – undo
332 332
         if (!api_is_anonymous()) {
333 333
             $certificatesItem = Display::tag(
334 334
                 'li',
335
-                Display::url(Display::return_icon('graduation.png',get_lang('MyCertificates'),null,ICON_SIZE_SMALL).
335
+                Display::url(Display::return_icon('graduation.png', get_lang('MyCertificates'), null, ICON_SIZE_SMALL).
336 336
                     get_lang('MyCertificates'),
337
-                    api_get_path(WEB_CODE_PATH) . "gradebook/my_certificates.php"
337
+                    api_get_path(WEB_CODE_PATH)."gradebook/my_certificates.php"
338 338
                 )
339 339
             );
340 340
         }
@@ -344,29 +344,29 @@  discard block
 block discarded – undo
344 344
         if (api_get_setting('allow_public_certificates') == 'true') {
345 345
             $searchItem = Display::tag(
346 346
                 'li',
347
-                Display::url(Display::return_icon('search_graduation.png',get_lang('Search'),null,ICON_SIZE_SMALL).
347
+                Display::url(Display::return_icon('search_graduation.png', get_lang('Search'), null, ICON_SIZE_SMALL).
348 348
                     get_lang('Search'),
349
-                    api_get_path(WEB_CODE_PATH) . "gradebook/search.php"
349
+                    api_get_path(WEB_CODE_PATH)."gradebook/search.php"
350 350
                 )
351 351
             );
352 352
         }
353 353
 
354 354
         if (empty($certificatesItem) && empty($searchItem)) {
355 355
             return null;
356
-        }else{
357
-            $content.= $certificatesItem;
358
-            $content.= $searchItem;
356
+        } else {
357
+            $content .= $certificatesItem;
358
+            $content .= $searchItem;
359 359
         }
360 360
 
361 361
         if (api_get_setting('allow_skills_tool') == 'true') {
362 362
 
363
-            $content .= Display::tag('li', Display::url(Display::return_icon('skill-badges.png',get_lang('MySkills'),null,ICON_SIZE_SMALL).get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/my_skills_report.php'));
363
+            $content .= Display::tag('li', Display::url(Display::return_icon('skill-badges.png', get_lang('MySkills'), null, ICON_SIZE_SMALL).get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/my_skills_report.php'));
364 364
             $allowSkillsManagement = api_get_setting('allow_hr_skills_management') == 'true';
365 365
             if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) {
366 366
                 $content .= Display::tag('li',
367 367
                     Display::url(Display::return_icon('edit-skill.png', get_lang('MySkills'), null,
368
-                            ICON_SIZE_SMALL) . get_lang('ManageSkills'),
369
-                        api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php'));
368
+                            ICON_SIZE_SMALL).get_lang('ManageSkills'),
369
+                        api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php'));
370 370
             }
371 371
         }
372 372
         $content .= '</ul>';
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 
419 419
         // Get list of courses in category $category.
420 420
         $sql_get_course_list = "SELECT * FROM $main_course_table cours
421
-                                    WHERE category_code = '" . $category . "'
421
+                                    WHERE category_code = '".$category."'
422 422
                                     ORDER BY title, UPPER(visual_code)";
423 423
 
424 424
         // Showing only the courses of the current access_url_id.
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                     FROM $main_category_table t1
466 466
                     LEFT JOIN $main_category_table t2 ON t1.code=t2.parent_id
467 467
                     LEFT JOIN $main_course_table t3 ON (t3.category_code = t1.code $platform_visible_courses)
468
-                    WHERE t1.parent_id ". (empty ($category) ? "IS NULL" : "='$category'")."
468
+                    WHERE t1.parent_id ".(empty ($category) ? "IS NULL" : "='$category'")."
469 469
                     GROUP BY t1.name,t1.code,t1.parent_id,t1.children_count ORDER BY t1.tree_pos, t1.name";
470 470
 
471 471
         // Showing only the category of courses of the current access_url_id
@@ -542,10 +542,10 @@  discard block
 block discarded – undo
542 542
         }
543 543
         $result .= $htmlTitre;
544 544
         if ($thereIsSubCat) {
545
-            $result .=  $htmlListCat;
545
+            $result .= $htmlListCat;
546 546
         }
547 547
         while ($categoryName = Database::fetch_array($resCats)) {
548
-            $result .= '<h3>' . $categoryName['name'] . "</h3>\n";
548
+            $result .= '<h3>'.$categoryName['name']."</h3>\n";
549 549
         }
550 550
         $numrows = Database::num_rows($sql_result_courses);
551 551
         $courses_list_string = '';
@@ -643,12 +643,12 @@  discard block
 block discarded – undo
643 643
         if ($courses_shown > 0) {
644 644
             // Only display the list of courses and categories if there was more than
645 645
                     // 0 courses visible to the world (we're in the anonymous list here).
646
-            $result .=  $courses_list_string;
646
+            $result .= $courses_list_string;
647 647
         }
648 648
         if ($category != '') {
649
-            $result .=  '<p><a href="'.api_get_self().'"> ' .
649
+            $result .= '<p><a href="'.api_get_self().'"> '.
650 650
                 Display :: return_icon('back.png', get_lang('BackToHomePage')).
651
-                get_lang('BackToHomePage') . '</a></p>';
651
+                get_lang('BackToHomePage').'</a></p>';
652 652
         }
653 653
         return $result;
654 654
     }
@@ -725,14 +725,14 @@  discard block
 block discarded – undo
725 725
     ) {
726 726
         if (!empty($idAccordion)) {
727 727
             $html = null;
728
-            $html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">' . PHP_EOL;
729
-            $html .= '<div class="panel panel-default" id="'.$id.'">' . PHP_EOL;
730
-            $html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">' . PHP_EOL;
731
-            $html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollapse.'" aria-expanded="true" aria-controls="'.$idCollapse.'">'.$title.'</a>' . PHP_EOL;
732
-            $html .= '</h4></div>' . PHP_EOL;
733
-            $html .= '<div id="'.$idCollapse.'" class="panel-collapse collapse in" role="tabpanel">' . PHP_EOL;
734
-            $html .= '<div class="panel-body">'.$content.'</div>' . PHP_EOL;
735
-            $html .= '</div></div></div>' . PHP_EOL;
728
+            $html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">'.PHP_EOL;
729
+            $html .= '<div class="panel panel-default" id="'.$id.'">'.PHP_EOL;
730
+            $html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">'.PHP_EOL;
731
+            $html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollapse.'" aria-expanded="true" aria-controls="'.$idCollapse.'">'.$title.'</a>'.PHP_EOL;
732
+            $html .= '</h4></div>'.PHP_EOL;
733
+            $html .= '<div id="'.$idCollapse.'" class="panel-collapse collapse in" role="tabpanel">'.PHP_EOL;
734
+            $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL;
735
+            $html .= '</div></div></div>'.PHP_EOL;
736 736
 
737 737
         } else {
738 738
             if (!empty($id)) {
@@ -741,9 +741,9 @@  discard block
 block discarded – undo
741 741
             $params['class'] = 'panel panel-default';
742 742
             $html = null;
743 743
             if (!empty($title)) {
744
-                $html .= '<div class="panel-heading">'.$title.'</div>' . PHP_EOL;
744
+                $html .= '<div class="panel-heading">'.$title.'</div>'.PHP_EOL;
745 745
             }
746
-            $html.= '<div class="panel-body">'.$content.'</div>' . PHP_EOL;
746
+            $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL;
747 747
             $html = Display::div($html, $params);
748 748
         }
749 749
         return $html;
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
             $usergroup_list = $usergroup->get_usergroup_by_user(api_get_user_id());
790 790
             $classes = '';
791 791
             if (!empty($usergroup_list)) {
792
-                foreach($usergroup_list as $group_id) {
792
+                foreach ($usergroup_list as $group_id) {
793 793
                     $data = $usergroup->get($group_id);
794 794
                     $data['name'] = Display::url($data['name'], api_get_path(WEB_CODE_PATH).'user/classes.php?id='.$data['id']);
795 795
                     $classes .= Display::tag('li', $data['name']);
@@ -798,7 +798,7 @@  discard block
 block discarded – undo
798 798
             if (api_is_platform_admin()) {
799 799
                 $classes .= Display::tag(
800 800
                     'li',
801
-                    Display::url(get_lang('AddClasses') ,api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add')
801
+                    Display::url(get_lang('AddClasses'), api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add')
802 802
                 );
803 803
             }
804 804
             if (!empty($classes)) {
@@ -820,11 +820,11 @@  discard block
 block discarded – undo
820 820
             $content = null;
821 821
 
822 822
             if (api_get_setting('allow_social_tool') == 'true') {
823
-                $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/social/home.php">
824
-                <img class="img-circle" src="' . $userPicture . '" ></a>';
823
+                $content .= '<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/social/home.php">
824
+                <img class="img-circle" src="' . $userPicture.'" ></a>';
825 825
             } else {
826
-                $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/auth/profile.php">
827
-                <img class="img-circle" title="' . get_lang('EditProfile') . '" src="' . $userPicture. '" ></a>';
826
+                $content .= '<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/auth/profile.php">
827
+                <img class="img-circle" title="' . get_lang('EditProfile').'" src="'.$userPicture.'" ></a>';
828 828
             }
829 829
 
830 830
             $html = self::show_right_block(
@@ -876,12 +876,12 @@  discard block
 block discarded – undo
876 876
             if (api_get_setting('allow_social_tool') == 'true') {
877 877
                 $link = '?f=social';
878 878
             }
879
-            $profile_content .= '<li class="inbox-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'">'.Display::return_icon('inbox.png',get_lang('Inbox'),null,ICON_SIZE_SMALL).get_lang('Inbox').$cant_msg.' </a></li>';
880
-            $profile_content .= '<li class="new-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'">'.Display::return_icon('new-message.png',get_lang('Compose'),null,ICON_SIZE_SMALL).get_lang('Compose').' </a></li>';
879
+            $profile_content .= '<li class="inbox-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'">'.Display::return_icon('inbox.png', get_lang('Inbox'), null, ICON_SIZE_SMALL).get_lang('Inbox').$cant_msg.' </a></li>';
880
+            $profile_content .= '<li class="new-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'">'.Display::return_icon('new-message.png', get_lang('Compose'), null, ICON_SIZE_SMALL).get_lang('Compose').' </a></li>';
881 881
 
882 882
             if (api_get_setting('allow_social_tool') == 'true') {
883 883
                 $total_invitations = Display::badge($total_invitations);
884
-                $profile_content .= '<li class="invitations-social"><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitations.png',get_lang('PendingInvitations'),null,ICON_SIZE_SMALL).get_lang('PendingInvitations').$total_invitations.'</a></li>';
884
+                $profile_content .= '<li class="invitations-social"><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitations.png', get_lang('PendingInvitations'), null, ICON_SIZE_SMALL).get_lang('PendingInvitations').$total_invitations.'</a></li>';
885 885
             }
886 886
 
887 887
             if (isset($_configuration['allow_my_files_link_in_homepage']) && $_configuration['allow_my_files_link_in_homepage']) {
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
 
898 898
         $editProfileUrl = Display::getProfileEditionLink($user_id);
899 899
 
900
-        $profile_content .= '<li class="profile-social"><a href="' . $editProfileUrl . '">'.Display::return_icon('edit-profile.png',get_lang('EditProfile'),null,ICON_SIZE_SMALL).get_lang('EditProfile').'</a></li>';
900
+        $profile_content .= '<li class="profile-social"><a href="'.$editProfileUrl.'">'.Display::return_icon('edit-profile.png', get_lang('EditProfile'), null, ICON_SIZE_SMALL).get_lang('EditProfile').'</a></li>';
901 901
         $profile_content .= '</ul>';
902 902
         $html = self::show_right_block(
903 903
             get_lang('Profile'),
@@ -972,17 +972,17 @@  discard block
 block discarded – undo
972 972
         if ($show_create_link) {
973 973
             $my_account_content .= '<li class="add-course"><a href="main/create_course/add_course.php">';
974 974
             if (api_get_setting('course_validation') == 'true' && !api_is_platform_admin()) {
975
-                $my_account_content .= Display::return_icon('new-course.png',get_lang('CreateCourseRequest'),null,ICON_SIZE_SMALL);
975
+                $my_account_content .= Display::return_icon('new-course.png', get_lang('CreateCourseRequest'), null, ICON_SIZE_SMALL);
976 976
                 $my_account_content .= get_lang('CreateCourseRequest');
977 977
             } else {
978
-                $my_account_content .= Display::return_icon('new-course.png',get_lang('CourseCreate'),null,ICON_SIZE_SMALL);
978
+                $my_account_content .= Display::return_icon('new-course.png', get_lang('CourseCreate'), null, ICON_SIZE_SMALL);
979 979
                 $my_account_content .= get_lang('CourseCreate');
980 980
             }
981 981
             $my_account_content .= '</a></li>';
982 982
 
983 983
             if (SessionManager::allowToManageSessions()) {
984 984
                 $my_account_content .= '<li class="add-course"><a href="main/session/session_add.php">';
985
-                $my_account_content .= Display::return_icon('session.png',get_lang('AddSession'),null,ICON_SIZE_SMALL);
985
+                $my_account_content .= Display::return_icon('session.png', get_lang('AddSession'), null, ICON_SIZE_SMALL);
986 986
                 $my_account_content .= get_lang('AddSession');
987 987
                 $my_account_content .= '</a></li>';
988 988
             }
@@ -990,21 +990,21 @@  discard block
 block discarded – undo
990 990
 
991 991
         //Sort courses
992 992
         $url = api_get_path(WEB_CODE_PATH).'auth/courses.php?action=sortmycourses';
993
-        $img_order= Display::return_icon('order-course.png',get_lang('SortMyCourses'),null,ICON_SIZE_SMALL);
993
+        $img_order = Display::return_icon('order-course.png', get_lang('SortMyCourses'), null, ICON_SIZE_SMALL);
994 994
         $my_account_content .= '<li class="order-course">'.Display::url($img_order.get_lang('SortMyCourses'), $url, array('class' => 'sort course')).'</li>';
995 995
 
996 996
         // Session history
997 997
         if (isset($_GET['history']) && intval($_GET['history']) == 1) {
998
-            $my_account_content .= '<li class="history-course"><a href="user_portal.php">'.Display::return_icon('history-course.png',get_lang('DisplayTrainingList'),null,ICON_SIZE_SMALL).get_lang('DisplayTrainingList').'</a></li>';
998
+            $my_account_content .= '<li class="history-course"><a href="user_portal.php">'.Display::return_icon('history-course.png', get_lang('DisplayTrainingList'), null, ICON_SIZE_SMALL).get_lang('DisplayTrainingList').'</a></li>';
999 999
         } else {
1000
-            $my_account_content .= '<li class="history-course"><a href="user_portal.php?history=1" >'.Display::return_icon('history-course.png',get_lang('HistoryTrainingSessions'),null,ICON_SIZE_SMALL).get_lang('HistoryTrainingSessions').'</a></li>';
1000
+            $my_account_content .= '<li class="history-course"><a href="user_portal.php?history=1" >'.Display::return_icon('history-course.png', get_lang('HistoryTrainingSessions'), null, ICON_SIZE_SMALL).get_lang('HistoryTrainingSessions').'</a></li>';
1001 1001
         }
1002 1002
 
1003 1003
         // Course catalog
1004 1004
 
1005 1005
         if ($show_course_link) {
1006 1006
             if (!api_is_drh()) {
1007
-                $my_account_content .= '<li class="list-course"><a href="main/auth/courses.php" >'.Display::return_icon('catalog-course.png',get_lang('CourseCatalog'),null,ICON_SIZE_SMALL).get_lang('CourseCatalog').'</a></li>';
1007
+                $my_account_content .= '<li class="list-course"><a href="main/auth/courses.php" >'.Display::return_icon('catalog-course.png', get_lang('CourseCatalog'), null, ICON_SIZE_SMALL).get_lang('CourseCatalog').'</a></li>';
1008 1008
             } else {
1009 1009
                 $my_account_content .= '<li><a href="main/dashboard/index.php">'.get_lang('Dashboard').'</a></li>';
1010 1010
             }
@@ -1183,10 +1183,10 @@  discard block
 block discarded – undo
1183 1183
 
1184 1184
                             $extra_info = !empty($session_box['coach']) ? $session_box['coach'] : null;
1185 1185
                             $extra_info .= !empty($session_box['coach'])
1186
-                                ? ' - ' . $session_box['dates']
1186
+                                ? ' - '.$session_box['dates']
1187 1187
                                 : $session_box['dates'];
1188 1188
                             $extra_info .= isset($session_box['duration'])
1189
-                                ? ' ' . $session_box['duration']
1189
+                                ? ' '.$session_box['duration']
1190 1190
                                 : null;
1191 1191
 
1192 1192
                             $params['extra_fields'] = $session_box['extra_fields'];
@@ -1308,8 +1308,8 @@  discard block
 block discarded – undo
1308 1308
                                 $sessionParams['course_list_session_style'] = $coursesListSessionStyle;
1309 1309
                                 $sessionParams['title'] = $session_box['title'];
1310 1310
                                 $sessionParams['subtitle'] = (!empty($session_box['coach'])
1311
-                                    ? $session_box['coach'] . ' | '
1312
-                                    : '') . $session_box['dates'];
1311
+                                    ? $session_box['coach'].' | '
1312
+                                    : '').$session_box['dates'];
1313 1313
                                 $sessionParams['show_actions'] = api_is_platform_admin();
1314 1314
                                 $sessionParams['courses'] = $html_courses_session;
1315 1315
                                 $sessionParams['show_simple_session_info'] = false;
@@ -1359,14 +1359,14 @@  discard block
 block discarded – undo
1359 1359
                                 !empty($session_category_start_date) &&
1360 1360
                                 $session_category_start_date != '0000-00-00'
1361 1361
                             ) {
1362
-                                $categoryParams['subtitle'] = get_lang('From') . ' ' . $session_category_start_date;
1362
+                                $categoryParams['subtitle'] = get_lang('From').' '.$session_category_start_date;
1363 1363
                             }
1364 1364
 
1365 1365
                             if (
1366 1366
                                 !empty($session_category_end_date) &&
1367 1367
                                 $session_category_end_date != '0000-00-00'
1368 1368
                             ) {
1369
-                                $categoryParams['subtitle'] = get_lang('Until') . ' ' . $session_category_end_date;
1369
+                                $categoryParams['subtitle'] = get_lang('Until').' '.$session_category_end_date;
1370 1370
                             }
1371 1371
                         }
1372 1372
 
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
         if ($load_history) {
1441 1441
             $html .= Display::page_subheader(get_lang('HistoryTrainingSession'));
1442 1442
             if (empty($session_categories)) {
1443
-                $html .=  get_lang('YouDoNotHaveAnySessionInItsHistory');
1443
+                $html .= get_lang('YouDoNotHaveAnySessionInItsHistory');
1444 1444
             }
1445 1445
         }
1446 1446
 
@@ -1513,7 +1513,7 @@  discard block
 block discarded – undo
1513 1513
                     } else {
1514 1514
                         $htmlCategory .= '<div class="session-view-row" >';
1515 1515
                     }
1516
-                    $coursesInfo =  $listCourse['course'];
1516
+                    $coursesInfo = $listCourse['course'];
1517 1517
 
1518 1518
                     $htmlCategory .= self::getHtmlForCourse(
1519 1519
                         $coursesInfo,
@@ -1530,7 +1530,7 @@  discard block
 block discarded – undo
1530 1530
                             $listCategorySession['catSessionName']
1531 1531
                         );
1532 1532
                         // list of session
1533
-                        $htmlSession = '';    // start
1533
+                        $htmlSession = ''; // start
1534 1534
                         foreach ($listCategorySession['sessionList'] as $k => $listSession) {
1535 1535
                             // add session
1536 1536
                             $htmlSession .= '<div class="session-view-row">';
@@ -1547,8 +1547,8 @@  discard block
 block discarded – undo
1547 1547
                         $htmlSessionCategory .= $htmlSession;
1548 1548
                     }
1549 1549
                     $htmlSessionCategory .= '</div>'; // end session cat block
1550
-                    $htmlCategory .=  $htmlSessionCategory .'</div>' ;
1551
-                    $htmlCategory .= '';   // end course block
1550
+                    $htmlCategory .= $htmlSessionCategory.'</div>';
1551
+                    $htmlCategory .= ''; // end course block
1552 1552
                 }
1553 1553
                 $userCategoryHtml .= $htmlCategory;
1554 1554
             }
@@ -1573,11 +1573,11 @@  discard block
 block discarded – undo
1573 1573
                 }
1574 1574
             }
1575 1575
             $htmlCategory .= '';
1576
-            $userCategoryHtml .= $htmlCategory;   // end user cat block
1576
+            $userCategoryHtml .= $htmlCategory; // end user cat block
1577 1577
             if ($userCategoryId != 0) {
1578 1578
                 $userCategoryHtml .= '</div>';
1579 1579
             }
1580
-            $html .= $userCategoryHtml;   //
1580
+            $html .= $userCategoryHtml; //
1581 1581
         }
1582 1582
         $html .= '</div>';
1583 1583
 
@@ -1718,11 +1718,11 @@  discard block
 block discarded – undo
1718 1718
         $html = '';
1719 1719
 
1720 1720
         if ($categorySessionId == 0) {
1721
-            $class1 = 'session-view-lvl-2';    // session
1722
-            $class2 = 'session-view-lvl-4';    // got to course in session link
1721
+            $class1 = 'session-view-lvl-2'; // session
1722
+            $class2 = 'session-view-lvl-4'; // got to course in session link
1723 1723
         } else {
1724
-            $class1 = 'session-view-lvl-3';    // session
1725
-            $class2 = 'session-view-lvl-5';    // got to course in session link
1724
+            $class1 = 'session-view-lvl-3'; // session
1725
+            $class2 = 'session-view-lvl-5'; // got to course in session link
1726 1726
         }
1727 1727
 
1728 1728
         $icon = Display::return_icon(
@@ -1750,7 +1750,7 @@  discard block
 block discarded – undo
1750 1750
         if ($listA['userCatTitle'] == $listB['userCatTitle']) {
1751 1751
             if ($listA['title'] == $listB['title']) {
1752 1752
                 return 0;
1753
-            } else if($listA['title'] > $listB['title']) {
1753
+            } else if ($listA['title'] > $listB['title']) {
1754 1754
                 return 1;
1755 1755
             } else {
1756 1756
                 return -1;
@@ -1771,7 +1771,7 @@  discard block
 block discarded – undo
1771 1771
     {
1772 1772
         if ($listA['title'] == $listB['title']) {
1773 1773
             return 0;
1774
-        } else if($listA['title'] > $listB['title']) {
1774
+        } else if ($listA['title'] > $listB['title']) {
1775 1775
             return 1;
1776 1776
         } else {
1777 1777
             return -1;
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -682,6 +682,7 @@  discard block
 block discarded – undo
682 682
     * retrieves all the courses that the user has already subscribed to
683 683
     * @author Patrick Cool <[email protected]>, Ghent University, Belgium
684 684
     * @param int $user_id: the id of the user
685
+    * @param integer $user_id
685 686
     * @return array an array containing all the information of the courses of the given user
686 687
     */
687 688
     public function get_courses_of_user($user_id)
@@ -732,8 +733,8 @@  discard block
 block discarded – undo
732 733
 
733 734
     /**
734 735
      * @todo use the template system
735
-     * @param $title
736
-     * @param $content
736
+     * @param string|null $title
737
+     * @param string $content
737 738
      * @param string $id
738 739
      * @param array $params
739 740
      * @param string $idAccordion
@@ -1704,8 +1705,8 @@  discard block
 block discarded – undo
1704 1705
 
1705 1706
     /**
1706 1707
      * Return HTML code for personal user course category
1707
-     * @param $id
1708
-     * @param $title
1708
+     * @param integer $id
1709
+     * @param string $title
1709 1710
      * @return string
1710 1711
      */
1711 1712
     private static function getHtmlForUserCategory($id, $title)
@@ -1726,7 +1727,7 @@  discard block
 block discarded – undo
1726 1727
     /**
1727 1728
      * return HTML code for course display in session view
1728 1729
      * @param array $courseInfo
1729
-     * @param $userCategoryId
1730
+     * @param integer $userCategoryId
1730 1731
      * @param bool $displayButton
1731 1732
      * @param $loadDirs
1732 1733
      * @return string
Please login to merge, or discard this patch.
main/tracking/lp_results_by_user.php 3 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,8 +73,9 @@
 block discarded – undo
73 73
 //$form->addElement('submit','submit',get_lang('Filter'));
74 74
 $form->addButtonFilter(get_lang('Filter'));
75 75
 
76
-if (!empty($_REQUEST['course_code']))
76
+if (!empty($_REQUEST['course_code'])) {
77 77
     $selected_course = $_REQUEST['course_code'];
78
+}
78 79
 if (!empty($selected_course)) {
79 80
     $selected_course = api_get_course_info($selected_course);
80 81
     $course_list = array($selected_course);
Please login to merge, or discard this patch.
Indentation   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -16,34 +16,34 @@  discard block
 block discarded – undo
16 16
 $is_allowedToTrack = $is_courseAdmin || $is_platformAdmin || $is_courseCoach || $is_sessionAdmin;
17 17
 
18 18
 if (!$is_allowedToTrack) {
19
-	Display :: display_header(null);
20
-	api_not_allowed();
21
-	Display :: display_footer();
19
+    Display :: display_header(null);
20
+    api_not_allowed();
21
+    Display :: display_footer();
22 22
 }
23 23
 
24 24
 $export_to_csv = false;
25 25
 if (isset($_GET['export'])) {
26
-	$export_to_csv = true;
26
+    $export_to_csv = true;
27 27
 }
28 28
 
29 29
 if (api_is_platform_admin() ) {
30
-	$global = true;
30
+    $global = true;
31 31
 } else {
32
-	$global = false;
32
+    $global = false;
33 33
 }
34 34
 
35 35
 if ($global) {
36
-	$temp_course_list = CourseManager :: get_courses_list();
37
-	foreach($temp_course_list  as $temp_course_item) {
38
-		$course_item = CourseManager ::get_course_information($temp_course_item['code']);
36
+    $temp_course_list = CourseManager :: get_courses_list();
37
+    foreach($temp_course_list  as $temp_course_item) {
38
+        $course_item = CourseManager ::get_course_information($temp_course_item['code']);
39 39
         $course_list[] = array(
40 40
             'code' => $course_item['code'],
41 41
             'title' => $course_item['title'],
42 42
         );
43
-	}
43
+    }
44 44
 } else {
45 45
     $current_course['code'] = $_course['id'];
46
-	$course_list = array($current_course);
46
+    $course_list = array($current_course);
47 47
 }
48 48
 
49 49
 $new_course_select = array();
@@ -54,20 +54,20 @@  discard block
 block discarded – undo
54 54
 $form = new FormValidator('search_simple', 'POST', '', '', null, false);
55 55
 $form->addElement('select','course_code',get_lang('Course'), $new_course_select);
56 56
 if ($global) {
57
-	$form->addElement('hidden','view','admin');
57
+    $form->addElement('hidden','view','admin');
58 58
 } else {
59
-	//Get exam lists
59
+    //Get exam lists
60 60
     $course_id = api_get_course_int_id();
61
-	$t_quiz = Database::get_course_table(TABLE_QUIZ_TEST);
62
-	$sqlExercices = "SELECT quiz.title,id FROM ".$t_quiz." AS quiz
61
+    $t_quiz = Database::get_course_table(TABLE_QUIZ_TEST);
62
+    $sqlExercices = "SELECT quiz.title,id FROM ".$t_quiz." AS quiz
63 63
 	                 WHERE c_id = $course_id AND active='1'
64 64
 	                 ORDER BY quiz.title ASC";
65
-	$resultExercices = Database::query($sqlExercices);
66
-	$exercise_list[0] = get_lang('All');
67
-	while($a_exercices = Database::fetch_array($resultExercices)) {
68
-		$exercise_list[$a_exercices['id']] = $a_exercices['title'];
69
-	}
70
-	$form->addElement('select', 'exercise_id', get_lang('Exercise'), $exercise_list);
65
+    $resultExercices = Database::query($sqlExercices);
66
+    $exercise_list[0] = get_lang('All');
67
+    while($a_exercices = Database::fetch_array($resultExercices)) {
68
+        $exercise_list[$a_exercices['id']] = $a_exercices['title'];
69
+    }
70
+    $form->addElement('select', 'exercise_id', get_lang('Exercise'), $exercise_list);
71 71
 }
72 72
 
73 73
 //$form->addElement('submit','submit',get_lang('Filter'));
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 }
82 82
 
83 83
 if (!$export_to_csv) {
84
-	Display :: display_header(get_lang('Reporting'));
85
-	echo '<div class="actions" style ="font-size:10pt;">';
86
-	if ($global) {
84
+    Display :: display_header(get_lang('Reporting'));
85
+    echo '<div class="actions" style ="font-size:10pt;">';
86
+    if ($global) {
87 87
 
88 88
         echo '<div style="float:right"> <a href="'.api_get_self().'?export=1&score='.$filter_score.'&exercise_id='.$exercise_id.'">
89 89
                 '.Display::return_icon('csv.gif').'
@@ -93,81 +93,81 @@  discard block
 block discarded – undo
93 93
                 &nbsp;'.get_lang('Print').'</a>
94 94
                 	</div>';
95 95
 
96
-		$menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=teacher">'.get_lang('TeacherInterface').'</a>';
96
+        $menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=teacher">'.get_lang('TeacherInterface').'</a>';
97 97
         if (api_is_platform_admin()) {
98
-		  $menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=admin">'.get_lang('AdminInterface').'</a>';
98
+            $menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=admin">'.get_lang('AdminInterface').'</a>';
99 99
         } else {
100 100
             $menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=coach">'.get_lang('AdminInterface').'</a>';
101 101
         }
102
-		$menu_items[] = get_lang('ExamTracking');
103
-		$nb_menu_items = count($menu_items);
104
-		if($nb_menu_items>1) {
105
-			foreach($menu_items as $key=> $item) {
106
-				echo $item;
107
-				if($key!=$nb_menu_items-1) {
108
-					echo ' | ';
109
-				}
110
-			}
111
-			echo '<br />';
112
-		}
113
-	} else {
114
-	    echo '<a href="courseLog.php?'.api_get_cidreq().'&studentlist=true">'.get_lang('StudentsTracking').'</a>&nbsp;|
102
+        $menu_items[] = get_lang('ExamTracking');
103
+        $nb_menu_items = count($menu_items);
104
+        if($nb_menu_items>1) {
105
+            foreach($menu_items as $key=> $item) {
106
+                echo $item;
107
+                if($key!=$nb_menu_items-1) {
108
+                    echo ' | ';
109
+                }
110
+            }
111
+            echo '<br />';
112
+        }
113
+    } else {
114
+        echo '<a href="courseLog.php?'.api_get_cidreq().'&studentlist=true">'.get_lang('StudentsTracking').'</a>&nbsp;|
115 115
 		     <a href="courseLog.php?'.api_get_cidreq().'&studentlist=false">'.get_lang('CourseTracking').'</a>&nbsp;|&nbsp';
116 116
         echo '<a href="courseLog.php?'.api_get_cidreq().'&studentlist=resources">'.get_lang('ResourcesTracking').'</a>';
117
-		echo ' | '.get_lang('ExamTracking').'';
117
+        echo ' | '.get_lang('ExamTracking').'';
118 118
         echo '<a href="'.api_get_self().'?export=1&score='.$filter_score.'&exercise_id='.$exercise_id.'">
119 119
             '.Display::return_icon('excel.gif').'
120 120
             &nbsp;'.get_lang('ExportAsXLS').'</a><br /><br />';
121 121
 
122
-	}
122
+    }
123 123
     echo '</div>';
124
-	echo '<br /><br />';
125
-	$form->display();
124
+    echo '<br /><br />';
125
+    $form->display();
126 126
 }
127 127
 $main_result = array();
128 128
 $session_id = 0;
129 129
 $user_list = array();
130 130
 // Getting course list
131 131
 foreach ($course_list  as $current_course ) {
132
-	$course_info = api_get_course_info($current_course['code']);
133
-	$_course = $course_info;
134
-
135
-	// Getting LP list
136
-	$list = new LearnpathList('', $current_course['code'], $session_id);
137
-	$lp_list = $list->get_flat_list();
138
-
139
-	// Looping LPs
140
-	$lps = array();
141
-	foreach ($lp_list as $lp_id =>$lp) {
142
-		$exercise_list = Event::get_all_exercises_from_lp($lp_id, $course_info['real_id']);
143
-		$attempt_result = array();
144
-		// Looping Chamilo Exercises in LP
145
-		foreach ($exercise_list as $exercise) {
146
-			$exercise_stats = Event::get_all_exercise_event_from_lp(
147
-				$exercise['path'],
148
-				$course_info['real_id'],
149
-				$session_id
150
-			);
151
-			// Looping Exercise Attempts
152
-			foreach ($exercise_stats as $stats) {
153
-				$attempt_result[$exercise['id']]['users'][$stats['exe_user_id']][$stats['exe_id']] = $stats;
154
-				$user_list[$stats['exe_user_id']] = $stats['exe_user_id'];
155
-			}
156
-			$exercise_list_name[$exercise['id']] = $exercise['title'];
157
-		}
158
-		$lps[$lp_id] = array('lp_name' =>$lp['lp_name'], 'exercises' =>$attempt_result);
159
-		$lp_list_name[$lp_id] = $lp['lp_name'];
160
-	}
161
-	$main_result[$current_course['code']] = $lps;
132
+    $course_info = api_get_course_info($current_course['code']);
133
+    $_course = $course_info;
134
+
135
+    // Getting LP list
136
+    $list = new LearnpathList('', $current_course['code'], $session_id);
137
+    $lp_list = $list->get_flat_list();
138
+
139
+    // Looping LPs
140
+    $lps = array();
141
+    foreach ($lp_list as $lp_id =>$lp) {
142
+        $exercise_list = Event::get_all_exercises_from_lp($lp_id, $course_info['real_id']);
143
+        $attempt_result = array();
144
+        // Looping Chamilo Exercises in LP
145
+        foreach ($exercise_list as $exercise) {
146
+            $exercise_stats = Event::get_all_exercise_event_from_lp(
147
+                $exercise['path'],
148
+                $course_info['real_id'],
149
+                $session_id
150
+            );
151
+            // Looping Exercise Attempts
152
+            foreach ($exercise_stats as $stats) {
153
+                $attempt_result[$exercise['id']]['users'][$stats['exe_user_id']][$stats['exe_id']] = $stats;
154
+                $user_list[$stats['exe_user_id']] = $stats['exe_user_id'];
155
+            }
156
+            $exercise_list_name[$exercise['id']] = $exercise['title'];
157
+        }
158
+        $lps[$lp_id] = array('lp_name' =>$lp['lp_name'], 'exercises' =>$attempt_result);
159
+        $lp_list_name[$lp_id] = $lp['lp_name'];
160
+    }
161
+    $main_result[$current_course['code']] = $lps;
162 162
 }
163 163
 
164 164
 if (!empty($user_list)) {
165 165
     foreach($user_list as $user_id) {
166 166
         $user_data = api_get_user_info($user_id);
167
-		$user_list_name[$user_id] = api_get_person_name(
168
-			$user_data['firstname'],
169
-			$user_data['lastname']
170
-		);
167
+        $user_list_name[$user_id] = api_get_person_name(
168
+            $user_data['firstname'],
169
+            $user_data['lastname']
170
+        );
171 171
     }
172 172
 }
173 173
 $export_array =  array();
@@ -207,15 +207,15 @@  discard block
 block discarded – undo
207 207
                         $html_result .= Display::tag('td', $result);
208 208
 
209 209
                         $html_result .= '</tr>';
210
-						$export_array[] = array(
211
-							$course_code,
212
-							$lp_list_name[$lp_id],
213
-							$exercise_list_name[$exercise_id],
214
-							$user_list_name[$user_id],
215
-							$attempt,
216
-							api_get_local_time($attempt_data['exe_date']),
217
-							$result,
218
-						);
210
+                        $export_array[] = array(
211
+                            $course_code,
212
+                            $lp_list_name[$lp_id],
213
+                            $exercise_list_name[$exercise_id],
214
+                            $user_list_name[$user_id],
215
+                            $attempt,
216
+                            api_get_local_time($attempt_data['exe_date']),
217
+                            $result,
218
+                        );
219 219
                         $attempt++;
220 220
                     }
221 221
                 }
@@ -226,30 +226,30 @@  discard block
 block discarded – undo
226 226
 }
227 227
 
228 228
 if (!$export_to_csv) {
229
-	echo $html_result;
229
+    echo $html_result;
230 230
 }
231 231
 $filename = 'learning_path_results-'.date('Y-m-d-h:i:s').'.xls';
232 232
 if ($export_to_csv) {
233 233
     export_complete_report_csv($filename, $export_array);
234
-	exit;
234
+    exit;
235 235
 }
236 236
 
237 237
 function export_complete_report_csv($filename, $array)
238 238
 {
239
-	$header[] = array(
240
-		get_lang('Course'),
241
-		get_lang('LearningPath'),
242
-		get_lang('Exercise'),
243
-		get_lang('User'),
244
-		get_lang('Attempt'),
245
-		get_lang('Date'),
246
-		get_lang('Results'),
247
-	);
248
-	if (!empty($array)) {
249
-		$array = array_merge($header, $array);
250
-		Export :: arrayToCsv($array, $filename);
251
-	}
252
-	exit;
239
+    $header[] = array(
240
+        get_lang('Course'),
241
+        get_lang('LearningPath'),
242
+        get_lang('Exercise'),
243
+        get_lang('User'),
244
+        get_lang('Attempt'),
245
+        get_lang('Date'),
246
+        get_lang('Results'),
247
+    );
248
+    if (!empty($array)) {
249
+        $array = array_merge($header, $array);
250
+        Export :: arrayToCsv($array, $filename);
251
+    }
252
+    exit;
253 253
 
254 254
 }
255 255
 Display :: display_footer();
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	$export_to_csv = true;
27 27
 }
28 28
 
29
-if (api_is_platform_admin() ) {
29
+if (api_is_platform_admin()) {
30 30
 	$global = true;
31 31
 } else {
32 32
 	$global = false;
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
 if ($global) {
36 36
 	$temp_course_list = CourseManager :: get_courses_list();
37
-	foreach($temp_course_list  as $temp_course_item) {
37
+	foreach ($temp_course_list  as $temp_course_item) {
38 38
 		$course_item = CourseManager ::get_course_information($temp_course_item['code']);
39 39
         $course_list[] = array(
40 40
             'code' => $course_item['code'],
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
 }
48 48
 
49 49
 $new_course_select = array();
50
-foreach($course_list as $data) {
50
+foreach ($course_list as $data) {
51 51
     $new_course_select[$data['code']] = $data['title'];
52 52
 }
53 53
 
54 54
 $form = new FormValidator('search_simple', 'POST', '', '', null, false);
55
-$form->addElement('select','course_code',get_lang('Course'), $new_course_select);
55
+$form->addElement('select', 'course_code', get_lang('Course'), $new_course_select);
56 56
 if ($global) {
57
-	$form->addElement('hidden','view','admin');
57
+	$form->addElement('hidden', 'view', 'admin');
58 58
 } else {
59 59
 	//Get exam lists
60 60
     $course_id = api_get_course_int_id();
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	                 ORDER BY quiz.title ASC";
65 65
 	$resultExercices = Database::query($sqlExercices);
66 66
 	$exercise_list[0] = get_lang('All');
67
-	while($a_exercices = Database::fetch_array($resultExercices)) {
67
+	while ($a_exercices = Database::fetch_array($resultExercices)) {
68 68
 		$exercise_list[$a_exercices['id']] = $a_exercices['title'];
69 69
 	}
70 70
 	$form->addElement('select', 'exercise_id', get_lang('Exercise'), $exercise_list);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         echo '<div style="float:right"> <a href="'.api_get_self().'?export=1&score='.$filter_score.'&exercise_id='.$exercise_id.'">
89 89
                 '.Display::return_icon('csv.gif').'
90
-                &nbsp;'.get_lang('ExportAsCSV').'</a>' .
90
+                &nbsp;'.get_lang('ExportAsCSV').'</a>'.
91 91
                 '<a href="javascript: void(0);" onclick="javascript: window.print()">
92 92
                 '.Display::return_icon('printmgr.gif').'
93 93
                 &nbsp;'.get_lang('Print').'</a>
@@ -101,10 +101,10 @@  discard block
 block discarded – undo
101 101
         }
102 102
 		$menu_items[] = get_lang('ExamTracking');
103 103
 		$nb_menu_items = count($menu_items);
104
-		if($nb_menu_items>1) {
105
-			foreach($menu_items as $key=> $item) {
104
+		if ($nb_menu_items > 1) {
105
+			foreach ($menu_items as $key=> $item) {
106 106
 				echo $item;
107
-				if($key!=$nb_menu_items-1) {
107
+				if ($key != $nb_menu_items - 1) {
108 108
 					echo ' | ';
109 109
 				}
110 110
 			}
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 $session_id = 0;
129 129
 $user_list = array();
130 130
 // Getting course list
131
-foreach ($course_list  as $current_course ) {
131
+foreach ($course_list  as $current_course) {
132 132
 	$course_info = api_get_course_info($current_course['code']);
133 133
 	$_course = $course_info;
134 134
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 }
163 163
 
164 164
 if (!empty($user_list)) {
165
-    foreach($user_list as $user_id) {
165
+    foreach ($user_list as $user_id) {
166 166
         $user_data = api_get_user_info($user_id);
167 167
 		$user_list_name[$user_id] = api_get_person_name(
168 168
 			$user_data['firstname'],
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		);
171 171
     }
172 172
 }
173
-$export_array =  array();
173
+$export_array = array();
174 174
 if (!empty($main_result)) {
175 175
 
176 176
     $html_result .= '<table  class="data_table">';
@@ -193,9 +193,9 @@  discard block
 block discarded – undo
193 193
 
194 194
             foreach ($exercises as $exercise_id => $exercise_data) {
195 195
                 $users = $exercise_data['users'];
196
-                foreach($users as $user_id => $attempts) {
196
+                foreach ($users as $user_id => $attempts) {
197 197
                     $attempt = 1;
198
-                    foreach($attempts as $exe_id => $attempt_data) {
198
+                    foreach ($attempts as $exe_id => $attempt_data) {
199 199
                         $html_result .= '<tr colspan="">';
200 200
                         $html_result .= Display::tag('td', $course_code);
201 201
                         $html_result .= Display::tag('td', $lp_list_name[$lp_id]);
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
             }
223 223
         }
224 224
     }
225
-    $html_result .='</table>';
225
+    $html_result .= '</table>';
226 226
 }
227 227
 
228 228
 if (!$export_to_csv) {
Please login to merge, or discard this patch.
main/tracking/toolaccess_details.php 2 patches
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 $nameTools = get_lang('ToolName');
25 25
 
26
-$interbreadcrumb[]= array ("url"=>"courseLog.php", "name"=> "Statistics");
26
+$interbreadcrumb[] = array("url"=>"courseLog.php", "name"=> "Statistics");
27 27
 
28 28
 $htmlHeadXtra[] = "<style type='text/css'>
29 29
 /*<![CDATA[*/
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 td {border-bottom: thin dashed gray;}
41 41
 /*]]>*/
42 42
 </style>";
43
-Display::display_header($nameTools,"Tracking");
43
+Display::display_header($nameTools, "Tracking");
44 44
 ?>
45 45
 
46 46
 <h3>
@@ -59,16 +59,16 @@  discard block
 block discarded – undo
59 59
 // Defining the months of the year to allow translation of the months
60 60
 $MonthsShort = api_get_months_short();
61 61
 
62
-$tool=$_REQUEST['tool'];
63
-$period=$_REQUEST['period'];
64
-$reqdate=$_REQUEST['reqdate'];
62
+$tool = $_REQUEST['tool'];
63
+$period = $_REQUEST['period'];
64
+$reqdate = $_REQUEST['reqdate'];
65 65
 ?>
66 66
 <table width="100%" cellpadding="2" cellspacing="0" border="0">
67 67
 <?php
68 68
     $TABLETRACK_ACCESS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS);
69 69
     $courseId = api_get_course_int_id();
70 70
     //stats for the current course
71
-    if(isset($_cid)) {
71
+    if (isset($_cid)) {
72 72
         // to see stats of one course user must be courseAdmin of this course
73 73
         $is_allowedToTrack = $is_courseAdmin;
74 74
         $courseCodeEqualcidIfNeeded = "AND c_id = '$courseId'";
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $is_allowedToTrack = $is_platformAdmin;
79 79
         $courseCodeEqualcidIfNeeded = "";
80 80
     }
81
-    if( $is_allowedToTrack) {
81
+    if ($is_allowedToTrack) {
82 82
         // list of all tools
83 83
         if (!isset($tool)) {
84 84
             $sql = "SELECT access_tool, count( access_tool )
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             echo "<tr>
91 91
                     <td>
92 92
                     ";
93
-            if(isset($_cid)) echo "<b>$_cid : </b>";
93
+            if (isset($_cid)) echo "<b>$_cid : </b>";
94 94
             echo "		<b>".get_lang('ToolList')."</b>
95 95
 					</td>
96 96
                 </tr>
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 </tr>";
109 109
             if (is_array($results))
110 110
             {
111
-                for($j = 0 ; $j < count($results) ; $j++)
111
+                for ($j = 0; $j < count($results); $j++)
112 112
                 {
113 113
                         echo "<tr>";
114 114
                         echo "<td><a href='toolaccess_details.php?tool=".urlencode($results[$j][0])."'>".get_lang($results[$j][0])."</a></td>";
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
             $encodedTool = urlencode($tool);
132 132
             $tool = urldecode($tool);
133 133
 
134
-            if( !isset($reqdate) )
134
+            if (!isset($reqdate))
135 135
                 $reqdate = time();
136 136
             echo "<tr>
137 137
                     <td>
138 138
 					";
139
-            if(isset($_cid)) echo "<b>$_cid : </b>";
139
+            if (isset($_cid)) echo "<b>$_cid : </b>";
140 140
             echo "        <b>".get_lang($tool)."</b>
141 141
 					</td>
142 142
                 </tr>
@@ -145,22 +145,22 @@  discard block
 block discarded – undo
145 145
             /* ------ display ------ */
146 146
             // displayed period
147 147
             echo "<tr><td>";
148
-            switch($period)
148
+            switch ($period)
149 149
             {
150 150
                 case "month" :
151
-                    echo $MonthsLong[date("n", $reqdate)-1].date(" Y", $reqdate);
151
+                    echo $MonthsLong[date("n", $reqdate) - 1].date(" Y", $reqdate);
152 152
                     break;
153 153
                 case "week" :
154
-                    $weeklowreqdate = ($reqdate-(86400*date("w" , $reqdate)));
155
-                    $weekhighreqdate = ($reqdate+(86400*(6-date("w" , $reqdate)) ));
156
-                    echo "<b>".$langFrom."</b> ".date("d " , $weeklowreqdate).$MonthsLong[date("n", $weeklowreqdate)-1].date(" Y" , $weeklowreqdate);
157
-                    echo " <b>".$langTo."</b> ".date("d " , $weekhighreqdate ).$MonthsLong[date("n", $weekhighreqdate)-1].date(" Y" , $weekhighreqdate);
154
+                    $weeklowreqdate = ($reqdate - (86400 * date("w", $reqdate)));
155
+                    $weekhighreqdate = ($reqdate + (86400 * (6 - date("w", $reqdate))));
156
+                    echo "<b>".$langFrom."</b> ".date("d ", $weeklowreqdate).$MonthsLong[date("n", $weeklowreqdate) - 1].date(" Y", $weeklowreqdate);
157
+                    echo " <b>".$langTo."</b> ".date("d ", $weekhighreqdate).$MonthsLong[date("n", $weekhighreqdate) - 1].date(" Y", $weekhighreqdate);
158 158
                     break;
159 159
                 // default == day
160 160
                 default :
161 161
                     $period = "day";
162 162
                 case "day" :
163
-                    echo $DaysLong[date("w" , $reqdate)].date(" d " , $reqdate).$MonthsLong[date("n", $reqdate)-1].date(" Y" , $reqdate);
163
+                    echo $DaysLong[date("w", $reqdate)].date(" d ", $reqdate).$MonthsLong[date("n", $reqdate) - 1].date(" Y", $reqdate);
164 164
                     break;
165 165
             }
166 166
             echo "</tr></td>";
@@ -174,13 +174,13 @@  discard block
 block discarded – undo
174 174
                     &nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;
175 175
 
176 176
                     ";
177
-            switch($period)
177
+            switch ($period)
178 178
             {
179 179
                 case "month" :
180 180
                     // previous and next date must be evaluated
181 181
                     // 30 days should be a good approximation
182
-                    $previousReqDate = mktime(1,1,1,date("m",$reqdate)-1,1,date("Y",$reqdate));
183
-                    $nextReqDate = mktime(1,1,1,date("m",$reqdate)+1,1,date("Y",$reqdate));
182
+                    $previousReqDate = mktime(1, 1, 1, date("m", $reqdate) - 1, 1, date("Y", $reqdate));
183
+                    $nextReqDate = mktime(1, 1, 1, date("m", $reqdate) + 1, 1, date("Y", $reqdate));
184 184
                     echo   "
185 185
                         [<a href='".api_get_self()."?tool=$encodedTool&period=month&reqdate=$previousReqDate' class='specialLink'>$langPreviousMonth</a>]
186 186
                         [<a href='".api_get_self()."?tool=$encodedTool&period=month&reqdate=$nextReqDate' class='specialLink'>$langNextMonth</a>]
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
                     break;
189 189
                 case "week" :
190 190
                     // previous and next date must be evaluated
191
-                    $previousReqDate = $reqdate - 7*86400;
192
-                    $nextReqDate = $reqdate + 7*86400;
191
+                    $previousReqDate = $reqdate - 7 * 86400;
192
+                    $nextReqDate = $reqdate + 7 * 86400;
193 193
                     echo   "
194 194
                         [<a href='".api_get_self()."?tool=$encodedTool&period=week&reqdate=$previousReqDate' class='specialLink'>$langPreviousWeek</a>]
195 195
                         [<a href='".api_get_self()."?tool=$encodedTool&period=week&reqdate=$nextReqDate' class='specialLink'>$langNextWeek</a>]
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                 </tr>
214 214
             ";
215 215
             // display information about this period
216
-            switch($period)
216
+            switch ($period)
217 217
             {
218 218
                 // all days
219 219
                 case "month" :
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                                 ORDER BY access_date ASC";
227 227
 
228 228
                     $days_array = StatsUtils::daysTab($sql);
229
-                    StatsUtils::makeHitsTable($days_array,$langDay);
229
+                    StatsUtils::makeHitsTable($days_array, $langDay);
230 230
                     break;
231 231
                 // all days
232 232
                 case "week" :
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                                 ORDER BY access_date ASC";
240 240
 
241 241
                     $days_array = StatsUtils::daysTab($sql);
242
-                    StatsUtils::makeHitsTable($days_array,$langDay);
242
+                    StatsUtils::makeHitsTable($days_array, $langDay);
243 243
                     break;
244 244
                 // all hours
245 245
                 case "day"  :
@@ -251,8 +251,8 @@  discard block
 block discarded – undo
251 251
                                     AND YEAR(access_date) = YEAR(FROM_UNIXTIME('$reqdate'))
252 252
                                 ORDER BY access_date ASC";
253 253
 
254
-                    $hours_array = StatsUtils::hoursTab($sql,$reqdate);
255
-                    StatsUtils::makeHitsTable($hours_array,$langHour);
254
+                    $hours_array = StatsUtils::hoursTab($sql, $reqdate);
255
+                    StatsUtils::makeHitsTable($hours_array, $langHour);
256 256
                     break;
257 257
             }
258 258
         }
Please login to merge, or discard this patch.
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -90,7 +90,9 @@  discard block
 block discarded – undo
90 90
             echo "<tr>
91 91
                     <td>
92 92
                     ";
93
-            if(isset($_cid)) echo "<b>$_cid : </b>";
93
+            if(isset($_cid)) {
94
+                echo "<b>$_cid : </b>";
95
+            }
94 96
             echo "		<b>".get_lang('ToolList')."</b>
95 97
 					</td>
96 98
                 </tr>
@@ -116,27 +118,28 @@  discard block
 block discarded – undo
116 118
                         echo"</tr>";
117 119
                 }
118 120
 
119
-            }
120
-            else
121
+            } else
121 122
             {
122 123
                 echo "<tr>";
123 124
                 echo "<td colspan='2'><center>".get_lang('NoResult')."</center></td>";
124 125
                 echo"</tr>";
125 126
             }
126 127
             echo "</table></td></tr>";
127
-        }
128
-        else
128
+        } else
129 129
         {
130 130
             // this can prevent bug if there is special chars in $tool
131 131
             $encodedTool = urlencode($tool);
132 132
             $tool = urldecode($tool);
133 133
 
134
-            if( !isset($reqdate) )
135
-                $reqdate = time();
134
+            if( !isset($reqdate) ) {
135
+                            $reqdate = time();
136
+            }
136 137
             echo "<tr>
137 138
                     <td>
138 139
 					";
139
-            if(isset($_cid)) echo "<b>$_cid : </b>";
140
+            if(isset($_cid)) {
141
+                echo "<b>$_cid : </b>";
142
+            }
140 143
             echo "        <b>".get_lang($tool)."</b>
141 144
 					</td>
142 145
                 </tr>
Please login to merge, or discard this patch.
main/tracking/logins_details.php 3 patches
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
     // check if uid is tutor of this group
76 76
     $courseId = api_get_course_int_id();
77 77
 
78
-    if (( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse)) {
78
+    if (($is_allowedToTrack || $is_allowedToTrackEverybodyInCourse)) {
79 79
         if ($is_allowedToTrackEverybodyInCourse) {
80 80
             $sql = "SELECT u.firstname,u.lastname, u.email
81 81
                     FROM $TABLECOURSUSER cu , $TABLEUSER u
82 82
                     WHERE
83 83
                         cu.user_id = u.user_id AND
84
-                        cu.relation_type<>" . COURSE_RELATION_TYPE_RRHH . " AND
84
+                        cu.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND
85 85
                         cu.c_id = '$courseId' AND
86 86
                         u.user_id = '$uInfo'";
87 87
         } else {
@@ -97,21 +97,21 @@  discard block
 block discarded – undo
97 97
             $res[2] == "" ? $res2 = get_lang('NoEmail') : $res2 = Display::encrypted_mailto_link($res[2]);
98 98
 
99 99
             echo "<tr><td>";
100
-            echo $informationsAbout . " : <br>";
100
+            echo $informationsAbout." : <br>";
101 101
             echo "<ul>\n"
102
-            . "<li>" . get_lang('FirstName') . " : " . $res[0] . "</li>\n"
103
-            . "<li>" . get_lang('LastName') . " : " . $res[1] . "</li>\n"
104
-            . "<li>" . get_lang('Email') . " : " . $res2 . "</li>\n"
102
+            . "<li>".get_lang('FirstName')." : ".$res[0]."</li>\n"
103
+            . "<li>".get_lang('LastName')." : ".$res[1]."</li>\n"
104
+            . "<li>".get_lang('Email')." : ".$res2."</li>\n"
105 105
             . "</ul>";
106 106
             echo "</td></tr>";
107 107
             /*             * ***** MENU ******* */
108 108
             echo "<tr>
109 109
                 <td>
110
-                [<a href='userLog.php?uInfo=$uInfo&view=$view'>" . get_lang('Back') . "</a>]
110
+                [<a href='userLog.php?uInfo=$uInfo&view=$view'>".get_lang('Back')."</a>]
111 111
         ";
112 112
             echo "  &nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;
113
-                [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=week&reqdate=$reqdate' class='specialLink'>" . get_lang('PeriodWeek') . "</a>]
114
-                [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=month&reqdate=$reqdate' class='specialLink'>" . get_lang('PeriodMonth') . "</a>]
113
+                [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=week&reqdate=$reqdate' class='specialLink'>".get_lang('PeriodWeek')."</a>]
114
+                [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=month&reqdate=$reqdate' class='specialLink'>".get_lang('PeriodMonth')."</a>]
115 115
                 &nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;
116 116
         ";
117 117
             switch ($period) {
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
                     $previousReqDate = $reqdate - 7 * 86400;
121 121
                     $nextReqDate = $reqdate + 7 * 86400;
122 122
                     echo "
123
-                    [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=week&reqdate=$previousReqDate' class='specialLink'>" . get_lang('PreviousWeek') . "</a>]
124
-                    [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=week&reqdate=$nextReqDate' class='specialLink'>" . get_lang('NextWeek') . "</a>]
123
+                    [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=week&reqdate=$previousReqDate' class='specialLink'>".get_lang('PreviousWeek')."</a>]
124
+                    [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=week&reqdate=$nextReqDate' class='specialLink'>".get_lang('NextWeek')."</a>]
125 125
                 ";
126 126
                     break;
127 127
                 default :
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
                     $previousReqDate = mktime(1, 1, 1, date("m", $reqdate) - 1, 1, date("Y", $reqdate));
133 133
                     $nextReqDate = mktime(1, 1, 1, date("m", $reqdate) + 1, 1, date("Y", $reqdate));
134 134
                     echo "
135
-                    [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=month&reqdate=$previousReqDate' class='specialLink'>" . get_lang('PreviousMonth') . "</a>]
136
-                    [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=month&reqdate=$nextReqDate' class='specialLink'>" . get_lang('NextMonth') . "</a>]
135
+                    [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=month&reqdate=$previousReqDate' class='specialLink'>".get_lang('PreviousMonth')."</a>]
136
+                    [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=month&reqdate=$nextReqDate' class='specialLink'>".get_lang('NextMonth')."</a>]
137 137
                 ";
138 138
                     break;
139 139
             }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                         AND YEAR(access_date) = YEAR(FROM_UNIXTIME('$reqdate'))
154 154
                         GROUP BY DAYOFMONTH(access_date)
155 155
                         ORDER BY access_date ASC";
156
-                $displayedDate = $MonthsLong[date("n", $reqdate) - 1] . date(" Y", $reqdate);
156
+                $displayedDate = $MonthsLong[date("n", $reqdate) - 1].date(" Y", $reqdate);
157 157
                 break;
158 158
             case "week" :
159 159
                 $sql = "SELECT access_date
@@ -165,24 +165,24 @@  discard block
 block discarded – undo
165 165
                         GROUP BY DAYOFMONTH(access_date)
166 166
                         ORDER BY access_date ASC";
167 167
                 $weeklowreqdate = ($reqdate - (86400 * date("w", $reqdate)));
168
-                $weekhighreqdate = ($reqdate + (86400 * (6 - date("w", $reqdate)) ));
169
-                $displayedDate = get_lang('From') . " " . date("d ", $weeklowreqdate) . $MonthsLong[date("n", $weeklowreqdate) - 1] . date(" Y", $weeklowreqdate)
170
-                        . " " . get_lang('To') . " " . date("d ", $weekhighreqdate) . $MonthsLong[date("n", $weekhighreqdate) - 1] . date(" Y", $weekhighreqdate);
168
+                $weekhighreqdate = ($reqdate + (86400 * (6 - date("w", $reqdate))));
169
+                $displayedDate = get_lang('From')." ".date("d ", $weeklowreqdate).$MonthsLong[date("n", $weeklowreqdate) - 1].date(" Y", $weeklowreqdate)
170
+                        . " ".get_lang('To')." ".date("d ", $weekhighreqdate).$MonthsLong[date("n", $weekhighreqdate) - 1].date(" Y", $weekhighreqdate);
171 171
                 break;
172 172
         }
173 173
         echo "<tr><td>";
174 174
         $results = StatsUtils::getManyResults1Col($sql);
175 175
         /*             * * display of the displayed period  ** */
176 176
         echo "<table width='100%' cellpadding='2' cellspacing='1' border='0' align=center>";
177
-        echo "<td bgcolor='#E6E6E6'>" . $displayedDate . "</td>";
177
+        echo "<td bgcolor='#E6E6E6'>".$displayedDate."</td>";
178 178
         if (is_array($results)) {
179 179
             for ($j = 0; $j < sizeof($results); $j++) {
180 180
                 $beautifulDateTime = api_convert_and_format_date($results[$j], null, date_default_timezone_get());
181 181
                 echo "<tr>";
182
-                echo "<td style='padding-left : 40px;' valign='top'>" . $beautifulDateTime . "</td>";
182
+                echo "<td style='padding-left : 40px;' valign='top'>".$beautifulDateTime."</td>";
183 183
                 echo"</tr>";
184 184
                 // $limit is used to select only results between $results[$j] (current login) and next one
185
-                if ($j == ( sizeof($results) - 1 ))
185
+                if ($j == (sizeof($results) - 1))
186 186
                     $limit = date("Y-m-d H:i:s", $nextReqDate);
187 187
                 else
188 188
                     $limit = $results[$j + 1];
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
                         FROM $TABLETRACK_ACCESS
193 193
                         WHERE access_user_id = $uInfo
194 194
                             AND access_tool IS NOT NULL
195
-                            AND access_date > '" . $results[$j] . "'
196
-                            AND access_date < '" . $limit . "'
195
+                            AND access_date > '".$results[$j]."'
196
+                            AND access_date < '" . $limit."'
197 197
                             AND c_id = $courseId
198 198
                         GROUP BY access_tool
199 199
                         ORDER BY access_tool ASC";
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
                     echo "<table width='50%' cellpadding='0' cellspacing='0' border='0'>\n";
205 205
                     for ($k = 0; $k < count($results2); $k++) {
206 206
                         echo "<tr>\n";
207
-                        echo "<td width='70%' style='padding-left : 60px;'>" . get_lang($results2[$k][0]) . "</td>\n";
208
-                        echo "<td width='30%' align='right' style='padding-right : 40px'>" . $results2[$k][1] . " " . get_lang('Visits') . "</td>\n";
207
+                        echo "<td width='70%' style='padding-left : 60px;'>".get_lang($results2[$k][0])."</td>\n";
208
+                        echo "<td width='30%' align='right' style='padding-right : 40px'>".$results2[$k][1]." ".get_lang('Visits')."</td>\n";
209 209
                         echo "</tr>";
210 210
                     }
211 211
                     echo "</table>\n";
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
             }
216 216
         } else {
217 217
             echo "<tr>";
218
-            echo "<td colspan='2' bgcolor='#eeeeee'>" . get_lang('NoResult') . "</td>";
218
+            echo "<td colspan='2' bgcolor='#eeeeee'>".get_lang('NoResult')."</td>";
219 219
             echo "</tr>";
220 220
         }
221 221
         echo "</table>";
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -182,10 +182,11 @@
 block discarded – undo
182 182
                 echo "<td style='padding-left : 40px;' valign='top'>" . $beautifulDateTime . "</td>";
183 183
                 echo"</tr>";
184 184
                 // $limit is used to select only results between $results[$j] (current login) and next one
185
-                if ($j == ( sizeof($results) - 1 ))
186
-                    $limit = date("Y-m-d H:i:s", $nextReqDate);
187
-                else
188
-                    $limit = $results[$j + 1];
185
+                if ($j == ( sizeof($results) - 1 )) {
186
+                                    $limit = date("Y-m-d H:i:s", $nextReqDate);
187
+                } else {
188
+                                    $limit = $results[$j + 1];
189
+                }
189 190
                 // select all access to tool between displayed date and next displayed date or now() if
190 191
                 // displayed date is the last login date
191 192
                 $sql = "SELECT access_tool, count(access_tool)
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
  * @author Patrick Cool
17 17
  * @author René Haentjens, added CSV file import (October 2004)
18 18
  * @package chamilo.link
19
-
20 19
  */
21 20
 
22 21
 // Including libraries
Please login to merge, or discard this patch.
main/tracking/course_log_groups.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 $action_links = '
100 100
 function action_formatter(cellvalue, options, rowObject) {
101
-    return \'<a href="course_log_tools.php?id_session=0&cidReq='.$course_code.'&gidReq=\'+options.rowId+\'">'.Display::return_icon('2rightarrow.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.
101
+    return \'<a href="course_log_tools.php?id_session=0&cidReq='.$course_code.'&gidReq=\'+options.rowId+\'">'.Display::return_icon('2rightarrow.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'.
102 102
     '\';
103 103
 }';
104 104
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 $htmlHeadXtra[] = '
109 109
 <script>
110 110
 $(function() {
111
-    '.Display::grid_js('group_users',$url, $columns, $column_model, $extra_params, array(), $action_links, true).'
111
+    '.Display::grid_js('group_users', $url, $columns, $column_model, $extra_params, array(), $action_links, true).'
112 112
 });
113 113
 </script>';
114 114
 
Please login to merge, or discard this patch.
main/tracking/exams.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 if (!$exportToXLS) {
83 83
     Display :: display_header(get_lang('Reporting'));
84
-    $actionsLeft = $actionsRight ='';
84
+    $actionsLeft = $actionsRight = '';
85 85
     if ($global) {
86 86
 
87 87
         $actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'auth/my_progress.php">'.
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
         }
99 99
 
100 100
         $actionsRight .= '<a href="'.api_get_self().'?export=1&score='.$filter_score.'&exercise_id='.$exerciseId.'&'.$courseLink.'">'.
101
-            Display::return_icon('export_excel.png',get_lang('ExportAsXLS'),'',ICON_SIZE_MEDIUM).'</a>';
101
+            Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'</a>';
102 102
         $actionsRight .= '<a href="javascript: void(0);" onclick="javascript: window.print()">'.
103
-            Display::return_icon('printer.png',get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>';
103
+            Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
104 104
         
105 105
 
106 106
         $menuItems[] = Display::url(
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     }
148 148
     
149 149
     
150
-    $toolbar = Display::toolbarAction('toolbar-exams', $content = array( 0 => $actionsLeft, 1 => $actionsRight ));
150
+    $toolbar = Display::toolbarAction('toolbar-exams', $content = array(0 => $actionsLeft, 1 => $actionsRight));
151 151
     echo $toolbar;
152 152
 
153 153
     $form->display();
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             $countExercises = Database::store_result($result);
208 208
             $exerciseSessionCount = $countExercises[0]['count'];
209 209
 
210
-            $exerciseCount =  $exerciseCount + $exerciseCount * count($newSessionList) + $exerciseSessionCount;
210
+            $exerciseCount = $exerciseCount + $exerciseCount * count($newSessionList) + $exerciseSessionCount;
211 211
 
212 212
             // Add course and session list.
213 213
             if ($exerciseCount == 0) {
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
         $column++;
425 425
         $worksheet->SetCellValueByColumnAndRow($line, $column, get_lang('ExamNotTaken'));
426 426
         $column++;
427
-        $worksheet->SetCellValueByColumnAndRow($line, $column, sprintf(get_lang('ExamPassX'), $filter_score) . '%');
427
+        $worksheet->SetCellValueByColumnAndRow($line, $column, sprintf(get_lang('ExamPassX'), $filter_score).'%');
428 428
         $column++;
429 429
         $worksheet->SetCellValueByColumnAndRow($line, $column, get_lang('ExamFail'));
430 430
         $column++;
@@ -442,15 +442,15 @@  discard block
 block discarded – undo
442 442
         }
443 443
         $line++;
444 444
     } else {
445
-        $worksheet->SetCellValueByColumnAndRow($line,$column,get_lang('Exercises'));
445
+        $worksheet->SetCellValueByColumnAndRow($line, $column, get_lang('Exercises'));
446 446
         $column++;
447
-        $worksheet->SetCellValueByColumnAndRow($line,$column,get_lang('User'));
447
+        $worksheet->SetCellValueByColumnAndRow($line, $column, get_lang('User'));
448 448
         $column++;
449
-        $worksheet->SetCellValueByColumnAndRow($line,$column,get_lang('Percentage'));
449
+        $worksheet->SetCellValueByColumnAndRow($line, $column, get_lang('Percentage'));
450 450
         $column++;
451
-        $worksheet->SetCellValueByColumnAndRow($line,$column,get_lang('Status'));
451
+        $worksheet->SetCellValueByColumnAndRow($line, $column, get_lang('Status'));
452 452
         $column++;
453
-        $worksheet->SetCellValueByColumnAndRow($line,$column,get_lang('Attempts'));
453
+        $worksheet->SetCellValueByColumnAndRow($line, $column, get_lang('Attempts'));
454 454
         $column++;
455 455
         $line++;
456 456
         foreach ($array as $row) {
@@ -601,10 +601,10 @@  discard block
 block discarded – undo
601 601
         $percentageScore = 0;
602 602
 
603 603
         if ($weighting != 0) {
604
-            $percentageScore = round(($score*100)/$weighting);
604
+            $percentageScore = round(($score * 100) / $weighting);
605 605
         }
606 606
 
607
-        if ($attempts['count'] > 0 ) {
607
+        if ($attempts['count'] > 0) {
608 608
             $taken++;
609 609
         }
610 610
 
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
             } else {
648 648
                 $score = '-';
649 649
                 $userRow .= '<td>';
650
-                $userRow .=  '-';
650
+                $userRow .= '-';
651 651
                 $tempArray[] = '-';
652 652
                 $userRow .= '</td>';
653 653
 
@@ -701,13 +701,13 @@  discard block
 block discarded – undo
701 701
         // Exam taken
702 702
         $html .= '<td>';
703 703
         $html .= $taken;
704
-        $globalRow[]= $taken;
704
+        $globalRow[] = $taken;
705 705
         $html .= '</td>';
706 706
 
707 707
         // Exam NOT taken
708 708
         $html .= '<td>';
709 709
         $html .= $not_taken = $totalStudents - $taken;
710
-        $globalRow[]= $not_taken;
710
+        $globalRow[] = $not_taken;
711 711
         $html .= '</td>';
712 712
 
713 713
         // Exam pass
@@ -718,19 +718,19 @@  discard block
 block discarded – undo
718 718
         }
719 719
 
720 720
         $html .= $total_with_parameter_score;
721
-        $globalRow[]= $total_with_parameter_score;
721
+        $globalRow[] = $total_with_parameter_score;
722 722
         $html .= '</td>';
723 723
 
724 724
         // Exam fail
725 725
         $html .= '<td>';
726 726
 
727 727
         $html .= $fail = $taken - $total_with_parameter_score;
728
-        $globalRow[]= $fail;
728
+        $globalRow[] = $fail;
729 729
         $html .= '</td>';
730 730
 
731 731
         $html .= '<td>';
732 732
         $html .= $totalStudents;
733
-        $globalRow[]= $totalStudents;
733
+        $globalRow[] = $totalStudents;
734 734
 
735 735
         $html .= '</td>';
736 736
 
Please login to merge, or discard this patch.
main/tracking/course_log_tools.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 // getting all the students of the course
80 80
 if (empty($session_id)) {
81
-	// Registered students in a course outside session.
81
+    // Registered students in a course outside session.
82 82
     $a_students = CourseManager:: get_student_list_from_course_code(
83 83
         api_get_course_id(),
84 84
         false,
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         api_get_group_id()
90 90
     );
91 91
 } else {
92
-	// Registered students in session.
92
+    // Registered students in session.
93 93
     $a_students = CourseManager:: get_student_list_from_course_code(
94 94
         api_get_course_id(),
95 95
         true,
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 
66 66
 // Breadcrumbs.
67 67
 if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') {
68
-    $interbreadcrumb[] = array('url' => '../admin/index.php','name' => get_lang('PlatformAdmin'));
69
-    $interbreadcrumb[] = array('url' => '../session/session_list.php','name' => get_lang('SessionList'));
68
+    $interbreadcrumb[] = array('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin'));
69
+    $interbreadcrumb[] = array('url' => '../session/session_list.php', 'name' => get_lang('SessionList'));
70 70
     $interbreadcrumb[] = array('url' => '../session/resume_session.php?id_session='.api_get_session_id(), 'name' => get_lang('SessionOverview'));
71 71
 }
72 72
 
@@ -134,10 +134,10 @@  discard block
 block discarded – undo
134 134
 
135 135
 echo '<span style="float:right; padding-top:0px;">';
136 136
 echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'.
137
-    Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>';
137
+    Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
138 138
 
139 139
 echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&id_session='.api_get_session_id().'&export=csv">
140
-	'.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).'</a>';
140
+	'.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>';
141 141
 
142 142
 echo '</span>';
143 143
 echo '</div>';
Please login to merge, or discard this patch.
main/tracking/courseLog.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
                             get_lang('HideColumn'),
112 112
                             array('align' => 'absmiddle', 'hspace' => '3px'),
113 113
                             ICON_SIZE_SMALL
114
-                         ) . "</div>'
114
+                            ) . "</div>'
115 115
                     );
116 116
                 }
117 117
             );
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                             get_lang('HideColumn'),
113 113
                             array('align' => 'absmiddle', 'hspace' => '3px'),
114 114
                             ICON_SIZE_SMALL
115
-                         ) . "</div>'
115
+                         )."</div>'
116 116
                     );
117 117
                 }
118 118
             );
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 $TABLETRACK_LINKS       = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LINKS);
148 148
 $TABLETRACK_DOWNLOADS   = Database::get_main_table(TABLE_STATISTIC_TRACK_E_DOWNLOADS);
149 149
 $TABLETRACK_ACCESS_2    = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS);
150
-$TABLETRACK_EXERCISES 	= Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
150
+$TABLETRACK_EXERCISES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
151 151
 $TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER);
152 152
 $TABLECOURSE = Database::get_main_table(TABLE_MAIN_COURSE);
153 153
 $table_user = Database::get_main_table(TABLE_MAIN_USER);
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
 
158 158
 // Breadcrumbs.
159 159
 if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') {
160
-    $interbreadcrumb[] = array('url' => '../admin/index.php','name' => get_lang('PlatformAdmin'));
161
-    $interbreadcrumb[] = array('url' => '../session/session_list.php','name' => get_lang('SessionList'));
160
+    $interbreadcrumb[] = array('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin'));
161
+    $interbreadcrumb[] = array('url' => '../session/session_list.php', 'name' => get_lang('SessionList'));
162 162
     $interbreadcrumb[] = array('url' => '../session/resume_session.php?id_session='.$sessionId, 'name' => get_lang('SessionOverview'));
163 163
 }
164 164
 
@@ -229,21 +229,21 @@  discard block
 block discarded – undo
229 229
 if (!empty($sessionId)) {
230 230
     $actionsLeft .= Display::url(
231 231
         Display::return_icon('attendance_list.png', get_lang('Logins'), '', ICON_SIZE_MEDIUM),
232
-        api_get_path(WEB_CODE_PATH) . 'attendance/index.php?' . api_get_cidreq() . '&action=calendar_logins'
232
+        api_get_path(WEB_CODE_PATH).'attendance/index.php?'.api_get_cidreq().'&action=calendar_logins'
233 233
     );
234 234
 }
235 235
 
236 236
 $actionsRight = '<div class="pull-right">';
237 237
 $actionsRight .= '<a href="javascript: void(0);" onclick="javascript: window.print();">'.
238
-    Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>';
238
+    Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
239 239
 
240 240
 $addional_param = '';
241 241
 if (isset($_GET['additional_profile_field'])) {
242
-    $addional_param ='additional_profile_field='.intval($_GET['additional_profile_field']);
242
+    $addional_param = 'additional_profile_field='.intval($_GET['additional_profile_field']);
243 243
 }
244 244
 $users_tracking_per_page = '';
245 245
 if (isset($_GET['users_tracking_per_page'])) {
246
-    $users_tracking_per_page= '&users_tracking_per_page='.intval($_GET['users_tracking_per_page']);
246
+    $users_tracking_per_page = '&users_tracking_per_page='.intval($_GET['users_tracking_per_page']);
247 247
 }
248 248
 $actionsRight .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&export=csv&'.$addional_param.$users_tracking_per_page.'">
249 249
      '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>';
@@ -264,13 +264,13 @@  discard block
 block discarded – undo
264 264
 $form_search->addButtonSearch(get_lang('SearchUsers'));
265 265
 
266 266
 
267
-echo Display::toolbarAction('toolbar-courselog', array( 0 => $actionsLeft, 1 => $form_search->returnForm(), 2 => $actionsRight ), 3);
267
+echo Display::toolbarAction('toolbar-courselog', array(0 => $actionsLeft, 1 => $form_search->returnForm(), 2 => $actionsRight), 3);
268 268
 
269 269
 $course_name = get_lang('Course').' '.$courseInfo['name'];
270 270
 
271 271
 if ($session_id) {
272 272
     $titleSession = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.api_get_session_name($session_id);
273
-    $titleCourse =  Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_name;
273
+    $titleCourse = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_name;
274 274
 
275 275
 } else {
276 276
     $titleSession = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$courseInfo['name'];
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     $html .= '<ul class="session-list">';
313 313
     foreach ($sessionList as $session) {
314 314
         $url = api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id'].'&cidReq='.$courseInfo['code'];
315
-        $html .= Display::tag('li', $iconCourse . ' ' . Display::url($session['name'], $url));
315
+        $html .= Display::tag('li', $iconCourse.' '.Display::url($session['name'], $url));
316 316
     }
317 317
     $html .= '</ul>';
318 318
 }
@@ -327,12 +327,12 @@  discard block
 block discarded – undo
327 327
     $form = new FormValidator(
328 328
         'reminder_form',
329 329
         'get',
330
-        api_get_path(WEB_CODE_PATH).'announcements/announcements.php?' . api_get_cidreq(),
330
+        api_get_path(WEB_CODE_PATH).'announcements/announcements.php?'.api_get_cidreq(),
331 331
         null,
332 332
         ['style' => 'margin-bottom: 10px'],
333 333
         FormValidator::LAYOUT_INLINE
334 334
     );
335
-    $options = array (
335
+    $options = array(
336 336
         2 => sprintf($getLangXDays, 2),
337 337
         3 => sprintf($getLangXDays, 3),
338 338
         4 => sprintf($getLangXDays, 4),
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     );
346 346
     $el = $form->addSelect(
347 347
         'since',
348
-        Display::returnFontAwesomeIcon('warning') . get_lang('RemindInactivesLearnersSince'),
348
+        Display::returnFontAwesomeIcon('warning').get_lang('RemindInactivesLearnersSince'),
349 349
         $options,
350 350
         ['class' => 'col-sm-3']
351 351
     );
Please login to merge, or discard this patch.