@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | |
29 | 29 | // COURSES WITH CATEGORIES |
30 | 30 | if (!empty($user_course_categories)) { |
31 | - foreach ($user_course_categories as $row) { |
|
32 | - echo Display::page_subheader($row['title']); |
|
33 | - echo '<a name="category'.$row['id'].'"></a>'; |
|
31 | + foreach ($user_course_categories as $row) { |
|
32 | + echo Display::page_subheader($row['title']); |
|
33 | + echo '<a name="category'.$row['id'].'"></a>'; |
|
34 | 34 | |
35 | - if (isset($_GET['categoryid']) && $_GET['categoryid'] == $row['id']) { ?> |
|
35 | + if (isset($_GET['categoryid']) && $_GET['categoryid'] == $row['id']) { ?> |
|
36 | 36 | <!-- We display the edit form for the category --> |
37 | 37 | |
38 | 38 | <form name="edit_course_category" method="post" action="courses.php?action=<?php echo $action; ?>"> |
@@ -243,15 +243,15 @@ discard block |
||
243 | 243 | </a> |
244 | 244 | <?php } else { |
245 | 245 | echo Display::display_icon('up_na.png', get_lang('Up'),'',22); |
246 | - } |
|
246 | + } |
|
247 | 247 | |
248 | - if ($key < $number_of_courses - 1) { ?> |
|
248 | + if ($key < $number_of_courses - 1) { ?> |
|
249 | 249 | <a href="courses.php?action=<?php echo $action; ?>&move=down&course=<?php echo $course['code']; ?>&category=<?php echo $course['user_course_cat']; ?>&sec_token=<?php echo $stok; ?>"> |
250 | 250 | <?php echo Display::display_icon('down.png', get_lang('Down'),'',22); ?> |
251 | 251 | </a> |
252 | 252 | <?php } else { |
253 | 253 | echo Display::display_icon('down_na.png', get_lang('Down'),'',22); |
254 | - }?> |
|
254 | + }?> |
|
255 | 255 | </div> |
256 | 256 | <div style="float:left; margin-right:10px;"> |
257 | 257 | <!-- cancel subscrioption--> |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | </div> |
270 | 270 | <?php } |
271 | 271 | } |
272 | - ?> |
|
272 | + ?> |
|
273 | 273 | </td> |
274 | 274 | </tr> |
275 | 275 | <?php |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <!-- Actions: The menu with the different options in cathe course management --> |
18 | 18 | <div id="actions" class="actions"> |
19 | 19 | <?php if ($action != 'createcoursecategory') { ?> |
20 | - <a href="<?php echo api_get_self(); ?>?action=createcoursecategory"><?php echo Display::return_icon('new_folder.png', get_lang('CreateCourseCategory'),'','32'); ?></a> |
|
20 | + <a href="<?php echo api_get_self(); ?>?action=createcoursecategory"><?php echo Display::return_icon('new_folder.png', get_lang('CreateCourseCategory'), '', '32'); ?></a> |
|
21 | 21 | <?php } ?> |
22 | 22 | </div> |
23 | 23 | |
@@ -49,26 +49,26 @@ discard block |
||
49 | 49 | $max_category_key = count($user_course_categories); |
50 | 50 | if ($action != 'unsubscribe') { ?> |
51 | 51 | <a href="courses.php?action=sortmycourses&categoryid=<?php echo $row['id']; ?>&sec_token=<?php echo $stok; ?>#category<?php echo $row['id']; ?>"> |
52 | - <?php echo Display::display_icon('edit.png', get_lang('Edit'),'',22); ?> |
|
52 | + <?php echo Display::display_icon('edit.png', get_lang('Edit'), '', 22); ?> |
|
53 | 53 | </a> |
54 | 54 | |
55 | 55 | <?php if ($row['id'] != $user_course_categories[0]['id']) { ?> |
56 | 56 | <a href="courses.php?action=<?php echo $action ?>&move=up&category=<?php echo $row['id']; ?>&sec_token=<?php echo $stok; ?>"> |
57 | - <?php echo Display::return_icon('up.png', get_lang('Up'),'',22); ?> |
|
57 | + <?php echo Display::return_icon('up.png', get_lang('Up'), '', 22); ?> |
|
58 | 58 | </a> |
59 | 59 | <?php } else { ?> |
60 | - <?php echo Display::return_icon('up_na.png', get_lang('Up'),'',22); ?> |
|
60 | + <?php echo Display::return_icon('up_na.png', get_lang('Up'), '', 22); ?> |
|
61 | 61 | <?php } ?> |
62 | 62 | |
63 | 63 | <?php if ($row['id'] != $user_course_categories[$max_category_key - 1]['id']) { ?> |
64 | 64 | <a href="courses.php?action=<?php echo $action; ?>&move=down&category=<?php echo $row['id']; ?>&sec_token=<?php echo $stok; ?>"> |
65 | - <?php echo Display::return_icon('down.png', get_lang('Down'),'',22); ?> |
|
65 | + <?php echo Display::return_icon('down.png', get_lang('Down'), '', 22); ?> |
|
66 | 66 | </a> |
67 | 67 | <?php } else { ?> |
68 | - <?php echo Display::return_icon('down_na.png', get_lang('Down'),'',22); ?> |
|
68 | + <?php echo Display::return_icon('down_na.png', get_lang('Down'), '', 22); ?> |
|
69 | 69 | <?php } ?> |
70 | 70 | <a href="courses.php?action=deletecoursecategory&id=<?php echo $row['id']; ?>&sec_token=<?php echo $stok; ?>"> |
71 | - <?php echo Display::display_icon('delete.png', get_lang('Delete'), array('onclick' => "javascript: if (!confirm('".addslashes(api_htmlentities(get_lang("CourseCategoryAbout2bedeleted"), ENT_QUOTES, api_get_system_encoding()))."')) return false;"),22) ?> |
|
71 | + <?php echo Display::display_icon('delete.png', get_lang('Delete'), array('onclick' => "javascript: if (!confirm('".addslashes(api_htmlentities(get_lang("CourseCategoryAbout2bedeleted"), ENT_QUOTES, api_get_system_encoding()))."')) return false;"), 22) ?> |
|
72 | 72 | </a> |
73 | 73 | <?php } |
74 | 74 | echo '<br /><br />'; |
@@ -122,35 +122,35 @@ discard block |
||
122 | 122 | <div style="float:left;width:110px;"> |
123 | 123 | <?php |
124 | 124 | if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { |
125 | - $icon_title = get_lang('CourseDetails') . ' - ' . $course['title']; |
|
125 | + $icon_title = get_lang('CourseDetails').' - '.$course['title']; |
|
126 | 126 | ?> |
127 | 127 | <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>inc/ajax/course_home.ajax.php?a=show_course_information&code=<?php echo $course['code'] ?>" data-title="<?php echo $icon_title ?>" title="<?php echo $icon_title ?>" class="ajax"> |
128 | - <?php echo Display::return_icon('info.png', $icon_title,'','22') ?> |
|
128 | + <?php echo Display::return_icon('info.png', $icon_title, '', '22') ?> |
|
129 | 129 | <?php } ?> |
130 | 130 | </a> |
131 | 131 | |
132 | 132 | <?php if (isset($_GET['edit']) && $course['code'] == $_GET['edit']) { ?> |
133 | - <?php echo Display::display_icon('edit_na.png', get_lang('Edit'),'',22); ?> |
|
133 | + <?php echo Display::display_icon('edit_na.png', get_lang('Edit'), '', 22); ?> |
|
134 | 134 | <?php } else { ?> |
135 | 135 | <a href="courses.php?action=<?php echo $action; ?>&edit=<?php echo $course['code']; ?>&sec_token=<?php echo $stok; ?>"> |
136 | - <?php echo Display::display_icon('edit.png', get_lang('Edit'),'',22); ?> |
|
136 | + <?php echo Display::display_icon('edit.png', get_lang('Edit'), '', 22); ?> |
|
137 | 137 | </a> |
138 | 138 | <?php } ?> |
139 | 139 | |
140 | 140 | <?php if ($key > 0) { ?> |
141 | 141 | <a href="courses.php?action=<?php echo $action; ?>&move=up&course=<?php echo $course['code']; ?>&category=<?php echo $course['user_course_cat']; ?>&sec_token=<?php echo $stok; ?>"> |
142 | - <?php echo Display::display_icon('up.png', get_lang('Up'),'',22); ?> |
|
142 | + <?php echo Display::display_icon('up.png', get_lang('Up'), '', 22); ?> |
|
143 | 143 | </a> |
144 | 144 | <?php } else { ?> |
145 | - <?php echo Display::display_icon('up_na.png', get_lang('Up'),'',22); ?> |
|
145 | + <?php echo Display::display_icon('up_na.png', get_lang('Up'), '', 22); ?> |
|
146 | 146 | <?php } ?> |
147 | 147 | |
148 | 148 | <?php if ($key < $number_of_courses - 1) { ?> |
149 | 149 | <a href="courses.php?action=<?php echo $action; ?>&move=down&course=<?php echo $course['code']; ?>&category=<?php echo $course['user_course_cat']; ?>&sec_token=<?php echo $stok; ?>"> |
150 | - <?php echo Display::display_icon('down.png', get_lang('Down'),'',22); ?> |
|
150 | + <?php echo Display::display_icon('down.png', get_lang('Down'), '', 22); ?> |
|
151 | 151 | </a> |
152 | 152 | <?php } else { ?> |
153 | - <?php echo Display::display_icon('down_na.png', get_lang('Down'),'',22); ?> |
|
153 | + <?php echo Display::display_icon('down_na.png', get_lang('Down'), '', 22); ?> |
|
154 | 154 | <?php } ?> |
155 | 155 | |
156 | 156 | </div> |
@@ -221,36 +221,36 @@ discard block |
||
221 | 221 | <div style="float:left; width:110px"> |
222 | 222 | <?php |
223 | 223 | if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { |
224 | - $icon_title = get_lang('CourseDetails') . ' - ' . $course['title']; |
|
224 | + $icon_title = get_lang('CourseDetails').' - '.$course['title']; |
|
225 | 225 | ?> |
226 | 226 | <a href="<?php echo api_get_path(WEB_CODE_PATH); ?>inc/ajax/course_home.ajax.php?a=show_course_information&code=<?php echo $course['code'] ?>" data-title="<?php echo $icon_title ?>" title="<?php echo $icon_title ?>" class="ajax"> |
227 | - <?php echo Display::return_icon('info.png', $icon_title, '','22'); ?> |
|
227 | + <?php echo Display::return_icon('info.png', $icon_title, '', '22'); ?> |
|
228 | 228 | </a> |
229 | 229 | <?php } ?> |
230 | 230 | |
231 | 231 | <?php if (isset($_GET['edit']) && $course['code'] == $_GET['edit']) { ?> |
232 | - <?php echo Display::display_icon('edit_na.png', get_lang('Edit'),'',22); ?> |
|
232 | + <?php echo Display::display_icon('edit_na.png', get_lang('Edit'), '', 22); ?> |
|
233 | 233 | <?php } else { ?> |
234 | 234 | <a href="courses.php?action=<?php echo $action; ?>&edit=<?php echo $course['code']; ?>&sec_token=<?php echo $stok; ?>"> |
235 | - <?php echo Display::display_icon('edit.png', get_lang('Edit'),'',22); ?> |
|
235 | + <?php echo Display::display_icon('edit.png', get_lang('Edit'), '', 22); ?> |
|
236 | 236 | </a> |
237 | 237 | <?php } ?> |
238 | 238 | |
239 | 239 | <!-- up /down icons--> |
240 | 240 | <?php if ($key > 0) { ?> |
241 | 241 | <a href="courses.php?action=<?php echo $action; ?>&move=up&course=<?php echo $course['code']; ?>&category=<?php echo $course['user_course_cat']; ?>&sec_token=<?php echo $stok; ?>"> |
242 | - <?php echo Display::display_icon('up.png', get_lang('Up'),'',22) ?> |
|
242 | + <?php echo Display::display_icon('up.png', get_lang('Up'), '', 22) ?> |
|
243 | 243 | </a> |
244 | 244 | <?php } else { |
245 | - echo Display::display_icon('up_na.png', get_lang('Up'),'',22); |
|
245 | + echo Display::display_icon('up_na.png', get_lang('Up'), '', 22); |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | if ($key < $number_of_courses - 1) { ?> |
249 | 249 | <a href="courses.php?action=<?php echo $action; ?>&move=down&course=<?php echo $course['code']; ?>&category=<?php echo $course['user_course_cat']; ?>&sec_token=<?php echo $stok; ?>"> |
250 | - <?php echo Display::display_icon('down.png', get_lang('Down'),'',22); ?> |
|
250 | + <?php echo Display::display_icon('down.png', get_lang('Down'), '', 22); ?> |
|
251 | 251 | </a> |
252 | 252 | <?php } else { |
253 | - echo Display::display_icon('down_na.png', get_lang('Down'),'',22); |
|
253 | + echo Display::display_icon('down_na.png', get_lang('Down'), '', 22); |
|
254 | 254 | }?> |
255 | 255 | </div> |
256 | 256 | <div style="float:left; margin-right:10px;"> |
@@ -16,7 +16,7 @@ |
||
16 | 16 | <!-- Actions: The menu with the different options in cathe course management --> |
17 | 17 | <div id="actions" class="actions"> |
18 | 18 | <a href="<?php echo api_get_self() ?>?action=sortmycourses"> |
19 | - <?php echo Display::return_icon('back.png', get_lang('Back'),'','32'); ?> |
|
19 | + <?php echo Display::return_icon('back.png', get_lang('Back'), '', '32'); ?> |
|
20 | 20 | </a> |
21 | 21 | </div> |
22 | 22 |
@@ -26,14 +26,14 @@ |
||
26 | 26 | * Redirect to the correct script to handle this type of upload |
27 | 27 | */ |
28 | 28 | switch ($_SESSION['my_tool']) { |
29 | - case TOOL_LEARNPATH: |
|
30 | - require 'upload.scorm.php'; |
|
31 | - break; |
|
32 | - //the following cases need to be distinguished later on |
|
33 | - case TOOL_DROPBOX: |
|
34 | - case TOOL_STUDENTPUBLICATION: |
|
35 | - case TOOL_DOCUMENT: |
|
36 | - default: |
|
37 | - require 'upload.document.php'; |
|
38 | - break; |
|
29 | + case TOOL_LEARNPATH: |
|
30 | + require 'upload.scorm.php'; |
|
31 | + break; |
|
32 | + //the following cases need to be distinguished later on |
|
33 | + case TOOL_DROPBOX: |
|
34 | + case TOOL_STUDENTPUBLICATION: |
|
35 | + case TOOL_DOCUMENT: |
|
36 | + default: |
|
37 | + require 'upload.document.php'; |
|
38 | + break; |
|
39 | 39 | } |
@@ -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 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | /** |
5 | 5 | * This script displays an area where teachers can edit the group properties and member list. |
6 | - * |
|
6 | + * |
|
7 | 7 | * @author various contributors |
8 | 8 | * @author Roan Embrechts (VUB), partial code cleanup, initial virtual course support |
9 | 9 | * @package chamilo.group |
@@ -12,7 +12,7 @@ discard block |
||
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); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $form->addGroup( |
82 | 82 | $group, |
83 | 83 | '', |
84 | - Display::return_icon('user.png', get_lang('GroupSelfRegistration')) . '<span>' . get_lang('GroupSelfRegistration') . '</span>', |
|
84 | + Display::return_icon('user.png', get_lang('GroupSelfRegistration')).'<span>'.get_lang('GroupSelfRegistration').'</span>', |
|
85 | 85 | null, |
86 | 86 | false |
87 | 87 | ); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $form->addGroup( |
96 | 96 | $group, |
97 | 97 | '', |
98 | - Display::return_icon('folder.png', get_lang('GroupDocument')) . '<span>' . get_lang('GroupDocument') . '</span>', |
|
98 | + Display::return_icon('folder.png', get_lang('GroupDocument')).'<span>'.get_lang('GroupDocument').'</span>', |
|
99 | 99 | null, |
100 | 100 | false |
101 | 101 | ); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $form->addGroup( |
110 | 110 | $group, |
111 | 111 | '', |
112 | - Display::return_icon('works.png', get_lang('GroupWork')) . '<span>' . get_lang('GroupWork') . '</span>', |
|
112 | + Display::return_icon('works.png', get_lang('GroupWork')).'<span>'.get_lang('GroupWork').'</span>', |
|
113 | 113 | null, |
114 | 114 | false |
115 | 115 | ); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $form->addGroup( |
124 | 124 | $group, |
125 | 125 | '', |
126 | - Display::return_icon('agenda.png', get_lang('GroupCalendar')) . '<span>' . get_lang('GroupCalendar') . '</span>', |
|
126 | + Display::return_icon('agenda.png', get_lang('GroupCalendar')).'<span>'.get_lang('GroupCalendar').'</span>', |
|
127 | 127 | null, |
128 | 128 | false |
129 | 129 | ); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $form->addGroup( |
141 | 141 | $group, |
142 | 142 | '', |
143 | - Display::return_icon('announce.png', get_lang('GroupAnnouncements')) . '<span>' . get_lang('GroupAnnouncements') . '</span>', |
|
143 | + Display::return_icon('announce.png', get_lang('GroupAnnouncements')).'<span>'.get_lang('GroupAnnouncements').'</span>', |
|
144 | 144 | null, |
145 | 145 | false |
146 | 146 | ); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $form->addGroup( |
155 | 155 | $group, |
156 | 156 | '', |
157 | - Display::return_icon('forum.png', get_lang('GroupForum')) . '<span>' . get_lang('GroupForum') . '</span>', |
|
157 | + Display::return_icon('forum.png', get_lang('GroupForum')).'<span>'.get_lang('GroupForum').'</span>', |
|
158 | 158 | null, |
159 | 159 | false |
160 | 160 | ); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $form->addGroup( |
182 | 182 | $group, |
183 | 183 | '', |
184 | - Display::return_icon('chat.png', get_lang('Chat')) . '<span>' . get_lang('Chat') . '</span>', |
|
184 | + Display::return_icon('chat.png', get_lang('Chat')).'<span>'.get_lang('Chat').'</span>', |
|
185 | 185 | null, |
186 | 186 | false |
187 | 187 | ); |
@@ -161,9 +161,9 @@ |
||
161 | 161 | // possible : number_groups_left > 0 and is group member |
162 | 162 | $possible_users = array(); |
163 | 163 | foreach ($complete_user_list as $index => $user) { |
164 | - if ($user['number_groups_left'] > 0 || in_array($user['user_id'], $selected_users)) { |
|
164 | + if ($user['number_groups_left'] > 0 || in_array($user['user_id'], $selected_users)) { |
|
165 | 165 | $possible_users[$user['user_id']] = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')'; |
166 | - } |
|
166 | + } |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | $group_members_element = $form->addElement('advmultiselect', 'group_members', get_lang('GroupMembers'), $possible_users, 'style="width: 280px;"'); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | require_once '../inc/global.inc.php'; |
15 | 15 | $this_section = SECTION_COURSES; |
16 | -$current_course_tool = TOOL_GROUP; |
|
16 | +$current_course_tool = TOOL_GROUP; |
|
17 | 17 | |
18 | 18 | // Notice for unauthorized people. |
19 | 19 | api_protect_course_script(true); |
@@ -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'); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | // Group members |
160 | 160 | $group_member_list = GroupManager :: get_subscribed_users($current_group['id']); |
161 | 161 | |
162 | -$selected_users = array (); |
|
162 | +$selected_users = array(); |
|
163 | 163 | foreach ($group_member_list as $index => $user) { |
164 | 164 | $selected_users[] = $user['user_id']; |
165 | 165 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $form->addGroup( |
199 | 199 | $group, |
200 | 200 | '', |
201 | - Display::return_icon('user.png', get_lang('GroupSelfRegistration')) . ' ' . get_lang('GroupSelfRegistration'), |
|
201 | + Display::return_icon('user.png', get_lang('GroupSelfRegistration')).' '.get_lang('GroupSelfRegistration'), |
|
202 | 202 | null, |
203 | 203 | false |
204 | 204 | ); |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $form->addGroup( |
225 | 225 | $group, |
226 | 226 | '', |
227 | - Display::return_icon('work.png', get_lang('GroupWork')) . ' ' . get_lang('GroupWork'), |
|
227 | + Display::return_icon('work.png', get_lang('GroupWork')).' '.get_lang('GroupWork'), |
|
228 | 228 | null, |
229 | 229 | false |
230 | 230 | ); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $form->addGroup( |
238 | 238 | $group, |
239 | 239 | '', |
240 | - Display::return_icon('agenda.png', get_lang('GroupCalendar')) . ' ' . get_lang('GroupCalendar'), |
|
240 | + Display::return_icon('agenda.png', get_lang('GroupCalendar')).' '.get_lang('GroupCalendar'), |
|
241 | 241 | null, |
242 | 242 | false |
243 | 243 | ); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | $form->addGroup( |
251 | 251 | $group, |
252 | 252 | '', |
253 | - Display::return_icon('announce.png', get_lang('GroupAnnouncements')) . ' ' . get_lang('GroupAnnouncements'), |
|
253 | + Display::return_icon('announce.png', get_lang('GroupAnnouncements')).' '.get_lang('GroupAnnouncements'), |
|
254 | 254 | null, |
255 | 255 | false |
256 | 256 | ); |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | $form->addGroup( |
264 | 264 | $group, |
265 | 265 | '', |
266 | - Display::return_icon('forum.png', get_lang('GroupForum')) . ' ' . get_lang('GroupForum'), |
|
266 | + Display::return_icon('forum.png', get_lang('GroupForum')).' '.get_lang('GroupForum'), |
|
267 | 267 | null, |
268 | 268 | false |
269 | 269 | ); |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | $form->addGroup( |
278 | 278 | $group, |
279 | 279 | '', |
280 | - Display::return_icon('wiki.png', get_lang('GroupWiki')) . ' ' . get_lang('GroupWiki'), |
|
280 | + Display::return_icon('wiki.png', get_lang('GroupWiki')).' '.get_lang('GroupWiki'), |
|
281 | 281 | null, |
282 | 282 | false |
283 | 283 | ); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | isset ($_GET['action']) || |
19 | 19 | isset ($_POST['action'])) |
20 | 20 | ) { |
21 | - api_not_allowed(); |
|
21 | + api_not_allowed(); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -86,30 +86,30 @@ discard block |
||
86 | 86 | |
87 | 87 | // Build the form |
88 | 88 | if (isset($_GET['id'])) { |
89 | - // Update settings of existing category |
|
90 | - $action = 'update_settings'; |
|
89 | + // Update settings of existing category |
|
90 | + $action = 'update_settings'; |
|
91 | 91 | $form = new FormValidator( |
92 | 92 | 'group_category', |
93 | 93 | 'post', |
94 | 94 | api_get_self().'?id='.$category['id'].'&'.api_get_cidReq() |
95 | 95 | ); |
96 | - $form->addElement('hidden', 'id'); |
|
96 | + $form->addElement('hidden', 'id'); |
|
97 | 97 | } else { |
98 | 98 | // Checks if the field was created in the table Category. It creates it if is neccesary |
99 | 99 | $table_category = Database :: get_course_table(TABLE_GROUP_CATEGORY); |
100 | 100 | if (!Database::query("SELECT wiki_state FROM $table_category WHERE c_id = $course_id")) { |
101 | 101 | Database::query("ALTER TABLE $table_category ADD wiki_state tinyint(3) UNSIGNED NOT NULL default '1' WHERE c_id = $course_id"); |
102 | 102 | } |
103 | - // Create a new category |
|
104 | - $action = 'add_category'; |
|
105 | - $form = new FormValidator('group_category'); |
|
103 | + // Create a new category |
|
104 | + $action = 'add_category'; |
|
105 | + $form = new FormValidator('group_category'); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | // If categories allowed, show title & description field |
109 | 109 | if (api_get_setting('allow_group_categories') == 'true') { |
110 | 110 | $form->addElement('header', $nameTools); |
111 | 111 | $form->addElement('html', '<div class="row"><div class="col-md-6">'); |
112 | - $form->addText('title', get_lang('Title')); |
|
112 | + $form->addText('title', get_lang('Title')); |
|
113 | 113 | |
114 | 114 | // Groups per user |
115 | 115 | $possible_values = array(); |
@@ -142,8 +142,8 @@ discard block |
||
142 | 142 | $form->addElement('html', '</div>'); |
143 | 143 | $form->addElement('html', '</div>'); |
144 | 144 | } else { |
145 | - $form->addElement('hidden', 'title'); |
|
146 | - $form->addElement('hidden', 'description'); |
|
145 | + $form->addElement('hidden', 'title'); |
|
146 | + $form->addElement('hidden', 'description'); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | $form->addElement('header', get_lang('DefaultSettingsForNewGroups')); |
@@ -228,17 +228,17 @@ discard block |
||
228 | 228 | if ($form->validate()) { |
229 | 229 | $values = $form->exportValues(); |
230 | 230 | if ($values['max_member_no_limit'] == GroupManager::MEMBER_PER_GROUP_NO_LIMIT) { |
231 | - $max_member = GroupManager::MEMBER_PER_GROUP_NO_LIMIT; |
|
232 | - } else { |
|
233 | - $max_member = $values['max_member']; |
|
234 | - } |
|
231 | + $max_member = GroupManager::MEMBER_PER_GROUP_NO_LIMIT; |
|
232 | + } else { |
|
233 | + $max_member = $values['max_member']; |
|
234 | + } |
|
235 | 235 | |
236 | - $self_reg_allowed = isset($values['self_reg_allowed']) ? $values['self_reg_allowed'] : 0; |
|
237 | - $self_unreg_allowed = isset($values['self_unreg_allowed']) ? $values['self_unreg_allowed'] : 0; |
|
236 | + $self_reg_allowed = isset($values['self_reg_allowed']) ? $values['self_reg_allowed'] : 0; |
|
237 | + $self_unreg_allowed = isset($values['self_unreg_allowed']) ? $values['self_unreg_allowed'] : 0; |
|
238 | 238 | |
239 | - switch ($values['action']) { |
|
240 | - case 'update_settings': |
|
241 | - GroupManager::update_category( |
|
239 | + switch ($values['action']) { |
|
240 | + case 'update_settings': |
|
241 | + GroupManager::update_category( |
|
242 | 242 | $values['id'], |
243 | 243 | $values['title'], |
244 | 244 | $values['description'], |
@@ -257,8 +257,8 @@ discard block |
||
257 | 257 | Display::addFlash(Display::return_message(get_lang('GroupPropertiesModified'))); |
258 | 258 | header("Location: ".$currentUrl."&category=".$values['id']); |
259 | 259 | exit; |
260 | - case 'add_category': |
|
261 | - GroupManager :: create_category( |
|
260 | + case 'add_category': |
|
261 | + GroupManager :: create_category( |
|
262 | 262 | $values['title'], |
263 | 263 | $values['description'], |
264 | 264 | $values['doc_state'], |
@@ -276,8 +276,8 @@ discard block |
||
276 | 276 | Display::addFlash(Display::return_message(get_lang('CategoryCreated'))); |
277 | 277 | header("Location: ".$currentUrl); |
278 | 278 | exit; |
279 | - break; |
|
280 | - } |
|
279 | + break; |
|
280 | + } |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | // Else display the form |
@@ -292,10 +292,10 @@ discard block |
||
292 | 292 | $defaults = $category; |
293 | 293 | $defaults['action'] = $action; |
294 | 294 | if ($defaults['max_student'] == GroupManager::MEMBER_PER_GROUP_NO_LIMIT) { |
295 | - $defaults['max_member_no_limit'] = GroupManager::MEMBER_PER_GROUP_NO_LIMIT; |
|
295 | + $defaults['max_member_no_limit'] = GroupManager::MEMBER_PER_GROUP_NO_LIMIT; |
|
296 | 296 | } else { |
297 | - $defaults['max_member_no_limit'] = 1; |
|
298 | - $defaults['max_member'] = $defaults['max_student']; |
|
297 | + $defaults['max_member_no_limit'] = 1; |
|
298 | + $defaults['max_member'] = $defaults['max_student']; |
|
299 | 299 | } |
300 | 300 | $form->setDefaults($defaults); |
301 | 301 | $form->display(); |
@@ -7,12 +7,12 @@ discard block |
||
7 | 7 | |
8 | 8 | require_once '../inc/global.inc.php'; |
9 | 9 | $this_section = SECTION_COURSES; |
10 | -$current_course_tool = TOOL_GROUP; |
|
10 | +$current_course_tool = TOOL_GROUP; |
|
11 | 11 | |
12 | 12 | // Notice for unauthorized people. |
13 | 13 | api_protect_course_script(true); |
14 | 14 | |
15 | -if (!api_is_allowed_to_edit(false,true) || |
|
15 | +if (!api_is_allowed_to_edit(false, true) || |
|
16 | 16 | !(isset ($_GET['id']) || |
17 | 17 | isset ($_POST['id']) || |
18 | 18 | isset ($_GET['action']) || |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | 'groups_per_user' => 1, |
60 | 60 | 'doc_state' => GroupManager::TOOL_PRIVATE, |
61 | 61 | 'work_state' => GroupManager::TOOL_PRIVATE, |
62 | - 'wiki_state' => GroupManager::TOOL_PRIVATE , |
|
62 | + 'wiki_state' => GroupManager::TOOL_PRIVATE, |
|
63 | 63 | 'chat_state' => GroupManager::TOOL_PRIVATE, |
64 | 64 | 'calendar_state' => GroupManager::TOOL_PRIVATE, |
65 | 65 | 'announcements_state'=> GroupManager::TOOL_PRIVATE, |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | // Groups per user |
115 | 115 | $possible_values = array(); |
116 | - for ($i = 1; $i <= 10; $i ++) { |
|
116 | + for ($i = 1; $i <= 10; $i++) { |
|
117 | 117 | $possible_values[$i] = $i; |
118 | 118 | } |
119 | 119 | $possible_values[GroupManager::GROUP_PER_MEMBER_NO_LIMIT] = get_lang('All'); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | $form->addElement('html', '<div class="col-md-6">'); |
140 | 140 | // Description |
141 | - $form->addElement('textarea', 'description', get_lang('Description'), array ('rows' => 6)); |
|
141 | + $form->addElement('textarea', 'description', get_lang('Description'), array('rows' => 6)); |
|
142 | 142 | $form->addElement('html', '</div>'); |
143 | 143 | $form->addElement('html', '</div>'); |
144 | 144 | } else { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $form->addGroup( |
159 | 159 | $group, |
160 | 160 | '', |
161 | - Display::return_icon('user.png', get_lang('GroupSelfRegistration')) . ' ' . get_lang('GroupSelfRegistration'), |
|
161 | + Display::return_icon('user.png', get_lang('GroupSelfRegistration')).' '.get_lang('GroupSelfRegistration'), |
|
162 | 162 | null, |
163 | 163 | false |
164 | 164 | ); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $form->addGroup( |
173 | 173 | $group, |
174 | 174 | '', |
175 | - Display::return_icon('folder.png', get_lang('GroupDocument')) . ' ' . get_lang('GroupDocument'), |
|
175 | + Display::return_icon('folder.png', get_lang('GroupDocument')).' '.get_lang('GroupDocument'), |
|
176 | 176 | null, |
177 | 177 | false |
178 | 178 | ); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $form->addGroup( |
187 | 187 | $group, |
188 | 188 | '', |
189 | - Display::return_icon('work.png', get_lang('GroupWork'), array(), ICON_SIZE_SMALL) . ' ' . get_lang('GroupWork'), |
|
189 | + Display::return_icon('work.png', get_lang('GroupWork'), array(), ICON_SIZE_SMALL).' '.get_lang('GroupWork'), |
|
190 | 190 | '', |
191 | 191 | false); |
192 | 192 | |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $form->addGroup( |
200 | 200 | $group, |
201 | 201 | '', |
202 | - Display::return_icon('agenda.png', get_lang('GroupCalendar')) . ' ' . get_lang('GroupCalendar'), |
|
202 | + Display::return_icon('agenda.png', get_lang('GroupCalendar')).' '.get_lang('GroupCalendar'), |
|
203 | 203 | null, |
204 | 204 | false |
205 | 205 | ); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $form->addGroup( |
217 | 217 | $group, |
218 | 218 | '', |
219 | - Display::return_icon('announce.png', get_lang('GroupAnnouncements')) . ' ' . get_lang('GroupAnnouncements'), |
|
219 | + Display::return_icon('announce.png', get_lang('GroupAnnouncements')).' '.get_lang('GroupAnnouncements'), |
|
220 | 220 | null, |
221 | 221 | false |
222 | 222 | ); |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $form->addGroup( |
231 | 231 | $group, |
232 | 232 | '', |
233 | - Display::return_icon('forum.png', get_lang('GroupForum')) . ' ' . get_lang('GroupForum'), |
|
233 | + Display::return_icon('forum.png', get_lang('GroupForum')).' '.get_lang('GroupForum'), |
|
234 | 234 | null, |
235 | 235 | false |
236 | 236 | ); |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $form->addGroup( |
245 | 245 | $group, |
246 | 246 | '', |
247 | - Display::return_icon('wiki.png', get_lang('GroupWiki')) . ' ' . get_lang('GroupWiki'), |
|
247 | + Display::return_icon('wiki.png', get_lang('GroupWiki')).' '.get_lang('GroupWiki'), |
|
248 | 248 | null, |
249 | 249 | false |
250 | 250 | ); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $form->addGroup( |
259 | 259 | $group, |
260 | 260 | '', |
261 | - Display::return_icon('chat.png', get_lang('Chat')) . ' ' . get_lang('Chat'), |
|
261 | + Display::return_icon('chat.png', get_lang('Chat')).' '.get_lang('Chat'), |
|
262 | 262 | null, |
263 | 263 | false |
264 | 264 | ); |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | // actions bar |
334 | 334 | echo '<div class="actions">'; |
335 | 335 | echo '<a href="group.php">'. |
336 | - Display::return_icon('back.png', get_lang('BackToGroupList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
336 | + Display::return_icon('back.png', get_lang('BackToGroupList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
337 | 337 | echo '</div>'; |
338 | 338 | |
339 | 339 | $defaults = $category; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | require_once '../inc/global.inc.php'; |
15 | 15 | $this_section = SECTION_COURSES; |
16 | -$current_course_tool = TOOL_GROUP; |
|
16 | +$current_course_tool = TOOL_GROUP; |
|
17 | 17 | |
18 | 18 | // Notice for unauthorized people. |
19 | 19 | api_protect_course_script(true); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | // Group members |
163 | 163 | $group_member_list = GroupManager::get_subscribed_users($current_group['id']); |
164 | 164 | |
165 | -$selected_users = array (); |
|
165 | +$selected_users = array(); |
|
166 | 166 | if (!empty($group_member_list)) { |
167 | 167 | foreach ($group_member_list as $index => $user) { |
168 | 168 | $selected_users[] = $user['user_id']; |
@@ -89,7 +89,7 @@ |
||
89 | 89 | 'error' |
90 | 90 | ) |
91 | 91 | ); |
92 | - exit; |
|
92 | + exit; |
|
93 | 93 | } else { |
94 | 94 | /* DOWNLOAD THE FILE */ |
95 | 95 | // the user is allowed to download the file |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | ON (post.file_id = file.id AND post.c_id = $course_id AND file.c_id = $course_id) |
51 | 51 | WHERE |
52 | 52 | post.cat_id = ".intval($_GET['cat_id'])." AND |
53 | - post.dest_user_id = $user_id" ; |
|
53 | + post.dest_user_id = $user_id"; |
|
54 | 54 | } |
55 | 55 | $files_to_download = array(); |
56 | 56 | $result = Database::query($sql); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $_SESSION['_seen'][$_course['id']][TOOL_DROPBOX][] = intval($_GET['id']); |
97 | 97 | |
98 | 98 | $work = new Dropbox_Work($_GET['id']); |
99 | - $path = dropbox_cnf('sysPath') . '/' . $work -> filename; //path to file as stored on server |
|
99 | + $path = dropbox_cnf('sysPath').'/'.$work -> filename; //path to file as stored on server |
|
100 | 100 | |
101 | 101 | if (!Security::check_abs_path($path, dropbox_cnf('sysPath').'/')) { |
102 | 102 | exit; |