Completed
Push — 1.11.x ( 30f47b...9fdd19 )
by José
24:40
created
main/admin/course_intro_pdf_import.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -90,26 +90,26 @@
 block discarded – undo
90 90
 {
91 91
     $baseDir = api_get_path(SYS_ARCHIVE_PATH);
92 92
     $uploadPath = 'pdfimport/';
93
-    $errors = array ();
93
+    $errors = array();
94 94
     if (!is_dir($baseDir.$uploadPath)) {
95 95
         @mkdir($baseDir.$uploadPath);
96 96
     }
97
-    if (!unzip_uploaded_file($_FILES['import_file'], $uploadPath, $baseDir, 1024*1024*1024)) {
97
+    if (!unzip_uploaded_file($_FILES['import_file'], $uploadPath, $baseDir, 1024 * 1024 * 1024)) {
98 98
         error_log('Could not unzip uploaded file in '.__FILE__.', line '.__LINE__);
99 99
         return $errors;
100 100
     }
101 101
     $list = scandir($baseDir.$uploadPath);
102 102
     $i = 0;
103 103
     foreach ($list as $file) {
104
-        if (substr($file,0,1) == '.' or !is_file($baseDir.$uploadPath.$file)) {
104
+        if (substr($file, 0, 1) == '.' or !is_file($baseDir.$uploadPath.$file)) {
105 105
             continue;
106 106
         }
107
-        $parts = preg_split('/_/',$file);
107
+        $parts = preg_split('/_/', $file);
108 108
         $course = api_get_course_info($parts[0]);
109 109
         if (count($course) > 0) {
110 110
             // Build file info because handle_uploaded_document() needs it (name, type, size, tmp_name)
111 111
             $fileSize = filesize($baseDir.$uploadPath.$file);
112
-            $docId = add_document($course, $subDir.'/'.$file, 'file', $fileSize, $parts[1].' '.substr($parts[2],0,-4));
112
+            $docId = add_document($course, $subDir.'/'.$file, 'file', $fileSize, $parts[1].' '.substr($parts[2], 0, -4));
113 113
             if ($docId > 0) {
114 114
                 if (!is_file($baseDir.$uploadPath.$file)) {
115 115
                     error_log($baseDir.$uploadPath.$file.' does not exists in '.__FILE__);
Please login to merge, or discard this patch.
main/admin/user_export.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
 
23 23
 set_time_limit(0);
24 24
 
25
-$courses = array ();
25
+$courses = array();
26 26
 $courses[''] = '--';
27 27
 $sql = "SELECT code,visual_code,title FROM $course_table ORDER BY visual_code";
28 28
 
29 29
 global $_configuration;
30 30
 
31 31
 if (api_is_multiple_url_enabled()) {
32
-	$tbl_course_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
32
+	$tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
33 33
 	$access_url_id = api_get_current_access_url_id();
34
-	if ($access_url_id != -1){
34
+	if ($access_url_id != -1) {
35 35
 	$sql = "SELECT code,visual_code,title
36 36
 		FROM $course_table as c
37 37
 		INNER JOIN $tbl_course_rel_access_url as course_rel_url
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 }
47 47
 $form = new FormValidator('export_users');
48 48
 $form->addElement('header', $tool_name);
49
-$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'XML','xml');
49
+$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'XML', 'xml');
50 50
 $form->addElement('radio', 'file_type', null, 'CSV', 'csv');
51 51
 $form->addElement('radio', 'file_type', null, 'XLS', 'xls');
52 52
 
53
-$form->addElement('checkbox', 'addcsvheader', get_lang('AddCSVHeader'), get_lang('YesAddCSVHeader'),'1');
53
+$form->addElement('checkbox', 'addcsvheader', get_lang('AddCSVHeader'), get_lang('YesAddCSVHeader'), '1');
54 54
 $form->addElement('select', 'course_code', get_lang('OnlyUsersFromCourse'), $courses);
55 55
 $form->addButtonExport(get_lang('Export'));
56 56
 $form->setDefaults(array('file_type' => 'csv'));
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 				u.firstname 	AS FirstName,
69 69
 				u.email 		AS Email,
70 70
 				u.username	AS UserName,
71
-				".(($_configuration['password_encryption']!='none')?" ":"u.password AS Password, ")."
71
+				".(($_configuration['password_encryption'] != 'none') ? " " : "u.password AS Password, ")."
72 72
 				u.auth_source	AS AuthSource,
73 73
 				u.status		AS Status,
74 74
 				u.official_code	AS OfficialCode,
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 		$filename = 'export_users_'.$course_code.'_'.api_get_local_time();
84 84
 	} else {
85 85
 		if (api_is_multiple_url_enabled()) {
86
-			$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
86
+			$tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
87 87
 			$access_url_id = api_get_current_access_url_id();
88 88
 			if ($access_url_id != -1) {
89
-			$sql.= " FROM $user_table u
89
+			$sql .= " FROM $user_table u
90 90
 					INNER JOIN $tbl_user_rel_access_url as user_rel_url
91 91
 				ON (u.user_id= user_rel_url.user_id)
92 92
 				WHERE access_url_id = $access_url_id
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		$filename = 'export_users_'.api_get_local_time();
99 99
 	}
100 100
 	$data = array();
101
-	$extra_fields = UserManager::get_extra_fields(0, 0, 5, 'ASC',false);
102
-	if ($export['addcsvheader']=='1' AND $export['file_type']=='csv') {
101
+	$extra_fields = UserManager::get_extra_fields(0, 0, 5, 'ASC', false);
102
+	if ($export['addcsvheader'] == '1' AND $export['file_type'] == 'csv') {
103 103
 		if ($_configuration['password_encryption'] != 'none') {
104 104
 			$data[] = array(
105 105
 				'UserId',
@@ -127,19 +127,19 @@  discard block
 block discarded – undo
127 127
 			);
128 128
 		}
129 129
 
130
-		foreach($extra_fields as $extra) {
131
-			$data[0][]=$extra[1];
130
+		foreach ($extra_fields as $extra) {
131
+			$data[0][] = $extra[1];
132 132
 		}
133 133
 	}
134 134
 
135 135
 	$res = Database::query($sql);
136
-	while($user = Database::fetch_array($res,'ASSOC')) {
136
+	while ($user = Database::fetch_array($res, 'ASSOC')) {
137 137
 		$student_data = UserManager:: get_extra_user_data(
138 138
 			$user['UserId'],
139 139
 			true,
140 140
 			false
141 141
 		);
142
-		foreach($student_data as $key=>$value) {
142
+		foreach ($student_data as $key=>$value) {
143 143
 			$key = substr($key, 6);
144 144
 			if (is_array($value)) {
145 145
 				$user[$key] = $value[$key];
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 				$user[$key] = $value;
148 148
 			}
149 149
 		}
150
-		$data[] = $user	;
150
+		$data[] = $user;
151 151
 	}
152 152
 
153 153
 	switch ($file_type) {
Please login to merge, or discard this patch.
main/admin/usergroup_user_import.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
         foreach ($mandatory_fields as $field) {
27 27
             if (!isset($user_class[$field]) || strlen($user_class[$field]) == 0) {
28
-                $user_class['error'] = get_lang($field . 'Mandatory');
28
+                $user_class['error'] = get_lang($field.'Mandatory');
29 29
                 $errors[] = $user_class;
30 30
             }
31 31
         }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                 // 2.1.1 Check whether code exists in DB
38 38
                 $exists = $usergroup->usergroup_exists($user_class['ClassName']);
39 39
                 if (!$exists) {
40
-                    $user_class['error'] = get_lang('CodeDoesNotExists') . ': ' . $user_class['ClassName'];
40
+                    $user_class['error'] = get_lang('CodeDoesNotExists').': '.$user_class['ClassName'];
41 41
                     $errors[] = $user_class;
42 42
                 } else {
43 43
                     $classcodes[$user_class['CourseCode']] = 1;
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
         if (!UserManager::is_username_empty($user_class['UserName'])) {
50 50
             // 3.1. Check whether username is too long.
51 51
             if (UserManager::is_username_too_long($user_class['UserName'])) {
52
-                $user_class['error'] = get_lang('UserNameTooLong') . ': ' . $user_class['UserName'];
52
+                $user_class['error'] = get_lang('UserNameTooLong').': '.$user_class['UserName'];
53 53
                 $errors[] = $user_class;
54 54
             }
55 55
 
56 56
             $username = UserManager::purify_username($user_class['UserName'], $purification_option_for_usernames);
57 57
             // 3.2. Check whether username exists.
58 58
             if (UserManager::is_username_available($username)) {
59
-                $user_class['error'] = get_lang('UnknownUser') . ': ' . $username;
59
+                $user_class['error'] = get_lang('UnknownUser').': '.$username;
60 60
                 $errors[] = $user_class;
61 61
             }
62 62
         }
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
             $class_name = $user_data['class_name'];
106 106
             $user_list_name = $user_data['user_list_name'];
107 107
             $usergroup->subscribe_users_to_usergroup($class_id, $user_list, $deleteUsersNotInList);
108
-            $message .= Display::return_message(get_lang('Class') . ': ' . $class_name . '<br />', 'normal', false);
109
-            $message .= Display::return_message(get_lang('Users') . ': ' . implode(', ', $user_list_name));
108
+            $message .= Display::return_message(get_lang('Class').': '.$class_name.'<br />', 'normal', false);
109
+            $message .= Display::return_message(get_lang('Users').': '.implode(', ', $user_list_name));
110 110
         }
111 111
     }
112 112
     return $message;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 $this_section = SECTION_PLATFORM_ADMIN;
129 129
 api_protect_admin_script(true);
130 130
 
131
-$tool_name = get_lang('AddUsersToAClass') . ' CSV';
131
+$tool_name = get_lang('AddUsersToAClass').' CSV';
132 132
 
133 133
 $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
134 134
 $interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 if (count($errors) != 0) {
165 165
     $error_message = "\n";
166 166
     foreach ($errors as $index => $error_class_user) {
167
-        $error_message .= get_lang('Line') . ' ' . $error_class_user['line'] . ': ' . $error_class_user['error'] . '</b>';
167
+        $error_message .= get_lang('Line').' '.$error_class_user['line'].': '.$error_class_user['error'].'</b>';
168 168
         $error_message .= "<br />";
169 169
     }
170 170
     $error_message .= "\n";
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 }
173 173
 $form->display();
174 174
 ?>
175
-<p><?php echo get_lang('CSVMustLookLike') . ' (' . get_lang('MandatoryFields') . ')'; ?> :</p>
175
+<p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p>
176 176
 <pre>
177 177
 <b>UserName</b>;<b>ClassName</b>
178 178
 jdoe;class01
Please login to merge, or discard this patch.
main/admin/extra_fields.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 $obj->setupBreadcrumb($interbreadcrumb, $action);
37 37
 
38 38
 //jqgrid will use this URL to do the selects
39
-$url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_extra_fields&type=' . $extraFieldType;
39
+$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_extra_fields&type='.$extraFieldType;
40 40
 
41 41
 //The order is important you need to check the the $column variable in the model.ajax.php file
42 42
 $columns = $obj->getJqgridColumnNames();
@@ -64,43 +64,43 @@  discard block
 block discarded – undo
64 64
         array(),
65 65
         $action_links,
66 66
         true
67
-    ). '
67
+    ).'
68 68
 
69 69
     $("#field_type").on("change", function() {
70 70
         id = $(this).val();
71 71
         switch(id) {
72 72
             case "1":
73
-                $("#example").html("' . addslashes(Display::return_icon('userfield_text.png')) . '");
73
+                $("#example").html("' . addslashes(Display::return_icon('userfield_text.png')).'");
74 74
                 break;
75 75
             case "2":
76
-                $("#example").html("' . addslashes(Display::return_icon('userfield_text_area.png')) . '");
76
+                $("#example").html("' . addslashes(Display::return_icon('userfield_text_area.png')).'");
77 77
                 break;
78 78
             case "3":
79
-                $("#example").html("' . addslashes(Display::return_icon('add_user_field_howto.png')) . '");
79
+                $("#example").html("' . addslashes(Display::return_icon('add_user_field_howto.png')).'");
80 80
                 break;
81 81
             case "4":
82
-                $("#example").html("' . addslashes(Display::return_icon('userfield_drop_down.png')) . '");
82
+                $("#example").html("' . addslashes(Display::return_icon('userfield_drop_down.png')).'");
83 83
                 break;
84 84
             case "5":
85
-                $("#example").html("' . addslashes(Display::return_icon('userfield_multidropdown.png')) . '");
85
+                $("#example").html("' . addslashes(Display::return_icon('userfield_multidropdown.png')).'");
86 86
                 break;
87 87
             case "6":
88
-                $("#example").html("' . addslashes(Display::return_icon('userfield_data.png')) . '");
88
+                $("#example").html("' . addslashes(Display::return_icon('userfield_data.png')).'");
89 89
                 break;
90 90
             case "7":
91
-                $("#example").html("' . addslashes(Display::return_icon('userfield_date_time.png')) . '");
91
+                $("#example").html("' . addslashes(Display::return_icon('userfield_date_time.png')).'");
92 92
                 break;
93 93
             case "8":
94
-                $("#example").html("' . addslashes(Display::return_icon('userfield_doubleselect.png')) . '");
94
+                $("#example").html("' . addslashes(Display::return_icon('userfield_doubleselect.png')).'");
95 95
                 break;
96 96
             case "9":
97
-                $("#example").html("' . addslashes(Display::return_icon('userfield_divider.png')) . '");
97
+                $("#example").html("' . addslashes(Display::return_icon('userfield_divider.png')).'");
98 98
                 break;
99 99
             case "10":
100
-                $("#example").html("' . addslashes(Display::return_icon('userfield_user_tag.png')) . '");
100
+                $("#example").html("' . addslashes(Display::return_icon('userfield_user_tag.png')).'");
101 101
                 break;
102 102
             case "11":
103
-                $("#example").html("' . addslashes(Display::return_icon('userfield_data.png')) . '");
103
+                $("#example").html("' . addslashes(Display::return_icon('userfield_data.png')).'");
104 104
                 break;
105 105
         }
106 106
     });
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         ) {
120 120
             api_not_allowed();
121 121
         }
122
-        $url = api_get_self() . '?type=' . $obj->type . '&action=' . Security::remove_XSS($_GET['action']);
122
+        $url = api_get_self().'?type='.$obj->type.'&action='.Security::remove_XSS($_GET['action']);
123 123
         $form = $obj->return_form($url, 'add');
124 124
 
125 125
         // The validation or display
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
             $obj->display();
136 136
         } else {
137 137
             echo '<div class="actions">';
138
-            echo '<a href="' . api_get_self() . '?type=' . $obj->type . '">' .
139
-            Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM) . '</a>';
138
+            echo '<a href="'.api_get_self().'?type='.$obj->type.'">'.
139
+            Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
140 140
             echo '</div>';
141 141
             $form->addElement('hidden', 'sec_token');
142 142
             $form->setConstants(array('sec_token' => $token));
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         break;
146 146
     case 'edit':
147 147
         // Action handling: Editing
148
-        $url = api_get_self() . '?type=' . $obj->type . '&action=' . Security::remove_XSS($_GET['action']) . '&id=' . intval($_GET['id']);
148
+        $url = api_get_self().'?type='.$obj->type.'&action='.Security::remove_XSS($_GET['action']).'&id='.intval($_GET['id']);
149 149
         $form = $obj->return_form($url, 'edit');
150 150
 
151 151
         // The validation or display
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
             $obj->display();
160 160
         } else {
161 161
             echo '<div class="actions">';
162
-            echo '<a href="' . api_get_self() . '?type=' . $obj->type . '">' .
163
-            Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM) . '</a>';
162
+            echo '<a href="'.api_get_self().'?type='.$obj->type.'">'.
163
+            Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
164 164
             echo '</div>';
165 165
             $form->addElement('hidden', 'sec_token');
166 166
             $form->setConstants(array('sec_token' => $token));
Please login to merge, or discard this patch.
main/admin/course_create_content.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@
 block discarded – undo
7 7
  * @package chamilo.admin
8 8
  */
9 9
 include ('../inc/global.inc.php');
10
-$this_section=SECTION_PLATFORM_ADMIN;
10
+$this_section = SECTION_PLATFORM_ADMIN;
11 11
 
12 12
 api_protect_admin_script();
13 13
 $tool_name = get_lang('DummyCourseCreator');
14
-$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
14
+$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
15 15
 Display::display_header($tool_name);
16 16
 //api_display_tool_title($tool_name);
17 17
 if (api_get_setting('server_type') != 'test') {
18 18
 	echo get_lang('DummyCourseOnlyOnTestServer');
19
-} elseif( isset($_POST['action'])) {
19
+} elseif (isset($_POST['action'])) {
20 20
 	require_once('../coursecopy/classes/DummyCourseCreator.class.php');
21 21
 	$dcc = new DummyCourseCreator();
22 22
 	$dcc->create_dummy_course($_POST['course_code']);
Please login to merge, or discard this patch.
main/admin/statistics.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 *   @package chamilo.admin
6 6
 */
7 7
 
8
-$cidReset=true;
8
+$cidReset = true;
9 9
 require_once '../inc/global.inc.php';
10 10
 $this_section = SECTION_PLATFORM_ADMIN;
11 11
 
12 12
 api_protect_admin_script();
13 13
 
14
-$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
14
+$interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin'));
15 15
 $tool_name = get_lang('Statistics');
16 16
 Display::display_header($tool_name);
17 17
 Display::display_footer();
Please login to merge, or discard this patch.
main/admin/career_dashboard.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
 $htmlHeadXtra[] = api_get_jqgrid_js();
19 19
 
20 20
 // setting breadcrumbs
21
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
22
-$interbreadcrumb[]=array('url' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions'));
21
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
22
+$interbreadcrumb[] = array('url' => 'career_dashboard.php', 'name' => get_lang('CareersAndPromotions'));
23 23
 
24 24
 Display :: display_header(null);
25 25
 
26
-$form = new FormValidator('filter_form','GET', api_get_self());
26
+$form = new FormValidator('filter_form', 'GET', api_get_self());
27 27
 
28 28
 $career = new Career();
29 29
 
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
 // action links
55 55
 echo '<div class="actions" style="margin-bottom:20px">';
56 56
     echo  '<a href="../admin/index.php">'.
57
-            Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>';
57
+            Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>';
58 58
     echo '<a href="careers.php">'.
59
-            Display::return_icon('career.png',get_lang('Careers'),'',ICON_SIZE_MEDIUM).'</a>';
59
+            Display::return_icon('career.png', get_lang('Careers'), '', ICON_SIZE_MEDIUM).'</a>';
60 60
     echo '<a href="promotions.php">'.
61
-            Display::return_icon('promotion.png',get_lang('Promotions'),'',ICON_SIZE_MEDIUM).'</a>';
61
+            Display::return_icon('promotion.png', get_lang('Promotions'), '', ICON_SIZE_MEDIUM).'</a>';
62 62
 echo '</div>';
63 63
 
64 64
 $form->display();
@@ -119,22 +119,22 @@  discard block
 block discarded – undo
119 119
     foreach ($career_array as $career_id => $data) {
120 120
         $career = $data['name'];
121 121
         $promotions = $data['promotions'];
122
-        $career = Display::url($career, 'careers.php?action=edit&id=' . $career_id);
122
+        $career = Display::url($career, 'careers.php?action=edit&id='.$career_id);
123 123
         $career = Display::tag('h4', $career);
124
-        echo '<tr><td style="background-color:#ECF0F1" colspan="3">' . $career . '</td></tr>';
124
+        echo '<tr><td style="background-color:#ECF0F1" colspan="3">'.$career.'</td></tr>';
125 125
         if (!empty($promotions)) {
126 126
             foreach ($promotions as $promotion_id => $promotion) {
127 127
                 $promotion_name = $promotion['name'];
128
-                $promotion_url = Display::url($promotion_name, 'promotions.php?action=edit&id=' . $promotion_id);
128
+                $promotion_url = Display::url($promotion_name, 'promotions.php?action=edit&id='.$promotion_id);
129 129
                 $sessions = $promotion['sessions'];
130 130
                 echo '<tr>';
131 131
                 $count = count($sessions);
132 132
                 $rowspan = '';
133 133
                 if (!empty($count)) {
134 134
                     $count++;
135
-                    $rowspan = 'rowspan="' . $count . '"';
135
+                    $rowspan = 'rowspan="'.$count.'"';
136 136
                 }
137
-                echo '<td ' . $rowspan . '>';
137
+                echo '<td '.$rowspan.'>';
138 138
                 echo Display::tag('h5', $promotion_url);
139 139
                 echo '</td>';
140 140
                 echo '</tr>';
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                         $course_list = $session['courses'];
145 145
 
146 146
                         $url = Display::url($session['data']['name'],
147
-                            '../session/resume_session.php?id_session=' . $session['data']['id']);
147
+                            '../session/resume_session.php?id_session='.$session['data']['id']);
148 148
                         echo '<tr>';
149 149
                         //Session name
150 150
                         echo Display::tag('td', $url);
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
                                 $url = Display::url(
159 159
                                     $course['title'],
160
-                                    api_get_path(WEB_COURSE_PATH) . $course['directory'] . '/index.php?id_session=' . $session['data']['id']
160
+                                    api_get_path(WEB_COURSE_PATH).$course['directory'].'/index.php?id_session='.$session['data']['id']
161 161
                                 );
162 162
                                 echo Display::tag('td', $url);
163 163
                                 echo '</tr>';
Please login to merge, or discard this patch.
main/admin/access_url_check_user_session.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,18 +15,18 @@  discard block
 block discarded – undo
15 15
 
16 16
 $tool_name = get_lang('SessionOverview');
17 17
 
18
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
19
-$interbreadcrumb[]=array('url' => 'session_list.php','name' => get_lang('SessionList'));
18
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
19
+$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
20 20
 
21 21
 // Database Table Definitions
22
-$tbl_user							= Database::get_main_table(TABLE_MAIN_USER);
23
-$tbl_session_rel_user				= Database::get_main_table(TABLE_MAIN_SESSION_USER);
22
+$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
23
+$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
24 24
 $table_access_url_user              = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
25 25
 $url_id                             = api_get_current_access_url_id();
26 26
 
27 27
 $action = $_GET['action'];
28 28
 
29
-switch($action) {
29
+switch ($action) {
30 30
     case 'add_user_to_url':
31 31
         $user_id = $_REQUEST['user_id'];
32 32
         $result = UrlManager::add_user_to_url($user_id, $url_id);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 }
59 59
 
60 60
 
61
-foreach($session_list  as $session_item) {
61
+foreach ($session_list  as $session_item) {
62 62
     $session_id = $session_item['id'];
63 63
     $html .= '<h3>'.$session_item['name'].'</h3>';
64 64
 
Please login to merge, or discard this patch.
main/admin/course_import.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@
 block discarded – undo
12 12
  */
13 13
 function validate_data($courses)
14 14
 {
15
-    $errors = array ();
16
-    $coursecodes = array ();
15
+    $errors = array();
16
+    $coursecodes = array();
17 17
     foreach ($courses as $index => $course) {
18
-        $course['line'] = $index +1;
18
+        $course['line'] = $index + 1;
19 19
 
20 20
         // 1. Check whether mandatory fields are set.
21
-        $mandatory_fields = array ('Code', 'Title', 'CourseCategory');
21
+        $mandatory_fields = array('Code', 'Title', 'CourseCategory');
22 22
         foreach ($mandatory_fields as $field) {
23 23
             if (!isset($course[$field]) || strlen($course[$field]) == 0) {
24 24
                 $course['error'] = get_lang($field.'Mandatory');
Please login to merge, or discard this patch.