@@ -7,12 +7,12 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -13,7 +13,7 @@ discard block |
||
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 |
||
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']; |
@@ -50,7 +50,7 @@ discard block |
||
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 |
||
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; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $action = isset($_GET['action']) ? $_GET['action'] : null; |
185 | 185 | |
186 | 186 | // Do some sanity checks |
187 | - $id = intval($id); |
|
187 | + $id = intval($id); |
|
188 | 188 | |
189 | 189 | // Get the data from DB |
190 | 190 | $sql = "SELECT uploader_id, filename, filesize, title, description, author, upload_date, last_upload_date, cat_id |
@@ -226,14 +226,14 @@ discard block |
||
226 | 226 | $row_feedback['feedback'] = Security::remove_XSS($row_feedback['feedback']); |
227 | 227 | $feedback2[] = $row_feedback; |
228 | 228 | } |
229 | - $this->feedback2= $feedback2; |
|
229 | + $this->feedback2 = $feedback2; |
|
230 | 230 | } |
231 | 231 | } |
232 | 232 | } |
233 | 233 | |
234 | 234 | class Dropbox_SentWork extends Dropbox_Work |
235 | 235 | { |
236 | - public $recipients; //array of ['id']['name'] arrays |
|
236 | + public $recipients; //array of ['id']['name'] arrays |
|
237 | 237 | |
238 | 238 | /** |
239 | 239 | * Constructor calls private functions to create a new work or retreive an existing work from DB |
@@ -290,15 +290,15 @@ discard block |
||
290 | 290 | settype($uploader_id, 'integer') or die(get_lang('GeneralError').' (code 208)'); // Set $uploader_id to correct type |
291 | 291 | |
292 | 292 | $justSubmit = false; |
293 | - if ( is_int($recipient_ids)) { |
|
293 | + if (is_int($recipient_ids)) { |
|
294 | 294 | $justSubmit = true; |
295 | 295 | $recipient_ids = array($recipient_ids + $this->id); |
296 | - } elseif ( count($recipient_ids) == 0) { |
|
296 | + } elseif (count($recipient_ids) == 0) { |
|
297 | 297 | $justSubmit = true; |
298 | 298 | $recipient_ids = array($uploader_id); |
299 | 299 | } |
300 | 300 | |
301 | - if (! is_array($recipient_ids) || count($recipient_ids) == 0) { |
|
301 | + if (!is_array($recipient_ids) || count($recipient_ids) == 0) { |
|
302 | 302 | die(get_lang('GeneralError').' (code 209)'); |
303 | 303 | } |
304 | 304 | |
@@ -313,11 +313,11 @@ discard block |
||
313 | 313 | $table_person = $dropbox_cnf['tbl_person']; |
314 | 314 | $session_id = api_get_session_id(); |
315 | 315 | $uploader_id = $this->uploader_id; |
316 | - $user = api_get_user_id(); |
|
316 | + $user = api_get_user_id(); |
|
317 | 317 | // Insert data in dropbox_post and dropbox_person table for each recipient |
318 | 318 | foreach ($this->recipients as $rec) { |
319 | - $file_id = (int)$this->id; |
|
320 | - $user_id = (int)$rec['id']; |
|
319 | + $file_id = (int) $this->id; |
|
320 | + $user_id = (int) $rec['id']; |
|
321 | 321 | $sql = "INSERT INTO $table_post (c_id, file_id, dest_user_id, session_id) |
322 | 322 | VALUES ($course_id, $file_id, $user_id, $session_id)"; |
323 | 323 | Database::query($sql); |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | |
334 | 334 | // Do not add recipient in person table if mailing zip or just upload. |
335 | 335 | if (!$justSubmit) { |
336 | - Database::query($sql); // If work already exists no error is generated |
|
336 | + Database::query($sql); // If work already exists no error is generated |
|
337 | 337 | } |
338 | 338 | } |
339 | 339 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | $ownerid = getUserOwningThisMailing($ownerid); |
343 | 343 | } |
344 | 344 | if (($recipid = $rec["id"]) > $dropbox_cnf['mailingIdBase']) { |
345 | - $recipid = $ownerid; // mailing file recipient = mailing id, not a person |
|
345 | + $recipid = $ownerid; // mailing file recipient = mailing id, not a person |
|
346 | 346 | } |
347 | 347 | api_item_property_update( |
348 | 348 | $_course, |
@@ -401,13 +401,13 @@ discard block |
||
401 | 401 | class Dropbox_Person |
402 | 402 | { |
403 | 403 | // The receivedWork and the sentWork arrays are sorted. |
404 | - public $receivedWork; // an array of Dropbox_Work objects |
|
405 | - public $sentWork; // an array of Dropbox_SentWork objects |
|
404 | + public $receivedWork; // an array of Dropbox_Work objects |
|
405 | + public $sentWork; // an array of Dropbox_SentWork objects |
|
406 | 406 | |
407 | 407 | public $userId = 0; |
408 | 408 | public $isCourseAdmin = false; |
409 | 409 | public $isCourseTutor = false; |
410 | - public $_orderBy = ''; // private property that determines by which field |
|
410 | + public $_orderBy = ''; // private property that determines by which field |
|
411 | 411 | |
412 | 412 | /** |
413 | 413 | * Constructor for recreating the Dropbox_Person object |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | */ |
507 | 507 | function orderSentWork($sort) |
508 | 508 | { |
509 | - switch($sort) { |
|
509 | + switch ($sort) { |
|
510 | 510 | case 'lastDate': |
511 | 511 | $this->_orderBy = 'last_upload_date'; |
512 | 512 | break; |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | */ |
540 | 540 | function orderReceivedWork($sort) |
541 | 541 | { |
542 | - switch($sort) { |
|
542 | + switch ($sort) { |
|
543 | 543 | case 'lastDate': |
544 | 544 | $this->_orderBy = 'last_upload_date'; |
545 | 545 | break; |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | $sql = "DELETE FROM ".$dropbox_cnf['tbl_person']." |
633 | 633 | WHERE c_id = $course_id AND user_id = '".$this->userId."' AND file_id ='".$id."'"; |
634 | 634 | Database::query($sql); |
635 | - removeUnusedFiles(); // Check for unused files |
|
635 | + removeUnusedFiles(); // Check for unused files |
|
636 | 636 | } |
637 | 637 | |
638 | 638 | /** |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | Database::query($sql); |
650 | 650 | removeMoreIfMailing($w->id); |
651 | 651 | } |
652 | - removeUnusedFiles(); // Check for unused files |
|
652 | + removeUnusedFiles(); // Check for unused files |
|
653 | 653 | } |
654 | 654 | |
655 | 655 | /** |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | WHERE c_id = $course_id AND user_id='".$this->userId."' AND file_id='".$id."'"; |
684 | 684 | Database::query($sql); |
685 | 685 | removeMoreIfMailing($id); |
686 | - removeUnusedFiles(); // Check for unused files |
|
686 | + removeUnusedFiles(); // Check for unused files |
|
687 | 687 | } |
688 | 688 | |
689 | 689 | /** |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | $wi = -1; |
706 | 706 | foreach ($this->receivedWork as $w) { |
707 | 707 | $wi++; |
708 | - if ($w->id == $id){ |
|
708 | + if ($w->id == $id) { |
|
709 | 709 | $found = true; |
710 | 710 | break; |
711 | 711 | } // foreach (... as $wi -> $w) gives error 221! (no idea why...) |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | */ |
19 | 19 | $dropbox_cnf['courseId'] = $_cid; |
20 | 20 | //path to dropbox subdir in course containing the uploaded files |
21 | -$dropbox_cnf['sysPath'] = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/dropbox'; |
|
22 | -$dropbox_cnf['webPath'] = api_get_path(WEB_COURSE_PATH) . $_course['path'] . '/dropbox'; |
|
21 | +$dropbox_cnf['sysPath'] = api_get_path(SYS_COURSE_PATH).$_course['path'].'/dropbox'; |
|
22 | +$dropbox_cnf['webPath'] = api_get_path(WEB_COURSE_PATH).$_course['path'].'/dropbox'; |
|
23 | 23 | |
24 | 24 | //file size limit as imposed by the platform admin (see Chamilo Config Settings on the platform administration section) |
25 | 25 | $dropbox_cnf['maxFilesize'] = api_get_setting('dropbox_max_filesize'); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | // false = no mailing functionality |
35 | 35 | $dropbox_cnf['allowMailing'] = api_string_2_boolean(api_get_setting('dropbox_allow_mailing')); |
36 | -$dropbox_cnf['mailingIdBase'] = 10000000; // bigger than any user_id, |
|
36 | +$dropbox_cnf['mailingIdBase'] = 10000000; // bigger than any user_id, |
|
37 | 37 | // allowing enough space for pseudo_ids as uploader_id, dest_user_id, user_id: |
38 | 38 | // mailing pseudo_id = dropbox_cnf('mailingIdBase') + mailing id |
39 | 39 | $dropbox_cnf['mailingZipRegexp'] = '/^(.*)(STUDENTID|USERID|LOGINNAME)(.*)\.ZIP$/i'; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | // current section |
15 | 15 | $this_section = SECTION_COURSES; |
16 | 16 | |
17 | -$current_course_tool = TOOL_COURSE_PROGRESS; |
|
17 | +$current_course_tool = TOOL_COURSE_PROGRESS; |
|
18 | 18 | |
19 | 19 | // protect a course script |
20 | 20 | api_protect_course_script(true); |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | 'thematic_advance_delete' |
47 | 47 | ); |
48 | 48 | |
49 | -$action = 'thematic_details'; |
|
50 | -if (isset($_GET['action']) && in_array($_GET['action'],$actions)) { |
|
49 | +$action = 'thematic_details'; |
|
50 | +if (isset($_GET['action']) && in_array($_GET['action'], $actions)) { |
|
51 | 51 | $action = $_GET['action']; |
52 | 52 | } |
53 | 53 | |
@@ -182,21 +182,21 @@ discard block |
||
182 | 182 | </script>'; |
183 | 183 | |
184 | 184 | if ($action == 'thematic_list') { |
185 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl')); |
|
185 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ThematicControl')); |
|
186 | 186 | } |
187 | 187 | if ($action == 'thematic_add') { |
188 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
189 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicSection')); |
|
188 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
189 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewThematicSection')); |
|
190 | 190 | } |
191 | 191 | if ($action == 'thematic_edit') { |
192 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
193 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('EditThematicSection')); |
|
192 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
193 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditThematicSection')); |
|
194 | 194 | } |
195 | 195 | if ($action == 'thematic_details') { |
196 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl')); |
|
196 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ThematicControl')); |
|
197 | 197 | } |
198 | 198 | if ($action == 'thematic_plan_list' || $action == 'thematic_plan_delete') { |
199 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
199 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
200 | 200 | if (!empty($thematic_data)) { |
201 | 201 | $interbreadcrumb[] = array( |
202 | 202 | 'url' => '#', |
@@ -205,22 +205,22 @@ discard block |
||
205 | 205 | } |
206 | 206 | } |
207 | 207 | if ($action == 'thematic_plan_add' || $action == 'thematic_plan_edit') { |
208 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
209 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicPlan').' ('.$thematic_data['title'].')'); |
|
208 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
209 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicPlan').' ('.$thematic_data['title'].')'); |
|
210 | 210 | if ($description_type >= ADD_THEMATIC_PLAN) { |
211 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewBloc')); |
|
211 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewBloc')); |
|
212 | 212 | } else { |
213 | - $interbreadcrumb[] = array ('url' => '#', 'name' => $default_thematic_plan_title[$description_type]); |
|
213 | + $interbreadcrumb[] = array('url' => '#', 'name' => $default_thematic_plan_title[$description_type]); |
|
214 | 214 | } |
215 | 215 | } |
216 | 216 | if ($action == 'thematic_advance_list' || $action == 'thematic_advance_delete') { |
217 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
218 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')'); |
|
217 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
218 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')'); |
|
219 | 219 | } |
220 | 220 | if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') { |
221 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
222 | - $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')'); |
|
223 | - $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicAdvance')); |
|
221 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl')); |
|
222 | + $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')'); |
|
223 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewThematicAdvance')); |
|
224 | 224 | } |
225 | 225 | |
226 | 226 | // Distpacher actions to controller |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | case 'thematic_import': |
235 | 235 | case 'moveup': |
236 | 236 | case 'movedown': |
237 | - if (!api_is_allowed_to_edit(null,true)) { |
|
237 | + if (!api_is_allowed_to_edit(null, true)) { |
|
238 | 238 | api_not_allowed(); |
239 | 239 | } |
240 | 240 | case 'thematic_list': |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | case 'thematic_plan_add': |
247 | 247 | case 'thematic_plan_edit': |
248 | 248 | case 'thematic_plan_delete': |
249 | - if (!api_is_allowed_to_edit(null,true)) { |
|
249 | + if (!api_is_allowed_to_edit(null, true)) { |
|
250 | 250 | api_not_allowed(); |
251 | 251 | } |
252 | 252 | case 'thematic_plan_list': |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | case 'thematic_advance_add': |
256 | 256 | case 'thematic_advance_edit': |
257 | 257 | case 'thematic_advance_delete': |
258 | - if (!api_is_allowed_to_edit(null,true)) { |
|
258 | + if (!api_is_allowed_to_edit(null, true)) { |
|
259 | 259 | api_not_allowed(); |
260 | 260 | } |
261 | 261 | case 'thematic_advance_list': |
@@ -201,20 +201,20 @@ discard block |
||
201 | 201 | $plan_html = null; |
202 | 202 | if (!empty($data)) { |
203 | 203 | foreach ($data as $plan) { |
204 | - $plan_html .= '<strong>' . $plan['title'] . '</strong><br /> ' . $plan['description'] . '<br />'; |
|
204 | + $plan_html .= '<strong>'.$plan['title'].'</strong><br /> '.$plan['description'].'<br />'; |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | $data = $thematic->get_thematic_advance_by_thematic_id($theme['id']); |
208 | 208 | $advance_html = null; |
209 | 209 | if (!empty($data)) { |
210 | 210 | foreach ($data as $advance) { |
211 | - $advance_html .= api_convert_and_format_date($advance['start_date'], DATE_FORMAT_LONG) . ' ('.$advance['duration'].' '.get_lang('HourShort').')<br />'.$advance['content'].'<br />'; |
|
211 | + $advance_html .= api_convert_and_format_date($advance['start_date'], DATE_FORMAT_LONG).' ('.$advance['duration'].' '.get_lang('HourShort').')<br />'.$advance['content'].'<br />'; |
|
212 | 212 | } |
213 | 213 | } |
214 | 214 | $table[] = array($theme['title'], $plan_html, $advance_html); |
215 | 215 | } |
216 | 216 | $params = array( |
217 | - 'filename' => get_lang('Thematic') . '-' . api_get_local_time(), |
|
217 | + 'filename' => get_lang('Thematic').'-'.api_get_local_time(), |
|
218 | 218 | 'pdf_title' => get_lang('Thematic'), |
219 | 219 | 'add_signatures' => true, |
220 | 220 | 'format' => 'A4-L', |
@@ -311,9 +311,9 @@ discard block |
||
311 | 311 | unset($_SESSION['thematic_plan_token']); |
312 | 312 | $data['message'] = 'ok'; |
313 | 313 | |
314 | - $saveRedirect = api_get_path(WEB_PATH) . 'main/course_progress/index.php?'; |
|
315 | - $saveRedirect.= api_get_cidreq() . '&'; |
|
316 | - $saveRedirect.= 'thematic_plan_save_message=ok'; |
|
314 | + $saveRedirect = api_get_path(WEB_PATH).'main/course_progress/index.php?'; |
|
315 | + $saveRedirect .= api_get_cidreq().'&'; |
|
316 | + $saveRedirect .= 'thematic_plan_save_message=ok'; |
|
317 | 317 | |
318 | 318 | header("Location: $saveRedirect"); |
319 | 319 | exit; |
@@ -25,15 +25,15 @@ discard block |
||
25 | 25 | 'index.php?action=thematic_advance_list&thematic_id='.$thematic_id.'&'.api_get_cidreq( |
26 | 26 | ) |
27 | 27 | ); |
28 | - $form->addElement('header', $header_form); |
|
28 | + $form->addElement('header', $header_form); |
|
29 | 29 | //$form->addElement('hidden', 'thematic_advance_token',$token); |
30 | 30 | $form->addElement('hidden', 'action', $action); |
31 | 31 | |
32 | 32 | if (!empty($thematic_advance_id)) { |
33 | - $form->addElement('hidden', 'thematic_advance_id',$thematic_advance_id); |
|
33 | + $form->addElement('hidden', 'thematic_advance_id', $thematic_advance_id); |
|
34 | 34 | } |
35 | 35 | if (!empty($thematic_id)) { |
36 | - $form->addElement('hidden', 'thematic_id',$thematic_id); |
|
36 | + $form->addElement('hidden', 'thematic_id', $thematic_id); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | $radios = array(); |
@@ -176,10 +176,10 @@ discard block |
||
176 | 176 | // thematic advance list |
177 | 177 | echo '<div class="actions">'; |
178 | 178 | echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=thematic_details">'. |
179 | - Display::return_icon('back.png', get_lang("BackTo"),'',ICON_SIZE_MEDIUM).'</a>'; |
|
179 | + Display::return_icon('back.png', get_lang("BackTo"), '', ICON_SIZE_MEDIUM).'</a>'; |
|
180 | 180 | if (api_is_allowed_to_edit(false, true)) { |
181 | 181 | echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=thematic_advance_add&thematic_id='.$thematic_id.'"> '. |
182 | - Display::return_icon('add.png', get_lang('NewThematicAdvance'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
182 | + Display::return_icon('add.png', get_lang('NewThematicAdvance'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
183 | 183 | } |
184 | 184 | echo '</div>'; |
185 | 185 | $table = new SortableTable( |
@@ -10,21 +10,21 @@ discard block |
||
10 | 10 | // actions menu |
11 | 11 | $new_thematic_plan_data = array(); |
12 | 12 | if (!empty($thematic_plan_data)) |
13 | -foreach($thematic_plan_data as $thematic_item) { |
|
13 | +foreach ($thematic_plan_data as $thematic_item) { |
|
14 | 14 | $thematic_simple_list[] = $thematic_item['description_type']; |
15 | 15 | $new_thematic_plan_data[$thematic_item['description_type']] = $thematic_item; |
16 | 16 | } |
17 | 17 | |
18 | 18 | $new_id = ADD_THEMATIC_PLAN; |
19 | 19 | if (!empty($thematic_simple_list)) |
20 | -foreach($thematic_simple_list as $item) { |
|
20 | +foreach ($thematic_simple_list as $item) { |
|
21 | 21 | if ($item >= ADD_THEMATIC_PLAN) { |
22 | 22 | $new_id = $item + 1; |
23 | 23 | $default_thematic_plan_title[$item] = $new_thematic_plan_data[$item]['title']; |
24 | 24 | } |
25 | 25 | } |
26 | 26 | |
27 | -$i=1; |
|
27 | +$i = 1; |
|
28 | 28 | |
29 | 29 | echo Display::tag('h2', $thematic_data['title']); |
30 | 30 | echo $thematic_data['content']; |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | $thematic_plan = null; |
67 | 67 | } else { |
68 | 68 | $thematic_plan = null; |
69 | - $default['title['.$id.']'] = $title; |
|
70 | - $default['description['.$id.']']= ''; |
|
69 | + $default['title['.$id.']'] = $title; |
|
70 | + $default['description['.$id.']'] = ''; |
|
71 | 71 | } |
72 | 72 | $form->setDefaults($default); |
73 | 73 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $header_form = $default_thematic_plan_title[$description_type]; |
81 | 81 | } |
82 | 82 | if (!$error) { |
83 | - $token = md5(uniqid(rand(),TRUE)); |
|
83 | + $token = md5(uniqid(rand(), TRUE)); |
|
84 | 84 | $_SESSION['thematic_plan_token'] = $token; |
85 | 85 | } |
86 | 86 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | // error messages |
137 | 137 | if ($error) { |
138 | - Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false); |
|
138 | + Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false); |
|
139 | 139 | } |
140 | 140 | $form->display(); |
141 | 141 | } |