@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | |
19 | 19 | if (isset($_GET['extra_field'])) { |
20 | 20 | $extraField = $em->find('ChamiloCoreBundle:ExtraField', intval($_GET['extra_field'])); |
21 | - $variableLanguage = '$' . api_underscore_to_camel_case($extraField->getVariable()); |
|
21 | + $variableLanguage = '$'.api_underscore_to_camel_case($extraField->getVariable()); |
|
22 | 22 | $originalName = $extraField->getDisplayText(false); |
23 | 23 | } elseif (isset($_GET['extra_field_option'])) { |
24 | 24 | $extraFieldOption = $em->find('ChamiloCoreBundle:ExtraFieldOptions', intval($_GET['extra_field_option'])); |
25 | 25 | $extraField = $extraFieldOption->getField(); |
26 | - $variableLanguage = '$' . ExtraFieldOption::getLanguageVariable($extraFieldOption->getDisplayText()); |
|
26 | + $variableLanguage = '$'.ExtraFieldOption::getLanguageVariable($extraFieldOption->getDisplayText()); |
|
27 | 27 | $originalName = $extraFieldOption->getDisplayText(false); |
28 | 28 | } |
29 | 29 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $languagesOptions[$language->getId()] = $language->getOriginalName(); |
44 | 44 | } |
45 | 45 | |
46 | -$translateUrl = api_get_path(WEB_CODE_PATH) . 'admin/sub_language_ajax.inc.php'; |
|
46 | +$translateUrl = api_get_path(WEB_CODE_PATH).'admin/sub_language_ajax.inc.php'; |
|
47 | 47 | |
48 | 48 | $form = new FormValidator('new_lang_variable', 'POST', $translateUrl); |
49 | 49 | $form->addHeader(get_lang('AddWordForTheSubLanguage')); |
@@ -72,24 +72,24 @@ discard block |
||
72 | 72 | $form->addRule('sub_language', get_lang('Required'), 'required'); |
73 | 73 | $form->freeze(['variable_language', 'original_name']); |
74 | 74 | |
75 | -$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH) . 'admin', 'name' => get_lang('Administration')]; |
|
75 | +$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'admin', 'name' => get_lang('Administration')]; |
|
76 | 76 | |
77 | 77 | switch ($extraField->getExtraFieldType()) { |
78 | 78 | case ExtraField::USER_FIELD_TYPE: |
79 | 79 | $interbreadcrumb[] = [ |
80 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/extra_fields.php?type=user', |
|
80 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type=user', |
|
81 | 81 | 'name' => get_lang('UserFields') |
82 | 82 | ]; |
83 | 83 | break; |
84 | 84 | case ExtraField::COURSE_FIELD_TYPE: |
85 | 85 | $interbreadcrumb[] = [ |
86 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/extra_fields.php?type=course', |
|
86 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type=course', |
|
87 | 87 | 'name' => get_lang('CourseFields') |
88 | 88 | ]; |
89 | 89 | break; |
90 | 90 | case ExtraField::SESSION_FIELD_TYPE: |
91 | 91 | $interbreadcrumb[] = [ |
92 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/extra_fields.php?type=session', |
|
92 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type=session', |
|
93 | 93 | 'name' => get_lang('SessionFields') |
94 | 94 | ]; |
95 | 95 | break; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $.ajax({ |
40 | 40 | contentType: "application/x-www-form-urlencoded", |
41 | 41 | data: "dirValue="+dirValue, |
42 | - url: "' . api_get_path(WEB_AJAX_PATH) . 'document.ajax.php?a=document_destination", |
|
42 | + url: "' . api_get_path(WEB_AJAX_PATH).'document.ajax.php?a=document_destination", |
|
43 | 43 | type: "POST", |
44 | 44 | success: function(response) { |
45 | 45 | $("[name=\'dirValue\']").val(response) |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | $doc_tree = explode('/', $dir); |
150 | -$count_dir = count($doc_tree) -2; // "2" because at the begin and end there are 2 "/" |
|
150 | +$count_dir = count($doc_tree) - 2; // "2" because at the begin and end there are 2 "/" |
|
151 | 151 | |
152 | 152 | if (api_is_in_group()) { |
153 | 153 | $group_properties = GroupManager::get_group_properties(api_get_group_id()); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $relative_url .= '../'; |
163 | 163 | } |
164 | 164 | |
165 | -if ($relative_url== '') { |
|
165 | +if ($relative_url == '') { |
|
166 | 166 | $relative_url = '/'; |
167 | 167 | } |
168 | 168 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | "name" => get_lang('Documents'), |
215 | 215 | ); |
216 | 216 | } else { |
217 | - $interbreadcrumb[]= array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook')); |
|
217 | + $interbreadcrumb[] = array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook')); |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | if (!api_is_allowed_in_course()) { |
@@ -253,9 +253,9 @@ discard block |
||
253 | 253 | $form->addElement('header', $nameTools); |
254 | 254 | |
255 | 255 | if ($is_certificate_mode) {//added condition for certicate in gradebook |
256 | - $form->addElement('hidden','certificate','true',array('id'=>'certificate')); |
|
256 | + $form->addElement('hidden', 'certificate', 'true', array('id'=>'certificate')); |
|
257 | 257 | if (isset($_GET['selectcat'])) { |
258 | - $form->addElement('hidden','selectcat', $select_cat); |
|
258 | + $form->addElement('hidden', 'selectcat', $select_cat); |
|
259 | 259 | } |
260 | 260 | } |
261 | 261 | |
@@ -334,19 +334,19 @@ discard block |
||
334 | 334 | $escaped_folders = array(); |
335 | 335 | foreach ($folders as $key => & $val) { |
336 | 336 | // Hide some folders |
337 | - if ($val=='/HotPotatoes_files' || $val=='/certificates' || basename($val)=='css'){ |
|
337 | + if ($val == '/HotPotatoes_files' || $val == '/certificates' || basename($val) == 'css') { |
|
338 | 338 | continue; |
339 | 339 | } |
340 | 340 | // Admin setting for Hide/Show the folders of all users |
341 | - if (api_get_setting('show_users_folders') == 'false' && (strstr($val, '/shared_folder') || strstr($val, 'shared_folder_session_'))){ |
|
341 | + if (api_get_setting('show_users_folders') == 'false' && (strstr($val, '/shared_folder') || strstr($val, 'shared_folder_session_'))) { |
|
342 | 342 | continue; |
343 | 343 | } |
344 | 344 | // Admin setting for Hide/Show Default folders to all users |
345 | - if (api_get_setting('show_default_folders') == 'false' && ($val=='/images' || $val=='/flash' || $val=='/audio' || $val=='/video' || strstr($val, '/images/gallery') || $val=='/video/flv')){ |
|
345 | + if (api_get_setting('show_default_folders') == 'false' && ($val == '/images' || $val == '/flash' || $val == '/audio' || $val == '/video' || strstr($val, '/images/gallery') || $val == '/video/flv')) { |
|
346 | 346 | continue; |
347 | 347 | } |
348 | 348 | // Admin setting for Hide/Show chat history folder |
349 | - if (api_get_setting('show_chat_folder') == 'false' && $val=='/chat_files'){ |
|
349 | + if (api_get_setting('show_chat_folder') == 'false' && $val == '/chat_files') { |
|
350 | 350 | continue; |
351 | 351 | } |
352 | 352 | |
@@ -371,13 +371,13 @@ discard block |
||
371 | 371 | if (is_array($folders)) { |
372 | 372 | foreach ($folders as & $folder) { |
373 | 373 | //Hide some folders |
374 | - if ($folder=='/HotPotatoes_files' || $folder=='/certificates' || basename($folder)=='css') { |
|
374 | + if ($folder == '/HotPotatoes_files' || $folder == '/certificates' || basename($folder) == 'css') { |
|
375 | 375 | continue; |
376 | 376 | } |
377 | 377 | //Admin setting for Hide/Show the folders of all users |
378 | 378 | if (api_get_setting('show_users_folders') == 'false' && |
379 | 379 | (strstr($folder, '/shared_folder') || strstr($folder, 'shared_folder_session_')) |
380 | - ){ |
|
380 | + ) { |
|
381 | 381 | continue; |
382 | 382 | } |
383 | 383 | //Admin setting for Hide/Show Default folders to all users |
@@ -390,20 +390,20 @@ discard block |
||
390 | 390 | strstr($folder, '/images/gallery') || |
391 | 391 | $folder == '/video/flv' |
392 | 392 | ) |
393 | - ){ |
|
393 | + ) { |
|
394 | 394 | continue; |
395 | 395 | } |
396 | 396 | //Admin setting for Hide/Show chat history folder |
397 | 397 | if (api_get_setting('show_chat_folder') == 'false' && |
398 | - $folder=='/chat_files' |
|
399 | - ){ |
|
398 | + $folder == '/chat_files' |
|
399 | + ) { |
|
400 | 400 | continue; |
401 | 401 | } |
402 | 402 | |
403 | - $selected = (substr($dir,0,-1) == $folder) ? ' selected="selected"' : ''; |
|
403 | + $selected = (substr($dir, 0, -1) == $folder) ? ' selected="selected"' : ''; |
|
404 | 404 | $path_parts = explode('/', $folder); |
405 | 405 | $folder_titles[$folder] = cut($folder_titles[$folder], 80); |
406 | - $space_counter =count($path_parts) - 2; |
|
406 | + $space_counter = count($path_parts) - 2; |
|
407 | 407 | if ($space_counter > 0) { |
408 | 408 | $label = str_repeat(' ', $space_counter).' — '.$folder_titles[$folder]; |
409 | 409 | } else { |
@@ -421,11 +421,11 @@ discard block |
||
421 | 421 | $selected = (substr($dir, 0, -1) == $folder) ? ' selected="selected"' : ''; |
422 | 422 | $label = $folder_titles[$folder]; |
423 | 423 | if ($folder == $group_dir) { |
424 | - $label = '/ (' . get_lang('HomeDirectory') . ')'; |
|
424 | + $label = '/ ('.get_lang('HomeDirectory').')'; |
|
425 | 425 | } else { |
426 | 426 | $path_parts = explode('/', str_replace($group_dir, '', $folder)); |
427 | 427 | $label = cut($label, 80); |
428 | - $label = str_repeat(' ', count($path_parts) - 2) . ' — ' . $label; |
|
428 | + $label = str_repeat(' ', count($path_parts) - 2).' — '.$label; |
|
429 | 429 | } |
430 | 430 | $parent_select->addOption($label, $folder); |
431 | 431 | if ($selected != '') { |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | ); |
556 | 556 | } |
557 | 557 | } |
558 | - $dir= substr($dir,0,-1); |
|
558 | + $dir = substr($dir, 0, -1); |
|
559 | 559 | $selectcat = ''; |
560 | 560 | if (isset($_REQUEST['selectcat'])) { |
561 | 561 | $selectcat = "&selectcat=".intval($_REQUEST['selectcat']); |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | if ($is_certificate_mode) { |
565 | 565 | $df = DocumentManager::get_default_certificate_id($_course['code']); |
566 | 566 | if (!isset($df)) { |
567 | - DocumentManager::attach_gradebook_certificate($_course['code'],$document_id); |
|
567 | + DocumentManager::attach_gradebook_certificate($_course['code'], $document_id); |
|
568 | 568 | } |
569 | 569 | $certificate_condition = '&certificate=true&curdirpath=/certificates'; |
570 | 570 | } |
@@ -608,16 +608,16 @@ discard block |
||
608 | 608 | |
609 | 609 | // link back to the documents overview |
610 | 610 | if ($is_certificate_mode) { |
611 | - $actionsLeft = '<a href="document.php?certificate=true&id='.$folder_id.'&selectcat=' . Security::remove_XSS($_GET['selectcat']).'">'. |
|
612 | - Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
611 | + $actionsLeft = '<a href="document.php?certificate=true&id='.$folder_id.'&selectcat='.Security::remove_XSS($_GET['selectcat']).'">'. |
|
612 | + Display::return_icon('back.png', get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
613 | 613 | $actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'. |
614 | - Display::return_icon('expand.png',get_lang('Back'),array('id'=>'expand'),ICON_SIZE_MEDIUM).Display::return_icon('contract.png',get_lang('Back'),array('id'=>'contract', 'class'=>'hide'),ICON_SIZE_MEDIUM).'</a>'; |
|
614 | + Display::return_icon('expand.png', get_lang('Back'), array('id'=>'expand'), ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Back'), array('id'=>'contract', 'class'=>'hide'), ICON_SIZE_MEDIUM).'</a>'; |
|
615 | 615 | } else { |
616 | 616 | $actionsLeft = '<a href="document.php?curdirpath='.Security::remove_XSS($dir).'">'. |
617 | - Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
617 | + Display::return_icon('back.png', get_lang('Back').' '.get_lang('To').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
618 | 618 | $actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'. |
619 | - Display::return_icon('expand.png',get_lang('Expand'),array('id'=>'expand'),ICON_SIZE_MEDIUM). |
|
620 | - Display::return_icon('contract.png',get_lang('Collapse'),array('id'=>'contract', 'class'=>'hide'),ICON_SIZE_MEDIUM).'</a>'; |
|
619 | + Display::return_icon('expand.png', get_lang('Expand'), array('id'=>'expand'), ICON_SIZE_MEDIUM). |
|
620 | + Display::return_icon('contract.png', get_lang('Collapse'), array('id'=>'contract', 'class'=>'hide'), ICON_SIZE_MEDIUM).'</a>'; |
|
621 | 621 | } |
622 | 622 | |
623 | 623 | echo $toolbar = Display::toolbarAction('actions-documents', array($actionsLeft)); |
@@ -630,10 +630,10 @@ discard block |
||
630 | 630 | |
631 | 631 | $str_info = ''; |
632 | 632 | foreach ($all_information_by_create_certificate[0] as $info_value) { |
633 | - $str_info.=$info_value.'<br/>'; |
|
633 | + $str_info .= $info_value.'<br/>'; |
|
634 | 634 | } |
635 | 635 | $create_certificate = get_lang('CreateCertificateWithTags'); |
636 | - Display::display_normal_message($create_certificate.': <br /><br/>'.$str_info,false); |
|
636 | + Display::display_normal_message($create_certificate.': <br /><br/>'.$str_info, false); |
|
637 | 637 | } |
638 | 638 | |
639 | 639 | // HTML-editor |
@@ -79,10 +79,10 @@ discard block |
||
79 | 79 | $_user = api_get_user_info(); |
80 | 80 | $courseInfo = api_get_course_info(); |
81 | 81 | $courseId = $courseInfo['real_id']; |
82 | -$course_dir = $courseInfo['directory'] . '/document'; |
|
82 | +$course_dir = $courseInfo['directory'].'/document'; |
|
83 | 83 | $sys_course_path = api_get_path(SYS_COURSE_PATH); |
84 | -$base_work_dir = $sys_course_path . $course_dir; |
|
85 | -$http_www = api_get_path(WEB_COURSE_PATH).$courseInfo['directory'] . '/document'; |
|
84 | +$base_work_dir = $sys_course_path.$course_dir; |
|
85 | +$http_www = api_get_path(WEB_COURSE_PATH).$courseInfo['directory'].'/document'; |
|
86 | 86 | $document_path = $base_work_dir; |
87 | 87 | $usePpt2lp = api_get_setting('service_ppt2lp', 'active') == 'true'; |
88 | 88 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $certificateId |
275 | 275 | ); |
276 | 276 | Display::addFlash(Display::return_message( |
277 | - get_lang('DocDeleted') . ': ' . $documentInfo['title'], |
|
277 | + get_lang('DocDeleted').': '.$documentInfo['title'], |
|
278 | 278 | 'success' |
279 | 279 | )); |
280 | 280 | } else { |
@@ -465,11 +465,9 @@ discard block |
||
465 | 465 | case 'convertToPdf': |
466 | 466 | // PDF format as target by default |
467 | 467 | $formatTarget = $_REQUEST['formatTarget'] ? |
468 | - strtolower(Security::remove_XSS($_REQUEST['formatTarget'])) : |
|
469 | - 'pdf'; |
|
468 | + strtolower(Security::remove_XSS($_REQUEST['formatTarget'])) : 'pdf'; |
|
470 | 469 | $formatType = $_REQUEST['formatType'] ? |
471 | - strtolower(Security::remove_XSS($_REQUEST['formatType'])) : |
|
472 | - 'text'; |
|
470 | + strtolower(Security::remove_XSS($_REQUEST['formatType'])) : 'text'; |
|
473 | 471 | // Get the document data from the ID |
474 | 472 | $document_info = DocumentManager::get_document_data_by_id( |
475 | 473 | $document_id, |
@@ -477,8 +475,8 @@ discard block |
||
477 | 475 | true, |
478 | 476 | $session_id |
479 | 477 | ); |
480 | - $file = $sys_course_path . $courseInfo['directory'] . |
|
481 | - '/document' . $document_info['path']; |
|
478 | + $file = $sys_course_path.$courseInfo['directory']. |
|
479 | + '/document'.$document_info['path']; |
|
482 | 480 | $fileInfo = pathinfo($file); |
483 | 481 | if ($fileInfo['extension'] == $formatTarget) { |
484 | 482 | Display::addFlash(Display::return_message( |
@@ -509,9 +507,9 @@ discard block |
||
509 | 507 | 'warning' |
510 | 508 | )); |
511 | 509 | } else { |
512 | - $convertedFile = $fileInfo['dirname'] . DIRECTORY_SEPARATOR . |
|
513 | - $fileInfo['filename'] . '_from_' . $fileInfo['extension'] . |
|
514 | - '.' . $formatTarget; |
|
510 | + $convertedFile = $fileInfo['dirname'].DIRECTORY_SEPARATOR. |
|
511 | + $fileInfo['filename'].'_from_'.$fileInfo['extension']. |
|
512 | + '.'.$formatTarget; |
|
515 | 513 | $convertedTitle = $document_info['title']; |
516 | 514 | $obj = new OpenofficePresentation(true); |
517 | 515 | if (file_exists($convertedFile)) { |
@@ -536,11 +534,11 @@ discard block |
||
536 | 534 | $gidReq = Security::remove_XSS($_GET['gidReq']); |
537 | 535 | $file_link = Display::url( |
538 | 536 | get_lang('SeeFile'), |
539 | - api_get_path(WEB_CODE_PATH) . |
|
540 | - 'document/showinframes.php?'.api_get_cidreq_params($cidReq, $id_session, $gidReq).'&id=' . current($result) |
|
537 | + api_get_path(WEB_CODE_PATH). |
|
538 | + 'document/showinframes.php?'.api_get_cidreq_params($cidReq, $id_session, $gidReq).'&id='.current($result) |
|
541 | 539 | ); |
542 | 540 | Display::addFlash(Display::return_message( |
543 | - get_lang('CopyMade') . ' ' . $file_link, |
|
541 | + get_lang('CopyMade').' '.$file_link, |
|
544 | 542 | 'confirmation', |
545 | 543 | false |
546 | 544 | )); |
@@ -711,7 +709,7 @@ discard block |
||
711 | 709 | $new_content_html |
712 | 710 | ); |
713 | 711 | $new_content_html = str_replace( |
714 | - SYS_CODE_PATH . 'img/', |
|
712 | + SYS_CODE_PATH.'img/', |
|
715 | 713 | api_get_path(WEB_IMG_PATH), |
716 | 714 | $new_content_html |
717 | 715 | ); |
@@ -768,11 +766,11 @@ discard block |
||
768 | 766 | $("#convertSelect").change(function() { |
769 | 767 | var formatTarget = $(this).val(); |
770 | 768 | window.location.href = "'. |
771 | - api_get_self() . '?' . api_get_cidreq() . |
|
772 | - '&curdirpath=' . $curdirpath . |
|
773 | - '&action=convertToPdf&formatTarget=' . |
|
774 | - '" + formatTarget + "&id=" + id + "&' . |
|
775 | - api_get_cidreq() . '&formatType=" + format; |
|
769 | + api_get_self().'?'.api_get_cidreq(). |
|
770 | + '&curdirpath='.$curdirpath. |
|
771 | + '&action=convertToPdf&formatTarget='. |
|
772 | + '" + formatTarget + "&id=" + id + "&'. |
|
773 | + api_get_cidreq().'&formatType=" + format; |
|
776 | 774 | }); |
777 | 775 | $("#convertModal").on("hidden", function(){ |
778 | 776 | $("." + format + "FormatType").hide(); |
@@ -1112,7 +1110,7 @@ discard block |
||
1112 | 1110 | DocumentManager::updateDbInfo( |
1113 | 1111 | 'update', |
1114 | 1112 | $document_to_move['path'], |
1115 | - $moveTo . '/' . basename($document_to_move['path']) |
|
1113 | + $moveTo.'/'.basename($document_to_move['path']) |
|
1116 | 1114 | ); |
1117 | 1115 | |
1118 | 1116 | //update database item property |
@@ -1230,7 +1228,7 @@ discard block |
||
1230 | 1228 | )) { |
1231 | 1229 | $messages .= Display::return_message(get_lang('VisibilityChanged').': '.$data['title'], 'confirmation'); |
1232 | 1230 | } else { |
1233 | - $messages .= Display::return_message(get_lang('ViModProb'), 'error'); |
|
1231 | + $messages .= Display::return_message(get_lang('ViModProb'), 'error'); |
|
1234 | 1232 | } |
1235 | 1233 | break; |
1236 | 1234 | case 'delete': |
@@ -1342,7 +1340,7 @@ discard block |
||
1342 | 1340 | |
1343 | 1341 | if (!empty($newFolderData)) { |
1344 | 1342 | $message = Display::return_message( |
1345 | - get_lang('DirCr') . ' ' . $newFolderData['title'], |
|
1343 | + get_lang('DirCr').' '.$newFolderData['title'], |
|
1346 | 1344 | 'confirmation' |
1347 | 1345 | ); |
1348 | 1346 | } else { |
@@ -1425,27 +1423,27 @@ discard block |
||
1425 | 1423 | $document_id_for_template = intval($_GET['add_as_template']); |
1426 | 1424 | // Create the form that asks for the directory name |
1427 | 1425 | $templateForm .= ' |
1428 | - <form name="set_document_as_new_template" class="form-horizontal" enctype="multipart/form-data" action="' . api_get_self() . '?add_as_template=' . $document_id_for_template . '" method="post"> |
|
1426 | + <form name="set_document_as_new_template" class="form-horizontal" enctype="multipart/form-data" action="' . api_get_self().'?add_as_template='.$document_id_for_template.'" method="post"> |
|
1429 | 1427 | <fieldset> |
1430 | - <legend>' . get_lang('AddAsTemplate') . '</legend> |
|
1428 | + <legend>' . get_lang('AddAsTemplate').'</legend> |
|
1431 | 1429 | <div class="form-group"> |
1432 | - <label for="template_title" class="col-sm-2 control-label">' . get_lang('TemplateName') . '</label> |
|
1430 | + <label for="template_title" class="col-sm-2 control-label">' . get_lang('TemplateName').'</label> |
|
1433 | 1431 | <div class="col-sm-10"> |
1434 | 1432 | <input type="text" class="form-control" id="template_title" name="template_title"> |
1435 | 1433 | </div> |
1436 | 1434 | </div> |
1437 | 1435 | <div class="form-group"> |
1438 | - <label for="template_image" class="col-sm-2 control-label">' . get_lang('TemplateImage') . '</label> |
|
1436 | + <label for="template_image" class="col-sm-2 control-label">' . get_lang('TemplateImage').'</label> |
|
1439 | 1437 | <div class="col-sm-10"> |
1440 | 1438 | <input type="file" name="template_image" id="template_image"> |
1441 | 1439 | </div> |
1442 | 1440 | </div> |
1443 | 1441 | <div class="form-group"> |
1444 | 1442 | <div class="col-sm-offset-2 col-sm-10"> |
1445 | - <button type="submit" name="create_template" class="btn btn-primary">' . get_lang('CreateTemplate') . '</button> |
|
1443 | + <button type="submit" name="create_template" class="btn btn-primary">' . get_lang('CreateTemplate').'</button> |
|
1446 | 1444 | </div> |
1447 | 1445 | </div> |
1448 | - <input type="hidden" name="curdirpath" value="' . $curdirpath . '" /> |
|
1446 | + <input type="hidden" name="curdirpath" value="' . $curdirpath.'" /> |
|
1449 | 1447 | </fieldset> |
1450 | 1448 | </form> |
1451 | 1449 | <hr> |
@@ -1650,7 +1648,7 @@ discard block |
||
1650 | 1648 | if (api_get_setting('enable_record_audio') === 'true') { |
1651 | 1649 | $actionsLeft .= Display::url( |
1652 | 1650 | Display::return_icon('new_recording.png', get_lang('RecordMyVoice'), '', ICON_SIZE_MEDIUM), |
1653 | - api_get_path(WEB_CODE_PATH) . 'document/record_audio.php?' . api_get_cidreq() . '&id=' . $document_id |
|
1651 | + api_get_path(WEB_CODE_PATH).'document/record_audio.php?'.api_get_cidreq().'&id='.$document_id |
|
1654 | 1652 | ); |
1655 | 1653 | } |
1656 | 1654 | |
@@ -2122,18 +2120,18 @@ discard block |
||
2122 | 2120 | <div class="modal-dialog"> |
2123 | 2121 | <div class="modal-content"> |
2124 | 2122 | <div class="modal-header" style="text-align: center;"> |
2125 | - <button type="button" class="close" data-dismiss="modal" aria-label="' . get_lang('Close') . '"> |
|
2123 | + <button type="button" class="close" data-dismiss="modal" aria-label="' . get_lang('Close').'"> |
|
2126 | 2124 | <span aria-hidden="true">×</span> |
2127 | 2125 | </button> |
2128 | - <h4 class="modal-title">' . get_lang('Convert') . '</h4> |
|
2126 | + <h4 class="modal-title">' . get_lang('Convert').'</h4> |
|
2129 | 2127 | </div> |
2130 | 2128 | <div class="modal-body"> |
2131 | 2129 | <form action="#" class="form-horizontal"> |
2132 | 2130 | <div class="form-group"> |
2133 | - <label class="col-sm-4 control-label" for="convertSelect">' . get_lang('ConvertFormats') . '</label> |
|
2131 | + <label class="col-sm-4 control-label" for="convertSelect">' . get_lang('ConvertFormats').'</label> |
|
2134 | 2132 | <div class="col-sm-8"> |
2135 | 2133 | <select id="convertSelect"> |
2136 | - <option value="">' . get_lang('Select') . '</option> |
|
2134 | + <option value="">' . get_lang('Select').'</option> |
|
2137 | 2135 | <option value="pdf"> |
2138 | 2136 | PDF - Portable Document File |
2139 | 2137 | </option> |
@@ -2152,7 +2150,7 @@ discard block |
||
2152 | 2150 | </form> |
2153 | 2151 | </div> |
2154 | 2152 | <div class="modal-footer"> |
2155 | - <button type="button" class="btn btn-default" data-dismiss="modal">' . get_lang('Close') . '</button> |
|
2153 | + <button type="button" class="btn btn-default" data-dismiss="modal">' . get_lang('Close').'</button> |
|
2156 | 2154 | </div> |
2157 | 2155 | </div> |
2158 | 2156 | </div>'; |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | $dir = $document_data['path']; |
36 | 36 | |
37 | 37 | //make some vars |
38 | -$webcamdir=$dir; |
|
39 | -if($webcamdir=="/"){ |
|
40 | - $webcamdir=""; |
|
38 | +$webcamdir = $dir; |
|
39 | +if ($webcamdir == "/") { |
|
40 | + $webcamdir = ""; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $groupId = api_get_group_id(); |
72 | 72 | |
73 | 73 | if (!empty($groupId)) { |
74 | - $interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); |
|
74 | + $interbreadcrumb[] = array("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); |
|
75 | 75 | $noPHP_SELF = true; |
76 | 76 | $group = GroupManager :: get_group_properties($groupId); |
77 | 77 | $path = explode('/', $dir); |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | -$interbreadcrumb[] = array ("url" => "./document.php?id=".$document_id."&".api_get_cidreq(), "name" => get_lang('Documents')); |
|
83 | +$interbreadcrumb[] = array("url" => "./document.php?id=".$document_id."&".api_get_cidreq(), "name" => get_lang('Documents')); |
|
84 | 84 | |
85 | 85 | if (!api_is_allowed_in_course()) { |
86 | 86 | api_not_allowed(true); |
87 | 87 | } |
88 | 88 | |
89 | 89 | if (!($is_allowed_to_edit || $groupRights || |
90 | - DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) { |
|
90 | + DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir), api_get_session_id()))) { |
|
91 | 91 | api_not_allowed(true); |
92 | 92 | } |
93 | 93 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | // Interbreadcrumb for the current directory root path |
106 | 106 | $counter = 0; |
107 | 107 | if (isset($document_data['parents'])) { |
108 | - foreach($document_data['parents'] as $document_sub_data) { |
|
108 | + foreach ($document_data['parents'] as $document_sub_data) { |
|
109 | 109 | //fixing double group folder in breadcrumb |
110 | 110 | if (api_get_group_id()) { |
111 | 111 | if ($counter == 0) { |
@@ -119,12 +119,12 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | //make some vars |
122 | -$webcamuserid=api_get_user_id(); |
|
122 | +$webcamuserid = api_get_user_id(); |
|
123 | 123 | |
124 | 124 | Display :: display_header($nameTools, 'Doc'); |
125 | 125 | echo '<div class="actions">'; |
126 | 126 | echo '<a href="document.php?id='.$document_id.'">'. |
127 | - Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
127 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
128 | 128 | echo '</div>'; |
129 | 129 | ?> |
130 | 130 |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | $session = array(); |
33 | 33 | $user_name = $user_info['complete_name']; |
34 | 34 | |
35 | -$course_list = SessionManager::get_course_list_by_session_id ($session_id); |
|
35 | +$course_list = SessionManager::get_course_list_by_session_id($session_id); |
|
36 | 36 | $session_list = SessionManager::get_session_by_course($course_id); |
37 | 37 | $total_quota_bytes = DocumentManager::get_course_quota(); |
38 | -$quota_bytes = DocumentManager::documents_total_space($course_id, 0 , 0); |
|
39 | -$quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
38 | +$quota_bytes = DocumentManager::documents_total_space($course_id, 0, 0); |
|
39 | +$quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
40 | 40 | |
41 | 41 | $session[] = array(get_lang('Course').' ('.format_file_size($quota_bytes).')', $quota_percentage); |
42 | 42 | |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | foreach ($session_list as $session_data) { |
47 | 47 | $quota_percentage = 0; |
48 | 48 | $quota_bytes = intval(DocumentManager::documents_total_space($course_id, null, $session_data['id'])); |
49 | - if (!empty($quota_bytes)) { |
|
50 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
49 | + if (!empty($quota_bytes)) { |
|
50 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
51 | 51 | } |
52 | 52 | if ($session_id == $session_data['id']) { |
53 | - $session_data['name'] = $session_data['name'] . ' * '; |
|
53 | + $session_data['name'] = $session_data['name'].' * '; |
|
54 | 54 | } |
55 | 55 | $used_quota_bytes += $quota_bytes; |
56 | 56 | $session[] = array( |
@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | $quota_percentage = 0; |
67 | 67 | $my_group_id = $group_data['id']; |
68 | 68 | $quota_bytes = intval(DocumentManager::documents_total_space($course_id, $my_group_id, 0)); |
69 | - if (!empty($quota_bytes)) { |
|
70 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
69 | + if (!empty($quota_bytes)) { |
|
70 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
71 | 71 | } |
72 | 72 | if ($group_id == $my_group_id) { |
73 | - $group_data['name'] = $group_data['name'] . ' * '; |
|
73 | + $group_data['name'] = $group_data['name'].' * '; |
|
74 | 74 | } |
75 | 75 | $used_quota_bytes += $quota_bytes; |
76 | 76 | $session[] = array(addslashes(get_lang('Group').': '.$group_data['name']).' ('.format_file_size($quota_bytes).')', $quota_percentage); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | } |
87 | 87 | if ($quota_bytes != 0) { |
88 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
88 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $session[] = array(addslashes(get_lang('Teacher').': '.$user_name).' ('.format_file_size($quota_bytes).')', $quota_percentage); |
@@ -100,15 +100,15 @@ discard block |
||
100 | 100 | } |
101 | 101 | } |
102 | 102 | if ($quota_bytes != 0) { |
103 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
103 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
104 | 104 | } |
105 | 105 | } |
106 | - $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'),$user_name)), $quota_percentage); |
|
106 | + $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'), $user_name)), $quota_percentage); |
|
107 | 107 | |
108 | 108 | } |
109 | 109 | } |
110 | 110 | |
111 | -$quota_percentage = round(($total_quota_bytes - $used_quota_bytes)/$total_quota_bytes, 2)*100; |
|
111 | +$quota_percentage = round(($total_quota_bytes - $used_quota_bytes) / $total_quota_bytes, 2) * 100; |
|
112 | 112 | $session[] = array(addslashes(get_lang('ShowCourseQuotaUse')).' ('.format_file_size($total_quota_bytes - $used_quota_bytes).') ', $quota_percentage); |
113 | 113 | $quota_data = json_encode($session); |
114 | 114 |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | $nParent = 0; // the number of /.. into the url |
41 | 41 | while (substr($cwd, -3, 3) == '/..') { |
42 | 42 | // go to parent directory |
43 | - $cwd= substr($cwd, 0, -3); |
|
44 | - if (strlen($cwd) == 0) { $cwd='/'; } |
|
43 | + $cwd = substr($cwd, 0, -3); |
|
44 | + if (strlen($cwd) == 0) { $cwd = '/'; } |
|
45 | 45 | $nParent++; |
46 | 46 | } |
47 | 47 | for (; $nParent > 0; $nParent--) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | if ($action == 'list') { |
57 | 57 | /*==== List files ====*/ |
58 | - if ($debug>0) { error_log("sending file list",0); } |
|
58 | + if ($debug > 0) { error_log("sending file list", 0); } |
|
59 | 59 | |
60 | 60 | // get files list |
61 | 61 | $files = DocumentManager::get_all_document_data($_course, $cwd, 0, null, false); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | // Check if object exists already. If it does, the old object is used |
105 | 105 | // with updated information (authors, description, upload_date) |
106 | 106 | $this->isOldWork = false; |
107 | - $sql = "SELECT id, upload_date FROM ". Database::get_course_table(TABLE_DROPBOX_FILE) ." |
|
107 | + $sql = "SELECT id, upload_date FROM ".Database::get_course_table(TABLE_DROPBOX_FILE)." |
|
108 | 108 | WHERE c_id = $course_id AND filename = '".Database::escape_string($this->filename)."'"; |
109 | 109 | $result = Database::query($sql); |
110 | 110 | $res = Database::fetch_array($result); |
@@ -148,20 +148,20 @@ discard block |
||
148 | 148 | |
149 | 149 | $this->id = Database::insert(Database::get_course_table(TABLE_DROPBOX_FILE), $params); |
150 | 150 | if ($this->id) { |
151 | - $sql = "UPDATE ". Database::get_course_table(TABLE_DROPBOX_FILE) ." SET id = iid WHERE iid = {$this->id}"; |
|
151 | + $sql = "UPDATE ".Database::get_course_table(TABLE_DROPBOX_FILE)." SET id = iid WHERE iid = {$this->id}"; |
|
152 | 152 | Database::query($sql); |
153 | 153 | } |
154 | 154 | } |
155 | 155 | |
156 | 156 | $sql = "SELECT count(file_id) as count |
157 | - FROM ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." |
|
157 | + FROM ". Database::get_course_table(TABLE_DROPBOX_PERSON)." |
|
158 | 158 | WHERE c_id = $course_id AND file_id = ".intval($this->id)." AND user_id = ".$this->uploader_id; |
159 | 159 | $result = Database::query($sql); |
160 | 160 | $row = Database::fetch_array($result); |
161 | 161 | if ($row['count'] == 0) { |
162 | 162 | |
163 | 163 | // Insert entries into person table |
164 | - $sql = "INSERT INTO ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." (c_id, file_id, user_id) |
|
164 | + $sql = "INSERT INTO ".Database::get_course_table(TABLE_DROPBOX_PERSON)." (c_id, file_id, user_id) |
|
165 | 165 | VALUES ($course_id, ".intval($this->id)." , ".intval($this->uploader_id).")"; |
166 | 166 | Database::query($sql); |
167 | 167 | } |
@@ -179,11 +179,11 @@ discard block |
||
179 | 179 | $action = isset($_GET['action']) ? $_GET['action'] : null; |
180 | 180 | |
181 | 181 | // Do some sanity checks |
182 | - $id = intval($id); |
|
182 | + $id = intval($id); |
|
183 | 183 | |
184 | 184 | // Get the data from DB |
185 | 185 | $sql = "SELECT uploader_id, filename, filesize, title, description, author, upload_date, last_upload_date, cat_id |
186 | - FROM ". Database::get_course_table(TABLE_DROPBOX_FILE) ." |
|
186 | + FROM ". Database::get_course_table(TABLE_DROPBOX_FILE)." |
|
187 | 187 | WHERE c_id = $course_id AND id = ".$id.""; |
188 | 188 | $result = Database::query($sql); |
189 | 189 | $res = Database::fetch_array($result, 'ASSOC'); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | // Getting the feedback on the work. |
213 | 213 | if ($action == 'viewfeedback' AND $this->id == $_GET['id']) { |
214 | 214 | $feedback2 = array(); |
215 | - $sql = "SELECT * FROM ". Database::get_course_table(TABLE_DROPBOX_FEEDBACK) ." |
|
215 | + $sql = "SELECT * FROM ".Database::get_course_table(TABLE_DROPBOX_FEEDBACK)." |
|
216 | 216 | WHERE c_id = $course_id AND file_id='".$id."' |
217 | 217 | ORDER BY feedback_id ASC"; |
218 | 218 | $result = Database::query($sql); |
@@ -220,14 +220,14 @@ discard block |
||
220 | 220 | $row_feedback['feedback'] = Security::remove_XSS($row_feedback['feedback']); |
221 | 221 | $feedback2[] = $row_feedback; |
222 | 222 | } |
223 | - $this->feedback2= $feedback2; |
|
223 | + $this->feedback2 = $feedback2; |
|
224 | 224 | } |
225 | 225 | } |
226 | 226 | } |
227 | 227 | |
228 | 228 | class Dropbox_SentWork extends Dropbox_Work |
229 | 229 | { |
230 | - public $recipients; //array of ['id']['name'] arrays |
|
230 | + public $recipients; //array of ['id']['name'] arrays |
|
231 | 231 | |
232 | 232 | /** |
233 | 233 | * Constructor calls private functions to create a new work or retreive an existing work from DB |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | $recipient_ids = array($uploader_id); |
293 | 293 | } |
294 | 294 | |
295 | - if (! is_array($recipient_ids) || count($recipient_ids) == 0) { |
|
295 | + if (!is_array($recipient_ids) || count($recipient_ids) == 0) { |
|
296 | 296 | die(get_lang('GeneralError').' (code 209)'); |
297 | 297 | } |
298 | 298 | |
@@ -308,14 +308,14 @@ discard block |
||
308 | 308 | $table_post = Database::get_course_table(TABLE_DROPBOX_POST); |
309 | 309 | $table_person = Database::get_course_table(TABLE_DROPBOX_PERSON); |
310 | 310 | $session_id = api_get_session_id(); |
311 | - $user = api_get_user_id(); |
|
311 | + $user = api_get_user_id(); |
|
312 | 312 | $now = api_get_utc_datetime(); |
313 | 313 | $mailId = get_mail_id_base(); |
314 | 314 | |
315 | 315 | // Insert data in dropbox_post and dropbox_person table for each recipient |
316 | 316 | foreach ($this->recipients as $rec) { |
317 | - $file_id = (int)$this->id; |
|
318 | - $user_id = (int)$rec['id']; |
|
317 | + $file_id = (int) $this->id; |
|
318 | + $user_id = (int) $rec['id']; |
|
319 | 319 | $sql = "INSERT INTO $table_post (c_id, file_id, dest_user_id, session_id, feedback_date, cat_id) |
320 | 320 | VALUES ($course_id, $file_id, $user_id, $session_id, '$now', 0)"; |
321 | 321 | Database::query($sql); |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | |
332 | 332 | // Do not add recipient in person table if mailing zip or just upload. |
333 | 333 | if (!$justSubmit) { |
334 | - Database::query($sql); // If work already exists no error is generated |
|
334 | + Database::query($sql); // If work already exists no error is generated |
|
335 | 335 | } |
336 | 336 | } |
337 | 337 | |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | $ownerid = getUserOwningThisMailing($ownerid); |
341 | 341 | } |
342 | 342 | if (($recipid = $rec["id"]) > $mailId) { |
343 | - $recipid = $ownerid; // mailing file recipient = mailing id, not a person |
|
343 | + $recipid = $ownerid; // mailing file recipient = mailing id, not a person |
|
344 | 344 | } |
345 | 345 | api_item_property_update( |
346 | 346 | $_course, |
@@ -397,13 +397,13 @@ discard block |
||
397 | 397 | class Dropbox_Person |
398 | 398 | { |
399 | 399 | // The receivedWork and the sentWork arrays are sorted. |
400 | - public $receivedWork; // an array of Dropbox_Work objects |
|
401 | - public $sentWork; // an array of Dropbox_SentWork objects |
|
400 | + public $receivedWork; // an array of Dropbox_Work objects |
|
401 | + public $sentWork; // an array of Dropbox_SentWork objects |
|
402 | 402 | |
403 | 403 | public $userId = 0; |
404 | 404 | public $isCourseAdmin = false; |
405 | 405 | public $isCourseTutor = false; |
406 | - public $_orderBy = ''; // private property that determines by which field |
|
406 | + public $_orderBy = ''; // private property that determines by which field |
|
407 | 407 | |
408 | 408 | /** |
409 | 409 | * Constructor for recreating the Dropbox_Person object |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | $course_id = api_get_course_int_id(); |
473 | 473 | // Delete entries in person table concerning received works |
474 | 474 | foreach ($this->receivedWork as $w) { |
475 | - $sql = "DELETE FROM ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." |
|
475 | + $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_PERSON)." |
|
476 | 476 | WHERE c_id = $course_id AND user_id='".$this->userId."' AND file_id='".$w->id."'"; |
477 | 477 | Database::query($sql); |
478 | 478 | } |
@@ -489,10 +489,10 @@ discard block |
||
489 | 489 | $course_id = api_get_course_int_id(); |
490 | 490 | |
491 | 491 | $id = intval($id); |
492 | - $sql = "DELETE FROM ". Database::get_course_table(TABLE_DROPBOX_FILE) ." |
|
492 | + $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_FILE)." |
|
493 | 493 | WHERE c_id = $course_id AND cat_id = '".$id."' "; |
494 | 494 | if (!Database::query($sql)) return false; |
495 | - $sql = "DELETE FROM ". Database::get_course_table(TABLE_DROPBOX_CATEGORY) ." |
|
495 | + $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_CATEGORY)." |
|
496 | 496 | WHERE c_id = $course_id AND cat_id = '".$id."' "; |
497 | 497 | if (!Database::query($sql)) return false; |
498 | 498 | $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_POST)." |
@@ -526,10 +526,10 @@ discard block |
||
526 | 526 | } |
527 | 527 | } |
528 | 528 | // Delete entries in person table concerning received works |
529 | - $sql = "DELETE FROM ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." |
|
529 | + $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_PERSON)." |
|
530 | 530 | WHERE c_id = $course_id AND user_id = '".$this->userId."' AND file_id ='".$id."'"; |
531 | 531 | Database::query($sql); |
532 | - removeUnusedFiles(); // Check for unused files |
|
532 | + removeUnusedFiles(); // Check for unused files |
|
533 | 533 | } |
534 | 534 | |
535 | 535 | /** |
@@ -540,12 +540,12 @@ discard block |
||
540 | 540 | $course_id = api_get_course_int_id(); |
541 | 541 | //delete entries in person table concerning sent works |
542 | 542 | foreach ($this->sentWork as $w) { |
543 | - $sql = "DELETE FROM ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." |
|
543 | + $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_PERSON)." |
|
544 | 544 | WHERE c_id = $course_id AND user_id='".$this->userId."' AND file_id='".$w->id."'"; |
545 | 545 | Database::query($sql); |
546 | 546 | removeMoreIfMailing($w->id); |
547 | 547 | } |
548 | - removeUnusedFiles(); // Check for unused files |
|
548 | + removeUnusedFiles(); // Check for unused files |
|
549 | 549 | } |
550 | 550 | |
551 | 551 | /** |
@@ -574,11 +574,11 @@ discard block |
||
574 | 574 | } |
575 | 575 | //$file_id = $this->sentWork[$index]->id; |
576 | 576 | // Delete entries in person table concerning sent works |
577 | - $sql = "DELETE FROM ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." |
|
577 | + $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_PERSON)." |
|
578 | 578 | WHERE c_id = $course_id AND user_id='".$this->userId."' AND file_id='".$id."'"; |
579 | 579 | Database::query($sql); |
580 | 580 | removeMoreIfMailing($id); |
581 | - removeUnusedFiles(); // Check for unused files |
|
581 | + removeUnusedFiles(); // Check for unused files |
|
582 | 582 | } |
583 | 583 | |
584 | 584 | /** |
@@ -600,7 +600,7 @@ discard block |
||
600 | 600 | $wi = -1; |
601 | 601 | foreach ($this->receivedWork as $w) { |
602 | 602 | $wi++; |
603 | - if ($w->id == $id){ |
|
603 | + if ($w->id == $id) { |
|
604 | 604 | $found = true; |
605 | 605 | break; |
606 | 606 | } // foreach (... as $wi -> $w) gives error 221! (no idea why...) |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $is_courseTutor = api_is_course_tutor(); |
119 | 119 | $is_courseAdmin = api_is_course_admin(); |
120 | 120 | |
121 | -$current_course_tool = TOOL_DROPBOX; |
|
121 | +$current_course_tool = TOOL_DROPBOX; |
|
122 | 122 | |
123 | 123 | // the dropbox file that contains additional functions |
124 | 124 | require_once 'dropbox_functions.inc.php'; |
@@ -263,10 +263,10 @@ discard block |
||
263 | 263 | $javascript .= " |
264 | 264 | </script>"; |
265 | 265 | $htmlHeadXtra[] = $javascript; |
266 | -$htmlHeadXtra[] ="<script> |
|
266 | +$htmlHeadXtra[] = "<script> |
|
267 | 267 | function confirmation (name) |
268 | 268 | { |
269 | - if (confirm(\" ". get_lang("AreYouSureToDeleteJS") ." \"+ name + \" ?\")) |
|
269 | + if (confirm(\" ". get_lang("AreYouSureToDeleteJS")." \"+ name + \" ?\")) |
|
270 | 270 | {return true;} |
271 | 271 | else |
272 | 272 | {return false;} |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | |
314 | 314 | if ((!$is_allowed_in_course || !$is_course_member) && !api_is_allowed_to_edit(null, true)) { |
315 | 315 | if ($origin != 'learnpath') { |
316 | - api_not_allowed(true);//print headers/footers |
|
316 | + api_not_allowed(true); //print headers/footers |
|
317 | 317 | } else { |
318 | 318 | api_not_allowed(); |
319 | 319 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | require_once __DIR__.'/../inc/global.inc.php'; |
12 | -$current_course_tool = TOOL_COURSE_DESCRIPTION; |
|
12 | +$current_course_tool = TOOL_COURSE_DESCRIPTION; |
|
13 | 13 | |
14 | 14 | // defining constants |
15 | 15 | define('ADD_BLOCK', 8); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | // get actions |
24 | 24 | $actions = array('listing', 'add', 'edit', 'delete', 'history'); |
25 | 25 | $action = 'listing'; |
26 | -if (isset($_GET['action']) && in_array($_GET['action'],$actions)) { |
|
26 | +if (isset($_GET['action']) && in_array($_GET['action'], $actions)) { |
|
27 | 27 | $action = $_GET['action']; |
28 | 28 | } |
29 | 29 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | // interbreadcrumb |
45 | -$interbreadcrumb[] = array ("url" => "index.php?".api_get_cidreq(), "name" => get_lang('CourseProgram')); |
|
45 | +$interbreadcrumb[] = array("url" => "index.php?".api_get_cidreq(), "name" => get_lang('CourseProgram')); |
|
46 | 46 | if ($description_type == 1) { |
47 | 47 | $interbreadcrumb[] = array("url" => "#", "name" => get_lang('GeneralDescription')); |
48 | 48 | } |