@@ -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; |
@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | * @author Yannick Warnier <[email protected]> |
10 | 10 | */ |
11 | 11 | |
12 | -$courseDir = $_course['path'] . "/document"; |
|
12 | +$courseDir = $_course['path']."/document"; |
|
13 | 13 | $sys_course_path = api_get_path(SYS_COURSE_PATH); |
14 | -$base_work_dir = $sys_course_path . $courseDir; |
|
14 | +$base_work_dir = $sys_course_path.$courseDir; |
|
15 | 15 | $noPHP_SELF = true; |
16 | 16 | $max_filled_space = DocumentManager::get_course_quota(); |
17 | 17 | |
@@ -34,14 +34,14 @@ discard block |
||
34 | 34 | |
35 | 35 | $nameTools = get_lang('UplUploadDocument'); |
36 | 36 | $interbreadcrumb[] = array( |
37 | - "url" => "./document.php?curdirpath=" . urlencode( |
|
37 | + "url" => "./document.php?curdirpath=".urlencode( |
|
38 | 38 | $path |
39 | - ) . $req_gid, |
|
39 | + ).$req_gid, |
|
40 | 40 | "name" => $langDocuments |
41 | 41 | ); |
42 | 42 | Display::display_header($nameTools, "Doc"); |
43 | 43 | //show the title |
44 | -api_display_tool_title($nameTools . $add_group_to_title); |
|
44 | +api_display_tool_title($nameTools.$add_group_to_title); |
|
45 | 45 | |
46 | 46 | /** |
47 | 47 | * Process |
@@ -71,11 +71,11 @@ discard block |
||
71 | 71 | $ct = ''; |
72 | 72 | if ($new_comment) $ct .= ", comment='$new_comment'"; |
73 | 73 | if ($new_title) $ct .= ", title='$new_title'"; |
74 | - Database::query("UPDATE $table_document SET" . substr($ct, 1) ." WHERE id = '$docid'"); |
|
74 | + Database::query("UPDATE $table_document SET".substr($ct, 1)." WHERE id = '$docid'"); |
|
75 | 75 | } |
76 | 76 | //check for missing images in html files |
77 | 77 | $missing_files = check_for_missing_files($base_work_dir.$_POST['curdirpath'].$new_path); |
78 | - if ($missing_files) { |
|
78 | + if ($missing_files) { |
|
79 | 79 | //show a form to upload the missing files |
80 | 80 | Display::display_normal_message( |
81 | 81 | build_missing_files_form( |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | if ($number_of_uploaded_images > 0) { |
95 | 95 | //we could also create a function for this, I'm not sure... |
96 | 96 | //create a directory for the missing files |
97 | - $img_directory = str_replace('.','_',$_POST['related_file']."_files"); |
|
97 | + $img_directory = str_replace('.', '_', $_POST['related_file']."_files"); |
|
98 | 98 | $folderData = create_unexisting_directory( |
99 | 99 | $_course, |
100 | 100 | $_user['user_id'], |
@@ -120,15 +120,15 @@ discard block |
||
120 | 120 | replace_img_path_in_html_file( |
121 | 121 | $_POST['img_file_path'], |
122 | 122 | $paths_to_replace_in_file, |
123 | - $base_work_dir . $_POST['related_file'] |
|
123 | + $base_work_dir.$_POST['related_file'] |
|
124 | 124 | ); |
125 | 125 | //update parent folders |
126 | - item_property_update_on_folder($_course,$_POST['curdirpath'],$_user['user_id']); |
|
126 | + item_property_update_on_folder($_course, $_POST['curdirpath'], $_user['user_id']); |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 | //they want to create a directory |
130 | -if (isset($_POST['create_dir']) && $_POST['dirname']!='') { |
|
131 | - $added_slash = ($path=='/')?'':'/'; |
|
130 | +if (isset($_POST['create_dir']) && $_POST['dirname'] != '') { |
|
131 | + $added_slash = ($path == '/') ? '' : '/'; |
|
132 | 132 | $dir_name = $path.$added_slash.api_replace_dangerous_char($_POST['dirname']); |
133 | 133 | $created_dir = create_unexisting_directory( |
134 | 134 | $_course, |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | //create the form that asks for the directory name |
153 | 153 | $new_folder_text = '<form action="'.api_get_self().'" method="POST">'; |
154 | 154 | $new_folder_text .= '<input type="hidden" name="curdirpath" value="'.$path.'"/>'; |
155 | - $new_folder_text .= get_lang('NewDir') .' '; |
|
155 | + $new_folder_text .= get_lang('NewDir').' '; |
|
156 | 156 | $new_folder_text .= '<input type="text" name="dirname"/>'; |
157 | 157 | $new_folder_text .= '<input type="submit" name="create_dir" value="'.get_lang('Ok').'"/>'; |
158 | 158 | $new_folder_text .= '</form>'; |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | <p> |
164 | 164 | <a href="<?php echo api_get_self(); ?>?path=<?php echo $path; ?>&createdir=1"> |
165 | 165 | <img src="../img/new_folder.gif" border="0" align="absmiddle" alt ="" /> |
166 | - <?php echo(get_lang('CreateDir'));?> |
|
166 | + <?php echo(get_lang('CreateDir')); ?> |
|
167 | 167 | </a> |
168 | 168 | </p> |
169 | 169 | <?php |
@@ -186,11 +186,11 @@ discard block |
||
186 | 186 | </td> |
187 | 187 | </tr> |
188 | 188 | <tr> |
189 | - <td><?php echo get_lang('Title');?></td> |
|
189 | + <td><?php echo get_lang('Title'); ?></td> |
|
190 | 190 | <td><input type="text" size="20" name="title" style="width:300px;"></td> |
191 | 191 | </tr> |
192 | 192 | <tr> |
193 | - <td valign="top"><?php echo get_lang('Comment');?></td> |
|
193 | + <td valign="top"><?php echo get_lang('Comment'); ?></td> |
|
194 | 194 | <td><textarea rows="3" cols="20" name="comment" wrap="virtual" style="width:300px;"></textarea></td> |
195 | 195 | </tr> |
196 | 196 | <tr> |
@@ -198,22 +198,22 @@ discard block |
||
198 | 198 | <?php echo get_lang('Options'); ?> |
199 | 199 | </td> |
200 | 200 | <td> |
201 | -- <input type="checkbox" name="unzip" value="1" onclick="check_unzip()"/> <?php echo(get_lang('Uncompress'));?><br/> |
|
202 | -- <?php echo (get_lang('UplWhatIfFileExists'));?><br/> |
|
203 | - <input type="radio" name="if_exists" value="nothing" title="<?php echo (get_lang('UplDoNothingLong'));?>" checked="checked"/> <?php echo (get_lang('UplDoNothing'));?><br/> |
|
204 | - <input type="radio" name="if_exists" value="overwrite" title="<?php echo (get_lang('UplOverwriteLong'));?>"/> <?php echo (get_lang('UplOverwrite'));?><br/> |
|
205 | - <input type="radio" name="if_exists" value="rename" title="<?php echo (get_lang('UplRenameLong'));?>"/> <?php echo (get_lang('UplRename'));?> |
|
201 | +- <input type="checkbox" name="unzip" value="1" onclick="check_unzip()"/> <?php echo(get_lang('Uncompress')); ?><br/> |
|
202 | +- <?php echo (get_lang('UplWhatIfFileExists')); ?><br/> |
|
203 | + <input type="radio" name="if_exists" value="nothing" title="<?php echo (get_lang('UplDoNothingLong')); ?>" checked="checked"/> <?php echo (get_lang('UplDoNothing')); ?><br/> |
|
204 | + <input type="radio" name="if_exists" value="overwrite" title="<?php echo (get_lang('UplOverwriteLong')); ?>"/> <?php echo (get_lang('UplOverwrite')); ?><br/> |
|
205 | + <input type="radio" name="if_exists" value="rename" title="<?php echo (get_lang('UplRenameLong')); ?>"/> <?php echo (get_lang('UplRename')); ?> |
|
206 | 206 | |
207 | 207 | </td> |
208 | 208 | </tr> |
209 | 209 | </table> |
210 | 210 | |
211 | -<input type="submit" value="<?php echo(get_lang('Ok'));?>"> |
|
211 | +<input type="submit" value="<?php echo(get_lang('Ok')); ?>"> |
|
212 | 212 | </form> |
213 | 213 | <!-- end upload form --> |
214 | 214 | |
215 | 215 | <!-- so they can get back to the documents --> |
216 | - <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> |
|
216 | + <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> |
|
217 | 217 | <?php |
218 | 218 | |
219 | 219 | Display::display_footer(); |
@@ -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"> |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | */ |
7 | 7 | require_once '../inc/global.inc.php'; |
8 | 8 | $this_section = SECTION_COURSES; |
9 | -$current_course_tool = TOOL_GROUP; |
|
9 | +$current_course_tool = TOOL_GROUP; |
|
10 | 10 | |
11 | 11 | // Notice for unauthorized people. |
12 | 12 | api_protect_course_script(true); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | case 'create_groups': |
20 | 20 | $groups = array(); |
21 | 21 | |
22 | - for ($i = 0; $i < $_POST['number_of_groups']; $i ++) { |
|
22 | + for ($i = 0; $i < $_POST['number_of_groups']; $i++) { |
|
23 | 23 | $group1['name'] = empty($_POST['group_'.$i.'_name']) ? get_lang('Group').' '.$i : $_POST['group_'.$i.'_name']; |
24 | 24 | $group1['category'] = isset($_POST['group_'.$i.'_category']) ? $_POST['group_'.$i.'_category'] : null; |
25 | 25 | $group1['tutor'] = isset($_POST['group_'.$i.'_tutor']) ? $_POST['group_'.$i.'_tutor'] : null; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | $nameTools = get_lang('GroupCreation'); |
73 | -$interbreadcrumb[] = array ('url' => 'group.php', 'name' => get_lang('Groups')); |
|
73 | +$interbreadcrumb[] = array('url' => 'group.php', 'name' => get_lang('Groups')); |
|
74 | 74 | Display :: display_header($nameTools, 'Group'); |
75 | 75 | |
76 | 76 | if (!api_is_allowed_to_edit(false, true)) { |
@@ -163,16 +163,16 @@ discard block |
||
163 | 163 | $form->addGroup($group_el, 'groups', null, "</td><td>", false); |
164 | 164 | // Checkboxes |
165 | 165 | if ($_POST['number_of_groups'] > 1) { |
166 | - $group_el = array (); |
|
166 | + $group_el = array(); |
|
167 | 167 | $group_el[] = $form->createElement('static', null, null, ' '); |
168 | 168 | if (api_get_setting('allow_group_categories') == 'true') { |
169 | 169 | $group_el[] = $form->createElement('checkbox', 'same_category', null, get_lang('SameForAll'), array('onclick' => "javascript: switch_state('category');")); |
170 | 170 | } |
171 | - $group_el[] = $form->createElement('checkbox', 'same_places', null, get_lang('SameForAll'), array ('onclick' => "javascript: switch_state('places');")); |
|
171 | + $group_el[] = $form->createElement('checkbox', 'same_places', null, get_lang('SameForAll'), array('onclick' => "javascript: switch_state('places');")); |
|
172 | 172 | $form->addGroup($group_el, 'groups', null, '</td><td>', false); |
173 | 173 | } |
174 | 174 | // Properties for all groups |
175 | - for ($group_number = 0; $group_number < $_POST['number_of_groups']; $group_number ++) { |
|
175 | + for ($group_number = 0; $group_number < $_POST['number_of_groups']; $group_number++) { |
|
176 | 176 | $group_el = array(); |
177 | 177 | $group_el[] = $form->createElement('text', 'group_'.$group_number.'_name'); |
178 | 178 | if (api_get_setting('allow_group_categories') == 'true') { |
@@ -185,14 +185,14 @@ discard block |
||
185 | 185 | $prev = '000'; |
186 | 186 | } elseif ($group_id < 100) { |
187 | 187 | $prev = '00'; |
188 | - } elseif ($group_id<1000) { |
|
188 | + } elseif ($group_id < 1000) { |
|
189 | 189 | $prev = '0'; |
190 | 190 | } else { |
191 | 191 | $prev = ''; |
192 | 192 | } |
193 | 193 | } |
194 | 194 | |
195 | - $defaults['group_'.$group_number.'_name'] = get_lang('GroupSingle').' '.$prev.$group_id ++; |
|
195 | + $defaults['group_'.$group_number.'_name'] = get_lang('GroupSingle').' '.$prev.$group_id++; |
|
196 | 196 | $form->addGroup($group_el, 'group_'.$group_number, null, '</td><td>', false); |
197 | 197 | } |
198 | 198 | $defaults['action'] = 'create_groups'; |
@@ -213,8 +213,8 @@ discard block |
||
213 | 213 | $group_el[] = $create_groups_form->addButtonCreate(get_lang('ProceedToCreateGroup'), 'submit', true); |
214 | 214 | $create_groups_form->addGroup($group_el, 'create_groups', get_lang('NumberOfGroupsToCreate'), ' ', false); |
215 | 215 | */ |
216 | - $create_groups_form->addText('number_of_groups',get_lang('NumberOfGroupsToCreate'),null,array('value'=>'1')); |
|
217 | - $create_groups_form->addButton('submit', get_lang('ProceedToCreateGroup'),'plus','primary'); |
|
216 | + $create_groups_form->addText('number_of_groups', get_lang('NumberOfGroupsToCreate'), null, array('value'=>'1')); |
|
217 | + $create_groups_form->addButton('submit', get_lang('ProceedToCreateGroup'), 'plus', 'primary'); |
|
218 | 218 | $defaults = array(); |
219 | 219 | $defaults['number_of_groups'] = 1; |
220 | 220 | $create_groups_form->setDefaults($defaults); |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | * Show form to generate subgroups |
225 | 225 | */ |
226 | 226 | if (api_get_setting('allow_group_categories') == 'true' && count(GroupManager :: get_group_list()) > 0) { |
227 | - $base_group_options = array (); |
|
227 | + $base_group_options = array(); |
|
228 | 228 | $groups = GroupManager :: get_group_list(); |
229 | 229 | foreach ($groups as $index => $group) { |
230 | 230 | $number_of_students = GroupManager :: number_of_students($group['id']); |
@@ -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 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | require_once '../inc/global.inc.php'; |
13 | -$current_course_tool = TOOL_GROUP; |
|
13 | +$current_course_tool = TOOL_GROUP; |
|
14 | 14 | |
15 | 15 | // Notice for unauthorized people. |
16 | 16 | api_protect_course_script(true); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | echo '<div class="actions">'; |
71 | 71 | echo '<a href="group.php">'. |
72 | - Display::return_icon('back.png',get_lang('BackToGroupList'),'',ICON_SIZE_MEDIUM). |
|
72 | + Display::return_icon('back.png', get_lang('BackToGroupList'), '', ICON_SIZE_MEDIUM). |
|
73 | 73 | '</a>'; |
74 | 74 | |
75 | 75 | /* |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | $unsubscribe_group = ''; |
88 | 88 | if (GroupManager :: is_self_unregistration_allowed($user_id, $current_group['id'])) { |
89 | - $unsubscribe_group = '<a class="btn btn-default" href="'.api_get_self().'?selfUnReg=1" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."'".')) return false;">'. |
|
89 | + $unsubscribe_group = '<a class="btn btn-default" href="'.api_get_self().'?selfUnReg=1" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."'".')) return false;">'. |
|
90 | 90 | get_lang("StudentUnsubscribe").'</a>'; |
91 | 91 | } |
92 | 92 | echo ' </div>'; |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | GroupManager::is_tutor_of_group(api_get_user_id(), api_get_group_id()) |
99 | 99 | ) { |
100 | 100 | $my_origin = isset($origin) ? $origin : ''; |
101 | - $edit_url = '<a href="'.api_get_path(WEB_CODE_PATH).'group/settings.php?'.api_get_cidreq().'&origin='.$my_origin.'">'. |
|
102 | - Display::return_icon('edit.png', get_lang('EditGroup'),'',ICON_SIZE_SMALL).'</a>'; |
|
101 | + $edit_url = '<a href="'.api_get_path(WEB_CODE_PATH).'group/settings.php?'.api_get_cidreq().'&origin='.$my_origin.'">'. |
|
102 | + Display::return_icon('edit.png', get_lang('EditGroup'), '', ICON_SIZE_SMALL).'</a>'; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | echo Display::page_header( |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $forums_of_groups = get_forums_of_group($current_group['id']); |
123 | 123 | |
124 | 124 | if (is_array($forums_of_groups)) { |
125 | - if ($current_group['forum_state'] != GroupManager::TOOL_NOT_AVAILABLE ) { |
|
125 | + if ($current_group['forum_state'] != GroupManager::TOOL_NOT_AVAILABLE) { |
|
126 | 126 | foreach ($forums_of_groups as $key => $value) { |
127 | 127 | |
128 | 128 | //*!empty($user_subscribe_to_current_group) && */ |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | $actions_array[] = array( |
136 | 136 | 'url' => '../forum/viewforum.php?forum='.$value['forum_id'].'&'.api_get_cidreq().'&origin=group', |
137 | - 'content' => Display::return_icon('forum.png', get_lang('Forum').': '.$value['forum_title'] , array(), 32) |
|
137 | + 'content' => Display::return_icon('forum.png', get_lang('Forum').': '.$value['forum_title'], array(), 32) |
|
138 | 138 | ); |
139 | 139 | } |
140 | 140 | } |
@@ -212,9 +212,9 @@ discard block |
||
212 | 212 | $forums_of_groups = get_forums_of_group($current_group['id']); |
213 | 213 | |
214 | 214 | if (is_array($forums_of_groups)) { |
215 | - if ( $current_group['forum_state'] == GroupManager::TOOL_PUBLIC ) { |
|
215 | + if ($current_group['forum_state'] == GroupManager::TOOL_PUBLIC) { |
|
216 | 216 | foreach ($forums_of_groups as $key => $value) { |
217 | - if ($value['forum_group_public_private'] == 'public' ) { |
|
217 | + if ($value['forum_group_public_private'] == 'public') { |
|
218 | 218 | $actions_array[] = array( |
219 | 219 | 'url' => '../forum/viewforum.php?cidReq='.api_get_course_id().'&forum='.$value['forum_id'].'&gidReq='.Security::remove_XSS($current_group['id']).'&origin=group', |
220 | 220 | 'content' => Display::return_icon('forum.png', get_lang('GroupForum'), array(), ICON_SIZE_MEDIUM) |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | ); |
266 | 266 | } |
267 | 267 | |
268 | - if ($current_group['chat_state'] == GroupManager::TOOL_PUBLIC ) { |
|
268 | + if ($current_group['chat_state'] == GroupManager::TOOL_PUBLIC) { |
|
269 | 269 | // Link to the chat area of this group |
270 | 270 | if (api_get_course_setting('allow_open_chat_window')) { |
271 | 271 | $actions_array[] = array( |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | if (count($tutors) == 0) { |
295 | 295 | $tutor_info = get_lang('GroupNoneMasc'); |
296 | 296 | } else { |
297 | - isset($origin) ? $my_origin = $origin:$my_origin=''; |
|
297 | + isset($origin) ? $my_origin = $origin : $my_origin = ''; |
|
298 | 298 | $tutor_info .= '<ul class="thumbnails">'; |
299 | 299 | foreach ($tutors as $index => $tutor) { |
300 | 300 | $userInfo = api_get_user_info($tutor['user_id']); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | FROM ".$table_group_user." |
374 | 374 | WHERE c_id = $course_id AND group_id='".Database::escape_string($current_group['id'])."'"; |
375 | 375 | $result = Database::query($sql); |
376 | - $return = Database::fetch_array($result,'ASSOC'); |
|
376 | + $return = Database::fetch_array($result, 'ASSOC'); |
|
377 | 377 | return $return['number_of_users']; |
378 | 378 | } |
379 | 379 | |
@@ -394,8 +394,8 @@ discard block |
||
394 | 394 | global $current_group; |
395 | 395 | |
396 | 396 | // Database table definition |
397 | - $table_group_user = Database :: get_course_table(TABLE_GROUP_USER); |
|
398 | - $table_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
397 | + $table_group_user = Database :: get_course_table(TABLE_GROUP_USER); |
|
398 | + $table_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
399 | 399 | |
400 | 400 | $course_id = api_get_course_int_id(); |
401 | 401 |
@@ -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( |