@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | $session = array(); |
33 | 33 | $user_name = $user_info['complete_name']; |
34 | 34 | |
35 | -$course_list = SessionManager::get_course_list_by_session_id ($session_id); |
|
35 | +$course_list = SessionManager::get_course_list_by_session_id($session_id); |
|
36 | 36 | $session_list = SessionManager::get_session_by_course($course_id); |
37 | 37 | $total_quota_bytes = DocumentManager::get_course_quota(); |
38 | -$quota_bytes = DocumentManager::documents_total_space($course_id, 0 , 0); |
|
39 | -$quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
38 | +$quota_bytes = DocumentManager::documents_total_space($course_id, 0, 0); |
|
39 | +$quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
40 | 40 | |
41 | 41 | $session[] = array(get_lang('Course').' ('.format_file_size($quota_bytes).')', $quota_percentage); |
42 | 42 | |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | foreach ($session_list as $session_data) { |
47 | 47 | $quota_percentage = 0; |
48 | 48 | $quota_bytes = intval(DocumentManager::documents_total_space($course_id, null, $session_data['id'])); |
49 | - if (!empty($quota_bytes)) { |
|
50 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
49 | + if (!empty($quota_bytes)) { |
|
50 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
51 | 51 | } |
52 | 52 | if ($session_id == $session_data['id']) { |
53 | - $session_data['name'] = $session_data['name'] . ' * '; |
|
53 | + $session_data['name'] = $session_data['name'].' * '; |
|
54 | 54 | } |
55 | 55 | $used_quota_bytes += $quota_bytes; |
56 | 56 | $session[] = array( |
@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | $quota_percentage = 0; |
67 | 67 | $my_group_id = $group_data['id']; |
68 | 68 | $quota_bytes = intval(DocumentManager::documents_total_space($course_id, $my_group_id, 0)); |
69 | - if (!empty($quota_bytes)) { |
|
70 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
69 | + if (!empty($quota_bytes)) { |
|
70 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
71 | 71 | } |
72 | 72 | if ($group_id == $my_group_id) { |
73 | - $group_data['name'] = $group_data['name'] . ' * '; |
|
73 | + $group_data['name'] = $group_data['name'].' * '; |
|
74 | 74 | } |
75 | 75 | $used_quota_bytes += $quota_bytes; |
76 | 76 | $session[] = array(addslashes(get_lang('Group').': '.$group_data['name']).' ('.format_file_size($quota_bytes).')', $quota_percentage); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | } |
87 | 87 | if ($quota_bytes != 0) { |
88 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
88 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $session[] = array(addslashes(get_lang('Teacher').': '.$user_name).' ('.format_file_size($quota_bytes).')', $quota_percentage); |
@@ -98,15 +98,15 @@ discard block |
||
98 | 98 | $total_quota_bytes += DocumentManager::get_course_quota($course_data['id']); |
99 | 99 | } |
100 | 100 | if ($quota_bytes != 0) { |
101 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
101 | + $quota_percentage = round($quota_bytes / $total_quota_bytes, 2) * 100; |
|
102 | 102 | } |
103 | 103 | } |
104 | - $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'),$user_name)), $quota_percentage); |
|
104 | + $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'), $user_name)), $quota_percentage); |
|
105 | 105 | |
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
109 | -$quota_percentage = round(($total_quota_bytes - $used_quota_bytes)/$total_quota_bytes, 2)*100; |
|
109 | +$quota_percentage = round(($total_quota_bytes - $used_quota_bytes) / $total_quota_bytes, 2) * 100; |
|
110 | 110 | $session[] = array(addslashes(get_lang('ShowCourseQuotaUse')).' ('.format_file_size($total_quota_bytes - $used_quota_bytes).') ', $quota_percentage); |
111 | 111 | $quota_data = json_encode($session); |
112 | 112 |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | } |
87 | 87 | if ($quota_bytes != 0) { |
88 | - $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
88 | + $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $session[] = array(addslashes(get_lang('Teacher').': '.$user_name).' ('.format_file_size($quota_bytes).')', $quota_percentage); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } |
104 | 104 | $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'),$user_name)), $quota_percentage); |
105 | 105 | |
106 | - } |
|
106 | + } |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | $quota_percentage = round(($total_quota_bytes - $used_quota_bytes)/$total_quota_bytes, 2)*100; |
@@ -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 | } |
@@ -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(), $current_group['iid']); |
29 | 29 | |
@@ -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['iid']); |
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['iid']); |
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 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $form->addGroup( |
206 | 206 | $group, |
207 | 207 | '', |
208 | - Display::return_icon('user.png', get_lang('GroupSelfRegistration')) . ' ' . get_lang('GroupSelfRegistration'), |
|
208 | + Display::return_icon('user.png', get_lang('GroupSelfRegistration')).' '.get_lang('GroupSelfRegistration'), |
|
209 | 209 | null, |
210 | 210 | false |
211 | 211 | ); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $form->addGroup( |
232 | 232 | $group, |
233 | 233 | '', |
234 | - Display::return_icon('work.png', get_lang('GroupWork')) . ' ' . get_lang('GroupWork'), |
|
234 | + Display::return_icon('work.png', get_lang('GroupWork')).' '.get_lang('GroupWork'), |
|
235 | 235 | null, |
236 | 236 | false |
237 | 237 | ); |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $form->addGroup( |
245 | 245 | $group, |
246 | 246 | '', |
247 | - Display::return_icon('agenda.png', get_lang('GroupCalendar')) . ' ' . get_lang('GroupCalendar'), |
|
247 | + Display::return_icon('agenda.png', get_lang('GroupCalendar')).' '.get_lang('GroupCalendar'), |
|
248 | 248 | null, |
249 | 249 | false |
250 | 250 | ); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $form->addGroup( |
258 | 258 | $group, |
259 | 259 | '', |
260 | - Display::return_icon('announce.png', get_lang('GroupAnnouncements')) . ' ' . get_lang('GroupAnnouncements'), |
|
260 | + Display::return_icon('announce.png', get_lang('GroupAnnouncements')).' '.get_lang('GroupAnnouncements'), |
|
261 | 261 | null, |
262 | 262 | false |
263 | 263 | ); |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | $form->addGroup( |
271 | 271 | $group, |
272 | 272 | '', |
273 | - Display::return_icon('forum.png', get_lang('GroupForum')) . ' ' . get_lang('GroupForum'), |
|
273 | + Display::return_icon('forum.png', get_lang('GroupForum')).' '.get_lang('GroupForum'), |
|
274 | 274 | null, |
275 | 275 | false |
276 | 276 | ); |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $form->addGroup( |
285 | 285 | $group, |
286 | 286 | '', |
287 | - Display::return_icon('wiki.png', get_lang('GroupWiki')) . ' ' . get_lang('GroupWiki'), |
|
287 | + Display::return_icon('wiki.png', get_lang('GroupWiki')).' '.get_lang('GroupWiki'), |
|
288 | 288 | null, |
289 | 289 | false |
290 | 290 | ); |
@@ -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 |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | if ($_GET['sent_received'] == 'sent') { |
33 | 33 | // here we also incorporate the person table to make sure that deleted sent documents are not included. |
34 | 34 | $sql = "SELECT DISTINCT file.id, file.filename, file.title |
35 | - FROM ". Database::get_course_table(TABLE_DROPBOX_FILE) ." file |
|
36 | - INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." person |
|
35 | + FROM ". Database::get_course_table(TABLE_DROPBOX_FILE)." file |
|
36 | + INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_PERSON)." person |
|
37 | 37 | ON (person.file_id=file.id AND file.c_id = $course_id AND person.c_id = $course_id) |
38 | 38 | WHERE |
39 | 39 | file.uploader_id = $user_id AND |
@@ -43,14 +43,14 @@ discard block |
||
43 | 43 | |
44 | 44 | if ($_GET['sent_received'] == 'received') { |
45 | 45 | $sql = "SELECT DISTINCT file.id, file.filename, file.title |
46 | - FROM ". Database::get_course_table(TABLE_DROPBOX_FILE) ." file |
|
47 | - INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." person |
|
46 | + FROM ". Database::get_course_table(TABLE_DROPBOX_FILE)." file |
|
47 | + INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_PERSON)." person |
|
48 | 48 | ON (person.file_id=file.id AND file.c_id = $course_id AND person.c_id = $course_id) |
49 | 49 | INNER JOIN ".Database::get_course_table(TABLE_DROPBOX_POST)." post |
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); |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | |
98 | 98 | $work = new Dropbox_Work($_GET['id']); |
99 | 99 | |
100 | - $path = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/dropbox/' . $work -> filename; //path to file as stored on server |
|
100 | + $path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/dropbox/'.$work -> filename; //path to file as stored on server |
|
101 | 101 | |
102 | - if (!Security::check_abs_path($path, api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/dropbox/')) { |
|
102 | + if (!Security::check_abs_path($path, api_get_path(SYS_COURSE_PATH).$_course['path'].'/dropbox/')) { |
|
103 | 103 | exit; |
104 | 104 | } |
105 | 105 | $file = $work->title; |
@@ -83,11 +83,11 @@ |
||
83 | 83 | if (strstr($_POST['action'], 'move_')) { |
84 | 84 | // check move_received_n or move_sent_n command |
85 | 85 | if (strstr($_POST['action'], 'received')) { |
86 | - $part = 'received'; |
|
87 | - $to_cat_id = str_replace('move_received_', '', $_POST['action']); |
|
86 | + $part = 'received'; |
|
87 | + $to_cat_id = str_replace('move_received_', '', $_POST['action']); |
|
88 | 88 | } else { |
89 | - $part = 'sent'; |
|
90 | - $to_cat_id = str_replace('move_sent_', '', $_POST['action']); |
|
89 | + $part = 'sent'; |
|
90 | + $to_cat_id = str_replace('move_sent_', '', $_POST['action']); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | foreach ($checked_file_ids as $value) { |
@@ -750,10 +750,15 @@ |
||
750 | 750 | "; |
751 | 751 | $result = Database::query($sql); |
752 | 752 | |
753 | - if (!($res = Database::fetch_array($result))) |
|
754 | - die(get_lang('GeneralError').' (code 901)'); |
|
755 | - if ($owner == 0) return $res['uploader_id']; |
|
756 | - if ($res['uploader_id'] == $owner) return true; |
|
753 | + if (!($res = Database::fetch_array($result))) { |
|
754 | + die(get_lang('GeneralError').' (code 901)'); |
|
755 | + } |
|
756 | + if ($owner == 0) { |
|
757 | + return $res['uploader_id']; |
|
758 | + } |
|
759 | + if ($res['uploader_id'] == $owner) { |
|
760 | + return true; |
|
761 | + } |
|
757 | 762 | die(get_lang('GeneralError').' (code '.$or_die.')'); |
758 | 763 | } |
759 | 764 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | // STEP 2: at least one file has to be selected. If not we return an error message |
44 | 44 | $ids = isset($_GET['id']) ? $_GET['id'] : array(); |
45 | - if (count($ids)>0) { |
|
45 | + if (count($ids) > 0) { |
|
46 | 46 | $checked_file_ids = $_POST['id']; |
47 | 47 | } else { |
48 | 48 | foreach ($_POST as $key => $value) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | $cat = get_dropbox_category($id); |
136 | - if (count($cat)==0) { |
|
136 | + if (count($cat) == 0) { |
|
137 | 137 | return false; |
138 | 138 | } |
139 | 139 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | |
159 | 159 | // step 1: delete the category |
160 | - $sql = "DELETE FROM ". Database::get_course_table(TABLE_DROPBOX_CATEGORY) ." |
|
160 | + $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_CATEGORY)." |
|
161 | 161 | WHERE c_id = $course_id AND cat_id='".intval($id)."' AND $sentreceived='1'"; |
162 | 162 | Database::query($sql); |
163 | 163 | |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $return_message = get_lang('ReceivedFileMoved'); |
236 | 236 | } |
237 | 237 | if ($part == 'sent') { |
238 | - $sql = "UPDATE ". Database::get_course_table(TABLE_DROPBOX_FILE) ." |
|
238 | + $sql = "UPDATE ".Database::get_course_table(TABLE_DROPBOX_FILE)." |
|
239 | 239 | SET cat_id = ".intval($target)." |
240 | 240 | WHERE |
241 | 241 | c_id = $course_id AND |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | $session_id = api_get_session_id(); |
271 | 271 | $condition_session = api_get_session_condition($session_id); |
272 | 272 | |
273 | - $sql = "SELECT * FROM ". Database::get_course_table(TABLE_DROPBOX_CATEGORY) ." |
|
273 | + $sql = "SELECT * FROM ".Database::get_course_table(TABLE_DROPBOX_CATEGORY)." |
|
274 | 274 | WHERE c_id = $course_id AND user_id='".$_user['user_id']."' $condition_session"; |
275 | 275 | |
276 | 276 | $result = Database::query($sql); |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | { |
293 | 293 | $course_id = api_get_course_int_id(); |
294 | 294 | if (empty($id) or $id != intval($id)) { return array(); } |
295 | - $sql = "SELECT * FROM ". Database::get_course_table(TABLE_DROPBOX_CATEGORY) ." |
|
295 | + $sql = "SELECT * FROM ".Database::get_course_table(TABLE_DROPBOX_CATEGORY)." |
|
296 | 296 | WHERE c_id = $course_id AND cat_id='".$id."'"; |
297 | 297 | $res = Database::query($sql); |
298 | 298 | if ($res === false) { |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | if (!isset($_POST['edit_id'])) { |
342 | 342 | $session_id = api_get_session_id(); |
343 | 343 | // step 3a, we check if the category doesn't already exist |
344 | - $sql = "SELECT * FROM ". Database::get_course_table(TABLE_DROPBOX_CATEGORY) ." |
|
344 | + $sql = "SELECT * FROM ".Database::get_course_table(TABLE_DROPBOX_CATEGORY)." |
|
345 | 345 | WHERE |
346 | 346 | c_id = $course_id AND |
347 | 347 | user_id='".$_user['user_id']."' AND |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | ]; |
365 | 365 | $id = Database::insert(Database::get_course_table(TABLE_DROPBOX_CATEGORY), $params); |
366 | 366 | if ($id) { |
367 | - $sql = "UPDATE ". Database::get_course_table(TABLE_DROPBOX_CATEGORY) ." SET cat_id = iid WHERE iid = $id"; |
|
367 | + $sql = "UPDATE ".Database::get_course_table(TABLE_DROPBOX_CATEGORY)." SET cat_id = iid WHERE iid = $id"; |
|
368 | 368 | Database::query($sql); |
369 | 369 | } |
370 | 370 | |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | |
414 | 414 | if (isset($id) && $id != '') { |
415 | 415 | // retrieve the category we are editing |
416 | - $sql = "SELECT * FROM ". Database::get_course_table(TABLE_DROPBOX_CATEGORY) ." |
|
416 | + $sql = "SELECT * FROM ".Database::get_course_table(TABLE_DROPBOX_CATEGORY)." |
|
417 | 417 | WHERE c_id = $course_id AND cat_id = ".intval($id); |
418 | 418 | $result = Database::query($sql); |
419 | 419 | $row = Database::fetch_array($result); |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | |
603 | 603 | $full_name = $userInfo['complete_name'].$groupNameListToString; |
604 | 604 | $current_user_id = $current_user['user_id']; |
605 | - $options['user_' . $current_user_id] = $full_name; |
|
605 | + $options['user_'.$current_user_id] = $full_name; |
|
606 | 606 | } |
607 | 607 | } |
608 | 608 | } |
@@ -702,8 +702,8 @@ discard block |
||
702 | 702 | |
703 | 703 | // select all files that aren't referenced anymore |
704 | 704 | $sql = "SELECT DISTINCT f.id, f.filename |
705 | - FROM " . Database::get_course_table(TABLE_DROPBOX_FILE) . " f |
|
706 | - LEFT JOIN " . Database::get_course_table(TABLE_DROPBOX_PERSON) . " p |
|
705 | + FROM " . Database::get_course_table(TABLE_DROPBOX_FILE)." f |
|
706 | + LEFT JOIN " . Database::get_course_table(TABLE_DROPBOX_PERSON)." p |
|
707 | 707 | ON (f.id = p.file_id) |
708 | 708 | WHERE p.user_id IS NULL AND |
709 | 709 | f.c_id = $course_id |
@@ -711,14 +711,14 @@ discard block |
||
711 | 711 | $result = Database::query($sql); |
712 | 712 | while ($res = Database::fetch_array($result)) { |
713 | 713 | //delete the selected files from the post and file tables |
714 | - $sql = "DELETE FROM " . Database::get_course_table(TABLE_DROPBOX_POST) . " |
|
715 | - WHERE c_id = $course_id AND file_id = '" . $res['id'] . "'"; |
|
714 | + $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_POST)." |
|
715 | + WHERE c_id = $course_id AND file_id = '".$res['id']."'"; |
|
716 | 716 | Database::query($sql); |
717 | - $sql = "DELETE FROM " . Database::get_course_table(TABLE_DROPBOX_FILE) . " |
|
718 | - WHERE c_id = $course_id AND id ='" . $res['id'] . "'"; |
|
717 | + $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_FILE)." |
|
718 | + WHERE c_id = $course_id AND id ='".$res['id']."'"; |
|
719 | 719 | Database::query($sql); |
720 | 720 | //delete file from server |
721 | - @unlink( api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/dropbox/' . $res['filename']); |
|
721 | + @unlink(api_get_path(SYS_COURSE_PATH).$_course['path'].'/dropbox/'.$res['filename']); |
|
722 | 722 | } |
723 | 723 | } |
724 | 724 | |
@@ -740,11 +740,11 @@ discard block |
||
740 | 740 | |
741 | 741 | $mailingPseudoId = intval($mailingPseudoId); |
742 | 742 | $sql = "SELECT f.uploader_id |
743 | - FROM " . Database::get_course_table(TABLE_DROPBOX_FILE) . " f |
|
744 | - LEFT JOIN " . Database::get_course_table(TABLE_DROPBOX_POST) . " p |
|
743 | + FROM " . Database::get_course_table(TABLE_DROPBOX_FILE)." f |
|
744 | + LEFT JOIN " . Database::get_course_table(TABLE_DROPBOX_POST)." p |
|
745 | 745 | ON (f.id = p.file_id AND f.c_id = $course_id AND p.c_id = $course_id) |
746 | 746 | WHERE |
747 | - p.dest_user_id = '" . $mailingPseudoId . "' AND |
|
747 | + p.dest_user_id = '".$mailingPseudoId."' AND |
|
748 | 748 | p.c_id = $course_id |
749 | 749 | "; |
750 | 750 | $result = Database::query($sql); |
@@ -770,21 +770,21 @@ discard block |
||
770 | 770 | // for all content files, replace mailingPseudoId by owner as uploader |
771 | 771 | $file_id = intval($file_id); |
772 | 772 | $sql = "SELECT p.dest_user_id |
773 | - FROM " . Database::get_course_table(TABLE_DROPBOX_POST) . " p |
|
774 | - WHERE c_id = $course_id AND p.file_id = '" . $file_id . "'"; |
|
773 | + FROM " . Database::get_course_table(TABLE_DROPBOX_POST)." p |
|
774 | + WHERE c_id = $course_id AND p.file_id = '".$file_id."'"; |
|
775 | 775 | $result = Database::query($sql); |
776 | 776 | |
777 | 777 | if ($res = Database::fetch_array($result)) { |
778 | 778 | $mailingPseudoId = $res['dest_user_id']; |
779 | 779 | $mailId = get_mail_id_base(); |
780 | 780 | if ($mailingPseudoId > $mailId) { |
781 | - $sql = "DELETE FROM " . Database::get_course_table(TABLE_DROPBOX_PERSON) . " |
|
782 | - WHERE c_id = $course_id AND user_id='" . $mailingPseudoId . "'"; |
|
781 | + $sql = "DELETE FROM ".Database::get_course_table(TABLE_DROPBOX_PERSON)." |
|
782 | + WHERE c_id = $course_id AND user_id='".$mailingPseudoId."'"; |
|
783 | 783 | Database::query($sql); |
784 | 784 | |
785 | - $sql = "UPDATE " . Database::get_course_table(TABLE_DROPBOX_FILE) ." |
|
786 | - SET uploader_id='" . api_get_user_id() . "' |
|
787 | - WHERE c_id = $course_id AND uploader_id='" . $mailingPseudoId . "'"; |
|
785 | + $sql = "UPDATE ".Database::get_course_table(TABLE_DROPBOX_FILE)." |
|
786 | + SET uploader_id='" . api_get_user_id()."' |
|
787 | + WHERE c_id = $course_id AND uploader_id='".$mailingPseudoId."'"; |
|
788 | 788 | Database::query($sql); |
789 | 789 | } |
790 | 790 | } |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | } |
926 | 926 | } |
927 | 927 | } else { // rename file to login_filename_uniqueId format |
928 | - $dropbox_filename = $_user['username'] . "_" . $dropbox_filename . "_".uniqid(''); |
|
928 | + $dropbox_filename = $_user['username']."_".$dropbox_filename."_".uniqid(''); |
|
929 | 929 | } |
930 | 930 | |
931 | 931 | // creating the array that contains all the users who will receive the file |
@@ -944,7 +944,7 @@ discard block |
||
944 | 944 | } |
945 | 945 | } |
946 | 946 | |
947 | - @move_uploaded_file($dropbox_filetmpname, api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/dropbox/' . $dropbox_filename); |
|
947 | + @move_uploaded_file($dropbox_filetmpname, api_get_path(SYS_COURSE_PATH).$_course['path'].'/dropbox/'.$dropbox_filename); |
|
948 | 948 | |
949 | 949 | $b_send_mail = api_get_course_setting('email_alert_on_new_doc_dropbox'); |
950 | 950 | |
@@ -965,14 +965,14 @@ discard block |
||
965 | 965 | ), |
966 | 966 | $recipent_temp['email'], |
967 | 967 | get_lang('NewDropboxFileUploaded'), |
968 | - get_lang('NewDropboxFileUploadedContent').' <a href="'.api_get_path(WEB_CODE_PATH).'dropbox/index.php?' . api_get_cidreq() . '">'.get_lang('SeeFile').'</a>'. |
|
968 | + get_lang('NewDropboxFileUploadedContent').' <a href="'.api_get_path(WEB_CODE_PATH).'dropbox/index.php?'.api_get_cidreq().'">'.get_lang('SeeFile').'</a>'. |
|
969 | 969 | "\n\n". |
970 | 970 | api_get_person_name( |
971 | 971 | $_user['firstName'], |
972 | 972 | $_user['lastName'], |
973 | 973 | null, |
974 | 974 | PERSON_NAME_EMAIL_ADDRESS |
975 | - )."\n". get_lang('Email') ." : ".$_user['mail'], |
|
975 | + )."\n".get_lang('Email')." : ".$_user['mail'], |
|
976 | 976 | api_get_person_name( |
977 | 977 | $_user['firstName'], |
978 | 978 | $_user['lastName'], |
@@ -1068,12 +1068,12 @@ discard block |
||
1068 | 1068 | $id = intval($id); |
1069 | 1069 | $user_id = intval($user_id); |
1070 | 1070 | |
1071 | - $sql = "SELECT file_id FROM ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." |
|
1071 | + $sql = "SELECT file_id FROM ".Database::get_course_table(TABLE_DROPBOX_PERSON)." |
|
1072 | 1072 | WHERE c_id = $course_id AND user_id = $user_id AND file_id = ".$id; |
1073 | 1073 | $result = Database::query($sql); |
1074 | 1074 | $number_users_who_see_file = Database::num_rows($result); |
1075 | 1075 | |
1076 | - $sql = "SELECT file_id FROM ". Database::get_course_table(TABLE_DROPBOX_POST) ." |
|
1076 | + $sql = "SELECT file_id FROM ".Database::get_course_table(TABLE_DROPBOX_POST)." |
|
1077 | 1077 | WHERE c_id = $course_id AND dest_user_id = $user_id AND file_id = ".$id; |
1078 | 1078 | $result = Database::query($sql); |
1079 | 1079 | $count = Database::num_rows($result); |
@@ -1087,12 +1087,12 @@ discard block |
||
1087 | 1087 | { |
1088 | 1088 | $id = intval($id); |
1089 | 1089 | $course_id = api_get_course_int_id(); |
1090 | - $sql = "SELECT file_id FROM ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." |
|
1090 | + $sql = "SELECT file_id FROM ".Database::get_course_table(TABLE_DROPBOX_PERSON)." |
|
1091 | 1091 | WHERE c_id = $course_id AND file_id = ".$id; |
1092 | 1092 | $result = Database::query($sql); |
1093 | 1093 | $number_users_who_see_file = Database::num_rows($result); |
1094 | 1094 | |
1095 | - $sql = "SELECT file_id FROM ". Database::get_course_table(TABLE_DROPBOX_POST) ." |
|
1095 | + $sql = "SELECT file_id FROM ".Database::get_course_table(TABLE_DROPBOX_POST)." |
|
1096 | 1096 | WHERE c_id = $course_id AND file_id = ".$id; |
1097 | 1097 | $result = Database::query($sql); |
1098 | 1098 | $count = Database::num_rows($result); |
@@ -1124,7 +1124,7 @@ discard block |
||
1124 | 1124 | |
1125 | 1125 | $id = Database::insert(Database::get_course_table(TABLE_DROPBOX_FEEDBACK), $params); |
1126 | 1126 | if ($id) { |
1127 | - $sql = "UPDATE ". Database::get_course_table(TABLE_DROPBOX_FEEDBACK) ." SET feedback_id = iid WHERE iid = $id"; |
|
1127 | + $sql = "UPDATE ".Database::get_course_table(TABLE_DROPBOX_FEEDBACK)." SET feedback_id = iid WHERE iid = $id"; |
|
1128 | 1128 | Database::query($sql); |
1129 | 1129 | } |
1130 | 1130 | |
@@ -1151,10 +1151,10 @@ discard block |
||
1151 | 1151 | |
1152 | 1152 | // note: we also have to add the check if the user has received or sent this file. |
1153 | 1153 | $sql = "SELECT DISTINCT file.filename, file.title, file.author, file.description |
1154 | - FROM ". Database::get_course_table(TABLE_DROPBOX_FILE) ." file |
|
1155 | - INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." person |
|
1154 | + FROM ". Database::get_course_table(TABLE_DROPBOX_FILE)." file |
|
1155 | + INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_PERSON)." person |
|
1156 | 1156 | ON (person.file_id=file.id AND file.c_id = $course_id AND person.c_id = $course_id) |
1157 | - INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_POST) ." post |
|
1157 | + INNER JOIN ".Database::get_course_table(TABLE_DROPBOX_POST)." post |
|
1158 | 1158 | ON (post.file_id = file.id AND post.c_id = $course_id AND file.c_id = $course_id) |
1159 | 1159 | WHERE |
1160 | 1160 | file.id IN (".implode(', ', $fileList).") AND |
@@ -1248,7 +1248,7 @@ discard block |
||
1248 | 1248 | // Adding the content. |
1249 | 1249 | $return .= "\n<tr>"; |
1250 | 1250 | foreach ($column as $column_key => $column_value) { |
1251 | - if (!in_array($column_value,$dont_show_columns)) { |
|
1251 | + if (!in_array($column_value, $dont_show_columns)) { |
|
1252 | 1252 | $return .= "\n\t<td>"; |
1253 | 1253 | if (in_array($column_value, $make_link)) { |
1254 | 1254 | $return .= '<a href="'.$value[$column_value].'">'.$value[$column_value].'</a>'; |
@@ -1276,11 +1276,11 @@ discard block |
||
1276 | 1276 | { |
1277 | 1277 | $course_id = api_get_course_int_id(); |
1278 | 1278 | $sql = "SELECT COUNT(feedback_id) AS total, file_id |
1279 | - FROM ". Database::get_course_table(TABLE_DROPBOX_FEEDBACK) ." |
|
1279 | + FROM ". Database::get_course_table(TABLE_DROPBOX_FEEDBACK)." |
|
1280 | 1280 | WHERE c_id = $course_id GROUP BY file_id"; |
1281 | 1281 | $result = Database::query($sql); |
1282 | 1282 | $return = array(); |
1283 | - while ($row=Database::fetch_array($result)) { |
|
1283 | + while ($row = Database::fetch_array($result)) { |
|
1284 | 1284 | $return[$row['file_id']] = $row['total']; |
1285 | 1285 | } |
1286 | 1286 | return $return; |