@@ -15,17 +15,12 @@ discard block |
||
15 | 15 | |
16 | 16 | $showCourses = CoursesAndSessionsCatalog::showCourses(); |
17 | 17 | $showSessions = CoursesAndSessionsCatalog::showSessions(); |
18 | -$pageCurrent = isset($pageCurrent) ? $pageCurrent : |
|
19 | - isset($_GET['pageCurrent']) ? intval($_GET['pageCurrent']) : |
|
20 | - 1; |
|
21 | -$pageLength = isset($pageLength) ? $pageLength : |
|
22 | - isset($_GET['pageLength']) ? intval($_GET['pageLength']) : |
|
23 | - 10; |
|
18 | +$pageCurrent = isset($pageCurrent) ? $pageCurrent : isset($_GET['pageCurrent']) ? intval($_GET['pageCurrent']) : 1; |
|
19 | +$pageLength = isset($pageLength) ? $pageLength : isset($_GET['pageLength']) ? intval($_GET['pageLength']) : 10; |
|
24 | 20 | $pageTotal = intval(ceil(intval($countCoursesInCategory) / $pageLength)); |
25 | 21 | $cataloguePagination = $pageTotal > 1 ? |
26 | - getCataloguePagination($pageCurrent, $pageLength, $pageTotal) : |
|
27 | - ''; |
|
28 | -$search_term = isset($search_term) ? $search_term :null; |
|
22 | + getCataloguePagination($pageCurrent, $pageLength, $pageTotal) : ''; |
|
23 | +$search_term = isset($search_term) ? $search_term : null; |
|
29 | 24 | |
30 | 25 | if ($showSessions && isset($_POST['date'])) { |
31 | 26 | $date = $_POST['date']; |
@@ -66,7 +61,7 @@ discard block |
||
66 | 61 | $el.prepend('<?php echo Display::display_icon('nolines_minus.gif'); ?>'); |
67 | 62 | |
68 | 63 | $.ajax({ |
69 | - url: '<?php echo api_get_path(WEB_AJAX_PATH) . 'course.ajax.php' ?>', |
|
64 | + url: '<?php echo api_get_path(WEB_AJAX_PATH).'course.ajax.php' ?>', |
|
70 | 65 | type: 'GET', |
71 | 66 | dataType: 'json', |
72 | 67 | data: { |
@@ -130,13 +125,13 @@ discard block |
||
130 | 125 | <?php |
131 | 126 | |
132 | 127 | $webAction = api_get_path(WEB_CODE_PATH).'auth/courses.php'; |
133 | - $action = (!empty($_REQUEST['action'])?Security::remove_XSS($_REQUEST['action']):'display_courses'); |
|
134 | - $pageLength = (!empty($_REQUEST['pageLength'])?intval($_REQUEST['pageLength']):10); |
|
135 | - $pageCurrent = (!empty($_REQUEST['pageCurrent'])?intval($_REQUEST['pageCurrent']):1); |
|
128 | + $action = (!empty($_REQUEST['action']) ? Security::remove_XSS($_REQUEST['action']) : 'display_courses'); |
|
129 | + $pageLength = (!empty($_REQUEST['pageLength']) ? intval($_REQUEST['pageLength']) : 10); |
|
130 | + $pageCurrent = (!empty($_REQUEST['pageCurrent']) ? intval($_REQUEST['pageCurrent']) : 1); |
|
136 | 131 | $form = '<form action="'.$webAction.'" method="GET" class="form-horizontal">'; |
137 | - $form .= '<input type="hidden" name="action" value="' . $action . '">'; |
|
138 | - $form .= '<input type="hidden" name="pageCurrent" value="' . $pageCurrent . '">'; |
|
139 | - $form .= '<input type="hidden" name="pageLength" value="' . $pageLength . '">'; |
|
132 | + $form .= '<input type="hidden" name="action" value="'.$action.'">'; |
|
133 | + $form .= '<input type="hidden" name="pageCurrent" value="'.$pageCurrent.'">'; |
|
134 | + $form .= '<input type="hidden" name="pageLength" value="'.$pageLength.'">'; |
|
140 | 135 | $form .= '<div class="form-group">'; |
141 | 136 | $form .= '<div class="col-sm-12">'; |
142 | 137 | $form .= '<select name="category_code" onchange="submit();" class="selectpicker show-tick form-control">'; |
@@ -145,11 +140,11 @@ discard block |
||
145 | 140 | $categoryCode = $category['code']; |
146 | 141 | $countCourse = $category['count_courses']; |
147 | 142 | |
148 | - $form .= '<option '. ($categoryCode == $codeType? 'selected="selected" ':'') .' value="' . $category['code'] . '">' . $category['name'] . ' ( '. $countCourse .' ) </option>'; |
|
143 | + $form .= '<option '.($categoryCode == $codeType ? 'selected="selected" ' : '').' value="'.$category['code'].'">'.$category['name'].' ( '.$countCourse.' ) </option>'; |
|
149 | 144 | if (!empty($browse_course_categories[$categoryCode])) { |
150 | - foreach ($browse_course_categories[$categoryCode] as $subCategory){ |
|
145 | + foreach ($browse_course_categories[$categoryCode] as $subCategory) { |
|
151 | 146 | $subCategoryCode = $subCategory['code']; |
152 | - $form .= '<option '. ($subCategoryCode == $codeType ? 'selected="selected" ':'') .' value="' . $subCategory['code'] . '"> ---' . $subCategory['name'] . ' ( '. $subCategory['count_courses'] .' ) </option>'; |
|
147 | + $form .= '<option '.($subCategoryCode == $codeType ? 'selected="selected" ' : '').' value="'.$subCategory['code'].'"> ---'.$subCategory['name'].' ( '.$subCategory['count_courses'].' ) </option>'; |
|
153 | 148 | } |
154 | 149 | } |
155 | 150 | } |
@@ -212,7 +207,7 @@ discard block |
||
212 | 207 | $course_subscribe_allowed = ($course['subscribe'] == 1); |
213 | 208 | $course_unsubscribe_allowed = ($course['unsubscribe'] == 1); |
214 | 209 | $count_connections = $course['count_connections']; |
215 | - $creation_date = substr($course['creation_date'],0,10); |
|
210 | + $creation_date = substr($course['creation_date'], 0, 10); |
|
216 | 211 | |
217 | 212 | $icon_title = null; |
218 | 213 | $html = null; |
@@ -328,9 +323,9 @@ discard block |
||
328 | 323 | $ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote'; |
329 | 324 | $teachers = CourseManager::get_teacher_list_from_course_code_to_string($course['code']); |
330 | 325 | $rating = Display::return_rating_system('star_'.$course['real_id'], $ajax_url.'&course_id='.$course['real_id'], $course['point_info']); |
331 | - $html .= '<h4 class="title"><a href="' . $linkCourse . '">' . cut($title, 60) . '</a></h4>'; |
|
326 | + $html .= '<h4 class="title"><a href="'.$linkCourse.'">'.cut($title, 60).'</a></h4>'; |
|
332 | 327 | $html .= '<div class="teachers">'.$teachers.'</div>'; |
333 | - $html .= '<div class="ranking">'. $rating . '</div>'; |
|
328 | + $html .= '<div class="ranking">'.$rating.'</div>'; |
|
334 | 329 | |
335 | 330 | return $html; |
336 | 331 | } |
@@ -345,8 +340,8 @@ discard block |
||
345 | 340 | $title = $course['title']; |
346 | 341 | $html = ''; |
347 | 342 | if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { |
348 | - $html = '<a data-title="' . $title . '" class="ajax btn btn-default btn-sm" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&code='.$course['code'].'" title="' . get_lang('Description') . '">' . |
|
349 | - Display::returnFontAwesomeIcon('info-circle') . '</a>'; |
|
343 | + $html = '<a data-title="'.$title.'" class="ajax btn btn-default btn-sm" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&code='.$course['code'].'" title="'.get_lang('Description').'">'. |
|
344 | + Display::returnFontAwesomeIcon('info-circle').'</a>'; |
|
350 | 345 | } |
351 | 346 | |
352 | 347 | return $html; |
@@ -358,7 +353,7 @@ discard block |
||
358 | 353 | */ |
359 | 354 | function return_goto_button($course) |
360 | 355 | { |
361 | - $html = ' <a class="btn btn-default btn-sm" title="' . get_lang('GoToCourse') . '" href="'.api_get_course_url($course['code']).'">'. |
|
356 | + $html = ' <a class="btn btn-default btn-sm" title="'.get_lang('GoToCourse').'" href="'.api_get_course_url($course['code']).'">'. |
|
362 | 357 | Display::returnFontAwesomeIcon('share').'</a>'; |
363 | 358 | |
364 | 359 | return $html; |
@@ -392,8 +387,8 @@ discard block |
||
392 | 387 | */ |
393 | 388 | function return_register_button($course, $stok, $code, $search_term) |
394 | 389 | { |
395 | - $html = ' <a class="btn btn-success btn-sm" title="' . get_lang('Subscribe') . '" href="'.api_get_self().'?action=subscribe_course&sec_token='.$stok.'&subscribe_course='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">' . |
|
396 | - Display::returnFontAwesomeIcon('sign-in') . '</a>'; |
|
390 | + $html = ' <a class="btn btn-success btn-sm" title="'.get_lang('Subscribe').'" href="'.api_get_self().'?action=subscribe_course&sec_token='.$stok.'&subscribe_course='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">'. |
|
391 | + Display::returnFontAwesomeIcon('sign-in').'</a>'; |
|
397 | 392 | return $html; |
398 | 393 | } |
399 | 394 | |
@@ -406,7 +401,7 @@ discard block |
||
406 | 401 | */ |
407 | 402 | function return_unregister_button($course, $stok, $search_term, $code) |
408 | 403 | { |
409 | - $html = ' <a class="btn btn-danger btn-sm" title="' . get_lang('Unsubscribe') . '" href="'. api_get_self().'?action=unsubscribe&sec_token='.$stok.'&unsubscribe='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">' . |
|
410 | - Display::returnFontAwesomeIcon('sign-out') . '</a>'; |
|
404 | + $html = ' <a class="btn btn-danger btn-sm" title="'.get_lang('Unsubscribe').'" href="'.api_get_self().'?action=unsubscribe&sec_token='.$stok.'&unsubscribe='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">'. |
|
405 | + Display::returnFontAwesomeIcon('sign-out').'</a>'; |
|
411 | 406 | return $html; |
412 | 407 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | if (in_array(strtolower(pathinfo($_FILES['user_file']['name'], PATHINFO_EXTENSION)), $allowed_extensions)) { |
22 | 22 | require_once api_get_path(SYS_CODE_PATH).'newscorm/lp_upload.php'; |
23 | 23 | if (isset($o_ppt) && $first_item_id != 0) { |
24 | - if (api_get_setting('search_enabled')=='true') { |
|
24 | + if (api_get_setting('search_enabled') == 'true') { |
|
25 | 25 | require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; |
26 | 26 | $specific_fields = get_specific_field_list(); |
27 | 27 | foreach ($specific_fields as $specific_field) { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | api_not_allowed(true); |
61 | 61 | } |
62 | 62 | |
63 | -$interbreadcrumb[]= array ("url"=>"../newscorm/lp_controller.php?action=list", "name"=> get_lang("Doc")); |
|
63 | +$interbreadcrumb[] = array("url"=>"../newscorm/lp_controller.php?action=list", "name"=> get_lang("Doc")); |
|
64 | 64 | |
65 | 65 | $nameTools = get_lang("OogieConversionPowerPoint"); |
66 | 66 | Display :: display_header($nameTools); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $form->addElement('file', 'user_file', array('<img src="../img/powerpoint_big.gif" />', $div_upload_limit)); |
79 | 79 | $form->addElement('checkbox', 'take_slide_name', '', get_lang('TakeSlideName')); |
80 | 80 | if (api_get_setting('search_enabled') == 'true') { |
81 | - require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'); |
|
81 | + require_once(api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'); |
|
82 | 82 | $specific_fields = get_specific_field_list(); |
83 | 83 | $form->addElement('checkbox', 'index_document', '', get_lang('SearchFeatureDoIndexDocument')); |
84 | 84 | $form->addElement('select_language', 'language', get_lang('SearchFeatureDocumentLanguage')); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $form->addButtonUpload(get_lang('ConvertToLP'), 'convert'); |
91 | 91 | $form->addElement('hidden', 'ppt2lp', 'true'); |
92 | 92 | $form->add_real_progress_bar(md5(rand(0, 10000)), 'user_file', 1, true); |
93 | -$defaults = array('take_slide_name'=>'checked="checked"','index_document'=>'checked="checked"'); |
|
93 | +$defaults = array('take_slide_name'=>'checked="checked"', 'index_document'=>'checked="checked"'); |
|
94 | 94 | $form->setDefaults($defaults); |
95 | 95 | |
96 | 96 | // display the form |
@@ -42,14 +42,14 @@ |
||
42 | 42 | |
43 | 43 | |
44 | 44 | //$is_allowed_to_edit = api_is_allowed_to_edit(); |
45 | -$is_allowed_to_edit = api_is_allowed_to_edit(null,true); |
|
46 | -if(!$is_allowed_to_edit){ |
|
45 | +$is_allowed_to_edit = api_is_allowed_to_edit(null, true); |
|
46 | +if (!$is_allowed_to_edit) { |
|
47 | 47 | api_not_allowed(true); |
48 | 48 | } |
49 | 49 | |
50 | -$courseDir = $_course['path'] . "/document"; |
|
50 | +$courseDir = $_course['path']."/document"; |
|
51 | 51 | $sys_course_path = api_get_path(SYS_COURSE_PATH); |
52 | -$base_work_dir = $sys_course_path . $courseDir; |
|
52 | +$base_work_dir = $sys_course_path.$courseDir; |
|
53 | 53 | $noPHP_SELF = true; |
54 | 54 | $max_filled_space = DocumentManager::get_course_quota(); |
55 | 55 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $dialogtype = 'error'; |
34 | 34 | } else { |
35 | 35 | if (api_get_setting('search_enabled') == 'true') { |
36 | - require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'; |
|
36 | + require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; |
|
37 | 37 | $specific_fields = get_specific_field_list(); |
38 | 38 | |
39 | 39 | foreach ($specific_fields as $specific_field) { |
@@ -58,5 +58,5 @@ discard block |
||
58 | 58 | $dialogtype = 'confirmation'; |
59 | 59 | } |
60 | 60 | } |
61 | -header('location: ../newscorm/lp_controller.php?action=list&dialog_box=' . $msg . '&dialogtype=' . $dialogtype); |
|
61 | +header('location: ../newscorm/lp_controller.php?action=list&dialog_box='.$msg.'&dialogtype='.$dialogtype); |
|
62 | 62 | exit; |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | */ |
13 | 13 | $noPHP_SELF = false; |
14 | 14 | $nameTools = get_lang('FileUpload'); |
15 | -$interbreadcrumb[]= array ("url"=>"../newscorm/lp_controller.php?action=list", "name"=> get_lang(TOOL_DOCUMENT)); |
|
16 | -Display::display_header($nameTools,"Doc"); |
|
15 | +$interbreadcrumb[] = array("url"=>"../newscorm/lp_controller.php?action=list", "name"=> get_lang(TOOL_DOCUMENT)); |
|
16 | +Display::display_header($nameTools, "Doc"); |
|
17 | 17 | //show the title |
18 | 18 | api_display_tool_title($nameTools.$add_group_to_title); |
19 | 19 | ?> |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | <div id="dynamic_div" style="display:block;margin-left:40%;margin-top:10px;height:50px;"> |
22 | 22 | </div> |
23 | 23 | <div id="upload_form_div" name="form_div" style="display:block;"> |
24 | - <form method="POST" action="upload.php" id="upload_form" enctype="multipart/form-data" onsubmit="javascript: myUpload.start('dynamic_div','progressbar_green.gif','<?php echo(get_lang('Uploading', ''));?>','upload_form_div');"> |
|
24 | + <form method="POST" action="upload.php" id="upload_form" enctype="multipart/form-data" onsubmit="javascript: myUpload.start('dynamic_div','progressbar_green.gif','<?php echo(get_lang('Uploading', '')); ?>','upload_form_div');"> |
|
25 | 25 | <input type="hidden" name="curdirpath" value="<?php echo $path; ?>"> |
26 | 26 | <input type="hidden" name="tool" value="<?php echo $my_tool; ?>"> |
27 | 27 | <input type="file" name="user_file"> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | require_once '../inc/global.inc.php'; |
17 | 17 | $this_section = SECTION_COURSES; |
18 | -$current_course_tool = TOOL_GROUP; |
|
18 | +$current_course_tool = TOOL_GROUP; |
|
19 | 19 | |
20 | 20 | // Notice for unauthorized people. |
21 | 21 | api_protect_course_script(true); |
@@ -85,29 +85,29 @@ discard block |
||
85 | 85 | Display::return_icon('add.png', get_lang('NewGroupCreate'), '', ICON_SIZE_MEDIUM).'</a>'; |
86 | 86 | |
87 | 87 | if (api_get_setting('allow_group_categories') == 'true') { |
88 | - $actions.= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'. |
|
88 | + $actions .= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'. |
|
89 | 89 | Display::return_icon('new_folder.png', get_lang('AddCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
90 | 90 | } else { |
91 | - $actions.= '<a href="group_category.php?'.api_get_cidreq().'&id=2">'. |
|
91 | + $actions .= '<a href="group_category.php?'.api_get_cidreq().'&id=2">'. |
|
92 | 92 | Display::return_icon('settings.png', get_lang('PropModify'), '', ICON_SIZE_MEDIUM).'</a>'; |
93 | 93 | } |
94 | - $actions.= '<a href="import.php?'.api_get_cidreq().'&action=import">'. |
|
94 | + $actions .= '<a href="import.php?'.api_get_cidreq().'&action=import">'. |
|
95 | 95 | Display::return_icon('import_csv.png', get_lang('Import'), '', ICON_SIZE_MEDIUM).'</a>'; |
96 | 96 | |
97 | - $actions.= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_all&type=csv">'. |
|
97 | + $actions .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_all&type=csv">'. |
|
98 | 98 | Display::return_icon('export_csv.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).'</a>'; |
99 | 99 | |
100 | - $actions.= '<a href="group_overview.php?'.api_get_cidreq().'&action=export&type=xls">'. |
|
100 | + $actions .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export&type=xls">'. |
|
101 | 101 | Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'</a>'; |
102 | 102 | |
103 | - $actions.= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_pdf">'. |
|
103 | + $actions .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_pdf">'. |
|
104 | 104 | Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>'; |
105 | 105 | |
106 | - $actions.= '<a href="group.php?'.api_get_cidreq().'">'. |
|
107 | - Display::return_icon('group.png', get_lang('Groups'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
106 | + $actions .= '<a href="group.php?'.api_get_cidreq().'">'. |
|
107 | + Display::return_icon('group.png', get_lang('Groups'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
108 | 108 | |
109 | 109 | |
110 | - $actions.= '<a href="../user/user.php?'.api_get_cidreq().'">'. |
|
110 | + $actions .= '<a href="../user/user.php?'.api_get_cidreq().'">'. |
|
111 | 111 | Display::return_icon('user.png', get_lang('GoTo').' '.get_lang('Users'), '', ICON_SIZE_MEDIUM).'</a>'; |
112 | 112 | |
113 | 113 | // Action links |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $userId = api_get_user_id(); |
21 | 21 | |
22 | 22 | $this_section = SECTION_COURSES; |
23 | -$current_course_tool = TOOL_GROUP; |
|
23 | +$current_course_tool = TOOL_GROUP; |
|
24 | 24 | |
25 | 25 | // Notice for unauthorized people. |
26 | 26 | api_protect_course_script(true); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * Self-registration and un-registration |
43 | 43 | */ |
44 | 44 | $my_group_id = isset($_GET['group_id']) ? intval($_GET['group_id']) : null; |
45 | -$my_msg = isset($_GET['msg']) ? Security::remove_XSS($_GET['msg']) : null; |
|
45 | +$my_msg = isset($_GET['msg']) ? Security::remove_XSS($_GET['msg']) : null; |
|
46 | 46 | $my_group = isset($_REQUEST['group']) ? Security::remove_XSS($_REQUEST['group']) : null; |
47 | 47 | $my_get_id1 = isset($_GET['id1']) ? Security::remove_XSS($_GET['id1']) : null; |
48 | 48 | $my_get_id2 = isset($_GET['id2']) ? Security::remove_XSS($_GET['id2']) : null; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | Display::return_icon('add-groups.png', get_lang('NewGroupCreate'), '', ICON_SIZE_MEDIUM).'</a>'; |
170 | 170 | |
171 | 171 | if (api_get_setting('allow_group_categories') == 'true') { |
172 | - $actionsLeft .= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'. |
|
172 | + $actionsLeft .= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'. |
|
173 | 173 | Display::return_icon('new_folder.png', get_lang('AddCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
174 | 174 | } else { |
175 | 175 | $actionsLeft .= '<a href="group_category.php?'.api_get_cidreq().'&id=2">'. |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | |
196 | 196 | $actionsRight = GroupManager::getSearchForm(); |
197 | -$toolbar = Display::toolbarAction('toolbar-groups', $content = array( 0 => $actionsLeft, 1 => $actionsRight )); |
|
197 | +$toolbar = Display::toolbarAction('toolbar-groups', $content = array(0 => $actionsLeft, 1 => $actionsRight)); |
|
198 | 198 | $group_cats = GroupManager::get_categories(api_get_course_id()); |
199 | 199 | |
200 | 200 | echo $toolbar; |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $actions = null; |
226 | 226 | if (api_is_allowed_to_edit(false, true) && !empty($categoryId)) { |
227 | 227 | $actions .= '<a href="group_category.php?'.api_get_cidreq().'&id='.$categoryId.'" title="'.get_lang('Edit').'">'. |
228 | - Display::return_icon('edit.png', get_lang('EditGroup'),'',ICON_SIZE_SMALL).'</a>'; |
|
228 | + Display::return_icon('edit.png', get_lang('EditGroup'), '', ICON_SIZE_SMALL).'</a>'; |
|
229 | 229 | $actions .= |
230 | 230 | Display::url( |
231 | 231 | Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL), |
@@ -235,17 +235,17 @@ discard block |
||
235 | 235 | ) |
236 | 236 | ); |
237 | 237 | if ($index != 0) { |
238 | - $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index -1]['id'].'">'. |
|
239 | - Display::return_icon('up.png',' ','',ICON_SIZE_SMALL).'</a>'; |
|
238 | + $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index - 1]['id'].'">'. |
|
239 | + Display::return_icon('up.png', ' ', '', ICON_SIZE_SMALL).'</a>'; |
|
240 | 240 | } |
241 | 241 | if ($index != count($group_cats) - 1) { |
242 | - $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index +1]['id'].'">'. |
|
243 | - Display::return_icon('down.png',' ','',ICON_SIZE_SMALL).'</a>'; |
|
242 | + $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index + 1]['id'].'">'. |
|
243 | + Display::return_icon('down.png', ' ', '', ICON_SIZE_SMALL).'</a>'; |
|
244 | 244 | } |
245 | 245 | } |
246 | 246 | |
247 | 247 | echo Display::page_header( |
248 | - Security::remove_XSS($category['title'].' '. $label.' ').$actions, |
|
248 | + Security::remove_XSS($category['title'].' '.$label.' ').$actions, |
|
249 | 249 | null, |
250 | 250 | 'h4', |
251 | 251 | false |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | require_once '../inc/global.inc.php'; |
14 | 14 | $this_section = SECTION_COURSES; |
15 | -$current_course_tool = TOOL_GROUP; |
|
15 | +$current_course_tool = TOOL_GROUP; |
|
16 | 16 | |
17 | 17 | // Notice for unauthorized people. |
18 | 18 | api_protect_course_script(true); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | require '../inc/global.inc.php'; |
15 | 15 | $this_section = SECTION_COURSES; |
16 | -$current_course_tool = TOOL_GROUP; |
|
16 | +$current_course_tool = TOOL_GROUP; |
|
17 | 17 | |
18 | 18 | // Notice for unauthorized people. |
19 | 19 | api_protect_course_script(true); |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | $current_group = GroupManager :: get_group_properties($group_id); |
23 | 23 | |
24 | 24 | $nameTools = get_lang('EditGroup'); |
25 | -$interbreadcrumb[] = array ('url' => 'group.php?'.api_get_cidReq(), 'name' => get_lang('Groups')); |
|
26 | -$interbreadcrumb[] = array ('url' => 'group_space.php?'.api_get_cidReq(), 'name' => $current_group['name']); |
|
25 | +$interbreadcrumb[] = array('url' => 'group.php?'.api_get_cidReq(), 'name' => get_lang('Groups')); |
|
26 | +$interbreadcrumb[] = array('url' => 'group_space.php?'.api_get_cidReq(), 'name' => $current_group['name']); |
|
27 | 27 | |
28 | 28 | $is_group_member = GroupManager :: is_tutor_of_group(api_get_user_id(), $group_id); |
29 | 29 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | return true; |
105 | 105 | } |
106 | 106 | if (isset($value['max_member']) && isset($value['group_members']) && $value['max_member'] < count($value['group_members'])) { |
107 | - return array ('group_members' => get_lang('GroupTooMuchMembers')); |
|
107 | + return array('group_members' => get_lang('GroupTooMuchMembers')); |
|
108 | 108 | } |
109 | 109 | return true; |
110 | 110 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $form->addText('name', get_lang('GroupName')); |
131 | 131 | |
132 | 132 | // Description |
133 | -$form->addElement('textarea', 'description', get_lang('Description'), array ('rows' => 6)); |
|
133 | +$form->addElement('textarea', 'description', get_lang('Description'), array('rows' => 6)); |
|
134 | 134 | |
135 | 135 | $complete_user_list = GroupManager :: fill_groups_list($current_group['id']); |
136 | 136 | usort($complete_user_list, 'sort_users'); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | // Group members |
154 | 154 | $group_member_list = GroupManager :: get_subscribed_users($current_group['id']); |
155 | 155 | |
156 | -$selected_users = array (); |
|
156 | +$selected_users = array(); |
|
157 | 157 | foreach ($group_member_list as $index => $user) { |
158 | 158 | $selected_users[] = $user['user_id']; |
159 | 159 | } |
@@ -183,42 +183,42 @@ discard block |
||
183 | 183 | $form->createElement('checkbox', 'self_registration_allowed', get_lang('GroupSelfRegistration'), get_lang('GroupAllowStudentRegistration'), 1), |
184 | 184 | $form->createElement('checkbox', 'self_unregistration_allowed', null, get_lang('GroupAllowStudentUnregistration'), 1) |
185 | 185 | ); |
186 | -$form->addGroup($group, '', Display::return_icon('user.png', get_lang('GroupSelfRegistration') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupSelfRegistration'), '', false); |
|
186 | +$form->addGroup($group, '', Display::return_icon('user.png', get_lang('GroupSelfRegistration'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupSelfRegistration'), '', false); |
|
187 | 187 | |
188 | 188 | // Documents settings |
189 | 189 | $group = array(); |
190 | 190 | $group[] = $form->createElement('radio', 'doc_state', get_lang('GroupDocument'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE); |
191 | 191 | $group[] = $form->createElement('radio', 'doc_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC); |
192 | 192 | $group[] = $form->createElement('radio', 'doc_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE); |
193 | -$form->addGroup($group, '', Display::return_icon('folder.png', get_lang('GroupDocument') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupDocument'), '', false); |
|
193 | +$form->addGroup($group, '', Display::return_icon('folder.png', get_lang('GroupDocument'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupDocument'), '', false); |
|
194 | 194 | |
195 | 195 | // Work settings |
196 | 196 | $group = array(); |
197 | 197 | $group[] = $form->createElement('radio', 'work_state', get_lang('GroupWork'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE); |
198 | 198 | $group[] = $form->createElement('radio', 'work_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC); |
199 | 199 | $group[] = $form->createElement('radio', 'work_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE); |
200 | -$form->addGroup($group, '', Display::return_icon('work.png', get_lang('GroupWork') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupWork'), '', false); |
|
200 | +$form->addGroup($group, '', Display::return_icon('work.png', get_lang('GroupWork'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupWork'), '', false); |
|
201 | 201 | |
202 | 202 | // Calendar settings |
203 | 203 | $group = array(); |
204 | 204 | $group[] = $form->createElement('radio', 'calendar_state', get_lang('GroupCalendar'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE); |
205 | 205 | $group[] = $form->createElement('radio', 'calendar_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC); |
206 | 206 | $group[] = $form->createElement('radio', 'calendar_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE); |
207 | -$form->addGroup($group, '', Display::return_icon('agenda.png', get_lang('GroupCalendar') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupCalendar'), '', false); |
|
207 | +$form->addGroup($group, '', Display::return_icon('agenda.png', get_lang('GroupCalendar'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupCalendar'), '', false); |
|
208 | 208 | |
209 | 209 | // Announcements settings |
210 | 210 | $group = array(); |
211 | 211 | $group[] = $form->createElement('radio', 'announcements_state', get_lang('GroupAnnouncements'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE); |
212 | 212 | $group[] = $form->createElement('radio', 'announcements_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC); |
213 | 213 | $group[] = $form->createElement('radio', 'announcements_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE); |
214 | -$form->addGroup($group, '', Display::return_icon('announce.png', get_lang('GroupAnnouncements') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupAnnouncements'), '', false); |
|
214 | +$form->addGroup($group, '', Display::return_icon('announce.png', get_lang('GroupAnnouncements'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupAnnouncements'), '', false); |
|
215 | 215 | |
216 | 216 | //Forum settings |
217 | 217 | $group = array(); |
218 | 218 | $group[] = $form->createElement('radio', 'forum_state', get_lang('GroupForum'), get_lang('NotAvailable'), GroupManager::TOOL_NOT_AVAILABLE); |
219 | 219 | $group[] = $form->createElement('radio', 'forum_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC); |
220 | 220 | $group[] = $form->createElement('radio', 'forum_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE); |
221 | -$form->addGroup($group, '', Display::return_icon('forum.png', get_lang('GroupForum') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupForum'), '', false); |
|
221 | +$form->addGroup($group, '', Display::return_icon('forum.png', get_lang('GroupForum'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupForum'), '', false); |
|
222 | 222 | |
223 | 223 | // Wiki settings |
224 | 224 | $group = array( |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $form->createElement('radio', 'wiki_state', null, get_lang('Public'), GroupManager::TOOL_PUBLIC), |
227 | 227 | $form->createElement('radio', 'wiki_state', null, get_lang('Private'), GroupManager::TOOL_PRIVATE) |
228 | 228 | ); |
229 | -$form->addGroup($group, '', Display::return_icon('wiki.png', get_lang('GroupWiki') , array(), ICON_SIZE_SMALL).' '.get_lang('GroupWiki'), '', false); |
|
229 | +$form->addGroup($group, '', Display::return_icon('wiki.png', get_lang('GroupWiki'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupWiki'), '', false); |
|
230 | 230 | |
231 | 231 | // Chat settings |
232 | 232 | $group = array( |