Passed
Push — 1.10.x ( 07da6d...08890a )
by Yannick
83:27 queued 37:15
created
main/group/group_creation.php 2 patches
Indentation   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
             exit;
53 53
             break;
54 54
         case 'create_subgroups':
55
-			GroupManager::create_subgroups(
56
-				$_POST['base_group'],
57
-				$_POST['number_of_groups']
58
-			);
55
+            GroupManager::create_subgroups(
56
+                $_POST['base_group'],
57
+                $_POST['number_of_groups']
58
+            );
59 59
             Display::addFlash(Display::return_message(get_lang('GroupsAdded')));
60 60
             header("Location: ".$currentUrl);
61 61
             exit;
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
 if (isset($_POST['number_of_groups'])) {
81 81
     if (!is_numeric($_POST['number_of_groups']) || intval($_POST['number_of_groups']) < 1) {
82 82
         Display :: display_error_message(
83
-			get_lang('PleaseEnterValidNumber').'<br /><br />
83
+            get_lang('PleaseEnterValidNumber').'<br /><br />
84 84
 			<a href="group_creation.php?'.api_get_cidreq().'">&laquo; '.get_lang('Back').'</a>',
85
-			false
86
-		);
85
+            false
86
+        );
87 87
     } else {
88 88
         $number_of_groups = intval($_POST['number_of_groups']);
89 89
         if ($number_of_groups > 1) {
@@ -121,20 +121,20 @@  discard block
 block discarded – undo
121 121
     }
122 122
     </script>
123 123
     <?php
124
-		}
125
-		$group_categories = GroupManager::get_categories();
126
-		$group_id = GroupManager :: get_number_of_groups() + 1;
127
-		$cat_options = [];
128
-		foreach ($group_categories as $index => $category) {
129
-			$cat_options[$category['id']] = $category['title'];
130
-		}
124
+        }
125
+        $group_categories = GroupManager::get_categories();
126
+        $group_id = GroupManager :: get_number_of_groups() + 1;
127
+        $cat_options = [];
128
+        foreach ($group_categories as $index => $category) {
129
+            $cat_options[$category['id']] = $category['title'];
130
+        }
131 131
         $form = new FormValidator('create_groups_step2', 'POST', api_get_self().'?'.api_get_cidreq());
132 132
 
133
-		// Modify the default templates
134
-		$renderer = $form->defaultRenderer();
135
-		$form_template = "<form {attributes}>\n<div class='create-groups'>\n<table>\n{content}\n</table>\n</div>\n</form>";
136
-		$renderer->setFormTemplate($form_template);
137
-		$element_template = <<<EOT
133
+        // Modify the default templates
134
+        $renderer = $form->defaultRenderer();
135
+        $form_template = "<form {attributes}>\n<div class='create-groups'>\n<table>\n{content}\n</table>\n</div>\n</form>";
136
+        $renderer->setFormTemplate($form_template);
137
+        $element_template = <<<EOT
138 138
         <tr class="separate">
139 139
 		<td>
140 140
 			<!-- BEGIN required -->
@@ -147,149 +147,149 @@  discard block
 block discarded – undo
147 147
 	</tr>
148 148
 
149 149
 EOT;
150
-		$renderer->setCustomElementTemplate($element_template);
150
+        $renderer->setCustomElementTemplate($element_template);
151 151
         $form->addElement('header', $nameTools);
152
-		$form->addElement('hidden', 'action');
153
-		$form->addElement('hidden', 'number_of_groups');
154
-		$defaults = array();
155
-		// Table heading
156
-		$group_el = array();
157
-		$group_el[] = $form->createElement('static', null, null, '<b>'.get_lang('GroupName').'</b>');
152
+        $form->addElement('hidden', 'action');
153
+        $form->addElement('hidden', 'number_of_groups');
154
+        $defaults = array();
155
+        // Table heading
156
+        $group_el = array();
157
+        $group_el[] = $form->createElement('static', null, null, '<b>'.get_lang('GroupName').'</b>');
158 158
 
159
-		if (api_get_setting('allow_group_categories') == 'true') {
160
-			$group_el[] = $form->createElement('static', null, null, '<b>'.get_lang('GroupCategory').'</b>');
161
-		}
162
-		$group_el[] = $form->createElement('static', null, null, '<b>'.get_lang('GroupPlacesThis').'</b>');
163
-		$form->addGroup($group_el, 'groups', null, "</td><td>", false);
164
-		// Checkboxes
165
-		if ($_POST['number_of_groups'] > 1) {
166
-			$group_el = array ();
167
-			$group_el[] = $form->createElement('static', null, null, ' ');
168
-			if (api_get_setting('allow_group_categories') == 'true') {
169
-				$group_el[] = $form->createElement('checkbox', 'same_category', null, get_lang('SameForAll'), array('onclick' => "javascript: switch_state('category');"));
170
-			}
171
-			$group_el[] = $form->createElement('checkbox', 'same_places', null, get_lang('SameForAll'), array ('onclick' => "javascript: switch_state('places');"));
172
-			$form->addGroup($group_el, 'groups', null, '</td><td>', false);
173
-		}
174
-		// Properties for all groups
175
-		for ($group_number = 0; $group_number < $_POST['number_of_groups']; $group_number ++) {
176
-			$group_el = array();
177
-			$group_el[] = $form->createElement('text', 'group_'.$group_number.'_name');
178
-			if (api_get_setting('allow_group_categories') == 'true') {
179
-				$group_el[] = $form->createElement('select', 'group_'.$group_number.'_category', null, $cat_options, array('id' => 'category_'.$group_number));
180
-			}
181
-			$group_el[] = $form->createElement('text', 'group_'.$group_number.'_places', null, array('class' => 'span1', 'id' => 'places_'.$group_number));
159
+        if (api_get_setting('allow_group_categories') == 'true') {
160
+            $group_el[] = $form->createElement('static', null, null, '<b>'.get_lang('GroupCategory').'</b>');
161
+        }
162
+        $group_el[] = $form->createElement('static', null, null, '<b>'.get_lang('GroupPlacesThis').'</b>');
163
+        $form->addGroup($group_el, 'groups', null, "</td><td>", false);
164
+        // Checkboxes
165
+        if ($_POST['number_of_groups'] > 1) {
166
+            $group_el = array ();
167
+            $group_el[] = $form->createElement('static', null, null, ' ');
168
+            if (api_get_setting('allow_group_categories') == 'true') {
169
+                $group_el[] = $form->createElement('checkbox', 'same_category', null, get_lang('SameForAll'), array('onclick' => "javascript: switch_state('category');"));
170
+            }
171
+            $group_el[] = $form->createElement('checkbox', 'same_places', null, get_lang('SameForAll'), array ('onclick' => "javascript: switch_state('places');"));
172
+            $form->addGroup($group_el, 'groups', null, '</td><td>', false);
173
+        }
174
+        // Properties for all groups
175
+        for ($group_number = 0; $group_number < $_POST['number_of_groups']; $group_number ++) {
176
+            $group_el = array();
177
+            $group_el[] = $form->createElement('text', 'group_'.$group_number.'_name');
178
+            if (api_get_setting('allow_group_categories') == 'true') {
179
+                $group_el[] = $form->createElement('select', 'group_'.$group_number.'_category', null, $cat_options, array('id' => 'category_'.$group_number));
180
+            }
181
+            $group_el[] = $form->createElement('text', 'group_'.$group_number.'_places', null, array('class' => 'span1', 'id' => 'places_'.$group_number));
182 182
 
183
-			if ($_POST['number_of_groups'] < 10000) {
184
-				if ($group_id < 10) {
185
-					$prev = '000';
186
-				} elseif ($group_id < 100) {
187
-					$prev = '00';
188
-				} elseif ($group_id<1000) {
189
-					$prev = '0';
190
-				} else {
191
-					$prev = '';
192
-				}
193
-			}
183
+            if ($_POST['number_of_groups'] < 10000) {
184
+                if ($group_id < 10) {
185
+                    $prev = '000';
186
+                } elseif ($group_id < 100) {
187
+                    $prev = '00';
188
+                } elseif ($group_id<1000) {
189
+                    $prev = '0';
190
+                } else {
191
+                    $prev = '';
192
+                }
193
+            }
194 194
 
195
-			$defaults['group_'.$group_number.'_name'] = get_lang('GroupSingle').' '.$prev.$group_id ++;
196
-			$form->addGroup($group_el, 'group_'.$group_number, null, '</td><td>', false);
197
-		}
198
-		$defaults['action'] = 'create_groups';
199
-		$defaults['number_of_groups'] = intval($_POST['number_of_groups']);
200
-		$form->setDefaults($defaults);
201
-		$form->addButtonCreate(get_lang('CreateGroup'), 'submit');
195
+            $defaults['group_'.$group_number.'_name'] = get_lang('GroupSingle').' '.$prev.$group_id ++;
196
+            $form->addGroup($group_el, 'group_'.$group_number, null, '</td><td>', false);
197
+        }
198
+        $defaults['action'] = 'create_groups';
199
+        $defaults['number_of_groups'] = intval($_POST['number_of_groups']);
200
+        $form->setDefaults($defaults);
201
+        $form->addButtonCreate(get_lang('CreateGroup'), 'submit');
202 202
         $form->display();
203
-	}
203
+    }
204 204
 } else {
205
-	/*
205
+    /*
206 206
 	 * Show form to generate new groups
207 207
 	 */
208 208
 
209
-	$create_groups_form = new FormValidator('create_groups', 'post', api_get_self().'?'.api_get_cidreq());
210
-	$create_groups_form->addElement('header', $nameTools);
211
-	/* $group_el = array ();
209
+    $create_groups_form = new FormValidator('create_groups', 'post', api_get_self().'?'.api_get_cidreq());
210
+    $create_groups_form->addElement('header', $nameTools);
211
+    /* $group_el = array ();
212 212
 	$group_el[] = $create_groups_form->createElement('text', 'number_of_groups', array(get_lang('Create'), '1'));
213 213
 	$group_el[] = $create_groups_form->addButtonCreate(get_lang('ProceedToCreateGroup'), 'submit', true);
214 214
 	$create_groups_form->addGroup($group_el, 'create_groups', get_lang('NumberOfGroupsToCreate'), ' ', false);
215 215
 	*/
216 216
     $create_groups_form->addText('number_of_groups',get_lang('NumberOfGroupsToCreate'),null,array('value'=>'1'));
217 217
     $create_groups_form->addButton('submit', get_lang('ProceedToCreateGroup'),'plus','primary');
218
-	$defaults = array();
219
-	$defaults['number_of_groups'] = 1;
220
-	$create_groups_form->setDefaults($defaults);
221
-	$create_groups_form->display();
218
+    $defaults = array();
219
+    $defaults['number_of_groups'] = 1;
220
+    $create_groups_form->setDefaults($defaults);
221
+    $create_groups_form->display();
222 222
 
223
-	/*
223
+    /*
224 224
 	 * Show form to generate subgroups
225 225
 	 */
226
-	if (api_get_setting('allow_group_categories') == 'true' && count(GroupManager :: get_group_list()) > 0) {
227
-		$base_group_options = array ();
228
-		$groups = GroupManager :: get_group_list();
229
-		foreach ($groups as $index => $group) {
230
-			$number_of_students = GroupManager :: number_of_students($group['id']);
231
-			if ($number_of_students > 0) {
232
-				$base_group_options[$group['id']] = $group['name'].' ('.$number_of_students.' '.get_lang('Users').')';
233
-			}
234
-		}
235
-		if (count($base_group_options) > 0) {
236
-			$create_subgroups_form = new FormValidator('create_subgroups', 'post', api_get_self().'?'.api_get_cidreq());
226
+    if (api_get_setting('allow_group_categories') == 'true' && count(GroupManager :: get_group_list()) > 0) {
227
+        $base_group_options = array ();
228
+        $groups = GroupManager :: get_group_list();
229
+        foreach ($groups as $index => $group) {
230
+            $number_of_students = GroupManager :: number_of_students($group['id']);
231
+            if ($number_of_students > 0) {
232
+                $base_group_options[$group['id']] = $group['name'].' ('.$number_of_students.' '.get_lang('Users').')';
233
+            }
234
+        }
235
+        if (count($base_group_options) > 0) {
236
+            $create_subgroups_form = new FormValidator('create_subgroups', 'post', api_get_self().'?'.api_get_cidreq());
237 237
             $create_subgroups_form->addElement('header', get_lang('CreateSubgroups'));
238 238
             $create_subgroups_form->addElement('html', get_lang('CreateSubgroupsInfo'));
239
-			$create_subgroups_form->addElement('hidden', 'action');
240
-			$group_el = array();
241
-			$group_el[] = $create_subgroups_form->createElement('static', null, null, get_lang('CreateNumberOfGroups'));
242
-			$group_el[] = $create_subgroups_form->createElement('text', 'number_of_groups', null, array('size' => 3));
243
-			$group_el[] = $create_subgroups_form->createElement('static', null, null, get_lang('WithUsersFrom'));
244
-			$group_el[] = $create_subgroups_form->createElement('select', 'base_group', null, $base_group_options);
245
-			$group_el[] = $create_subgroups_form->createElement('button', 'submit', get_lang('Ok'));
246
-			$create_subgroups_form->addGroup($group_el, 'create_groups', null, ' ', false);
247
-			$defaults = array();
248
-			$defaults['action'] = 'create_subgroups';
249
-			$create_subgroups_form->setDefaults($defaults);
250
-			$create_subgroups_form->display();
251
-		}
252
-	}
239
+            $create_subgroups_form->addElement('hidden', 'action');
240
+            $group_el = array();
241
+            $group_el[] = $create_subgroups_form->createElement('static', null, null, get_lang('CreateNumberOfGroups'));
242
+            $group_el[] = $create_subgroups_form->createElement('text', 'number_of_groups', null, array('size' => 3));
243
+            $group_el[] = $create_subgroups_form->createElement('static', null, null, get_lang('WithUsersFrom'));
244
+            $group_el[] = $create_subgroups_form->createElement('select', 'base_group', null, $base_group_options);
245
+            $group_el[] = $create_subgroups_form->createElement('button', 'submit', get_lang('Ok'));
246
+            $create_subgroups_form->addGroup($group_el, 'create_groups', null, ' ', false);
247
+            $defaults = array();
248
+            $defaults['action'] = 'create_subgroups';
249
+            $create_subgroups_form->setDefaults($defaults);
250
+            $create_subgroups_form->display();
251
+        }
252
+    }
253 253
 
254
-	/*
254
+    /*
255 255
 	 * Show form to generate groups from classes subscribed to the course
256 256
 	 */
257 257
     $options['where'] = array(" usergroup.course_id = ? " =>  api_get_real_course_id());
258 258
     $obj = new UserGroup();
259 259
     $classes = $obj->getUserGroupInCourse($options);
260
-	if (count($classes) > 0) {
261
-		echo '<b>'.get_lang('GroupsFromClasses').'</b>';
262
-		echo '<blockquote>';
263
-		echo '<p>'.get_lang('GroupsFromClassesInfo').'</p>';
264
-		echo '<ul>';
265
-		foreach ($classes as $index => $class) {
266
-			$number_of_users = count($obj->get_users_by_usergroup($class['id']));
267
-			echo '<li>';
268
-			echo $class['name'];
269
-			echo ' ('.$number_of_users.' '.get_lang('Users').')';
270
-			echo '</li>';
271
-		}
272
-		echo '</ul>';
260
+    if (count($classes) > 0) {
261
+        echo '<b>'.get_lang('GroupsFromClasses').'</b>';
262
+        echo '<blockquote>';
263
+        echo '<p>'.get_lang('GroupsFromClassesInfo').'</p>';
264
+        echo '<ul>';
265
+        foreach ($classes as $index => $class) {
266
+            $number_of_users = count($obj->get_users_by_usergroup($class['id']));
267
+            echo '<li>';
268
+            echo $class['name'];
269
+            echo ' ('.$number_of_users.' '.get_lang('Users').')';
270
+            echo '</li>';
271
+        }
272
+        echo '</ul>';
273 273
 
274
-		$create_class_groups_form = new FormValidator('create_class_groups_form', 'post', api_get_self().'?'.api_get_cidreq());
275
-		$create_class_groups_form->addElement('hidden', 'action');
276
-		if (api_get_setting('allow_group_categories') == 'true') {
277
-			$group_categories = GroupManager :: get_categories();
278
-			$cat_options = array();
279
-			foreach ($group_categories as $index => $category) {
280
-				$cat_options[$category['id']] = $category['title'];
281
-			}
282
-			$create_class_groups_form->addElement('select', 'group_category', null, $cat_options);
283
-		} else {
284
-			$create_class_groups_form->addElement('hidden', 'group_category');
285
-		}
286
-		$create_class_groups_form->addElement('submit', 'submit', get_lang('Ok'));
287
-		$defaults['group_category'] = GroupManager::DEFAULT_GROUP_CATEGORY;
288
-		$defaults['action'] = 'create_class_groups';
289
-		$create_class_groups_form->setDefaults($defaults);
290
-		$create_class_groups_form->display();
291
-		echo '</blockquote>';
292
-	}
274
+        $create_class_groups_form = new FormValidator('create_class_groups_form', 'post', api_get_self().'?'.api_get_cidreq());
275
+        $create_class_groups_form->addElement('hidden', 'action');
276
+        if (api_get_setting('allow_group_categories') == 'true') {
277
+            $group_categories = GroupManager :: get_categories();
278
+            $cat_options = array();
279
+            foreach ($group_categories as $index => $category) {
280
+                $cat_options[$category['id']] = $category['title'];
281
+            }
282
+            $create_class_groups_form->addElement('select', 'group_category', null, $cat_options);
283
+        } else {
284
+            $create_class_groups_form->addElement('hidden', 'group_category');
285
+        }
286
+        $create_class_groups_form->addElement('submit', 'submit', get_lang('Ok'));
287
+        $defaults['group_category'] = GroupManager::DEFAULT_GROUP_CATEGORY;
288
+        $defaults['action'] = 'create_class_groups';
289
+        $create_class_groups_form->setDefaults($defaults);
290
+        $create_class_groups_form->display();
291
+        echo '</blockquote>';
292
+    }
293 293
 }
294 294
 
295 295
 Display :: display_footer();
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 require_once '../inc/global.inc.php';
8 8
 $this_section = SECTION_COURSES;
9
-$current_course_tool  = TOOL_GROUP;
9
+$current_course_tool = TOOL_GROUP;
10 10
 
11 11
 // Notice for unauthorized people.
12 12
 api_protect_course_script(true);
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         case 'create_groups':
20 20
             $groups = array();
21 21
 
22
-            for ($i = 0; $i < $_POST['number_of_groups']; $i ++) {
22
+            for ($i = 0; $i < $_POST['number_of_groups']; $i++) {
23 23
                 $group1['name'] = empty($_POST['group_'.$i.'_name']) ? get_lang('Group').' '.$i : $_POST['group_'.$i.'_name'];
24 24
                 $group1['category'] = isset($_POST['group_'.$i.'_category']) ? $_POST['group_'.$i.'_category'] : null;
25 25
                 $group1['tutor'] = isset($_POST['group_'.$i.'_tutor']) ? $_POST['group_'.$i.'_tutor'] : null;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 }
71 71
 
72 72
 $nameTools = get_lang('GroupCreation');
73
-$interbreadcrumb[] = array ('url' => 'group.php', 'name' => get_lang('Groups'));
73
+$interbreadcrumb[] = array('url' => 'group.php', 'name' => get_lang('Groups'));
74 74
 Display :: display_header($nameTools, 'Group');
75 75
 
76 76
 if (!api_is_allowed_to_edit(false, true)) {
@@ -163,16 +163,16 @@  discard block
 block discarded – undo
163 163
 		$form->addGroup($group_el, 'groups', null, "</td><td>", false);
164 164
 		// Checkboxes
165 165
 		if ($_POST['number_of_groups'] > 1) {
166
-			$group_el = array ();
166
+			$group_el = array();
167 167
 			$group_el[] = $form->createElement('static', null, null, ' ');
168 168
 			if (api_get_setting('allow_group_categories') == 'true') {
169 169
 				$group_el[] = $form->createElement('checkbox', 'same_category', null, get_lang('SameForAll'), array('onclick' => "javascript: switch_state('category');"));
170 170
 			}
171
-			$group_el[] = $form->createElement('checkbox', 'same_places', null, get_lang('SameForAll'), array ('onclick' => "javascript: switch_state('places');"));
171
+			$group_el[] = $form->createElement('checkbox', 'same_places', null, get_lang('SameForAll'), array('onclick' => "javascript: switch_state('places');"));
172 172
 			$form->addGroup($group_el, 'groups', null, '</td><td>', false);
173 173
 		}
174 174
 		// Properties for all groups
175
-		for ($group_number = 0; $group_number < $_POST['number_of_groups']; $group_number ++) {
175
+		for ($group_number = 0; $group_number < $_POST['number_of_groups']; $group_number++) {
176 176
 			$group_el = array();
177 177
 			$group_el[] = $form->createElement('text', 'group_'.$group_number.'_name');
178 178
 			if (api_get_setting('allow_group_categories') == 'true') {
@@ -185,14 +185,14 @@  discard block
 block discarded – undo
185 185
 					$prev = '000';
186 186
 				} elseif ($group_id < 100) {
187 187
 					$prev = '00';
188
-				} elseif ($group_id<1000) {
188
+				} elseif ($group_id < 1000) {
189 189
 					$prev = '0';
190 190
 				} else {
191 191
 					$prev = '';
192 192
 				}
193 193
 			}
194 194
 
195
-			$defaults['group_'.$group_number.'_name'] = get_lang('GroupSingle').' '.$prev.$group_id ++;
195
+			$defaults['group_'.$group_number.'_name'] = get_lang('GroupSingle').' '.$prev.$group_id++;
196 196
 			$form->addGroup($group_el, 'group_'.$group_number, null, '</td><td>', false);
197 197
 		}
198 198
 		$defaults['action'] = 'create_groups';
@@ -213,8 +213,8 @@  discard block
 block discarded – undo
213 213
 	$group_el[] = $create_groups_form->addButtonCreate(get_lang('ProceedToCreateGroup'), 'submit', true);
214 214
 	$create_groups_form->addGroup($group_el, 'create_groups', get_lang('NumberOfGroupsToCreate'), ' ', false);
215 215
 	*/
216
-    $create_groups_form->addText('number_of_groups',get_lang('NumberOfGroupsToCreate'),null,array('value'=>'1'));
217
-    $create_groups_form->addButton('submit', get_lang('ProceedToCreateGroup'),'plus','primary');
216
+    $create_groups_form->addText('number_of_groups', get_lang('NumberOfGroupsToCreate'), null, array('value'=>'1'));
217
+    $create_groups_form->addButton('submit', get_lang('ProceedToCreateGroup'), 'plus', 'primary');
218 218
 	$defaults = array();
219 219
 	$defaults['number_of_groups'] = 1;
220 220
 	$create_groups_form->setDefaults($defaults);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 	 * Show form to generate subgroups
225 225
 	 */
226 226
 	if (api_get_setting('allow_group_categories') == 'true' && count(GroupManager :: get_group_list()) > 0) {
227
-		$base_group_options = array ();
227
+		$base_group_options = array();
228 228
 		$groups = GroupManager :: get_group_list();
229 229
 		foreach ($groups as $index => $group) {
230 230
 			$number_of_students = GroupManager :: number_of_students($group['id']);
Please login to merge, or discard this patch.
main/group/group_overview.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
                     break;
61 61
             }
62 62
             break;
63
-	}
63
+    }
64 64
 }
65 65
 
66 66
 /*	Header */
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  */
16 16
 require_once '../inc/global.inc.php';
17 17
 $this_section = SECTION_COURSES;
18
-$current_course_tool  = TOOL_GROUP;
18
+$current_course_tool = TOOL_GROUP;
19 19
 
20 20
 // Notice for unauthorized people.
21 21
 api_protect_course_script(true);
@@ -85,29 +85,29 @@  discard block
 block discarded – undo
85 85
         Display::return_icon('add.png', get_lang('NewGroupCreate'), '', ICON_SIZE_MEDIUM).'</a>';
86 86
 
87 87
     if (api_get_setting('allow_group_categories') == 'true') {
88
-        $actions.= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'.
88
+        $actions .= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'.
89 89
             Display::return_icon('new_folder.png', get_lang('AddCategory'), '', ICON_SIZE_MEDIUM).'</a>';
90 90
     } else {
91
-        $actions.= '<a href="group_category.php?'.api_get_cidreq().'&id=2">'.
91
+        $actions .= '<a href="group_category.php?'.api_get_cidreq().'&id=2">'.
92 92
             Display::return_icon('settings.png', get_lang('PropModify'), '', ICON_SIZE_MEDIUM).'</a>';
93 93
     }
94
-    $actions.= '<a href="import.php?'.api_get_cidreq().'&action=import">'.
94
+    $actions .= '<a href="import.php?'.api_get_cidreq().'&action=import">'.
95 95
         Display::return_icon('import_csv.png', get_lang('Import'), '', ICON_SIZE_MEDIUM).'</a>';
96 96
 
97
-    $actions.= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_all&type=csv">'.
97
+    $actions .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_all&type=csv">'.
98 98
         Display::return_icon('export_csv.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).'</a>';
99 99
 
100
-    $actions.= '<a href="group_overview.php?'.api_get_cidreq().'&action=export&type=xls">'.
100
+    $actions .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export&type=xls">'.
101 101
     Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'</a>';
102 102
 
103
-    $actions.= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_pdf">'.
103
+    $actions .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_pdf">'.
104 104
         Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>';
105 105
 
106
-    $actions.= '<a href="group.php?'.api_get_cidreq().'">'.
107
-        Display::return_icon('group.png', get_lang('Groups'),'',ICON_SIZE_MEDIUM).'</a>';
106
+    $actions .= '<a href="group.php?'.api_get_cidreq().'">'.
107
+        Display::return_icon('group.png', get_lang('Groups'), '', ICON_SIZE_MEDIUM).'</a>';
108 108
 
109 109
 
110
-    $actions.= '<a href="../user/user.php?'.api_get_cidreq().'">'.
110
+    $actions .= '<a href="../user/user.php?'.api_get_cidreq().'">'.
111 111
     Display::return_icon('user.png', get_lang('GoTo').' '.get_lang('Users'), '', ICON_SIZE_MEDIUM).'</a>';
112 112
 
113 113
 // Action links
Please login to merge, or discard this patch.
main/group/group.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 $userId = api_get_user_id();
21 21
 
22 22
 $this_section = SECTION_COURSES;
23
-$current_course_tool  = TOOL_GROUP;
23
+$current_course_tool = TOOL_GROUP;
24 24
 
25 25
 // Notice for unauthorized people.
26 26
 api_protect_course_script(true);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
  * Self-registration and un-registration
43 43
  */
44 44
 $my_group_id = isset($_GET['group_id']) ? intval($_GET['group_id']) : null;
45
-$my_msg	= isset($_GET['msg']) ? Security::remove_XSS($_GET['msg']) : null;
45
+$my_msg = isset($_GET['msg']) ? Security::remove_XSS($_GET['msg']) : null;
46 46
 $my_group = isset($_REQUEST['group']) ? Security::remove_XSS($_REQUEST['group']) : null;
47 47
 $my_get_id1 = isset($_GET['id1']) ? Security::remove_XSS($_GET['id1']) : null;
48 48
 $my_get_id2 = isset($_GET['id2']) ? Security::remove_XSS($_GET['id2']) : null;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         Display::return_icon('add-groups.png', get_lang('NewGroupCreate'), '', ICON_SIZE_MEDIUM).'</a>';
170 170
 
171 171
     if (api_get_setting('allow_group_categories') == 'true') {
172
-        $actionsLeft .=  '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'.
172
+        $actionsLeft .= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'.
173 173
             Display::return_icon('new_folder.png', get_lang('AddCategory'), '', ICON_SIZE_MEDIUM).'</a>';
174 174
     } else {
175 175
         $actionsLeft .= '<a href="group_category.php?'.api_get_cidreq().'&id=2">'.
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
 
196 196
 $actionsRight = GroupManager::getSearchForm();
197
-$toolbar = Display::toolbarAction('toolbar-groups', $content = array( 0 => $actionsLeft, 1 => $actionsRight ));
197
+$toolbar = Display::toolbarAction('toolbar-groups', $content = array(0 => $actionsLeft, 1 => $actionsRight));
198 198
 $group_cats = GroupManager::get_categories(api_get_course_id());
199 199
 
200 200
 echo $toolbar;
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         $actions = null;
226 226
         if (api_is_allowed_to_edit(false, true) && !empty($categoryId)) {
227 227
             $actions .= '<a href="group_category.php?'.api_get_cidreq().'&id='.$categoryId.'" title="'.get_lang('Edit').'">'.
228
-                Display::return_icon('edit.png', get_lang('EditGroup'),'',ICON_SIZE_SMALL).'</a>';
228
+                Display::return_icon('edit.png', get_lang('EditGroup'), '', ICON_SIZE_SMALL).'</a>';
229 229
             $actions .=
230 230
                 Display::url(
231 231
                     Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL),
@@ -235,17 +235,17 @@  discard block
 block discarded – undo
235 235
                     )
236 236
                 );
237 237
             if ($index != 0) {
238
-                $actions .=  ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index -1]['id'].'">'.
239
-                    Display::return_icon('up.png','&nbsp;','',ICON_SIZE_SMALL).'</a>';
238
+                $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index - 1]['id'].'">'.
239
+                    Display::return_icon('up.png', '&nbsp;', '', ICON_SIZE_SMALL).'</a>';
240 240
             }
241 241
             if ($index != count($group_cats) - 1) {
242
-                $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index +1]['id'].'">'.
243
-                    Display::return_icon('down.png','&nbsp;','',ICON_SIZE_SMALL).'</a>';
242
+                $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index + 1]['id'].'">'.
243
+                    Display::return_icon('down.png', '&nbsp;', '', ICON_SIZE_SMALL).'</a>';
244 244
             }
245 245
         }
246 246
 
247 247
         echo Display::page_header(
248
-            Security::remove_XSS($category['title'].' '. $label.' ').$actions,
248
+            Security::remove_XSS($category['title'].' '.$label.' ').$actions,
249 249
             null,
250 250
             'h4',
251 251
             false
Please login to merge, or discard this patch.
main/group/settings.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 
4 4
 /**
5 5
  *	This script displays an area where teachers can edit the group properties and member list.
6
-  *
6
+ *
7 7
  *	@author various contributors
8 8
  *	@author Roan Embrechts (VUB), partial code cleanup, initial virtual course support
9 9
  *	@package chamilo.group
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 require_once '../inc/global.inc.php';
14 14
 $this_section = SECTION_COURSES;
15
-$current_course_tool  = TOOL_GROUP;
15
+$current_course_tool = TOOL_GROUP;
16 16
 
17 17
 // Notice for unauthorized people.
18 18
 api_protect_course_script(true);
Please login to merge, or discard this patch.
main/group/group_edit.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,9 +161,9 @@
 block discarded – undo
161 161
 // possible : number_groups_left > 0 and is group member
162 162
 $possible_users = array();
163 163
 foreach ($complete_user_list as $index => $user) {
164
-     if ($user['number_groups_left'] > 0 || in_array($user['user_id'], $selected_users)) {
164
+        if ($user['number_groups_left'] > 0 || in_array($user['user_id'], $selected_users)) {
165 165
         $possible_users[$user['user_id']] = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')';
166
-     }
166
+        }
167 167
 }
168 168
 
169 169
 $group_members_element = $form->addElement('advmultiselect', 'group_members', get_lang('GroupMembers'), $possible_users, 'style="width: 280px;"');
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 require '../inc/global.inc.php';
15 15
 $this_section = SECTION_COURSES;
16
-$current_course_tool  = TOOL_GROUP;
16
+$current_course_tool = TOOL_GROUP;
17 17
 
18 18
 // Notice for unauthorized people.
19 19
 api_protect_course_script(true);
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 $current_group = GroupManager :: get_group_properties($group_id);
23 23
 
24 24
 $nameTools = get_lang('EditGroup');
25
-$interbreadcrumb[] = array ('url' => 'group.php?'.api_get_cidReq(), 'name' => get_lang('Groups'));
26
-$interbreadcrumb[] = array ('url' => 'group_space.php?'.api_get_cidReq(), 'name' => $current_group['name']);
25
+$interbreadcrumb[] = array('url' => 'group.php?'.api_get_cidReq(), 'name' => get_lang('Groups'));
26
+$interbreadcrumb[] = array('url' => 'group_space.php?'.api_get_cidReq(), 'name' => $current_group['name']);
27 27
 
28 28
 $is_group_member = GroupManager :: is_tutor_of_group(api_get_user_id(), $group_id);
29 29
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         return true;
105 105
     }
106 106
     if (isset($value['max_member']) && isset($value['group_members']) && $value['max_member'] < count($value['group_members'])) {
107
-        return array ('group_members' => get_lang('GroupTooMuchMembers'));
107
+        return array('group_members' => get_lang('GroupTooMuchMembers'));
108 108
     }
109 109
     return true;
110 110
 }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 $form->addText('name', get_lang('GroupName'));
131 131
 
132 132
 // Description
133
-$form->addElement('textarea', 'description', get_lang('Description'), array ('rows' => 6));
133
+$form->addElement('textarea', 'description', get_lang('Description'), array('rows' => 6));
134 134
 
135 135
 $complete_user_list = GroupManager :: fill_groups_list($current_group['id']);
136 136
 usort($complete_user_list, 'sort_users');
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 // Group members
154 154
 $group_member_list = GroupManager :: get_subscribed_users($current_group['id']);
155 155
 
156
-$selected_users = array ();
156
+$selected_users = array();
157 157
 foreach ($group_member_list as $index => $user) {
158 158
     $selected_users[] = $user['user_id'];
159 159
 }
@@ -183,42 +183,42 @@  discard block
 block discarded – undo
183 183
     $form->createElement('checkbox', 'self_registration_allowed', get_lang('GroupSelfRegistration'), get_lang('GroupAllowStudentRegistration'), 1),
184 184
     $form->createElement('checkbox', 'self_unregistration_allowed', null, get_lang('GroupAllowStudentUnregistration'), 1)
185 185
 );
186
-$form->addGroup($group, '', Display::return_icon('user.png', get_lang('GroupSelfRegistration') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupSelfRegistration'), '', false);
186
+$form->addGroup($group, '', Display::return_icon('user.png', get_lang('GroupSelfRegistration'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupSelfRegistration'), '', false);
187 187
 
188 188
 // Documents settings
189 189
 $group = array();
190 190
 $group[] = $form->createElement('radio', 'doc_state', get_lang('GroupDocument'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE);
191 191
 $group[] = $form->createElement('radio', 'doc_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC);
192 192
 $group[] = $form->createElement('radio', 'doc_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE);
193
-$form->addGroup($group, '', Display::return_icon('folder.png', get_lang('GroupDocument') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupDocument'), '', false);
193
+$form->addGroup($group, '', Display::return_icon('folder.png', get_lang('GroupDocument'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupDocument'), '', false);
194 194
 
195 195
 // Work settings
196 196
 $group = array();
197 197
 $group[] = $form->createElement('radio', 'work_state', get_lang('GroupWork'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE);
198 198
 $group[] = $form->createElement('radio', 'work_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC);
199 199
 $group[] = $form->createElement('radio', 'work_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE);
200
-$form->addGroup($group, '', Display::return_icon('work.png', get_lang('GroupWork') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupWork'), '', false);
200
+$form->addGroup($group, '', Display::return_icon('work.png', get_lang('GroupWork'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupWork'), '', false);
201 201
 
202 202
 // Calendar settings
203 203
 $group = array();
204 204
 $group[] = $form->createElement('radio', 'calendar_state', get_lang('GroupCalendar'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE);
205 205
 $group[] = $form->createElement('radio', 'calendar_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC);
206 206
 $group[] = $form->createElement('radio', 'calendar_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE);
207
-$form->addGroup($group, '', Display::return_icon('agenda.png', get_lang('GroupCalendar') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupCalendar'), '', false);
207
+$form->addGroup($group, '', Display::return_icon('agenda.png', get_lang('GroupCalendar'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupCalendar'), '', false);
208 208
 
209 209
 // Announcements settings
210 210
 $group = array();
211 211
 $group[] = $form->createElement('radio', 'announcements_state', get_lang('GroupAnnouncements'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE);
212 212
 $group[] = $form->createElement('radio', 'announcements_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC);
213 213
 $group[] = $form->createElement('radio', 'announcements_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE);
214
-$form->addGroup($group, '', Display::return_icon('announce.png', get_lang('GroupAnnouncements') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupAnnouncements'), '', false);
214
+$form->addGroup($group, '', Display::return_icon('announce.png', get_lang('GroupAnnouncements'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupAnnouncements'), '', false);
215 215
 
216 216
 //Forum settings
217 217
 $group = array();
218 218
 $group[] = $form->createElement('radio', 'forum_state', get_lang('GroupForum'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE);
219 219
 $group[] = $form->createElement('radio', 'forum_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC);
220 220
 $group[] = $form->createElement('radio', 'forum_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE);
221
-$form->addGroup($group, '', Display::return_icon('forum.png', get_lang('GroupForum') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupForum'), '', false);
221
+$form->addGroup($group, '', Display::return_icon('forum.png', get_lang('GroupForum'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupForum'), '', false);
222 222
 
223 223
 // Wiki settings
224 224
 $group = array(
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     $form->createElement('radio', 'wiki_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC),
227 227
     $form->createElement('radio', 'wiki_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE)
228 228
 );
229
-$form->addGroup($group, '', Display::return_icon('wiki.png', get_lang('GroupWiki') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupWiki'), '', false);
229
+$form->addGroup($group, '', Display::return_icon('wiki.png', get_lang('GroupWiki'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupWiki'), '', false);
230 230
 
231 231
 // Chat settings
232 232
 $group = array(
Please login to merge, or discard this patch.
main/group/tutor_settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 require_once '../inc/global.inc.php';
15 15
 $this_section = SECTION_COURSES;
16
-$current_course_tool  = TOOL_GROUP;
16
+$current_course_tool = TOOL_GROUP;
17 17
 
18 18
 // Notice for unauthorized people.
19 19
 api_protect_course_script(true);
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 $current_group = GroupManager :: get_group_properties($group_id);
23 23
 
24 24
 $nameTools = get_lang('EditGroup');
25
-$interbreadcrumb[] = array ('url' => 'group.php?'.api_get_cidReq(), 'name' => get_lang('Groups'));
26
-$interbreadcrumb[] = array ('url' => 'group_space.php?'.api_get_cidReq(), 'name' => $current_group['name']);
25
+$interbreadcrumb[] = array('url' => 'group.php?'.api_get_cidReq(), 'name' => get_lang('Groups'));
26
+$interbreadcrumb[] = array('url' => 'group_space.php?'.api_get_cidReq(), 'name' => $current_group['name']);
27 27
 
28 28
 $is_group_member = GroupManager :: is_tutor_of_group(api_get_user_id(), $group_id);
29 29
 
Please login to merge, or discard this patch.
main/group/group_category.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     isset ($_GET['action']) ||
19 19
     isset ($_POST['action']))
20 20
 ) {
21
-	api_not_allowed();
21
+    api_not_allowed();
22 22
 }
23 23
 
24 24
 /**
@@ -86,30 +86,30 @@  discard block
 block discarded – undo
86 86
 
87 87
 // Build the form
88 88
 if (isset($_GET['id'])) {
89
-	// Update settings of existing category
90
-	$action = 'update_settings';
89
+    // Update settings of existing category
90
+    $action = 'update_settings';
91 91
     $form = new FormValidator(
92 92
         'group_category',
93 93
         'post',
94 94
         api_get_self().'?id='.$category['id'].'&'.api_get_cidReq()
95 95
     );
96
-	$form->addElement('hidden', 'id');
96
+    $form->addElement('hidden', 'id');
97 97
 } else {
98 98
     // Checks if the field was created in the table Category. It creates it if is neccesary
99 99
     $table_category = Database :: get_course_table(TABLE_GROUP_CATEGORY);
100 100
     if (!Database::query("SELECT wiki_state FROM $table_category WHERE c_id = $course_id")) {
101 101
         Database::query("ALTER TABLE $table_category ADD wiki_state tinyint(3) UNSIGNED NOT NULL default '1' WHERE c_id = $course_id");
102 102
     }
103
-	// Create a new category
104
-	$action = 'add_category';
105
-	$form = new FormValidator('group_category');
103
+    // Create a new category
104
+    $action = 'add_category';
105
+    $form = new FormValidator('group_category');
106 106
 }
107 107
 
108 108
 // If categories allowed, show title & description field
109 109
 if (api_get_setting('allow_group_categories') == 'true') {
110 110
     $form->addElement('header', $nameTools);
111 111
     $form->addElement('html', '<div class="row"><div class="col-md-6">');
112
-	$form->addText('title', get_lang('Title'));
112
+    $form->addText('title', get_lang('Title'));
113 113
 
114 114
     // Groups per user
115 115
     $possible_values = array();
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
     $form->addElement('html', '</div>');
143 143
     $form->addElement('html', '</div>');
144 144
 } else {
145
-	$form->addElement('hidden', 'title');
146
-	$form->addElement('hidden', 'description');
145
+    $form->addElement('hidden', 'title');
146
+    $form->addElement('hidden', 'description');
147 147
 }
148 148
 
149 149
 $form->addElement('header', get_lang('DefaultSettingsForNewGroups'));
@@ -228,17 +228,17 @@  discard block
 block discarded – undo
228 228
 if ($form->validate()) {
229 229
     $values = $form->exportValues();
230 230
     if ($values['max_member_no_limit'] == GroupManager::MEMBER_PER_GROUP_NO_LIMIT) {
231
-		$max_member = GroupManager::MEMBER_PER_GROUP_NO_LIMIT;
232
-	} else {
233
-		$max_member = $values['max_member'];
234
-	}
231
+        $max_member = GroupManager::MEMBER_PER_GROUP_NO_LIMIT;
232
+    } else {
233
+        $max_member = $values['max_member'];
234
+    }
235 235
 
236
-	$self_reg_allowed = isset($values['self_reg_allowed']) ? $values['self_reg_allowed'] : 0;
237
-	$self_unreg_allowed = isset($values['self_unreg_allowed']) ? $values['self_unreg_allowed'] : 0;
236
+    $self_reg_allowed = isset($values['self_reg_allowed']) ? $values['self_reg_allowed'] : 0;
237
+    $self_unreg_allowed = isset($values['self_unreg_allowed']) ? $values['self_unreg_allowed'] : 0;
238 238
 
239
-	switch ($values['action']) {
240
-		case 'update_settings':
241
-			GroupManager::update_category(
239
+    switch ($values['action']) {
240
+        case 'update_settings':
241
+            GroupManager::update_category(
242 242
                 $values['id'],
243 243
                 $values['title'],
244 244
                 $values['description'],
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
             Display::addFlash(Display::return_message(get_lang('GroupPropertiesModified')));
258 258
             header("Location: ".$currentUrl."&category=".$values['id']);
259 259
             exit;
260
-		case 'add_category':
261
-			GroupManager :: create_category(
260
+        case 'add_category':
261
+            GroupManager :: create_category(
262 262
                 $values['title'],
263 263
                 $values['description'],
264 264
                 $values['doc_state'],
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
             Display::addFlash(Display::return_message(get_lang('CategoryCreated')));
277 277
             header("Location: ".$currentUrl);
278 278
             exit;
279
-			break;
280
-	}
279
+            break;
280
+    }
281 281
 }
282 282
 
283 283
 // Else display the form
@@ -292,10 +292,10 @@  discard block
 block discarded – undo
292 292
 $defaults = $category;
293 293
 $defaults['action'] = $action;
294 294
 if ($defaults['max_student'] == GroupManager::MEMBER_PER_GROUP_NO_LIMIT) {
295
-	$defaults['max_member_no_limit'] = GroupManager::MEMBER_PER_GROUP_NO_LIMIT;
295
+    $defaults['max_member_no_limit'] = GroupManager::MEMBER_PER_GROUP_NO_LIMIT;
296 296
 } else {
297
-	$defaults['max_member_no_limit'] = 1;
298
-	$defaults['max_member'] = $defaults['max_student'];
297
+    $defaults['max_member_no_limit'] = 1;
298
+    $defaults['max_member'] = $defaults['max_student'];
299 299
 }
300 300
 $form->setDefaults($defaults);
301 301
 $form->display();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@  discard block
 block discarded – undo
7 7
 
8 8
 require_once '../inc/global.inc.php';
9 9
 $this_section = SECTION_COURSES;
10
-$current_course_tool  = TOOL_GROUP;
10
+$current_course_tool = TOOL_GROUP;
11 11
 
12 12
 // Notice for unauthorized people.
13 13
 api_protect_course_script(true);
14 14
 
15
-if (!api_is_allowed_to_edit(false,true) ||
15
+if (!api_is_allowed_to_edit(false, true) ||
16 16
     !(isset ($_GET['id']) ||
17 17
     isset ($_POST['id']) ||
18 18
     isset ($_GET['action']) ||
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             'groups_per_user' => 1,
60 60
             'doc_state' => GroupManager::TOOL_PRIVATE,
61 61
             'work_state' => GroupManager::TOOL_PRIVATE,
62
-            'wiki_state' => GroupManager::TOOL_PRIVATE ,
62
+            'wiki_state' => GroupManager::TOOL_PRIVATE,
63 63
             'chat_state' => GroupManager::TOOL_PRIVATE,
64 64
             'calendar_state' => GroupManager::TOOL_PRIVATE,
65 65
             'announcements_state'=> GroupManager::TOOL_PRIVATE,
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
     // Groups per user
115 115
     $possible_values = array();
116
-    for ($i = 1; $i <= 10; $i ++) {
116
+    for ($i = 1; $i <= 10; $i++) {
117 117
         $possible_values[$i] = $i;
118 118
     }
119 119
     $possible_values[GroupManager::GROUP_PER_MEMBER_NO_LIMIT] = get_lang('All');
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
     $form->addElement('html', '<div class="col-md-6">');
140 140
     // Description
141
-    $form->addElement('textarea', 'description', get_lang('Description'), array ('rows' => 6));
141
+    $form->addElement('textarea', 'description', get_lang('Description'), array('rows' => 6));
142 142
     $form->addElement('html', '</div>');
143 143
     $form->addElement('html', '</div>');
144 144
 } else {
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 // actions bar
287 287
 echo '<div class="actions">';
288 288
 echo '<a href="group.php">'.
289
-    Display::return_icon('back.png', get_lang('BackToGroupList'),'',ICON_SIZE_MEDIUM).'</a>';
289
+    Display::return_icon('back.png', get_lang('BackToGroupList'), '', ICON_SIZE_MEDIUM).'</a>';
290 290
 echo '</div>';
291 291
 
292 292
 $defaults = $category;
Please login to merge, or discard this patch.
main/group/member_settings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 require_once '../inc/global.inc.php';
15 15
 $this_section = SECTION_COURSES;
16
-$current_course_tool  = TOOL_GROUP;
16
+$current_course_tool = TOOL_GROUP;
17 17
 
18 18
 // Notice for unauthorized people.
19 19
 api_protect_course_script(true);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 // Group members
163 163
 $group_member_list = GroupManager::get_subscribed_users($current_group['id']);
164 164
 
165
-$selected_users = array ();
165
+$selected_users = array();
166 166
 if (!empty($group_member_list)) {
167 167
     foreach ($group_member_list as $index => $user) {
168 168
         $selected_users[] = $user['user_id'];
Please login to merge, or discard this patch.
main/dropbox/dropbox_download.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
             'error'
90 90
         )
91 91
     );
92
-	exit;
92
+    exit;
93 93
 } else {
94 94
     /*      DOWNLOAD THE FILE */
95 95
     // the user is allowed to download the file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 ON (post.file_id = file.id AND post.c_id = $course_id AND file.c_id = $course_id)
51 51
                 WHERE
52 52
                     post.cat_id = ".intval($_GET['cat_id'])." AND
53
-                    post.dest_user_id = $user_id" ;
53
+                    post.dest_user_id = $user_id";
54 54
     }
55 55
     $files_to_download = array();
56 56
     $result = Database::query($sql);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     $_SESSION['_seen'][$_course['id']][TOOL_DROPBOX][] = intval($_GET['id']);
97 97
 
98 98
     $work = new Dropbox_Work($_GET['id']);
99
-    $path = dropbox_cnf('sysPath') . '/' . $work -> filename; //path to file as stored on server
99
+    $path = dropbox_cnf('sysPath').'/'.$work -> filename; //path to file as stored on server
100 100
 
101 101
     if (!Security::check_abs_path($path, dropbox_cnf('sysPath').'/')) {
102 102
         exit;
Please login to merge, or discard this patch.