@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | get_lang('HideColumn'), |
112 | 112 | array('align' => 'absmiddle', 'hspace' => '3px'), |
113 | 113 | ICON_SIZE_SMALL |
114 | - ) . "</div>' |
|
114 | + )."</div>' |
|
115 | 115 | ); |
116 | 116 | } |
117 | 117 | ); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $TABLETRACK_LINKS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LINKS); |
147 | 147 | $TABLETRACK_DOWNLOADS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_DOWNLOADS); |
148 | 148 | $TABLETRACK_ACCESS_2 = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS); |
149 | -$TABLETRACK_EXERCISES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
|
149 | +$TABLETRACK_EXERCISES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
|
150 | 150 | $TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
151 | 151 | $TABLECOURSE = Database::get_main_table(TABLE_MAIN_COURSE); |
152 | 152 | $table_user = Database::get_main_table(TABLE_MAIN_USER); |
@@ -156,8 +156,8 @@ discard block |
||
156 | 156 | |
157 | 157 | // Breadcrumbs. |
158 | 158 | if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') { |
159 | - $interbreadcrumb[] = array('url' => '../admin/index.php','name' => get_lang('PlatformAdmin')); |
|
160 | - $interbreadcrumb[] = array('url' => '../session/session_list.php','name' => get_lang('SessionList')); |
|
159 | + $interbreadcrumb[] = array('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin')); |
|
160 | + $interbreadcrumb[] = array('url' => '../session/session_list.php', 'name' => get_lang('SessionList')); |
|
161 | 161 | $interbreadcrumb[] = array('url' => '../session/resume_session.php?id_session='.$sessionId, 'name' => get_lang('SessionOverview')); |
162 | 162 | } |
163 | 163 | |
@@ -228,21 +228,21 @@ discard block |
||
228 | 228 | if (!empty($sessionId)) { |
229 | 229 | $actionsLeft .= Display::url( |
230 | 230 | Display::return_icon('attendance_list.png', get_lang('Logins'), '', ICON_SIZE_MEDIUM), |
231 | - api_get_path(WEB_CODE_PATH) . 'attendance/index.php?' . api_get_cidreq() . '&action=calendar_logins' |
|
231 | + api_get_path(WEB_CODE_PATH).'attendance/index.php?'.api_get_cidreq().'&action=calendar_logins' |
|
232 | 232 | ); |
233 | 233 | } |
234 | 234 | |
235 | 235 | $actionsRight = '<div class="pull-right">'; |
236 | 236 | $actionsRight .= '<a href="javascript: void(0);" onclick="javascript: window.print();">'. |
237 | - Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
237 | + Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
238 | 238 | |
239 | 239 | $addional_param = ''; |
240 | 240 | if (isset($_GET['additional_profile_field'])) { |
241 | - $addional_param ='additional_profile_field='.intval($_GET['additional_profile_field']); |
|
241 | + $addional_param = 'additional_profile_field='.intval($_GET['additional_profile_field']); |
|
242 | 242 | } |
243 | 243 | $users_tracking_per_page = ''; |
244 | 244 | if (isset($_GET['users_tracking_per_page'])) { |
245 | - $users_tracking_per_page= '&users_tracking_per_page='.intval($_GET['users_tracking_per_page']); |
|
245 | + $users_tracking_per_page = '&users_tracking_per_page='.intval($_GET['users_tracking_per_page']); |
|
246 | 246 | } |
247 | 247 | $actionsRight .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&export=csv&'.$addional_param.$users_tracking_per_page.'"> |
248 | 248 | '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>'; |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | $course_name = get_lang('Course').' '.$courseInfo['name']; |
267 | 267 | if ($session_id) { |
268 | 268 | $titleSession = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.api_get_session_name($session_id); |
269 | - $titleCourse = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_name; |
|
269 | + $titleCourse = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_name; |
|
270 | 270 | } else { |
271 | 271 | $titleSession = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$courseInfo['name']; |
272 | 272 | } |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | $html .= '<ul class="session-list">'; |
307 | 307 | foreach ($sessionList as $session) { |
308 | 308 | $url = api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id'].'&cidReq='.$courseInfo['code']; |
309 | - $html .= Display::tag('li', $iconCourse . ' ' . Display::url($session['name'], $url)); |
|
309 | + $html .= Display::tag('li', $iconCourse.' '.Display::url($session['name'], $url)); |
|
310 | 310 | } |
311 | 311 | $html .= '</ul>'; |
312 | 312 | } |
@@ -321,12 +321,12 @@ discard block |
||
321 | 321 | $form = new FormValidator( |
322 | 322 | 'reminder_form', |
323 | 323 | 'get', |
324 | - api_get_path(WEB_CODE_PATH).'announcements/announcements.php?' . api_get_cidreq(), |
|
324 | + api_get_path(WEB_CODE_PATH).'announcements/announcements.php?'.api_get_cidreq(), |
|
325 | 325 | null, |
326 | 326 | ['style' => 'margin-bottom: 10px'], |
327 | 327 | FormValidator::LAYOUT_INLINE |
328 | 328 | ); |
329 | - $options = array ( |
|
329 | + $options = array( |
|
330 | 330 | 2 => sprintf($getLangXDays, 2), |
331 | 331 | 3 => sprintf($getLangXDays, 3), |
332 | 332 | 4 => sprintf($getLangXDays, 4), |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | ); |
340 | 340 | $el = $form->addSelect( |
341 | 341 | 'since', |
342 | - Display::returnFontAwesomeIcon('warning') . get_lang('RemindInactivesLearnersSince'), |
|
342 | + Display::returnFontAwesomeIcon('warning').get_lang('RemindInactivesLearnersSince'), |
|
343 | 343 | $options, |
344 | 344 | ['class' => 'col-sm-3'] |
345 | 345 | ); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $url = api_get_path(WEB_AJAX_PATH).'document.ajax.php?a=document_preview'; |
48 | 48 | $folder_icon = api_get_path(WEB_IMG_PATH).'icons/22/folder.png'; |
49 | 49 | $close_icon = api_get_path(WEB_IMG_PATH).'loading1.gif'; |
50 | - $htmlHeadXtra[] = '<script> |
|
50 | + $htmlHeadXtra[] = '<script> |
|
51 | 51 | $(document).ready(function() { |
52 | 52 | $(".document_preview_container").hide(); |
53 | 53 | $(".document_preview").click(function() { |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | if ($displayMyCourseViewBySessionLink) { |
80 | 80 | $htmlHeadXtra[] = ' |
81 | 81 | <script> |
82 | - userId = ' . $userId . ' |
|
82 | + userId = ' . $userId.' |
|
83 | 83 | $(document).ready(function() { |
84 | 84 | changeMyCoursesView($.cookie("defaultMyCourseView"+userId)); |
85 | 85 | }); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | function changeMyCoursesView(inView) |
92 | 92 | { |
93 | 93 | $.cookie("defaultMyCourseView"+userId, inView, { expires: 365 }); |
94 | - if (inView == ' . IndexManager::VIEW_BY_SESSION . ') { |
|
94 | + if (inView == ' . IndexManager::VIEW_BY_SESSION.') { |
|
95 | 95 | $("#viewBySession").addClass("btn-primary"); |
96 | 96 | $("#viewByDefault").removeClass("btn-primary"); |
97 | 97 | } else { |
@@ -150,16 +150,16 @@ discard block |
||
150 | 150 | if (isset($sessionInfo['courses']) && count($sessionInfo['courses']) == 1) { |
151 | 151 | $courseCode = $sessionInfo['courses'][0]['code']; |
152 | 152 | $courseInfo = api_get_course_info_by_id($sessionInfo['courses'][0]['real_id']); |
153 | - $courseUrl = $courseInfo['course_public_url'] . '?id_session=' . $sessionInfo['session_id']; |
|
154 | - header('Location:' . $courseUrl); |
|
153 | + $courseUrl = $courseInfo['course_public_url'].'?id_session='.$sessionInfo['session_id']; |
|
154 | + header('Location:'.$courseUrl); |
|
155 | 155 | exit; |
156 | 156 | } |
157 | 157 | |
158 | 158 | // Session has many courses. |
159 | 159 | if (isset($sessionInfo['session_id'])) { |
160 | - $url = api_get_path(WEB_CODE_PATH) . 'session/?session_id=' . $sessionInfo['session_id']; |
|
160 | + $url = api_get_path(WEB_CODE_PATH).'session/?session_id='.$sessionInfo['session_id']; |
|
161 | 161 | |
162 | - header('Location:' . $url); |
|
162 | + header('Location:'.$url); |
|
163 | 163 | exit; |
164 | 164 | } |
165 | 165 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $courseInfo = api_get_course_info_by_id($courses[0]['real_id']); |
176 | 176 | if (!empty($courseInfo)) { |
177 | 177 | $courseUrl = $courseInfo['course_public_url']; |
178 | - header('Location:' . $courseUrl); |
|
178 | + header('Location:'.$courseUrl); |
|
179 | 179 | exit; |
180 | 180 | } |
181 | 181 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $pdfParams['orientation'] = 'landscape'; |
36 | 36 | $pageFormat = $pdfParams['orientation'] === 'landscape' ? 'A4-L' : 'A4'; |
37 | 37 | $userInfo = api_get_user_info($certificate->user_id); |
38 | - $pdfName = api_replace_dangerous_char(get_lang('Certificate') . ' ' . $userInfo['username']); |
|
38 | + $pdfName = api_replace_dangerous_char(get_lang('Certificate').' '.$userInfo['username']); |
|
39 | 39 | |
40 | 40 | $pdf = new PDF($pageFormat, $pdfParams['orientation'], $pdfParams); |
41 | 41 | $pdf->html_to_pdf($certificatePathList, $pdfName, null, false, false); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | Event::addEvent( |
46 | 46 | LOG_ATTEMPTED_FORCED_LOGIN, |
47 | 47 | 'tried_hacking_get', |
48 | - $_SERVER['REMOTE_ADDR'].(empty($_POST['login'])?'':'/'.$_POST['login']), |
|
48 | + $_SERVER['REMOTE_ADDR'].(empty($_POST['login']) ? '' : '/'.$_POST['login']), |
|
49 | 49 | null, |
50 | 50 | $i |
51 | 51 | ); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | $editorConfig = array( |
124 | - 'ToolbarSet' => (api_is_allowed_to_edit(null, true) ? 'Documents' :'DocumentsStudent'), |
|
124 | + 'ToolbarSet' => (api_is_allowed_to_edit(null, true) ? 'Documents' : 'DocumentsStudent'), |
|
125 | 125 | 'Width' => '100%', |
126 | 126 | 'Height' => '400', |
127 | 127 | 'cols-size' => [2, 10, 0], |
@@ -164,13 +164,13 @@ discard block |
||
164 | 164 | "name" => get_lang('Documents'), |
165 | 165 | ); |
166 | 166 | } else { |
167 | - $interbreadcrumb[]= array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook')); |
|
167 | + $interbreadcrumb[] = array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook')); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | if (empty($document_data['parents'])) { |
171 | 171 | $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']); |
172 | 172 | } else { |
173 | - foreach($document_data['parents'] as $document_sub_data) { |
|
173 | + foreach ($document_data['parents'] as $document_sub_data) { |
|
174 | 174 | if ($document_data['title'] == $document_sub_data['title']) { |
175 | 175 | continue; |
176 | 176 | } |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $dir, |
355 | 355 | api_get_user_id() |
356 | 356 | ); |
357 | - header('Location: document.php?id=' . $document_data['parent_id'] . '&' . api_get_cidreq() . ($is_certificate_mode?'&curdirpath=/certificates&selectcat=1':'')); |
|
357 | + header('Location: document.php?id='.$document_data['parent_id'].'&'.api_get_cidreq().($is_certificate_mode ? '&curdirpath=/certificates&selectcat=1' : '')); |
|
358 | 358 | exit; |
359 | 359 | } else { |
360 | 360 | Display::addFlash(Display::return_message(get_lang('Impossible'), 'warning')); |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | /* Display user interface */ |
398 | 398 | |
399 | 399 | // Display the header |
400 | -$nameTools = get_lang('EditDocument') . ': '.Security::remove_XSS($document_data['title']); |
|
400 | +$nameTools = get_lang('EditDocument').': '.Security::remove_XSS($document_data['title']); |
|
401 | 401 | Display::display_header($nameTools, 'Doc'); |
402 | 402 | |
403 | 403 | $document_info = api_get_item_property_info( |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | $form->addElement('textarea', 'comment', get_lang('Comment'), ['cols-size' => [2, 10, 0]]); |
480 | 480 | |
481 | 481 | if ($owner_id == api_get_user_id() || api_is_platform_admin()) { |
482 | - $checked =& $form->addElement('checkbox', 'readonly', null, get_lang('ReadOnly')); |
|
482 | + $checked = & $form->addElement('checkbox', 'readonly', null, get_lang('ReadOnly')); |
|
483 | 483 | if ($readonly == 1) { |
484 | 484 | $checked->setChecked(true); |
485 | 485 | } |
@@ -519,14 +519,14 @@ discard block |
||
519 | 519 | foreach ($all_information_by_create_certificate[0] as $info_value) { |
520 | 520 | $str_info .= $info_value.'<br/>'; |
521 | 521 | } |
522 | - $create_certificate=get_lang('CreateCertificateWithTags'); |
|
522 | + $create_certificate = get_lang('CreateCertificateWithTags'); |
|
523 | 523 | Display::display_normal_message( |
524 | 524 | $create_certificate.': <br /><br />'.$str_info, |
525 | 525 | false |
526 | 526 | ); |
527 | 527 | } |
528 | 528 | |
529 | - if ($extension=='svg' && !api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true'){ |
|
529 | + if ($extension == 'svg' && !api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true') { |
|
530 | 530 | Display::display_warning_message(get_lang('BrowserDontSupportsSVG')); |
531 | 531 | } |
532 | 532 | // HTML-editor |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | } |
579 | 579 | |
580 | 580 | //return button back to |
581 | -function show_return($document_id, $path, $call_from_tool='', $slide_id=0, $is_certificate_mode=false) |
|
581 | +function show_return($document_id, $path, $call_from_tool = '', $slide_id = 0, $is_certificate_mode = false) |
|
582 | 582 | { |
583 | 583 | $actionsLeft = null; |
584 | 584 | |
@@ -587,29 +587,29 @@ discard block |
||
587 | 587 | |
588 | 588 | if ($is_certificate_mode) { |
589 | 589 | $selectedCategory = (isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : ''); |
590 | - $actionsLeft .= '<a href="document.php?curdirpath='. $selectedCategory .'&selectcat=' . $selectedCategory .'">'. |
|
591 | - Display::return_icon('back.png',get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
592 | - $actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png',get_lang('Expand'),array('id'=>'expand'),ICON_SIZE_MEDIUM).Display::return_icon('contract.png',get_lang('Collapse'),array('id'=>'contract', 'class'=>'hide'),ICON_SIZE_MEDIUM).'</a>'; |
|
593 | - } elseif($call_from_tool=='slideshow') { |
|
590 | + $actionsLeft .= '<a href="document.php?curdirpath='.$selectedCategory.'&selectcat='.$selectedCategory.'">'. |
|
591 | + Display::return_icon('back.png', get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
592 | + $actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png', get_lang('Expand'), array('id'=>'expand'), ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Collapse'), array('id'=>'contract', 'class'=>'hide'), ICON_SIZE_MEDIUM).'</a>'; |
|
593 | + } elseif ($call_from_tool == 'slideshow') { |
|
594 | 594 | $actionsLeft .= '<a href="'.api_get_path(WEB_PATH).'main/document/slideshow.php?slide_id='.$slide_id.'&curdirpath='.Security::remove_XSS(urlencode($_GET['curdirpath'])).'">'. |
595 | - Display::return_icon('slideshow.png', get_lang('BackTo').' '.get_lang('ViewSlideshow'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
596 | - } elseif($call_from_tool=='editdraw') { |
|
595 | + Display::return_icon('slideshow.png', get_lang('BackTo').' '.get_lang('ViewSlideshow'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
596 | + } elseif ($call_from_tool == 'editdraw') { |
|
597 | 597 | $actionsLeft .= '<a href="'.$url.'">'. |
598 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
598 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
599 | 599 | $actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('BackTo').' '.get_lang('Draw'), array(), 32).'</a>'; |
600 | - } elseif($call_from_tool=='editodf') { |
|
600 | + } elseif ($call_from_tool == 'editodf') { |
|
601 | 601 | $actionsLeft .= '<a href="'.$url.'">'. |
602 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
602 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
603 | 603 | $actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('BackTo').' '.get_lang('Write'), array(), 32).'</a>'; |
604 | - $actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png',get_lang('Expand'),array('id'=>'expand'),ICON_SIZE_MEDIUM).Display::return_icon('contract.png',get_lang('Collapse'),array('id'=>'contract', 'class'=>'hide'),ICON_SIZE_MEDIUM).'</a>'; |
|
605 | - } elseif($call_from_tool=='editpaint'){ |
|
604 | + $actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png', get_lang('Expand'), array('id'=>'expand'), ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Collapse'), array('id'=>'contract', 'class'=>'hide'), ICON_SIZE_MEDIUM).'</a>'; |
|
605 | + } elseif ($call_from_tool == 'editpaint') { |
|
606 | 606 | $actionsLeft .= '<a href="'.$url.'">'. |
607 | 607 | Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), array(), ICON_SIZE_MEDIUM).'</a>'; |
608 | 608 | $actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('paint.png', get_lang('BackTo').' '.get_lang('Paint'), array(), 32).'</a>'; |
609 | 609 | } else { |
610 | 610 | $actionsLeft .= '<a href="'.$url.'">'. |
611 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
612 | - $actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png',get_lang('Expand'),array('id'=>'expand'),ICON_SIZE_MEDIUM).Display::return_icon('contract.png',get_lang('Collapse'),array('id'=>'contract', 'class'=>'hide'),ICON_SIZE_MEDIUM).'</a>'; |
|
611 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
612 | + $actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png', get_lang('Expand'), array('id'=>'expand'), ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Collapse'), array('id'=>'contract', 'class'=>'hide'), ICON_SIZE_MEDIUM).'</a>'; |
|
613 | 613 | } |
614 | 614 | |
615 | 615 | echo $toolbar = Display::toolbarAction('actions-documents', array($actionsLeft)); |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | $_course = api_get_course_info(); |
14 | -$courseDir = $_course['path'] . "/document"; |
|
14 | +$courseDir = $_course['path']."/document"; |
|
15 | 15 | $sys_course_path = api_get_path(SYS_COURSE_PATH); |
16 | -$base_work_dir = $sys_course_path . $courseDir; |
|
16 | +$base_work_dir = $sys_course_path.$courseDir; |
|
17 | 17 | $noPHP_SELF = true; |
18 | 18 | $max_filled_space = DocumentManager::get_course_quota(); |
19 | 19 | |
@@ -35,12 +35,12 @@ discard block |
||
35 | 35 | */ |
36 | 36 | $nameTools = get_lang('UplUploadDocument'); |
37 | 37 | $interbreadcrumb[] = array( |
38 | - "url" => api_get_path(WEB_CODE_PATH)."document/document.php?curdirpath=" . urlencode($path) . '&'.api_get_cidreq(), |
|
38 | + "url" => api_get_path(WEB_CODE_PATH)."document/document.php?curdirpath=".urlencode($path).'&'.api_get_cidreq(), |
|
39 | 39 | "name" => $langDocuments |
40 | 40 | ); |
41 | 41 | Display::display_header($nameTools, "Doc"); |
42 | 42 | //show the title |
43 | -api_display_tool_title($nameTools . $add_group_to_title); |
|
43 | +api_display_tool_title($nameTools.$add_group_to_title); |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * Process |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | if ($new_title) { |
75 | 75 | $ct .= ", title='$new_title'"; |
76 | 76 | } |
77 | - Database::query("UPDATE $table_document SET" . substr($ct, 1) ." WHERE id = '$docid'"); |
|
77 | + Database::query("UPDATE $table_document SET".substr($ct, 1)." WHERE id = '$docid'"); |
|
78 | 78 | } |
79 | 79 | //check for missing images in html files |
80 | 80 | $missing_files = check_for_missing_files($base_work_dir.$_POST['curdirpath'].$new_path); |
@@ -124,14 +124,14 @@ discard block |
||
124 | 124 | replace_img_path_in_html_file( |
125 | 125 | $_POST['img_file_path'], |
126 | 126 | $paths_to_replace_in_file, |
127 | - $base_work_dir . $_POST['related_file'] |
|
127 | + $base_work_dir.$_POST['related_file'] |
|
128 | 128 | ); |
129 | 129 | //update parent folders |
130 | 130 | item_property_update_on_folder($_course, $_POST['curdirpath'], $_user['user_id']); |
131 | 131 | } |
132 | 132 | } |
133 | 133 | //they want to create a directory |
134 | -if (isset($_POST['create_dir']) && $_POST['dirname']!='') { |
|
134 | +if (isset($_POST['create_dir']) && $_POST['dirname'] != '') { |
|
135 | 135 | $added_slash = $path == '/' ? '' : '/'; |
136 | 136 | $dir_name = $path.$added_slash.api_replace_dangerous_char($_POST['dirname']); |
137 | 137 | $created_dir = create_unexisting_directory( |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | //create the form that asks for the directory name |
157 | 157 | $new_folder_text = '<form action="'.api_get_self().'" method="POST">'; |
158 | 158 | $new_folder_text .= '<input type="hidden" name="curdirpath" value="'.$path.'"/>'; |
159 | - $new_folder_text .= get_lang('NewDir') .' '; |
|
159 | + $new_folder_text .= get_lang('NewDir').' '; |
|
160 | 160 | $new_folder_text .= '<input type="text" name="dirname"/>'; |
161 | 161 | $new_folder_text .= '<input type="submit" name="create_dir" value="'.get_lang('Ok').'"/>'; |
162 | 162 | $new_folder_text .= '</form>'; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | <p> |
168 | 168 | <a href="<?php echo api_get_self(); ?>?path=<?php echo $path; ?>&createdir=1"> |
169 | 169 | <?php echo Display::return_icon('new_folder.gif'); ?> |
170 | - <?php echo(get_lang('CreateDir'));?> |
|
170 | + <?php echo(get_lang('CreateDir')); ?> |
|
171 | 171 | </a> |
172 | 172 | </p> |
173 | 173 | <?php |
@@ -190,11 +190,11 @@ discard block |
||
190 | 190 | </td> |
191 | 191 | </tr> |
192 | 192 | <tr> |
193 | -<td><?php echo get_lang('Title');?></td> |
|
193 | +<td><?php echo get_lang('Title'); ?></td> |
|
194 | 194 | <td><input type="text" size="20" name="title" style="width:300px;"></td> |
195 | 195 | </tr> |
196 | 196 | <tr> |
197 | -<td valign="top"><?php echo get_lang('Comment');?></td> |
|
197 | +<td valign="top"><?php echo get_lang('Comment'); ?></td> |
|
198 | 198 | <td><textarea rows="3" cols="20" name="comment" wrap="virtual" style="width:300px;"></textarea></td> |
199 | 199 | </tr> |
200 | 200 | <tr> |
@@ -202,21 +202,21 @@ discard block |
||
202 | 202 | <?php echo get_lang('Options'); ?> |
203 | 203 | </td> |
204 | 204 | <td> |
205 | -- <input type="checkbox" name="unzip" value="1" onclick="check_unzip()"/> <?php echo(get_lang('Uncompress'));?><br/> |
|
206 | -- <?php echo (get_lang('UplWhatIfFileExists'));?><br/> |
|
207 | - <input type="radio" name="if_exists" value="nothing" title="<?php echo (get_lang('UplDoNothingLong'));?>" checked="checked"/> <?php echo (get_lang('UplDoNothing'));?><br/> |
|
208 | - <input type="radio" name="if_exists" value="overwrite" title="<?php echo (get_lang('UplOverwriteLong'));?>"/> <?php echo (get_lang('UplOverwrite'));?><br/> |
|
209 | - <input type="radio" name="if_exists" value="rename" title="<?php echo (get_lang('UplRenameLong'));?>"/> <?php echo (get_lang('UplRename'));?> |
|
205 | +- <input type="checkbox" name="unzip" value="1" onclick="check_unzip()"/> <?php echo(get_lang('Uncompress')); ?><br/> |
|
206 | +- <?php echo (get_lang('UplWhatIfFileExists')); ?><br/> |
|
207 | + <input type="radio" name="if_exists" value="nothing" title="<?php echo (get_lang('UplDoNothingLong')); ?>" checked="checked"/> <?php echo (get_lang('UplDoNothing')); ?><br/> |
|
208 | + <input type="radio" name="if_exists" value="overwrite" title="<?php echo (get_lang('UplOverwriteLong')); ?>"/> <?php echo (get_lang('UplOverwrite')); ?><br/> |
|
209 | + <input type="radio" name="if_exists" value="rename" title="<?php echo (get_lang('UplRenameLong')); ?>"/> <?php echo (get_lang('UplRename')); ?> |
|
210 | 210 | </td> |
211 | 211 | </tr> |
212 | 212 | </table> |
213 | 213 | |
214 | -<input type="submit" value="<?php echo(get_lang('Ok'));?>"> |
|
214 | +<input type="submit" value="<?php echo(get_lang('Ok')); ?>"> |
|
215 | 215 | </form> |
216 | 216 | <!-- end upload form --> |
217 | 217 | |
218 | 218 | <!-- so they can get back to the documents --> |
219 | - <p><?php echo (get_lang('Back'));?> <?php echo (get_lang('To'));?> <a href="document.php?curdirpath=<?php echo $path; ?>"><?php echo (get_lang('DocumentsOverview'));?></a></p> |
|
219 | + <p><?php echo (get_lang('Back')); ?> <?php echo (get_lang('To')); ?> <a href="document.php?curdirpath=<?php echo $path; ?>"><?php echo (get_lang('DocumentsOverview')); ?></a></p> |
|
220 | 220 | <?php |
221 | 221 | |
222 | 222 | Display::display_footer(); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * @param FormValidator $form |
33 | 33 | * @param int $fck_config |
34 | 34 | */ |
35 | - public function createForm (&$form, $fck_config=0) |
|
35 | + public function createForm(&$form, $fck_config = 0) |
|
36 | 36 | { |
37 | 37 | parent::createForm($form, $fck_config); |
38 | 38 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | // Saving a question |
51 | 51 | $form->addButtonSave(get_lang('GoToQuestion'), 'submitQuestion'); |
52 | 52 | //$form->addButtonSave(get_lang('GoToQuestion'), 'submitQuestion'); |
53 | - $form->addRule('imageUpload', get_lang('OnlyImagesAllowed'), 'filetype', array ('jpg', 'jpeg', 'png', 'gif')); |
|
53 | + $form->addRule('imageUpload', get_lang('OnlyImagesAllowed'), 'filetype', array('jpg', 'jpeg', 'png', 'gif')); |
|
54 | 54 | $form->addRule('imageUpload', get_lang('NoImage'), 'uploadedfile'); |
55 | 55 | } else { |
56 | 56 | // setting the save button here and not in the question class.php |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $_course = api_get_course_info(); |
71 | 71 | parent::processCreation($form, $objExercise); |
72 | 72 | |
73 | - if(!empty($file_info['tmp_name'])) { |
|
73 | + if (!empty($file_info['tmp_name'])) { |
|
74 | 74 | $this->uploadPicture($file_info['tmp_name'], $file_info['name']); |
75 | 75 | $documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; |
76 | 76 | $picturePath = $documentPath.'/images'; |
@@ -114,25 +114,25 @@ discard block |
||
114 | 114 | |
115 | 115 | } |
116 | 116 | |
117 | - function createForm(&$form, $fck_config=0) |
|
117 | + function createForm(&$form, $fck_config = 0) |
|
118 | 118 | { |
119 | - parent::createForm ($form, $fck_config); |
|
119 | + parent::createForm($form, $fck_config); |
|
120 | 120 | } |
121 | 121 | |
122 | - function processCreation ($form, $objExercise = null) |
|
122 | + function processCreation($form, $objExercise = null) |
|
123 | 123 | { |
124 | 124 | $file_info = $form -> getSubmitValue('imageUpload'); |
125 | - parent::processCreation ($form, $objExercise); |
|
125 | + parent::processCreation($form, $objExercise); |
|
126 | 126 | } |
127 | 127 | |
128 | - function createAnswersForm ($form) |
|
128 | + function createAnswersForm($form) |
|
129 | 129 | { |
130 | - parent::createAnswersForm ($form); |
|
130 | + parent::createAnswersForm($form); |
|
131 | 131 | } |
132 | 132 | |
133 | - function processAnswersCreation ($form) |
|
133 | + function processAnswersCreation($form) |
|
134 | 134 | { |
135 | - parent::processAnswersCreation ($form); |
|
135 | + parent::processAnswersCreation($form); |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | // error messages |
14 | 14 | if (isset($error)) { |
15 | - Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false); |
|
15 | + Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if (!isset($error)) { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $form->addElement('hidden', 'sec_token', $token); |
29 | 29 | |
30 | 30 | $form->addText('title', get_lang('Title'), true); |
31 | -$form->applyFilter('title','html_filter'); |
|
31 | +$form->applyFilter('title', 'html_filter'); |
|
32 | 32 | $form->addHtmlEditor( |
33 | 33 | 'description', |
34 | 34 | get_lang('Description'), |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if ((api_get_session_id() != 0 && Gradebook::is_active()) || api_get_session_id() == 0) { |
42 | 42 | $form->addButtonAdvancedSettings('id_qualify'); |
43 | 43 | |
44 | - $form->addElement('html','<div id="id_qualify_options" style="display:none">'); |
|
44 | + $form->addElement('html', '<div id="id_qualify_options" style="display:none">'); |
|
45 | 45 | |
46 | 46 | // Qualify Attendance for gradebook option |
47 | 47 | $form->addElement( |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | get_lang('QualifyAttendanceGradebook'), |
52 | 52 | 'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"' |
53 | 53 | ); |
54 | - $form->addElement('html','<div id="options_field" style="display:none">'); |
|
54 | + $form->addElement('html', '<div id="options_field" style="display:none">'); |
|
55 | 55 | |
56 | 56 | GradebookUtils::load_gradebook_select_in_tool($form); |
57 | 57 | |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | 'value="0.00" Style="width:40px" onfocus="javascript: this.select();"' |
65 | 65 | ); |
66 | 66 | $form->applyFilter('attendance_weight', 'html_filter'); |
67 | - $form->addElement('html','</div>'); |
|
68 | - $form->addElement('html','</div>'); |
|
67 | + $form->addElement('html', '</div>'); |
|
68 | + $form->addElement('html', '</div>'); |
|
69 | 69 | } |
70 | 70 | $form->addButtonCreate(get_lang('Save')); |
71 | 71 | $form->display(); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | // error messages |
14 | 14 | if (isset($error)) { |
15 | - Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false); |
|
15 | + Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if (!isset($error)) { |
@@ -49,18 +49,18 @@ discard block |
||
49 | 49 | if (Gradebook::is_active()) { |
50 | 50 | if (!empty($attendance_qualify_title) || !empty($attendance_weight)) { |
51 | 51 | $form->addButtonAdvancedSettings('id_qualify'); |
52 | - $form->addElement('html','<div id="id_qualify_options" style="display:block">'); |
|
52 | + $form->addElement('html', '<div id="id_qualify_options" style="display:block">'); |
|
53 | 53 | $form->addElement( |
54 | 54 | 'checkbox', |
55 | 55 | 'attendance_qualify_gradebook', |
56 | 56 | '', |
57 | 57 | get_lang('QualifyAttendanceGradebook'), |
58 | - array('checked'=>'true','onclick'=>'javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}') |
|
58 | + array('checked'=>'true', 'onclick'=>'javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}') |
|
59 | 59 | ); |
60 | - $form->addElement('html','<div id="options_field" style="display:block">'); |
|
60 | + $form->addElement('html', '<div id="options_field" style="display:block">'); |
|
61 | 61 | } else { |
62 | 62 | $form->addButtonAdvancedSettings('id_qualify'); |
63 | - $form->addElement('html','<div id="id_qualify_options" style="display:none">'); |
|
63 | + $form->addElement('html', '<div id="id_qualify_options" style="display:none">'); |
|
64 | 64 | $form->addElement( |
65 | 65 | 'checkbox', |
66 | 66 | 'attendance_qualify_gradebook', |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | get_lang('QualifyAttendanceGradebook'), |
69 | 69 | 'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"' |
70 | 70 | ); |
71 | - $form->addElement('html','<div id="options_field" style="display:none">'); |
|
71 | + $form->addElement('html', '<div id="options_field" style="display:none">'); |
|
72 | 72 | } |
73 | 73 | GradebookUtils::load_gradebook_select_in_tool($form); |
74 | 74 | $form->addElement('text', 'attendance_qualify_title', get_lang('TitleColumnGradebook')); |