@@ -9,21 +9,21 @@ discard block |
||
9 | 9 | |
10 | 10 | api_block_anonymous_users(); |
11 | 11 | |
12 | -$eval= Evaluation :: load($_GET['selecteval']); |
|
12 | +$eval = Evaluation :: load($_GET['selecteval']); |
|
13 | 13 | if ($eval[0]->get_category_id() < 0) { |
14 | 14 | // if category id is negative, then the evaluation's origin is a link |
15 | - $link= LinkFactory :: get_evaluation_link($eval[0]->get_id()); |
|
15 | + $link = LinkFactory :: get_evaluation_link($eval[0]->get_id()); |
|
16 | 16 | $currentcat = Category :: load($link->get_category_id()); |
17 | 17 | } else { |
18 | 18 | $currentcat = Category :: load($eval[0]->get_category_id()); |
19 | 19 | } |
20 | 20 | |
21 | -$interbreadcrumb[]= array ( |
|
22 | - 'url' => $_SESSION['gradebook_dest'].'?selectcat=' . $currentcat[0]->get_id(), 'name' => get_lang('ToolGradebook')); |
|
21 | +$interbreadcrumb[] = array( |
|
22 | + 'url' => $_SESSION['gradebook_dest'].'?selectcat='.$currentcat[0]->get_id(), 'name' => get_lang('ToolGradebook')); |
|
23 | 23 | |
24 | 24 | if (api_is_allowed_to_edit()) { |
25 | - $interbreadcrumb[]= array ( |
|
26 | - 'url' => 'gradebook_view_result.php?selecteval=' . Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(), |
|
25 | + $interbreadcrumb[] = array( |
|
26 | + 'url' => 'gradebook_view_result.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(), |
|
27 | 27 | 'name' => get_lang('ViewResult') |
28 | 28 | ); |
29 | 29 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | Display :: display_error_message(get_lang('PleaseEnableScoringSystem'), false); |
46 | 46 | } |
47 | 47 | } else { |
48 | - $allresults = Result::load(null,null,$eval[0]->get_id()); |
|
48 | + $allresults = Result::load(null, null, $eval[0]->get_id()); |
|
49 | 49 | $nr_items = array(); |
50 | 50 | foreach ($displays as $itemsdisplay) { |
51 | 51 | $nr_items[$itemsdisplay['display']] = 0; |
@@ -78,19 +78,19 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | // Generate table |
81 | - $stattable= '<table class="data_table" cellspacing="0" cellpadding="3">'; |
|
82 | - $stattable .= '<tr><th>' . get_lang('ScoringSystem') . '</th>'; |
|
83 | - $stattable .= '<th>' . get_lang('Percentage') . '</th>'; |
|
84 | - $stattable .= '<th>' . get_lang('CountUsers') . '</th>'; |
|
81 | + $stattable = '<table class="data_table" cellspacing="0" cellpadding="3">'; |
|
82 | + $stattable .= '<tr><th>'.get_lang('ScoringSystem').'</th>'; |
|
83 | + $stattable .= '<th>'.get_lang('Percentage').'</th>'; |
|
84 | + $stattable .= '<th>'.get_lang('CountUsers').'</th>'; |
|
85 | 85 | //$stattable .= '<th>' . get_lang('Statistics') . '</th></tr>'; |
86 | - $counter=0; |
|
86 | + $counter = 0; |
|
87 | 87 | foreach ($keys as $key) { |
88 | - $bar = ($highest_ratio > 0?($nr_items[$key] / $highest_ratio) * 100:0); |
|
89 | - $stattable .= '<tr class="row_' . ($counter % 2 == 0 ? 'odd' : 'even') . '">'; |
|
90 | - $stattable .= '<td width="150">' . $key . '</td>'; |
|
88 | + $bar = ($highest_ratio > 0 ? ($nr_items[$key] / $highest_ratio) * 100 : 0); |
|
89 | + $stattable .= '<tr class="row_'.($counter % 2 == 0 ? 'odd' : 'even').'">'; |
|
90 | + $stattable .= '<td width="150">'.$key.'</td>'; |
|
91 | 91 | |
92 | 92 | $stattable .= '<td width="550">'.Display::bar_progress($bar).'</td>'; |
93 | - $stattable .= '<td align="right">' . $nr_items[$key] . '</td>'; |
|
93 | + $stattable .= '<td align="right">'.$nr_items[$key].'</td>'; |
|
94 | 94 | $counter++; |
95 | 95 | } |
96 | 96 | $stattable .= '</tr></table>'; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | $c_id = $c_id ? intval($c_id) : api_get_course_int_id(); |
60 | - $table = Database::get_course_table(TABLE_TOOL_LIST); |
|
60 | + $table = Database::get_course_table(TABLE_TOOL_LIST); |
|
61 | 61 | $sql = "SELECT * from $table |
62 | 62 | WHERE c_id = $c_id and name='$name' |
63 | 63 | LIMIT 1"; |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $selected_skills = self::get_skills_by_gradebook($gradebook_id); |
195 | 195 | $clean_selected_skills = array(); |
196 | 196 | if (!empty($selected_skills)) { |
197 | - foreach($selected_skills as $skill) { |
|
197 | + foreach ($selected_skills as $skill) { |
|
198 | 198 | $clean_selected_skills[] = $skill['id']; |
199 | 199 | } |
200 | 200 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | foreach ($tab_parents_id as $parent_id) { |
85 | 85 | $Same_parent_LP_item_list = $LP_item_list->get_item_with_same_parent($parent_id); |
86 | 86 | $previous_item_id = 0; |
87 | - for ($i=0; $i < count($Same_parent_LP_item_list->list); $i++) { |
|
87 | + for ($i = 0; $i < count($Same_parent_LP_item_list->list); $i++) { |
|
88 | 88 | $item_id = $Same_parent_LP_item_list->list[$i]->id; |
89 | 89 | // display_order |
90 | 90 | $display_order = $i + 1; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | // next_item_id |
96 | 96 | $next_item_id = 0; |
97 | 97 | if ($i < count($Same_parent_LP_item_list->list) - 1) { |
98 | - $next_item_id = $Same_parent_LP_item_list->list[$i+1]->id; |
|
98 | + $next_item_id = $Same_parent_LP_item_list->list[$i + 1]->id; |
|
99 | 99 | } |
100 | 100 | $LP_item_list->set_parameters_for_id($item_id, $next_item_id, "next_item_id"); |
101 | 101 | } |
@@ -217,23 +217,23 @@ discard block |
||
217 | 217 | |
218 | 218 | if (api_get_session_id() == 0) { |
219 | 219 | echo '<div class="actions">'; |
220 | - if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) { |
|
221 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
220 | + if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) { |
|
221 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
222 | 222 | echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> '; |
223 | 223 | $movelist[0] = 'Root'; // move_received selectbox content |
224 | 224 | } else { |
225 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
225 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
226 | 226 | } |
227 | 227 | echo '</div>'; |
228 | 228 | } else { |
229 | 229 | if (api_is_allowed_to_session_edit(false, true)) { |
230 | 230 | echo '<div class="actions">'; |
231 | 231 | if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) { |
232 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
232 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
233 | 233 | echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> '; |
234 | 234 | $movelist[0] = 'Root'; // move_received selectbox content |
235 | 235 | } else { |
236 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
236 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
237 | 237 | } |
238 | 238 | echo '</div>'; |
239 | 239 | } |
@@ -253,13 +253,13 @@ discard block |
||
253 | 253 | if (api_get_session_id() == 0) { |
254 | 254 | echo '<div class="actions">'; |
255 | 255 | if ($view_dropbox_category_sent != 0) { |
256 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
256 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
257 | 257 | echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> '; |
258 | 258 | } else { |
259 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM)."</a>\n"; |
|
259 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n"; |
|
260 | 260 | } |
261 | 261 | if (empty($viewSentCategory)) { |
262 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
262 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
263 | 263 | } |
264 | 264 | echo '</div>'; |
265 | 265 | } else { |
@@ -267,12 +267,12 @@ discard block |
||
267 | 267 | echo '<div class="actions">'; |
268 | 268 | if ($view_dropbox_category_sent != 0) { |
269 | 269 | echo get_lang('CurrentlySeeing').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> '; |
270 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
270 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
271 | 271 | } else { |
272 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM)."</a>\n"; |
|
272 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n"; |
|
273 | 273 | } |
274 | 274 | if (empty($viewSentCategory)) { |
275 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
275 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
276 | 276 | } |
277 | 277 | echo '</div>'; |
278 | 278 | } |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | |
326 | 326 | if (api_get_session_id() == 0) { |
327 | 327 | $column_header[] = array(get_lang('Modify'), false, '', 'nowrap style="text-align: right"'); |
328 | - } elseif (api_is_allowed_to_session_edit(false,true)) { |
|
328 | + } elseif (api_is_allowed_to_session_edit(false, true)) { |
|
329 | 329 | $column_header[] = array(get_lang('Modify'), false, '', 'nowrap style="text-align: right"'); |
330 | 330 | } |
331 | 331 | |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | $link_open = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">'; |
387 | 387 | $dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).'</a>'; |
388 | 388 | $dropbox_file_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download">'. |
389 | - Display::return_icon('save.png', get_lang('Download'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a>'.$new_icon.'<br />'.$dropbox_file->description; |
|
389 | + Display::return_icon('save.png', get_lang('Download'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a>'.$new_icon.'<br />'.$dropbox_file->description; |
|
390 | 390 | $file_size = $dropbox_file->filesize; |
391 | 391 | $dropbox_file_data[] = format_file_size($file_size); |
392 | 392 | |
@@ -402,10 +402,10 @@ discard block |
||
402 | 402 | api_format_date($last_upload_date).'</span>'; |
403 | 403 | |
404 | 404 | $action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').' |
405 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).'</a> |
|
406 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movereceived&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).'</a> |
|
405 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).'</a> |
|
406 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movereceived&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'</a> |
|
407 | 407 | <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'. |
408 | - Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
408 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
409 | 409 | |
410 | 410 | // This is a hack to have an additional row in a sortable table |
411 | 411 | |
@@ -439,12 +439,12 @@ discard block |
||
439 | 439 | // The icon of the category |
440 | 440 | $link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$category['cat_id'].'&view_sent_category='.$viewSentCategory.'&view='.$view.'">'; |
441 | 441 | $dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', $category['cat_name']).'</a>'; |
442 | - $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=received">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$category['cat_name'].'</a>'; |
|
442 | + $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=received">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$category['cat_name'].'</a>'; |
|
443 | 443 | $dropbox_category_data[] = ''; |
444 | 444 | $dropbox_category_data[] = ''; |
445 | 445 | $dropbox_category_data[] = ''; |
446 | - $dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a> |
|
447 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
446 | + $dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a> |
|
447 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
448 | 448 | } |
449 | 449 | if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) { |
450 | 450 | $dropbox_data_recieved[] = $dropbox_category_data; |
@@ -464,8 +464,8 @@ discard block |
||
464 | 464 | ); |
465 | 465 | |
466 | 466 | if (is_array($movelist)) { |
467 | - foreach ($movelist as $catid => $catname){ |
|
468 | - $selectlist['move_received_'.$catid] = get_lang('Move') . '->'. Security::remove_XSS($catname); |
|
467 | + foreach ($movelist as $catid => $catname) { |
|
468 | + $selectlist['move_received_'.$catid] = get_lang('Move').'->'.Security::remove_XSS($catname); |
|
469 | 469 | } |
470 | 470 | } |
471 | 471 | |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | $link_open = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">'; |
560 | 560 | $dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).'</a>'; |
561 | 561 | $dropbox_file_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download">'. |
562 | - Display::return_icon('save.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a><br />'.$dropbox_file->description; |
|
562 | + Display::return_icon('save.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a><br />'.$dropbox_file->description; |
|
563 | 563 | $file_size = $dropbox_file->filesize; |
564 | 564 | $dropbox_file_data[] = format_file_size($file_size); |
565 | 565 | $receivers_celldata = null; |
@@ -577,9 +577,9 @@ discard block |
||
577 | 577 | $receivers_celldata = ''; |
578 | 578 | |
579 | 579 | $action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').' |
580 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).'</a> |
|
581 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movesent&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).'</a> |
|
582 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
580 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).'</a> |
|
581 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movesent&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'</a> |
|
582 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
583 | 583 | // This is a hack to have an additional row in a sortable table |
584 | 584 | if ($action == 'viewfeedback' && isset($_GET['id']) && is_numeric($_GET['id']) && $dropbox_file->id == $_GET['id']) { |
585 | 585 | $action_icons .= "</td></tr>\n"; // ending the normal row of the sortable table |
@@ -608,16 +608,16 @@ discard block |
||
608 | 608 | // This is where the checkbox icon for the files appear. |
609 | 609 | $link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$category['cat_id'].'&view='.$view.'">'; |
610 | 610 | $dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', Security::remove_XSS($category['cat_name'])).'</a>'; |
611 | - $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=sent">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>'; |
|
611 | + $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=sent">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>'; |
|
612 | 612 | //$dropbox_category_data[] = ''; |
613 | 613 | $dropbox_category_data[] = ''; |
614 | 614 | //$dropbox_category_data[] = ''; |
615 | 615 | $dropbox_category_data[] = ''; |
616 | 616 | $dropbox_category_data[] = ''; |
617 | 617 | $dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'. |
618 | - Display::return_icon('edit.png', get_lang('Edit'),'',ICON_SIZE_SMALL).'</a> |
|
618 | + Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a> |
|
619 | 619 | <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'. |
620 | - Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
620 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
621 | 621 | } |
622 | 622 | if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) { |
623 | 623 | $dropbox_data_sent[] = $dropbox_category_data; |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | |
640 | 640 | if (!empty($moveList)) { |
641 | 641 | foreach ($moveList as $catid => $catname) { |
642 | - $selectlist['move_sent_'.$catid] = get_lang('Move') . '->'. Security::remove_XSS($catname); |
|
642 | + $selectlist['move_sent_'.$catid] = get_lang('Move').'->'.Security::remove_XSS($catname); |
|
643 | 643 | } |
644 | 644 | } |
645 | 645 |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | $try_new_fsc_id = $try_new_fsc_db = $try_new_fsc_dir = 0; |
47 | 47 | |
48 | 48 | while (!$keys_are_unique) { |
49 | - $keys_course_id = $prefix_for_all . $unique_prefix . $wanted_code . $final_suffix['CourseId']; |
|
50 | - $keys_course_repository = $prefix_for_path . $unique_prefix . $wanted_code . $final_suffix['CourseDir']; |
|
49 | + $keys_course_id = $prefix_for_all.$unique_prefix.$wanted_code.$final_suffix['CourseId']; |
|
50 | + $keys_course_repository = $prefix_for_path.$unique_prefix.$wanted_code.$final_suffix['CourseDir']; |
|
51 | 51 | $keys_are_unique = true; |
52 | 52 | |
53 | 53 | // Check whether they are unique. |
@@ -58,12 +58,12 @@ discard block |
||
58 | 58 | |
59 | 59 | if (Database::num_rows($result)) { |
60 | 60 | $keys_are_unique = false; |
61 | - $try_new_fsc_id ++; |
|
61 | + $try_new_fsc_id++; |
|
62 | 62 | $final_suffix['CourseId'] = substr(md5(uniqid(rand())), 0, 4); |
63 | 63 | } |
64 | 64 | if (file_exists(api_get_path(SYS_COURSE_PATH).$keys_course_repository)) { |
65 | 65 | $keys_are_unique = false; |
66 | - $try_new_fsc_dir ++; |
|
66 | + $try_new_fsc_dir++; |
|
67 | 67 | $final_suffix['CourseDir'] = substr(md5(uniqid(rand())), 0, 4); |
68 | 68 | } |
69 | 69 | |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | $perm = api_get_permissions_for_new_directories(); |
92 | 92 | $perm_file = api_get_permissions_for_new_files(); |
93 | 93 | $htmlpage = "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <title>Not authorized</title>\n </head>\n <body>\n </body>\n</html>"; |
94 | - $cp = api_get_path(SYS_COURSE_PATH) . $course_repository; |
|
94 | + $cp = api_get_path(SYS_COURSE_PATH).$course_repository; |
|
95 | 95 | |
96 | 96 | //Creating document folder |
97 | 97 | mkdir($cp, $perm); |
98 | - mkdir($cp . '/document', $perm); |
|
99 | - $cpt = $cp . '/document/index.html'; |
|
98 | + mkdir($cp.'/document', $perm); |
|
99 | + $cpt = $cp.'/document/index.html'; |
|
100 | 100 | $fd = fopen($cpt, 'w'); |
101 | 101 | fwrite($fd, $htmlpage); |
102 | 102 | fclose($fd); |
@@ -118,49 +118,49 @@ discard block |
||
118 | 118 | @copy($cpt, $cp . '/document/video/index.html'); */ |
119 | 119 | |
120 | 120 | //Creatind dropbox folder |
121 | - mkdir($cp . '/dropbox', $perm); |
|
122 | - $cpt = $cp . '/dropbox/index.html'; |
|
121 | + mkdir($cp.'/dropbox', $perm); |
|
122 | + $cpt = $cp.'/dropbox/index.html'; |
|
123 | 123 | $fd = fopen($cpt, 'w'); |
124 | 124 | fwrite($fd, $htmlpage); |
125 | 125 | fclose($fd); |
126 | 126 | @chmod($cpt, $perm_file); |
127 | - mkdir($cp . '/group', $perm); |
|
128 | - @copy($cpt, $cp . '/group/index.html'); |
|
129 | - mkdir($cp . '/page', $perm); |
|
130 | - @copy($cpt, $cp . '/page/index.html'); |
|
131 | - mkdir($cp . '/scorm', $perm); |
|
132 | - @copy($cpt, $cp . '/scorm/index.html'); |
|
133 | - mkdir($cp . '/upload', $perm); |
|
134 | - @copy($cpt, $cp . '/upload/index.html'); |
|
135 | - mkdir($cp . '/upload/forum', $perm); |
|
136 | - @copy($cpt, $cp . '/upload/forum/index.html'); |
|
137 | - mkdir($cp . '/upload/forum/images', $perm); |
|
138 | - @copy($cpt, $cp . '/upload/forum/images/index.html'); |
|
139 | - mkdir($cp . '/upload/test', $perm); |
|
140 | - @copy($cpt, $cp . '/upload/test/index.html'); |
|
141 | - mkdir($cp . '/upload/blog', $perm); |
|
142 | - @copy($cpt, $cp . '/upload/blog/index.html'); |
|
143 | - mkdir($cp . '/upload/learning_path', $perm); |
|
144 | - @copy($cpt, $cp . '/upload/learning_path/index.html'); |
|
145 | - mkdir($cp . '/upload/learning_path/images', $perm); |
|
146 | - @copy($cpt, $cp . '/upload/learning_path/images/index.html'); |
|
147 | - mkdir($cp . '/upload/calendar', $perm); |
|
148 | - @copy($cpt, $cp . '/upload/calendar/index.html'); |
|
149 | - mkdir($cp . '/upload/calendar/images', $perm); |
|
150 | - @copy($cpt, $cp . '/upload/calendar/images/index.html'); |
|
151 | - mkdir($cp . '/work', $perm); |
|
152 | - @copy($cpt, $cp . '/work/index.html'); |
|
153 | - mkdir($cp . '/upload/announcements', $perm); |
|
154 | - @copy($cpt, $cp . '/upload/announcements/index.html'); |
|
155 | - mkdir($cp . '/upload/announcements/images', $perm); |
|
156 | - @copy($cpt, $cp . '/upload/announcements/images/index.html'); |
|
127 | + mkdir($cp.'/group', $perm); |
|
128 | + @copy($cpt, $cp.'/group/index.html'); |
|
129 | + mkdir($cp.'/page', $perm); |
|
130 | + @copy($cpt, $cp.'/page/index.html'); |
|
131 | + mkdir($cp.'/scorm', $perm); |
|
132 | + @copy($cpt, $cp.'/scorm/index.html'); |
|
133 | + mkdir($cp.'/upload', $perm); |
|
134 | + @copy($cpt, $cp.'/upload/index.html'); |
|
135 | + mkdir($cp.'/upload/forum', $perm); |
|
136 | + @copy($cpt, $cp.'/upload/forum/index.html'); |
|
137 | + mkdir($cp.'/upload/forum/images', $perm); |
|
138 | + @copy($cpt, $cp.'/upload/forum/images/index.html'); |
|
139 | + mkdir($cp.'/upload/test', $perm); |
|
140 | + @copy($cpt, $cp.'/upload/test/index.html'); |
|
141 | + mkdir($cp.'/upload/blog', $perm); |
|
142 | + @copy($cpt, $cp.'/upload/blog/index.html'); |
|
143 | + mkdir($cp.'/upload/learning_path', $perm); |
|
144 | + @copy($cpt, $cp.'/upload/learning_path/index.html'); |
|
145 | + mkdir($cp.'/upload/learning_path/images', $perm); |
|
146 | + @copy($cpt, $cp.'/upload/learning_path/images/index.html'); |
|
147 | + mkdir($cp.'/upload/calendar', $perm); |
|
148 | + @copy($cpt, $cp.'/upload/calendar/index.html'); |
|
149 | + mkdir($cp.'/upload/calendar/images', $perm); |
|
150 | + @copy($cpt, $cp.'/upload/calendar/images/index.html'); |
|
151 | + mkdir($cp.'/work', $perm); |
|
152 | + @copy($cpt, $cp.'/work/index.html'); |
|
153 | + mkdir($cp.'/upload/announcements', $perm); |
|
154 | + @copy($cpt, $cp.'/upload/announcements/index.html'); |
|
155 | + mkdir($cp.'/upload/announcements/images', $perm); |
|
156 | + @copy($cpt, $cp.'/upload/announcements/images/index.html'); |
|
157 | 157 | |
158 | 158 | //Oral expression question type |
159 | - mkdir($cp . '/exercises', $perm); |
|
160 | - @copy($cpt, $cp . '/exercises/index.html'); |
|
159 | + mkdir($cp.'/exercises', $perm); |
|
160 | + @copy($cpt, $cp.'/exercises/index.html'); |
|
161 | 161 | |
162 | 162 | // Create .htaccess in the dropbox directory. |
163 | - $fp = fopen($cp . '/dropbox/.htaccess', 'w'); |
|
163 | + $fp = fopen($cp.'/dropbox/.htaccess', 'w'); |
|
164 | 164 | fwrite( |
165 | 165 | $fp, |
166 | 166 | "AuthName AllowLocalAccess |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | { |
303 | 303 | $list = self::get_course_tables(); |
304 | 304 | foreach ($list as $table) { |
305 | - $sql = "DROP TABLE IF EXISTS " . DB_COURSE_PREFIX . $table; |
|
305 | + $sql = "DROP TABLE IF EXISTS ".DB_COURSE_PREFIX.$table; |
|
306 | 306 | Database::query($sql); |
307 | 307 | } |
308 | 308 | } |
@@ -326,47 +326,47 @@ discard block |
||
326 | 326 | if ($media == 'images') { |
327 | 327 | $code_path = api_get_path( |
328 | 328 | SYS_CODE_PATH |
329 | - ) . 'default_course_document/images/'; |
|
329 | + ).'default_course_document/images/'; |
|
330 | 330 | } |
331 | 331 | if ($media == 'audio') { |
332 | 332 | $code_path = api_get_path( |
333 | 333 | SYS_CODE_PATH |
334 | - ) . 'default_course_document/audio/'; |
|
334 | + ).'default_course_document/audio/'; |
|
335 | 335 | } |
336 | 336 | if ($media == 'flash') { |
337 | 337 | $code_path = api_get_path( |
338 | 338 | SYS_CODE_PATH |
339 | - ) . 'default_course_document/flash/'; |
|
339 | + ).'default_course_document/flash/'; |
|
340 | 340 | } |
341 | 341 | if ($media == 'video') { |
342 | 342 | $code_path = api_get_path( |
343 | 343 | SYS_CODE_PATH |
344 | - ) . 'default_course_document/video/'; |
|
344 | + ).'default_course_document/video/'; |
|
345 | 345 | } |
346 | 346 | if ($media == 'certificates') { |
347 | 347 | $code_path = api_get_path( |
348 | 348 | SYS_CODE_PATH |
349 | - ) . 'default_course_document/certificates/'; |
|
349 | + ).'default_course_document/certificates/'; |
|
350 | 350 | } |
351 | 351 | if (is_dir($path)) { |
352 | 352 | $handle = opendir($path); |
353 | 353 | while (false !== ($file = readdir($handle))) { |
354 | - if (is_dir($path . $file) && strpos($file, '.') !== 0) { |
|
354 | + if (is_dir($path.$file) && strpos($file, '.') !== 0) { |
|
355 | 355 | $files[]['dir'] = str_replace( |
356 | 356 | $code_path, |
357 | 357 | '', |
358 | - $path . $file . '/' |
|
358 | + $path.$file.'/' |
|
359 | 359 | ); |
360 | 360 | $files = self::browse_folders( |
361 | - $path . $file . '/', |
|
361 | + $path.$file.'/', |
|
362 | 362 | $files, |
363 | 363 | $media |
364 | 364 | ); |
365 | - } elseif (is_file($path . $file) && strpos($file, '.') !== 0) { |
|
365 | + } elseif (is_file($path.$file) && strpos($file, '.') !== 0) { |
|
366 | 366 | $files[]['file'] = str_replace( |
367 | 367 | $code_path, |
368 | 368 | '', |
369 | - $path . $file |
|
369 | + $path.$file |
|
370 | 370 | ); |
371 | 371 | } |
372 | 372 | } |
@@ -444,117 +444,117 @@ discard block |
||
444 | 444 | |
445 | 445 | Database::query( |
446 | 446 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
447 | - VALUES ($course_id, 1, '" . TOOL_COURSE_DESCRIPTION . "','course_description/','info.gif','" . self::string2binary( |
|
447 | + VALUES ($course_id, 1, '".TOOL_COURSE_DESCRIPTION."','course_description/','info.gif','".self::string2binary( |
|
448 | 448 | api_get_setting( |
449 | 449 | 'course_create_active_tools', |
450 | 450 | 'course_description' |
451 | 451 | ) |
452 | - ) . "','0','squaregrey.gif', 0,'_self','authoring','0')" |
|
452 | + )."','0','squaregrey.gif', 0,'_self','authoring','0')" |
|
453 | 453 | ); |
454 | 454 | Database::query( |
455 | 455 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
456 | - VALUES ($course_id, 2, '" . TOOL_CALENDAR_EVENT . "','calendar/agenda.php','agenda.gif','" . self::string2binary( |
|
456 | + VALUES ($course_id, 2, '".TOOL_CALENDAR_EVENT."','calendar/agenda.php','agenda.gif','".self::string2binary( |
|
457 | 457 | api_get_setting('course_create_active_tools', 'agenda') |
458 | - ) . "','0','squaregrey.gif',0,'_self','interaction','0')" |
|
458 | + )."','0','squaregrey.gif',0,'_self','interaction','0')" |
|
459 | 459 | ); |
460 | 460 | Database::query( |
461 | 461 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
462 | - VALUES ($course_id, 3, '" . TOOL_DOCUMENT . "','document/document.php','folder_document.gif','" . self::string2binary( |
|
462 | + VALUES ($course_id, 3, '".TOOL_DOCUMENT."','document/document.php','folder_document.gif','".self::string2binary( |
|
463 | 463 | api_get_setting('course_create_active_tools', 'documents') |
464 | - ) . "','0','squaregrey.gif',0,'_self','authoring','0')" |
|
464 | + )."','0','squaregrey.gif',0,'_self','authoring','0')" |
|
465 | 465 | ); |
466 | 466 | Database::query( |
467 | 467 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
468 | - VALUES ($course_id, 4, '" . TOOL_LEARNPATH . "','lp/lp_controller.php','scorms.gif','" . self::string2binary( |
|
468 | + VALUES ($course_id, 4, '".TOOL_LEARNPATH."','lp/lp_controller.php','scorms.gif','".self::string2binary( |
|
469 | 469 | api_get_setting('course_create_active_tools', 'learning_path') |
470 | - ) . "','0','squaregrey.gif',0,'_self','authoring','0')" |
|
470 | + )."','0','squaregrey.gif',0,'_self','authoring','0')" |
|
471 | 471 | ); |
472 | 472 | Database::query( |
473 | 473 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
474 | - VALUES ($course_id, 5, '" . TOOL_LINK . "','link/link.php','links.gif','" . self::string2binary( |
|
474 | + VALUES ($course_id, 5, '".TOOL_LINK."','link/link.php','links.gif','".self::string2binary( |
|
475 | 475 | api_get_setting('course_create_active_tools', 'links') |
476 | - ) . "','0','squaregrey.gif',0,'_self','authoring','0')" |
|
476 | + )."','0','squaregrey.gif',0,'_self','authoring','0')" |
|
477 | 477 | ); |
478 | 478 | Database::query( |
479 | 479 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
480 | - VALUES ($course_id, 6, '" . TOOL_QUIZ . "','exercise/exercise.php','quiz.gif','" . self::string2binary( |
|
480 | + VALUES ($course_id, 6, '".TOOL_QUIZ."','exercise/exercise.php','quiz.gif','".self::string2binary( |
|
481 | 481 | api_get_setting('course_create_active_tools', 'quiz') |
482 | - ) . "','0','squaregrey.gif',0,'_self','authoring','0')" |
|
482 | + )."','0','squaregrey.gif',0,'_self','authoring','0')" |
|
483 | 483 | ); |
484 | 484 | Database::query( |
485 | 485 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
486 | - VALUES ($course_id, 7, '" . TOOL_ANNOUNCEMENT . "','announcements/announcements.php','valves.gif','" . self::string2binary( |
|
486 | + VALUES ($course_id, 7, '".TOOL_ANNOUNCEMENT."','announcements/announcements.php','valves.gif','".self::string2binary( |
|
487 | 487 | api_get_setting('course_create_active_tools', 'announcements') |
488 | - ) . "','0','squaregrey.gif', 0,'_self','authoring','0')" |
|
488 | + )."','0','squaregrey.gif', 0,'_self','authoring','0')" |
|
489 | 489 | ); |
490 | 490 | Database::query( |
491 | 491 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
492 | - VALUES ($course_id, 8, '" . TOOL_FORUM . "','forum/index.php','forum.gif','" . self::string2binary( |
|
492 | + VALUES ($course_id, 8, '".TOOL_FORUM."','forum/index.php','forum.gif','".self::string2binary( |
|
493 | 493 | api_get_setting('course_create_active_tools', 'forums') |
494 | - ) . "','0','squaregrey.gif',0,'_self','interaction','0')" |
|
494 | + )."','0','squaregrey.gif',0,'_self','interaction','0')" |
|
495 | 495 | ); |
496 | 496 | Database::query( |
497 | 497 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
498 | - VALUES ($course_id, 9, '" . TOOL_DROPBOX . "','dropbox/index.php','dropbox.gif','" . self::string2binary( |
|
498 | + VALUES ($course_id, 9, '".TOOL_DROPBOX."','dropbox/index.php','dropbox.gif','".self::string2binary( |
|
499 | 499 | api_get_setting('course_create_active_tools', 'dropbox') |
500 | - ) . "','0','squaregrey.gif',0,'_self','interaction','0')" |
|
500 | + )."','0','squaregrey.gif',0,'_self','interaction','0')" |
|
501 | 501 | ); |
502 | 502 | Database::query( |
503 | 503 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
504 | - VALUES ($course_id, 10, '" . TOOL_USER . "','user/user.php','members.gif','" . self::string2binary( |
|
504 | + VALUES ($course_id, 10, '".TOOL_USER."','user/user.php','members.gif','".self::string2binary( |
|
505 | 505 | api_get_setting('course_create_active_tools', 'users') |
506 | - ) . "','0','squaregrey.gif',0,'_self','interaction','0')" |
|
506 | + )."','0','squaregrey.gif',0,'_self','interaction','0')" |
|
507 | 507 | ); |
508 | 508 | Database::query( |
509 | 509 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
510 | - VALUES ($course_id, 11, '" . TOOL_GROUP . "','group/group.php','group.gif','" . self::string2binary( |
|
510 | + VALUES ($course_id, 11, '".TOOL_GROUP."','group/group.php','group.gif','".self::string2binary( |
|
511 | 511 | api_get_setting('course_create_active_tools', 'groups') |
512 | - ) . "','0','squaregrey.gif',0,'_self','interaction','0')" |
|
512 | + )."','0','squaregrey.gif',0,'_self','interaction','0')" |
|
513 | 513 | ); |
514 | 514 | Database::query( |
515 | 515 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
516 | - VALUES ($course_id, 12, '" . TOOL_CHAT . "','chat/chat.php','chat.gif','" . self::string2binary( |
|
516 | + VALUES ($course_id, 12, '".TOOL_CHAT."','chat/chat.php','chat.gif','".self::string2binary( |
|
517 | 517 | api_get_setting('course_create_active_tools', 'chat') |
518 | - ) . "','0','squaregrey.gif',0,'_self','interaction','0')" |
|
518 | + )."','0','squaregrey.gif',0,'_self','interaction','0')" |
|
519 | 519 | ); |
520 | 520 | Database::query( |
521 | 521 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
522 | - VALUES ($course_id, 13, '" . TOOL_STUDENTPUBLICATION . "','work/work.php','works.gif','" . self::string2binary( |
|
522 | + VALUES ($course_id, 13, '".TOOL_STUDENTPUBLICATION."','work/work.php','works.gif','".self::string2binary( |
|
523 | 523 | api_get_setting( |
524 | 524 | 'course_create_active_tools', |
525 | 525 | 'student_publications' |
526 | 526 | ) |
527 | - ) . "','0','squaregrey.gif',0,'_self','interaction','0')" |
|
527 | + )."','0','squaregrey.gif',0,'_self','interaction','0')" |
|
528 | 528 | ); |
529 | 529 | Database::query( |
530 | 530 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
531 | - VALUES ($course_id, 14, '" . TOOL_SURVEY . "','survey/survey_list.php','survey.gif','" . self::string2binary( |
|
531 | + VALUES ($course_id, 14, '".TOOL_SURVEY."','survey/survey_list.php','survey.gif','".self::string2binary( |
|
532 | 532 | api_get_setting('course_create_active_tools', 'survey') |
533 | - ) . "','0','squaregrey.gif',0,'_self','interaction','0')" |
|
533 | + )."','0','squaregrey.gif',0,'_self','interaction','0')" |
|
534 | 534 | ); |
535 | 535 | Database::query( |
536 | 536 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
537 | - VALUES ($course_id, 15, '" . TOOL_WIKI . "','wiki/index.php','wiki.gif','" . self::string2binary( |
|
537 | + VALUES ($course_id, 15, '".TOOL_WIKI."','wiki/index.php','wiki.gif','".self::string2binary( |
|
538 | 538 | api_get_setting('course_create_active_tools', 'wiki') |
539 | - ) . "','0','squaregrey.gif',0,'_self','interaction','0')" |
|
539 | + )."','0','squaregrey.gif',0,'_self','interaction','0')" |
|
540 | 540 | ); |
541 | 541 | Database::query( |
542 | 542 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
543 | - VALUES ($course_id, 16, '" . TOOL_GRADEBOOK . "','gradebook/index.php','gradebook.gif','" . self::string2binary( |
|
543 | + VALUES ($course_id, 16, '".TOOL_GRADEBOOK."','gradebook/index.php','gradebook.gif','".self::string2binary( |
|
544 | 544 | api_get_setting('course_create_active_tools', 'gradebook') |
545 | - ) . "','0','squaregrey.gif',0,'_self','authoring','0')" |
|
545 | + )."','0','squaregrey.gif',0,'_self','authoring','0')" |
|
546 | 546 | ); |
547 | 547 | Database::query( |
548 | 548 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
549 | - VALUES ($course_id, 17, '" . TOOL_GLOSSARY . "','glossary/index.php','glossary.gif','" . self::string2binary( |
|
549 | + VALUES ($course_id, 17, '".TOOL_GLOSSARY."','glossary/index.php','glossary.gif','".self::string2binary( |
|
550 | 550 | api_get_setting('course_create_active_tools', 'glossary') |
551 | - ) . "','0','squaregrey.gif',0,'_self','authoring','0')" |
|
551 | + )."','0','squaregrey.gif',0,'_self','authoring','0')" |
|
552 | 552 | ); |
553 | 553 | Database::query( |
554 | 554 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
555 | - VALUES ($course_id, 18, '" . TOOL_NOTEBOOK . "','notebook/index.php','notebook.gif','" . self::string2binary( |
|
555 | + VALUES ($course_id, 18, '".TOOL_NOTEBOOK."','notebook/index.php','notebook.gif','".self::string2binary( |
|
556 | 556 | api_get_setting('course_create_active_tools', 'notebook') |
557 | - ) . "','0','squaregrey.gif',0,'_self','interaction','0')" |
|
557 | + )."','0','squaregrey.gif',0,'_self','interaction','0')" |
|
558 | 558 | ); |
559 | 559 | |
560 | 560 | $setting = intval(self::string2binary( |
@@ -563,45 +563,45 @@ discard block |
||
563 | 563 | |
564 | 564 | Database::query( |
565 | 565 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
566 | - VALUES ($course_id, 19, '" . TOOL_ATTENDANCE . "','attendance/index.php','attendance.gif','" . $setting. "','0','squaregrey.gif',0,'_self','authoring','0')" |
|
566 | + VALUES ($course_id, 19, '".TOOL_ATTENDANCE."','attendance/index.php','attendance.gif','".$setting."','0','squaregrey.gif',0,'_self','authoring','0')" |
|
567 | 567 | ); |
568 | 568 | Database::query( |
569 | 569 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
570 | - VALUES ($course_id, 20, '" . TOOL_COURSE_PROGRESS . "','course_progress/index.php','course_progress.gif','" . self::string2binary( |
|
570 | + VALUES ($course_id, 20, '".TOOL_COURSE_PROGRESS."','course_progress/index.php','course_progress.gif','".self::string2binary( |
|
571 | 571 | intval(api_get_setting('course_create_active_tools', 'course_progress')) |
572 | - ) . "','0','squaregrey.gif',0,'_self','authoring','0')" |
|
572 | + )."','0','squaregrey.gif',0,'_self','authoring','0')" |
|
573 | 573 | ); |
574 | 574 | |
575 | 575 | if (api_get_setting('search_enabled') === 'true') { |
576 | 576 | Database::query( |
577 | 577 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
578 | - VALUES ($course_id, 23, '" . TOOL_SEARCH . "','search/','info.gif','" . self::string2binary( |
|
578 | + VALUES ($course_id, 23, '".TOOL_SEARCH."','search/','info.gif','".self::string2binary( |
|
579 | 579 | api_get_setting( |
580 | 580 | 'course_create_active_tools', |
581 | 581 | 'enable_search' |
582 | 582 | ) |
583 | - ) . "','0','search.gif',0,'_self','authoring','0')" |
|
583 | + )."','0','search.gif',0,'_self','authoring','0')" |
|
584 | 584 | ); |
585 | 585 | } |
586 | 586 | |
587 | 587 | $sql = "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
588 | - VALUES ($course_id, 24,'" . TOOL_BLOGS . "','blog/blog_admin.php','blog_admin.gif','" . intval(self::string2binary( |
|
588 | + VALUES ($course_id, 24,'".TOOL_BLOGS."','blog/blog_admin.php','blog_admin.gif','".intval(self::string2binary( |
|
589 | 589 | api_get_setting('course_create_active_tools', 'blogs')) |
590 | - ) . "','1','squaregrey.gif',0,'_self','admin','0')"; |
|
590 | + )."','1','squaregrey.gif',0,'_self','admin','0')"; |
|
591 | 591 | Database::query($sql); |
592 | 592 | |
593 | 593 | /* Course homepage tools for course admin only */ |
594 | 594 | Database::query( |
595 | 595 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
596 | - VALUES ($course_id, 25, '" . TOOL_TRACKING . "','tracking/courseLog.php','statistics.gif','$visible_for_course_admin','1','', 0,'_self','admin','0')" |
|
596 | + VALUES ($course_id, 25, '".TOOL_TRACKING."','tracking/courseLog.php','statistics.gif','$visible_for_course_admin','1','', 0,'_self','admin','0')" |
|
597 | 597 | ); |
598 | 598 | Database::query( |
599 | 599 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
600 | - VALUES ($course_id, 26, '" . TOOL_COURSE_SETTING . "','course_info/infocours.php','reference.gif','$visible_for_course_admin','1','', 0,'_self','admin','0')" |
|
600 | + VALUES ($course_id, 26, '".TOOL_COURSE_SETTING."','course_info/infocours.php','reference.gif','$visible_for_course_admin','1','', 0,'_self','admin','0')" |
|
601 | 601 | ); |
602 | 602 | Database::query( |
603 | 603 | "INSERT INTO $tbl_course_homepage (c_id, id, name, link, image, visibility, admin, address, added_tool, target, category, session_id) |
604 | - VALUES ($course_id, 27, '" . TOOL_COURSE_MAINTENANCE . "','course_info/maintenance.php','backup.gif','$visible_for_course_admin','1','',0,'_self', 'admin','0')" |
|
604 | + VALUES ($course_id, 27, '".TOOL_COURSE_MAINTENANCE."','course_info/maintenance.php','backup.gif','$visible_for_course_admin','1','',0,'_self', 'admin','0')" |
|
605 | 605 | ); |
606 | 606 | |
607 | 607 | $alert = api_get_setting('email_alert_manager_on_new_quiz'); |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | $perm = api_get_permissions_for_new_directories(); |
689 | 689 | $perm_file = api_get_permissions_for_new_files(); |
690 | 690 | |
691 | - $chat_path = $sys_course_path . $course_repository . '/document/chat_files'; |
|
691 | + $chat_path = $sys_course_path.$course_repository.'/document/chat_files'; |
|
692 | 692 | |
693 | 693 | if (!is_dir($chat_path)) { |
694 | 694 | @mkdir($chat_path, api_get_permissions_for_new_directories()); |
@@ -720,11 +720,11 @@ discard block |
||
720 | 720 | 'certificates', |
721 | 721 | ); |
722 | 722 | |
723 | - $default_course_path = api_get_path(SYS_CODE_PATH) . 'default_course_document/'; |
|
723 | + $default_course_path = api_get_path(SYS_CODE_PATH).'default_course_document/'; |
|
724 | 724 | |
725 | 725 | $default_document_array = array(); |
726 | 726 | foreach ($folders_to_copy_from_default_course as $folder) { |
727 | - $default_course_folder_path = $default_course_path . $folder . '/'; |
|
727 | + $default_course_folder_path = $default_course_path.$folder.'/'; |
|
728 | 728 | $files = self::browse_folders( |
729 | 729 | $default_course_folder_path, |
730 | 730 | array(), |
@@ -753,30 +753,30 @@ discard block |
||
753 | 753 | //hack until feature #5242 is implemented |
754 | 754 | if ($media_type == 'images') { |
755 | 755 | $media_type = 'images/gallery'; |
756 | - $images_folder = $sys_course_path . $course_repository . "/document/images/"; |
|
756 | + $images_folder = $sys_course_path.$course_repository."/document/images/"; |
|
757 | 757 | |
758 | 758 | if (!is_dir($images_folder)) { |
759 | 759 | //Creating index.html |
760 | 760 | mkdir($images_folder, $perm); |
761 | - $fd = fopen($images_folder . 'index.html', 'w'); |
|
761 | + $fd = fopen($images_folder.'index.html', 'w'); |
|
762 | 762 | fwrite($fd, $htmlpage); |
763 | - @chmod($images_folder . 'index.html', $perm_file); |
|
763 | + @chmod($images_folder.'index.html', $perm_file); |
|
764 | 764 | } |
765 | 765 | } |
766 | 766 | |
767 | - $course_documents_folder = $sys_course_path . $course_repository . "/document/$media_type/"; |
|
768 | - $default_course_path = api_get_path(SYS_CODE_PATH) . 'default_course_document' . $path_documents; |
|
767 | + $course_documents_folder = $sys_course_path.$course_repository."/document/$media_type/"; |
|
768 | + $default_course_path = api_get_path(SYS_CODE_PATH).'default_course_document'.$path_documents; |
|
769 | 769 | |
770 | 770 | if (!is_dir($course_documents_folder)) { |
771 | 771 | // Creating index.html |
772 | 772 | mkdir($course_documents_folder, $perm); |
773 | 773 | $fd = fopen( |
774 | - $course_documents_folder . 'index.html', |
|
774 | + $course_documents_folder.'index.html', |
|
775 | 775 | 'w' |
776 | 776 | ); |
777 | 777 | fwrite($fd, $htmlpage); |
778 | 778 | @chmod( |
779 | - $course_documents_folder . 'index.html', |
|
779 | + $course_documents_folder.'index.html', |
|
780 | 780 | $perm_file |
781 | 781 | ); |
782 | 782 | } |
@@ -784,15 +784,15 @@ discard block |
||
784 | 784 | if (is_array($array_media) && count($array_media) > 0) { |
785 | 785 | foreach ($array_media as $key => $value) { |
786 | 786 | if (isset($value['dir']) && !empty($value['dir'])) { |
787 | - if (!is_dir($course_documents_folder . $value['dir'])) { |
|
787 | + if (!is_dir($course_documents_folder.$value['dir'])) { |
|
788 | 788 | //Creating folder |
789 | 789 | mkdir( |
790 | - $course_documents_folder . $value['dir'], |
|
790 | + $course_documents_folder.$value['dir'], |
|
791 | 791 | $perm |
792 | 792 | ); |
793 | 793 | |
794 | 794 | //Creating index.html (for light protection) |
795 | - $index_html = $course_documents_folder . $value['dir'] . '/index.html'; |
|
795 | + $index_html = $course_documents_folder.$value['dir'].'/index.html'; |
|
796 | 796 | $fd = fopen($index_html, 'w'); |
797 | 797 | fwrite($fd, $htmlpage); |
798 | 798 | @chmod($index_html, $perm_file); |
@@ -814,12 +814,12 @@ discard block |
||
814 | 814 | } |
815 | 815 | |
816 | 816 | if ($media_type == 'images/gallery') { |
817 | - $folder_path = 'gallery/' . $folder_path; |
|
817 | + $folder_path = 'gallery/'.$folder_path; |
|
818 | 818 | } |
819 | 819 | |
820 | 820 | Database::query( |
821 | 821 | "INSERT INTO $TABLETOOLDOCUMENT (c_id, path,title,filetype,size) |
822 | - VALUES ($course_id,'$path_documents" . $folder_path . "','" . $title . "','folder','0')" |
|
822 | + VALUES ($course_id,'$path_documents".$folder_path."','".$title."','folder','0')" |
|
823 | 823 | ); |
824 | 824 | $image_id = Database:: insert_id(); |
825 | 825 | |
@@ -844,33 +844,33 @@ discard block |
||
844 | 844 | |
845 | 845 | if (isset($value['file']) && !empty($value['file'])) { |
846 | 846 | if (!file_exists( |
847 | - $course_documents_folder . $value['file'] |
|
847 | + $course_documents_folder.$value['file'] |
|
848 | 848 | ) |
849 | 849 | ) { |
850 | 850 | //Copying file |
851 | 851 | copy( |
852 | - $default_course_path . $value['file'], |
|
853 | - $course_documents_folder . $value['file'] |
|
852 | + $default_course_path.$value['file'], |
|
853 | + $course_documents_folder.$value['file'] |
|
854 | 854 | ); |
855 | 855 | chmod( |
856 | - $course_documents_folder . $value['file'], |
|
856 | + $course_documents_folder.$value['file'], |
|
857 | 857 | $perm_file |
858 | 858 | ); |
859 | 859 | //echo $default_course_path.$value['file']; echo ' - '; echo $course_documents_folder.$value['file']; echo '<br />'; |
860 | 860 | $temp = explode('/', $value['file']); |
861 | 861 | $file_size = filesize( |
862 | - $course_documents_folder . $value['file'] |
|
862 | + $course_documents_folder.$value['file'] |
|
863 | 863 | ); |
864 | 864 | |
865 | 865 | //hack until feature #5242 is implemented |
866 | 866 | if ($media_type == 'images/gallery') { |
867 | - $value["file"] = 'gallery/' . $value["file"]; |
|
867 | + $value["file"] = 'gallery/'.$value["file"]; |
|
868 | 868 | } |
869 | 869 | |
870 | 870 | //Inserting file in the DB |
871 | 871 | Database::query( |
872 | 872 | "INSERT INTO $TABLETOOLDOCUMENT (c_id, path,title,filetype,size) |
873 | - VALUES ($course_id,'$path_documents" . $value["file"] . "','" . $temp[count($temp) - 1] . "','file','$file_size')" |
|
873 | + VALUES ($course_id,'$path_documents".$value["file"]."','".$temp[count($temp) - 1]."','file','$file_size')" |
|
874 | 874 | ); |
875 | 875 | $image_id = Database:: insert_id(); |
876 | 876 | if ($image_id) { |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | $sql = "UPDATE $TABLETOOLDOCUMENT SET id = iid WHERE iid = $image_id"; |
879 | 879 | Database::query($sql); |
880 | 880 | |
881 | - if ($path_documents . $value['file'] == '/certificates/default.html') { |
|
881 | + if ($path_documents.$value['file'] == '/certificates/default.html') { |
|
882 | 882 | $example_cert_id = $image_id; |
883 | 883 | } |
884 | 884 | $docId = Database::insert( |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | 'c_id' => $course_id, |
930 | 930 | 'url' => 'http://www.google.com', |
931 | 931 | 'title' => 'Google', |
932 | - 'description' => get_lang('Google') , |
|
932 | + 'description' => get_lang('Google'), |
|
933 | 933 | 'category_id' => 0, |
934 | 934 | 'on_homepage' => 0, |
935 | 935 | 'target' => '_self', |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | 'c_id' => $course_id, |
940 | 940 | 'url' => 'http://www.wikipedia.org', |
941 | 941 | 'title' => 'Wikipedia', |
942 | - 'description' => get_lang('Wikipedia') , |
|
942 | + 'description' => get_lang('Wikipedia'), |
|
943 | 943 | 'category_id' => 0, |
944 | 944 | 'on_homepage' => 0, |
945 | 945 | 'target' => '_self', |
@@ -947,7 +947,7 @@ discard block |
||
947 | 947 | ] |
948 | 948 | ]; |
949 | 949 | |
950 | - foreach($links as $params) { |
|
950 | + foreach ($links as $params) { |
|
951 | 951 | $link->save($params); |
952 | 952 | } |
953 | 953 | |
@@ -965,8 +965,8 @@ discard block |
||
965 | 965 | |
966 | 966 | /* Introduction text */ |
967 | 967 | $intro_text = '<p style="text-align: center;"> |
968 | - <img src="' . api_get_path(REL_CODE_PATH) . 'img/mascot.png" alt="Mr. Chamilo" title="Mr. Chamilo" /> |
|
969 | - <h2>' . get_lang('IntroductionText') . '</h2> |
|
968 | + <img src="' . api_get_path(REL_CODE_PATH).'img/mascot.png" alt="Mr. Chamilo" title="Mr. Chamilo" /> |
|
969 | + <h2>' . get_lang('IntroductionText').'</h2> |
|
970 | 970 | </p>'; |
971 | 971 | |
972 | 972 | $toolIntro = new Chamilo\CourseBundle\Entity\CToolIntro(); |
@@ -1002,9 +1002,9 @@ discard block |
||
1002 | 1002 | $html = '<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
1003 | 1003 | <tr> |
1004 | 1004 | <td width="220" valign="top" align="left"> |
1005 | - <img src="' . api_get_path(WEB_CODE_PATH) . 'default_course_document/images/mr_chamilo/doubts.png"> |
|
1005 | + <img src="' . api_get_path(WEB_CODE_PATH).'default_course_document/images/mr_chamilo/doubts.png"> |
|
1006 | 1006 | </td> |
1007 | - <td valign="top" align="left">' . get_lang('Antique') . '</td></tr> |
|
1007 | + <td valign="top" align="left">' . get_lang('Antique').'</td></tr> |
|
1008 | 1008 | </table>'; |
1009 | 1009 | $exercise->type = 1; |
1010 | 1010 | $exercise->setRandom(0); |
@@ -1257,7 +1257,7 @@ discard block |
||
1257 | 1257 | 'https://' |
1258 | 1258 | ) === false |
1259 | 1259 | ) { |
1260 | - $department_url = 'http://' . $department_url; |
|
1260 | + $department_url = 'http://'.$department_url; |
|
1261 | 1261 | } |
1262 | 1262 | //just in case |
1263 | 1263 | if ($department_url == 'http://') { |
@@ -1303,12 +1303,12 @@ discard block |
||
1303 | 1303 | $code |
1304 | 1304 | ); |
1305 | 1305 | if (!empty($user_id)) { |
1306 | - $sql = "INSERT INTO " . $TABLECOURSUSER . " SET |
|
1307 | - c_id = '" . $course_id . "', |
|
1308 | - user_id = '" . intval($user_id) . "', |
|
1306 | + $sql = "INSERT INTO ".$TABLECOURSUSER." SET |
|
1307 | + c_id = '" . $course_id."', |
|
1308 | + user_id = '" . intval($user_id)."', |
|
1309 | 1309 | status = '1', |
1310 | 1310 | is_tutor = '0', |
1311 | - sort = '" . ($i_course_sort) . "', |
|
1311 | + sort = '" . ($i_course_sort)."', |
|
1312 | 1312 | relation_type = 0, |
1313 | 1313 | user_course_cat = '0'"; |
1314 | 1314 | Database::query($sql); |
@@ -1327,12 +1327,12 @@ discard block |
||
1327 | 1327 | if (empty($key)) { |
1328 | 1328 | continue; |
1329 | 1329 | } |
1330 | - $sql = "INSERT INTO " . $TABLECOURSUSER . " SET |
|
1331 | - c_id = '" . Database::escape_string($course_id) . "', |
|
1332 | - user_id = '" . Database::escape_string($key) . "', |
|
1330 | + $sql = "INSERT INTO ".$TABLECOURSUSER." SET |
|
1331 | + c_id = '" . Database::escape_string($course_id)."', |
|
1332 | + user_id = '" . Database::escape_string($key)."', |
|
1333 | 1333 | status = '1', |
1334 | 1334 | is_tutor = '0', |
1335 | - sort = '" . ($sort + 1) . "', |
|
1335 | + sort = '" . ($sort + 1)."', |
|
1336 | 1336 | relation_type = 0, |
1337 | 1337 | user_course_cat = '0'"; |
1338 | 1338 | Database::query($sql); |
@@ -1376,18 +1376,18 @@ discard block |
||
1376 | 1376 | $iname = api_get_setting('Institution'); |
1377 | 1377 | $subject = get_lang( |
1378 | 1378 | 'NewCourseCreatedIn' |
1379 | - ) . ' ' . $siteName . ' - ' . $iname; |
|
1379 | + ).' '.$siteName.' - '.$iname; |
|
1380 | 1380 | $message = get_lang( |
1381 | 1381 | 'Dear' |
1382 | - ) . ' ' . $recipient_name . ",\n\n" . get_lang( |
|
1382 | + ).' '.$recipient_name.",\n\n".get_lang( |
|
1383 | 1383 | 'MessageOfNewCourseToAdmin' |
1384 | - ) . ' ' . $siteName . ' - ' . $iname . "\n"; |
|
1385 | - $message .= get_lang('CourseName') . ' ' . $title . "\n"; |
|
1384 | + ).' '.$siteName.' - '.$iname."\n"; |
|
1385 | + $message .= get_lang('CourseName').' '.$title."\n"; |
|
1386 | 1386 | $message .= get_lang( |
1387 | 1387 | 'Category' |
1388 | - ) . ' ' . $category_code . "\n"; |
|
1389 | - $message .= get_lang('Tutor') . ' ' . $tutor_name . "\n"; |
|
1390 | - $message .= get_lang('Language') . ' ' . $course_language; |
|
1388 | + ).' '.$category_code."\n"; |
|
1389 | + $message .= get_lang('Tutor').' '.$tutor_name."\n"; |
|
1390 | + $message .= get_lang('Language').' '.$course_language; |
|
1391 | 1391 | |
1392 | 1392 | $userInfo = api_get_user_info($user_id); |
1393 | 1393 |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $newMessageText = ''; |
361 | 361 | $linkToNewMessage = Display::url( |
362 | 362 | get_lang('SeeMessage'), |
363 | - api_get_path(WEB_CODE_PATH) . 'messages/inbox.php' |
|
363 | + api_get_path(WEB_CODE_PATH).'messages/inbox.php' |
|
364 | 364 | ); |
365 | 365 | break; |
366 | 366 | case self::NOTIFICATION_TYPE_MESSAGE: |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | } |
376 | 376 | $linkToNewMessage = Display::url( |
377 | 377 | get_lang('SeeMessage'), |
378 | - api_get_path(WEB_CODE_PATH) . 'messages/inbox.php' |
|
378 | + api_get_path(WEB_CODE_PATH).'messages/inbox.php' |
|
379 | 379 | ); |
380 | 380 | break; |
381 | 381 | case self::NOTIFICATION_TYPE_INVITATION: |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | } |
391 | 391 | $linkToNewMessage = Display::url( |
392 | 392 | get_lang('SeeInvitation'), |
393 | - api_get_path(WEB_CODE_PATH) . 'social/invitations.php' |
|
393 | + api_get_path(WEB_CODE_PATH).'social/invitations.php' |
|
394 | 394 | ); |
395 | 395 | break; |
396 | 396 | case self::NOTIFICATION_TYPE_GROUP: |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | } |
485 | 485 | |
486 | 486 | $headers = [ |
487 | - 'Authorization: key=' . $gdcApiKey, |
|
487 | + 'Authorization: key='.$gdcApiKey, |
|
488 | 488 | 'Content-Type: application/json' |
489 | 489 | ]; |
490 | 490 |
@@ -1191,7 +1191,7 @@ discard block |
||
1191 | 1191 | */ |
1192 | 1192 | public function hasPicture() |
1193 | 1193 | { |
1194 | - return file_exists(api_get_path(SYS_COURSE_PATH) . $this->directory . '/course-pic85x85.png'); |
|
1194 | + return file_exists(api_get_path(SYS_COURSE_PATH).$this->directory.'/course-pic85x85.png'); |
|
1195 | 1195 | } |
1196 | 1196 | |
1197 | 1197 | /** |
@@ -1206,9 +1206,9 @@ discard block |
||
1206 | 1206 | } |
1207 | 1207 | |
1208 | 1208 | if ($fullSize) { |
1209 | - return api_get_path(WEB_COURSE_PATH) . $this->directory . '/course-pic.png'; |
|
1209 | + return api_get_path(WEB_COURSE_PATH).$this->directory.'/course-pic.png'; |
|
1210 | 1210 | } |
1211 | 1211 | |
1212 | - return api_get_path(WEB_COURSE_PATH) . $this->directory . '/course-pic85x85.png'; |
|
1212 | + return api_get_path(WEB_COURSE_PATH).$this->directory.'/course-pic85x85.png'; |
|
1213 | 1213 | } |
1214 | 1214 | } |
@@ -212,8 +212,8 @@ discard block |
||
212 | 212 | $sql = "UPDATE $table_group SET id = iid WHERE iid = $lastId"; |
213 | 213 | Database::query($sql); |
214 | 214 | |
215 | - $desired_dir_name= '/'.api_replace_dangerous_char($name).'_groupdocs'; |
|
216 | - $my_path = api_get_path(SYS_COURSE_PATH) . $currentCourseRepository . '/document'; |
|
215 | + $desired_dir_name = '/'.api_replace_dangerous_char($name).'_groupdocs'; |
|
216 | + $my_path = api_get_path(SYS_COURSE_PATH).$currentCourseRepository.'/document'; |
|
217 | 217 | |
218 | 218 | $newFolderData = create_unexisting_directory( |
219 | 219 | $_course, |
@@ -276,11 +276,11 @@ discard block |
||
276 | 276 | $values['default_view_type_group']['default_view_type'] = api_get_setting('default_forum_view'); |
277 | 277 | $values['group_forum'] = $lastId; |
278 | 278 | if ($forumState == '1') { |
279 | - $values['public_private_group_forum_group']['public_private_group_forum']='public'; |
|
279 | + $values['public_private_group_forum_group']['public_private_group_forum'] = 'public'; |
|
280 | 280 | } elseif ($forumState == '2') { |
281 | - $values['public_private_group_forum_group']['public_private_group_forum']='private'; |
|
281 | + $values['public_private_group_forum_group']['public_private_group_forum'] = 'private'; |
|
282 | 282 | } elseif ($forumState == '0') { |
283 | - $values['public_private_group_forum_group']['public_private_group_forum']='unavailable'; |
|
283 | + $values['public_private_group_forum_group']['public_private_group_forum'] = 'unavailable'; |
|
284 | 284 | } |
285 | 285 | store_forum($values); |
286 | 286 | } |
@@ -312,9 +312,9 @@ discard block |
||
312 | 312 | 1 |
313 | 313 | ); |
314 | 314 | $users = self::get_users($group_id); |
315 | - $group_ids = array (); |
|
315 | + $group_ids = array(); |
|
316 | 316 | |
317 | - for ($group_nr = 1; $group_nr <= $number_of_groups; $group_nr ++) { |
|
317 | + for ($group_nr = 1; $group_nr <= $number_of_groups; $group_nr++) { |
|
318 | 318 | $group_ids[] = self::create_group( |
319 | 319 | get_lang('Subgroup').' '.$group_nr, |
320 | 320 | $category_id, |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | } elseif ($forum_state === 0) { |
616 | 616 | $sql2 .= " forum_group_public_private='unavailable' "; |
617 | 617 | } |
618 | - $sql2 .=" WHERE c_id = $course_id AND forum_of_group=".$group_id; |
|
618 | + $sql2 .= " WHERE c_id = $course_id AND forum_of_group=".$group_id; |
|
619 | 619 | Database::query($sql2); |
620 | 620 | return $result; |
621 | 621 | } |
@@ -645,13 +645,13 @@ discard block |
||
645 | 645 | public static function get_categories($course_code = null) |
646 | 646 | { |
647 | 647 | $course_info = api_get_course_info($course_code); |
648 | - $course_id = $course_info['real_id']; |
|
648 | + $course_id = $course_info['real_id']; |
|
649 | 649 | $table_group_cat = Database :: get_course_table(TABLE_GROUP_CATEGORY); |
650 | 650 | $sql = "SELECT * FROM $table_group_cat |
651 | 651 | WHERE c_id = $course_id |
652 | 652 | ORDER BY display_order"; |
653 | 653 | $res = Database::query($sql); |
654 | - $cats = array (); |
|
654 | + $cats = array(); |
|
655 | 655 | while ($cat = Database::fetch_array($res)) { |
656 | 656 | $cats[] = $cat; |
657 | 657 | } |
@@ -935,7 +935,7 @@ discard block |
||
935 | 935 | */ |
936 | 936 | public static function get_current_max_groups_per_user($category_id = null, $course_code = null) |
937 | 937 | { |
938 | - $course_info = api_get_course_info ($course_code); |
|
938 | + $course_info = api_get_course_info($course_code); |
|
939 | 939 | $group_table = Database :: get_course_table(TABLE_GROUP); |
940 | 940 | $group_user_table = Database :: get_course_table(TABLE_GROUP_USER); |
941 | 941 | $sql = 'SELECT COUNT(gu.group_id) AS current_max |
@@ -1216,7 +1216,7 @@ discard block |
||
1216 | 1216 | * Retrieve course users (reverse) ordered by the number |
1217 | 1217 | * of group they are already enrolled |
1218 | 1218 | */ |
1219 | - for ($i = 0; $i < count($complete_user_list); $i ++) { |
|
1219 | + for ($i = 0; $i < count($complete_user_list); $i++) { |
|
1220 | 1220 | //find # of groups the user is enrolled in |
1221 | 1221 | $number_of_groups = self :: user_in_number_of_groups( |
1222 | 1222 | $complete_user_list[$i]["user_id"], |
@@ -1235,7 +1235,7 @@ discard block |
||
1235 | 1235 | |
1236 | 1236 | //now sort by # of group left |
1237 | 1237 | $complete_user_list = TableSort :: sort_table($complete_user_list, 'number_groups_left', SORT_DESC); |
1238 | - $userToken = array (); |
|
1238 | + $userToken = array(); |
|
1239 | 1239 | foreach ($complete_user_list as $this_user) { |
1240 | 1240 | if ($this_user['number_groups_left'] > 0) { |
1241 | 1241 | $userToken[$this_user['user_id']] = $this_user['number_groups_left']; |
@@ -1435,7 +1435,7 @@ discard block |
||
1435 | 1435 | if ($category['groups_per_user'] == self::GROUP_PER_MEMBER_NO_LIMIT) { |
1436 | 1436 | $category['groups_per_user'] = self::INFINITE; |
1437 | 1437 | } |
1438 | - $result = self:: user_in_number_of_groups($user_id, $category['id'] ) < $category['groups_per_user']; |
|
1438 | + $result = self:: user_in_number_of_groups($user_id, $category['id']) < $category['groups_per_user']; |
|
1439 | 1439 | if ($result == false) { |
1440 | 1440 | return false; |
1441 | 1441 | } |
@@ -1536,7 +1536,7 @@ discard block |
||
1536 | 1536 | $order_clause |
1537 | 1537 | "; |
1538 | 1538 | $db_result = Database::query($sql); |
1539 | - $users = array (); |
|
1539 | + $users = array(); |
|
1540 | 1540 | while ($user = Database::fetch_object($db_result)) { |
1541 | 1541 | if (!$id_only) { |
1542 | 1542 | $member['user_id'] = $user->user_id; |
@@ -1601,8 +1601,8 @@ discard block |
||
1601 | 1601 | foreach ($user_ids as $user_id) { |
1602 | 1602 | $user_id = intval($user_id); |
1603 | 1603 | if (self::can_user_subscribe($user_id, $groupId, false)) { |
1604 | - $sql = "INSERT INTO " . $table_group_tutor . " (c_id, user_id, group_id) |
|
1605 | - VALUES ('$course_id', '" . $user_id . "', '" . $groupId . "')"; |
|
1604 | + $sql = "INSERT INTO ".$table_group_tutor." (c_id, user_id, group_id) |
|
1605 | + VALUES ('$course_id', '".$user_id."', '".$groupId."')"; |
|
1606 | 1606 | $result = Database::query($sql); |
1607 | 1607 | } |
1608 | 1608 | } |
@@ -1618,7 +1618,7 @@ discard block |
||
1618 | 1618 | */ |
1619 | 1619 | public static function unsubscribe_users($user_ids, $group_id) |
1620 | 1620 | { |
1621 | - $user_ids = is_array($user_ids) ? $user_ids : array ($user_ids); |
|
1621 | + $user_ids = is_array($user_ids) ? $user_ids : array($user_ids); |
|
1622 | 1622 | $table_group_user = Database :: get_course_table(TABLE_GROUP_USER); |
1623 | 1623 | $group_id = intval($group_id); |
1624 | 1624 | $course_id = api_get_course_int_id(); |
@@ -2066,7 +2066,7 @@ discard block |
||
2066 | 2066 | * Retrieve course users (reverse) ordered by the number |
2067 | 2067 | * of group they are already enrolled |
2068 | 2068 | */ |
2069 | - for ($i = 0; $i < count($complete_user_list); $i ++) { |
|
2069 | + for ($i = 0; $i < count($complete_user_list); $i++) { |
|
2070 | 2070 | // find # of groups the user is enrolled in |
2071 | 2071 | $number_of_groups = self:: user_in_number_of_groups( |
2072 | 2072 | $complete_user_list[$i]["user_id"], |
@@ -2203,14 +2203,14 @@ discard block |
||
2203 | 2203 | !(api_is_course_coach() && intval($this_group['session_id']) != $session_id) |
2204 | 2204 | ) { |
2205 | 2205 | $edit_actions = '<a href="'.$url.'settings.php?'.api_get_cidreq(true, false).'&gidReq='.$this_group['id'].'" title="'.get_lang('Edit').'">'. |
2206 | - Display::return_icon('edit.png', get_lang('EditGroup'),'',ICON_SIZE_SMALL).'</a> '; |
|
2206 | + Display::return_icon('edit.png', get_lang('EditGroup'), '', ICON_SIZE_SMALL).'</a> '; |
|
2207 | 2207 | |
2208 | 2208 | if ($this_group['status'] == 1) { |
2209 | - $edit_actions .= '<a href="' . api_get_self() . '?' . api_get_cidreq(true,false) . '&category=' . $category_id . '&action=set_invisible&id=' . $this_group['id'] . '" title="' . get_lang('Hide') . '">' . |
|
2210 | - Display::return_icon('visible.png', get_lang('Hide'), '', ICON_SIZE_SMALL) . '</a> '; |
|
2209 | + $edit_actions .= '<a href="'.api_get_self().'?'.api_get_cidreq(true, false).'&category='.$category_id.'&action=set_invisible&id='.$this_group['id'].'" title="'.get_lang('Hide').'">'. |
|
2210 | + Display::return_icon('visible.png', get_lang('Hide'), '', ICON_SIZE_SMALL).'</a> '; |
|
2211 | 2211 | } else { |
2212 | - $edit_actions .= '<a href="' . api_get_self() . '?' . api_get_cidreq(true, false) . '&category=' . $category_id . '&action=set_visible&id=' . $this_group['id'] . '" title="' . get_lang('Show') . '">' . |
|
2213 | - Display::return_icon('invisible.png', get_lang('Show'), '', ICON_SIZE_SMALL) . '</a> '; |
|
2212 | + $edit_actions .= '<a href="'.api_get_self().'?'.api_get_cidreq(true, false).'&category='.$category_id.'&action=set_visible&id='.$this_group['id'].'" title="'.get_lang('Show').'">'. |
|
2213 | + Display::return_icon('invisible.png', get_lang('Show'), '', ICON_SIZE_SMALL).'</a> '; |
|
2214 | 2214 | } |
2215 | 2215 | |
2216 | 2216 | $edit_actions .= '<a href="'.$url.'member_settings.php?'.api_get_cidreq(true, false).'&gidReq='.$this_group['id'].'" title="'.get_lang('GroupMembers').'">'. |
@@ -2220,10 +2220,10 @@ discard block |
||
2220 | 2220 | Display::return_icon('export_excel.png', get_lang('Export'), '', ICON_SIZE_SMALL).'</a> '; |
2221 | 2221 | |
2222 | 2222 | $edit_actions .= '<a href="'.api_get_self().'?'.api_get_cidreq(true, false).'&category='.$category_id.'&action=fill_one&id='.$this_group['id'].'" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES))."'".')) return false;" title="'.get_lang('FillGroup').'">'. |
2223 | - Display::return_icon('fill.png',get_lang('FillGroup'),'',ICON_SIZE_SMALL).'</a> '; |
|
2223 | + Display::return_icon('fill.png', get_lang('FillGroup'), '', ICON_SIZE_SMALL).'</a> '; |
|
2224 | 2224 | |
2225 | 2225 | $edit_actions .= '<a href="'.api_get_self().'?'.api_get_cidreq(true, false).'&category='.$category_id.'&action=delete_one&id='.$this_group['id'].'" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES))."'".')) return false;" title="'.get_lang('Delete').'">'. |
2226 | - Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a> '; |
|
2226 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a> '; |
|
2227 | 2227 | |
2228 | 2228 | $row[] = $edit_actions; |
2229 | 2229 | } |
@@ -2595,7 +2595,7 @@ discard block |
||
2595 | 2595 | $activeTutor = null; |
2596 | 2596 | $activeMember = null; |
2597 | 2597 | |
2598 | - switch($default) { |
|
2598 | + switch ($default) { |
|
2599 | 2599 | case 'settings': |
2600 | 2600 | $activeSettings = 'active'; |
2601 | 2601 | break; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | if (isset($_GET['editQuestion'])) { |
14 | - $objQuestion = Question::read ($_GET['editQuestion']); |
|
14 | + $objQuestion = Question::read($_GET['editQuestion']); |
|
15 | 15 | $action = api_get_self()."?".api_get_cidreq()."&myid=1&modifyQuestion=".$modifyQuestion."&editQuestion=".$objQuestion->id; |
16 | 16 | } else { |
17 | 17 | $objQuestion = Question :: getInstance($_REQUEST['answerType']); |