@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $this_blog_id = Database::insert($tbl_blogs, $params); |
135 | 135 | |
136 | 136 | if ($this_blog_id > 0) { |
137 | - $sql = "UPDATE $tbl_blogs SET blog_id = iid WHERE iid = $this_blog_id"; |
|
137 | + $sql = "update $tbl_blogs SET blog_id = iid WHERE iid = $this_blog_id"; |
|
138 | 138 | Database::query($sql); |
139 | 139 | |
140 | 140 | // insert into item_property |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | ]; |
160 | 160 | $postId = Database::insert($tbl_blogs_posts, $params); |
161 | 161 | if ($postId) { |
162 | - $sql = "UPDATE $tbl_blogs_posts SET post_id = iid WHERE iid = $postId"; |
|
162 | + $sql = "update $tbl_blogs_posts SET post_id = iid WHERE iid = $postId"; |
|
163 | 163 | Database::query($sql); |
164 | 164 | } |
165 | 165 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | $toolId = Database::insert_id(); |
172 | 172 | if ($toolId) { |
173 | - $sql = "UPDATE $tbl_tool SET id = iid WHERE iid = $toolId"; |
|
173 | + $sql = "update $tbl_tool SET id = iid WHERE iid = $toolId"; |
|
174 | 174 | Database::query($sql); |
175 | 175 | } |
176 | 176 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | |
208 | 208 | $id = Database::insert_id(); |
209 | 209 | if ($id) { |
210 | - $sql = "UPDATE $tbl_user_permissions SET id = iid WHERE iid = $id"; |
|
210 | + $sql = "update $tbl_user_permissions SET id = iid WHERE iid = $id"; |
|
211 | 211 | Database::query($sql); |
212 | 212 | } |
213 | 213 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | $id = Database::insert_id(); |
219 | 219 | if ($id) { |
220 | - $sql = "UPDATE $tbl_user_permissions SET id = iid WHERE iid = $id"; |
|
220 | + $sql = "update $tbl_user_permissions SET id = iid WHERE iid = $id"; |
|
221 | 221 | Database::query($sql); |
222 | 222 | } |
223 | 223 | } |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $subtitle = Database::escape_string($subtitle); |
243 | 243 | |
244 | 244 | // Update the blog |
245 | - $sql = "UPDATE $tbl_blogs SET |
|
245 | + $sql = "update $tbl_blogs SET |
|
246 | 246 | blog_name = '$title', |
247 | 247 | blog_subtitle = '$subtitle' |
248 | 248 | WHERE |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | ); |
262 | 262 | |
263 | 263 | // Update course homepage link |
264 | - $sql = "UPDATE $tbl_tool SET |
|
264 | + $sql = "update $tbl_tool SET |
|
265 | 265 | name = '$title' |
266 | 266 | WHERE c_id = $course_id AND link = 'blog/blog.php?blog_id=$blog_id' |
267 | 267 | LIMIT 1"; |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | $last_post_id = Database::insert_id(); |
364 | 364 | |
365 | 365 | if ($last_post_id) { |
366 | - $sql = "UPDATE $tbl_blogs_posts SET post_id = iid WHERE iid = $last_post_id"; |
|
366 | + $sql = "update $tbl_blogs_posts SET post_id = iid WHERE iid = $last_post_id"; |
|
367 | 367 | Database::query($sql); |
368 | 368 | } |
369 | 369 | |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | Database::query($sql); |
399 | 399 | $id = Database::insert_id(); |
400 | 400 | if ($id) { |
401 | - $sql = "UPDATE $blog_table_attachment SET id = iid WHERE iid = $id"; |
|
401 | + $sql = "update $blog_table_attachment SET id = iid WHERE iid = $id"; |
|
402 | 402 | Database::query($sql); |
403 | 403 | } |
404 | 404 | } |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | $blog_id = intval($blog_id); |
428 | 428 | |
429 | 429 | // Create the post |
430 | - $sql = "UPDATE $tbl_blogs_posts SET |
|
430 | + $sql = "update $tbl_blogs_posts SET |
|
431 | 431 | title = '$title', |
432 | 432 | full_text = '$full_text' |
433 | 433 | WHERE c_id = $course_id AND post_id = $post_id AND blog_id = $blog_id |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | $last_id = Database::insert_id(); |
524 | 524 | |
525 | 525 | if ($last_id) { |
526 | - $sql = "UPDATE $tbl_blogs_comments SET comment_id = iid WHERE iid = $last_id"; |
|
526 | + $sql = "update $tbl_blogs_comments SET comment_id = iid WHERE iid = $last_id"; |
|
527 | 527 | Database::query($sql); |
528 | 528 | |
529 | 529 | if ($has_attachment) { |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | $id = Database::insert_id(); |
559 | 559 | |
560 | 560 | if ($id) { |
561 | - $sql = "UPDATE $blog_table_attachment SET id = iid WHERE iid = $id"; |
|
561 | + $sql = "update $blog_table_attachment SET id = iid WHERE iid = $id"; |
|
562 | 562 | Database::query($sql); |
563 | 563 | } |
564 | 564 | } |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | $task_id = Database::insert_id(); |
649 | 649 | |
650 | 650 | if ($task_id) { |
651 | - $sql = "UPDATE $tbl_blogs_tasks SET task_id = iid WHERE iid = $task_id"; |
|
651 | + $sql = "update $tbl_blogs_tasks SET task_id = iid WHERE iid = $task_id"; |
|
652 | 652 | Database::query($sql); |
653 | 653 | } |
654 | 654 | |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | $id = Database::insert_id(); |
663 | 663 | |
664 | 664 | if ($id) { |
665 | - $sql = "UPDATE $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
665 | + $sql = "update $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
666 | 666 | Database::query($sql); |
667 | 667 | } |
668 | 668 | } |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | $id = Database::insert_id(); |
676 | 676 | |
677 | 677 | if ($id) { |
678 | - $sql = "UPDATE $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
678 | + $sql = "update $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
679 | 679 | Database::query($sql); |
680 | 680 | } |
681 | 681 | } |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | $id = Database::insert_id(); |
689 | 689 | |
690 | 690 | if ($id) { |
691 | - $sql = "UPDATE $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
691 | + $sql = "update $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
692 | 692 | Database::query($sql); |
693 | 693 | } |
694 | 694 | } |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | $color = Database::escape_string($color); |
728 | 728 | |
729 | 729 | // Create the task |
730 | - $sql = "UPDATE $tbl_blogs_tasks SET |
|
730 | + $sql = "update $tbl_blogs_tasks SET |
|
731 | 731 | title = '$title', |
732 | 732 | description = '$description', |
733 | 733 | color = '$color' |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | $id = Database::insert_id(); |
747 | 747 | |
748 | 748 | if ($id) { |
749 | - $sql = "UPDATE $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
749 | + $sql = "update $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
750 | 750 | Database::query($sql); |
751 | 751 | } |
752 | 752 | } |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | $id = Database::insert_id(); |
759 | 759 | |
760 | 760 | if ($id) { |
761 | - $sql = "UPDATE $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
761 | + $sql = "update $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
762 | 762 | Database::query($sql); |
763 | 763 | } |
764 | 764 | } |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | $id = Database::insert_id(); |
771 | 771 | |
772 | 772 | if ($id) { |
773 | - $sql = "UPDATE $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
773 | + $sql = "update $tbl_tasks_permissions SET id = iid WHERE iid = $id"; |
|
774 | 774 | Database::query($sql); |
775 | 775 | } |
776 | 776 | } |
@@ -895,7 +895,7 @@ discard block |
||
895 | 895 | |
896 | 896 | if ($visibility == 1) { |
897 | 897 | // Change visibility state, remove from course home. |
898 | - $sql = "UPDATE $tbl_blogs SET visibility = '0' |
|
898 | + $sql = "update $tbl_blogs SET visibility = '0' |
|
899 | 899 | WHERE c_id = $course_id AND blog_id ='".(int) $blog_id."' LIMIT 1"; |
900 | 900 | Database::query($sql); |
901 | 901 | |
@@ -904,7 +904,7 @@ discard block |
||
904 | 904 | Database::query($sql); |
905 | 905 | } else { |
906 | 906 | // Change visibility state, add to course home. |
907 | - $sql = "UPDATE $tbl_blogs SET visibility = '1' |
|
907 | + $sql = "update $tbl_blogs SET visibility = '1' |
|
908 | 908 | WHERE c_id = $course_id AND blog_id ='".(int) $blog_id."' LIMIT 1"; |
909 | 909 | Database::query($sql); |
910 | 910 | |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | $id = Database::insert_id(); |
915 | 915 | |
916 | 916 | if ($id) { |
917 | - $sql = "UPDATE $tbl_tool SET id = iid WHERE iid = $id"; |
|
917 | + $sql = "update $tbl_tool SET id = iid WHERE iid = $id"; |
|
918 | 918 | Database::query($sql); |
919 | 919 | } |
920 | 920 | } |
@@ -1506,7 +1506,7 @@ discard block |
||
1506 | 1506 | |
1507 | 1507 | $id = Database::insert_id(); |
1508 | 1508 | if ($id) { |
1509 | - $sql = "UPDATE $tbl_blogs_rating SET rating_id = iid WHERE iid = $id"; |
|
1509 | + $sql = "update $tbl_blogs_rating SET rating_id = iid WHERE iid = $id"; |
|
1510 | 1510 | Database::query($sql); |
1511 | 1511 | } |
1512 | 1512 | |
@@ -2235,7 +2235,7 @@ discard block |
||
2235 | 2235 | if ($row['number'] == 0 || |
2236 | 2236 | ($row['number'] != 0 && $task_id == $old_task_id && $user_id == $old_user_id) |
2237 | 2237 | ) { |
2238 | - $sql = "UPDATE $tbl_blogs_tasks_rel_user |
|
2238 | + $sql = "update $tbl_blogs_tasks_rel_user |
|
2239 | 2239 | SET |
2240 | 2240 | user_id = $user_id, |
2241 | 2241 | task_id = $task_id, |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | * @param string $full_text The full text of the new post |
328 | 328 | * @param string $file_comment The text of the comment (if any) |
329 | 329 | * @param int $blog_id The internal blog ID |
330 | - * @return void |
|
330 | + * @return string|null |
|
331 | 331 | */ |
332 | 332 | public static function createPost($title, $full_text, $file_comment, $blog_id) |
333 | 333 | { |
@@ -1156,7 +1156,7 @@ discard block |
||
1156 | 1156 | * @param int $blog_id |
1157 | 1157 | * @param int $post_id |
1158 | 1158 | * @param int $task_id |
1159 | - * @return array |
|
1159 | + * @return integer |
|
1160 | 1160 | */ |
1161 | 1161 | public static function getThreadedComments( |
1162 | 1162 | $current = 0, |
@@ -1277,7 +1277,7 @@ discard block |
||
1277 | 1277 | * @param int $blog_id |
1278 | 1278 | * @param int $post_id |
1279 | 1279 | * @param int $comment_id |
1280 | - * @return void |
|
1280 | + * @return string|null |
|
1281 | 1281 | */ |
1282 | 1282 | public static function displayRatingCreateForm($type, $blog_id, $post_id, $comment_id = null) |
1283 | 1283 | { |
@@ -1346,7 +1346,7 @@ discard block |
||
1346 | 1346 | * @param string $type |
1347 | 1347 | * @param integer $blog_id |
1348 | 1348 | * @param integer $item_id |
1349 | - * @return array |
|
1349 | + * @return double |
|
1350 | 1350 | */ |
1351 | 1351 | public static function displayRating($type, $blog_id, $item_id) |
1352 | 1352 | { |
@@ -2463,7 +2463,7 @@ discard block |
||
2463 | 2463 | * The listed users are users subcribed in the course. |
2464 | 2464 | * @author Toon Keppens |
2465 | 2465 | * @param int $blog_id |
2466 | - * @return false|null Form with sortable table with users to unsubcribe from a blog. |
|
2466 | + * @return false|string Form with sortable table with users to unsubcribe from a blog. |
|
2467 | 2467 | */ |
2468 | 2468 | public static function displayUserUnsubscriptionForm($blog_id) |
2469 | 2469 | { |
@@ -2924,7 +2924,7 @@ discard block |
||
2924 | 2924 | * @param int $blog_id the blog's id |
2925 | 2925 | * @param int $post_id the post's id |
2926 | 2926 | * @param int $comment_id the comment's id |
2927 | - * @return array with the post info according the parameters |
|
2927 | + * @return integer with the post info according the parameters |
|
2928 | 2928 | * @author Julio Montoya |
2929 | 2929 | * @version avril 2008, dokeos 1.8.5 |
2930 | 2930 | */ |
@@ -346,6 +346,7 @@ discard block |
||
346 | 346 | /** |
347 | 347 | * Sets the footer visibility |
348 | 348 | * @param bool true if we show the footer |
349 | + * @param boolean $status |
|
349 | 350 | */ |
350 | 351 | public function set_footer($status) |
351 | 352 | { |
@@ -386,6 +387,7 @@ discard block |
||
386 | 387 | /** |
387 | 388 | * Sets the header visibility |
388 | 389 | * @param bool true if we show the header |
390 | + * @param boolean $status |
|
389 | 391 | */ |
390 | 392 | public function set_header($status) |
391 | 393 | { |
@@ -1268,7 +1270,7 @@ discard block |
||
1268 | 1270 | } |
1269 | 1271 | |
1270 | 1272 | /** |
1271 | - * @param bool|true $setLoginForm |
|
1273 | + * @param boolean $setLoginForm |
|
1272 | 1274 | */ |
1273 | 1275 | public function setLoginForm($setLoginForm = true) |
1274 | 1276 | { |
@@ -87,9 +87,11 @@ |
||
87 | 87 | echo "\t</tr>\n"; |
88 | 88 | |
89 | 89 | // the main area with the checkboxes or images |
90 | -foreach ($tool_rights as $tool => $rights) // $tool_rights contains all the possible tools and their rights |
|
90 | +foreach ($tool_rights as $tool => $rights) { |
|
91 | + // $tool_rights contains all the possible tools and their rights |
|
91 | 92 | { |
92 | 93 | echo "\t<tr>\n"; |
94 | +} |
|
93 | 95 | echo "\t\t<td>\n"; |
94 | 96 | echo get_lang($tool); |
95 | 97 | echo "\t\t</td>\n"; |
@@ -20,10 +20,10 @@ |
||
20 | 20 | } |
21 | 21 | } |
22 | 22 | if (isset($_GET['action'])) { |
23 | - if (($_GET['action'] == 'grant' OR $_GET['action'] == 'revoke') AND isset($_GET['permission']) AND isset($_GET['tool'])) { |
|
23 | + if (($_GET['action'] == 'grant' or $_GET['action'] == 'revoke') and isset($_GET['permission']) and isset($_GET['tool'])) { |
|
24 | 24 | $result_message = store_one_permission('group', $_GET['action'], $group_id, $_GET['tool'], $_GET['permission']); |
25 | 25 | } |
26 | - if (isset($_GET['role']) AND ($_GET['action'] == 'grant' OR $_GET['action'] == 'revoke')) { |
|
26 | + if (isset($_GET['role']) and ($_GET['action'] == 'grant' or $_GET['action'] == 'revoke')) { |
|
27 | 27 | $result_message = assign_role('group', $_GET['action'], $group_id, $_GET['role'], $_GET['scope']); |
28 | 28 | echo 'hier'; |
29 | 29 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | { |
50 | 50 | $url_id = intval($url_id); |
51 | 51 | $table = Database::get_main_table(TABLE_MAIN_ACCESS_URL); |
52 | - $sql = "UPDATE $table |
|
52 | + $sql = "update $table |
|
53 | 53 | SET url = '".Database::escape_string($url)."', |
54 | 54 | description = '".Database::escape_string($description)."', |
55 | 55 | active = '".intval($active)."', |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $table_url_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
200 | 200 | $tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
201 | 201 | if (!empty($access_url_id)) { |
202 | - $where = "WHERE $table_url_rel_user.access_url_id = ".intval($access_url_id); |
|
202 | + $where = "where $table_url_rel_user.access_url_id = ".intval($access_url_id); |
|
203 | 203 | } |
204 | 204 | if (empty($order_by)) { |
205 | 205 | $order_clause = api_sort_by_first_name( |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
283 | 283 | |
284 | 284 | if (!empty($access_url_id)) { |
285 | - $where = "WHERE $table_url_rel_session.access_url_id = ".intval($access_url_id); |
|
285 | + $where = "where $table_url_rel_session.access_url_id = ".intval($access_url_id); |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | $sql = "SELECT id, name, access_url_id |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | $status_db = '1'; |
376 | 376 | } |
377 | 377 | if (($status_db == '1' || $status_db == '0') && is_numeric($url_id)) { |
378 | - $sql = "UPDATE $url_table SET active='".intval($status_db)."' |
|
378 | + $sql = "update $url_table SET active='".intval($status_db)."' |
|
379 | 379 | WHERE id='".intval($url_id)."'"; |
380 | 380 | Database::query($sql); |
381 | 381 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @param string $url The URL of the site |
19 | 19 | * @param string $description The description of the site |
20 | 20 | * @param int $active is active or not |
21 | - * @return boolean if success |
|
21 | + * @return Doctrine\DBAL\Driver\Statement if success |
|
22 | 22 | */ |
23 | 23 | public static function add($url, $description, $active) |
24 | 24 | { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @param string $url |
44 | 44 | * @param string $description The description of the site |
45 | 45 | * @param int $active is active or not |
46 | - * @return boolean if success |
|
46 | + * @return Doctrine\DBAL\Driver\Statement if success |
|
47 | 47 | */ |
48 | 48 | public static function update($url_id, $url, $description, $active) |
49 | 49 | { |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | * @author Julio Montoya |
386 | 386 | * @param int user id |
387 | 387 | * @param int url id |
388 | - * @return boolean true if success |
|
388 | + * @return integer true if success |
|
389 | 389 | * */ |
390 | 390 | public static function relation_url_user_exist($user_id, $url_id) |
391 | 391 | { |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | * @author Julio Montoya |
404 | 404 | * @param int $courseId |
405 | 405 | * @param int $urlId |
406 | - * @return boolean true if success |
|
406 | + * @return integer true if success |
|
407 | 407 | * */ |
408 | 408 | public static function relation_url_course_exist($courseId, $urlId) |
409 | 409 | { |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | * @author Julio Montoya |
425 | 425 | * @param int $userGroupId |
426 | 426 | * @param int $urlId |
427 | - * @return boolean true if success |
|
427 | + * @return integer true if success |
|
428 | 428 | * */ |
429 | 429 | public static function relationUrlUsergroupExist($userGroupId, $urlId) |
430 | 430 | { |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | * @author Julio Montoya |
445 | 445 | * @param int user id |
446 | 446 | * @param int url id |
447 | - * @return boolean true if success |
|
447 | + * @return integer true if success |
|
448 | 448 | * */ |
449 | 449 | public static function relation_url_session_exist($session_id, $url_id) |
450 | 450 | { |
@@ -567,6 +567,8 @@ discard block |
||
567 | 567 | * @author Julio Montoya |
568 | 568 | * @param array of course ids |
569 | 569 | * @param array of url_ids |
570 | + * @param integer[] $courseCategoryList |
|
571 | + * @param integer[] $urlList |
|
570 | 572 | * @return array |
571 | 573 | **/ |
572 | 574 | public static function addCourseCategoryListToUrl($courseCategoryList, $urlList) |
@@ -597,7 +599,7 @@ discard block |
||
597 | 599 | * @author Julio Montoya |
598 | 600 | * @param int $categoryCourseId |
599 | 601 | * @param int $urlId |
600 | - * @return boolean true if success |
|
602 | + * @return integer true if success |
|
601 | 603 | * */ |
602 | 604 | public static function relationUrlCourseCategoryExist($categoryCourseId, $urlId) |
603 | 605 | { |
@@ -615,7 +617,7 @@ discard block |
||
615 | 617 | /** |
616 | 618 | * @param int $userGroupId |
617 | 619 | * @param int $urlId |
618 | - * @return int |
|
620 | + * @return string |
|
619 | 621 | */ |
620 | 622 | public static function addUserGroupToUrl($userGroupId, $urlId) |
621 | 623 | { |
@@ -717,7 +719,7 @@ discard block |
||
717 | 719 | * @param int $courseId |
718 | 720 | * @param int $url_id |
719 | 721 | * |
720 | - * @return resource |
|
722 | + * @return boolean |
|
721 | 723 | */ |
722 | 724 | public static function add_course_to_url($courseId, $url_id = 1) |
723 | 725 | { |
@@ -808,7 +810,7 @@ discard block |
||
808 | 810 | * @param int $courseId |
809 | 811 | * @param int $urlId |
810 | 812 | * |
811 | - * @return boolean true if success |
|
813 | + * @return Doctrine\DBAL\Driver\Statement true if success |
|
812 | 814 | * */ |
813 | 815 | public static function delete_url_rel_course($courseId, $urlId) |
814 | 816 | { |
@@ -826,7 +828,7 @@ discard block |
||
826 | 828 | * @param int $userGroupId |
827 | 829 | * @param int $urlId |
828 | 830 | * |
829 | - * @return boolean true if success |
|
831 | + * @return Doctrine\DBAL\Driver\Statement true if success |
|
830 | 832 | * */ |
831 | 833 | public static function delete_url_rel_usergroup($userGroupId, $urlId) |
832 | 834 | { |
@@ -845,7 +847,7 @@ discard block |
||
845 | 847 | * @param int $userGroupId |
846 | 848 | * @param int $urlId |
847 | 849 | * |
848 | - * @return boolean true if success |
|
850 | + * @return Doctrine\DBAL\Driver\Statement true if success |
|
849 | 851 | * */ |
850 | 852 | public static function deleteUrlRelCourseCategory($userGroupId, $urlId) |
851 | 853 | { |
@@ -864,8 +866,9 @@ discard block |
||
864 | 866 | * @author Julio Montoya |
865 | 867 | * @param char course code |
866 | 868 | * @param int url id |
869 | + * @param integer $url_id |
|
867 | 870 | * |
868 | - * @return boolean true if success |
|
871 | + * @return Doctrine\DBAL\Driver\Statement true if success |
|
869 | 872 | * */ |
870 | 873 | public static function delete_url_rel_session($session_id, $url_id) |
871 | 874 | { |
@@ -11,15 +11,15 @@ discard block |
||
11 | 11 | class UrlManager |
12 | 12 | { |
13 | 13 | /** |
14 | - * Creates a new url access |
|
15 | - * |
|
16 | - * @author Julio Montoya <[email protected]>, |
|
17 | - * |
|
14 | + * Creates a new url access |
|
15 | + * |
|
16 | + * @author Julio Montoya <[email protected]>, |
|
17 | + * |
|
18 | 18 | * @param string $url The URL of the site |
19 | 19 | * @param string $description The description of the site |
20 | 20 | * @param int $active is active or not |
21 | 21 | * @return boolean if success |
22 | - */ |
|
22 | + */ |
|
23 | 23 | public static function add($url, $description, $active) |
24 | 24 | { |
25 | 25 | $tms = time(); |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
39 | - * Updates an URL access |
|
40 | - * @author Julio Montoya <[email protected]>, |
|
39 | + * Updates an URL access |
|
40 | + * @author Julio Montoya <[email protected]>, |
|
41 | 41 | * |
42 | 42 | * @param int $url_id The url id |
43 | 43 | * @param string $url |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
66 | - * Deletes an url |
|
67 | - * @author Julio Montoya |
|
68 | - * @param int $id url id |
|
66 | + * Deletes an url |
|
67 | + * @author Julio Montoya |
|
68 | + * @param int $id url id |
|
69 | 69 | * |
70 | - * @return boolean true if success |
|
71 | - * */ |
|
70 | + * @return boolean true if success |
|
71 | + * */ |
|
72 | 72 | public static function delete($id) |
73 | 73 | { |
74 | 74 | $id = intval($id); |
@@ -218,12 +218,12 @@ discard block |
||
218 | 218 | } |
219 | 219 | |
220 | 220 | /** |
221 | - * Gets the inner join of access_url and the course table |
|
222 | - * |
|
223 | - * @author Julio Montoya |
|
224 | - * @param int access url id |
|
225 | - * @return array Database::store_result of the result |
|
226 | - **/ |
|
221 | + * Gets the inner join of access_url and the course table |
|
222 | + * |
|
223 | + * @author Julio Montoya |
|
224 | + * @param int access url id |
|
225 | + * @return array Database::store_result of the result |
|
226 | + **/ |
|
227 | 227 | public static function get_url_rel_course_data($access_url_id = null) |
228 | 228 | { |
229 | 229 | $where = ''; |
@@ -381,12 +381,12 @@ discard block |
||
381 | 381 | } |
382 | 382 | |
383 | 383 | /** |
384 | - * Checks the relationship between an URL and a User (return the num_rows) |
|
385 | - * @author Julio Montoya |
|
386 | - * @param int user id |
|
387 | - * @param int url id |
|
388 | - * @return boolean true if success |
|
389 | - * */ |
|
384 | + * Checks the relationship between an URL and a User (return the num_rows) |
|
385 | + * @author Julio Montoya |
|
386 | + * @param int user id |
|
387 | + * @param int url id |
|
388 | + * @return boolean true if success |
|
389 | + * */ |
|
390 | 390 | public static function relation_url_user_exist($user_id, $url_id) |
391 | 391 | { |
392 | 392 | $table = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
@@ -399,12 +399,12 @@ discard block |
||
399 | 399 | } |
400 | 400 | |
401 | 401 | /** |
402 | - * Checks the relationship between an URL and a Course (return the num_rows) |
|
403 | - * @author Julio Montoya |
|
404 | - * @param int $courseId |
|
405 | - * @param int $urlId |
|
406 | - * @return boolean true if success |
|
407 | - * */ |
|
402 | + * Checks the relationship between an URL and a Course (return the num_rows) |
|
403 | + * @author Julio Montoya |
|
404 | + * @param int $courseId |
|
405 | + * @param int $urlId |
|
406 | + * @return boolean true if success |
|
407 | + * */ |
|
408 | 408 | public static function relation_url_course_exist($courseId, $urlId) |
409 | 409 | { |
410 | 410 | $table_url_rel_course = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE); |
@@ -440,12 +440,12 @@ discard block |
||
440 | 440 | } |
441 | 441 | |
442 | 442 | /** |
443 | - * Checks the relationship between an URL and a Session (return the num_rows) |
|
444 | - * @author Julio Montoya |
|
445 | - * @param int user id |
|
446 | - * @param int url id |
|
447 | - * @return boolean true if success |
|
448 | - * */ |
|
443 | + * Checks the relationship between an URL and a Session (return the num_rows) |
|
444 | + * @author Julio Montoya |
|
445 | + * @param int user id |
|
446 | + * @param int url id |
|
447 | + * @return boolean true if success |
|
448 | + * */ |
|
449 | 449 | public static function relation_url_session_exist($session_id, $url_id) |
450 | 450 | { |
451 | 451 | $table_url_rel_session = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
@@ -762,13 +762,13 @@ discard block |
||
762 | 762 | } |
763 | 763 | |
764 | 764 | /** |
765 | - * Deletes an url and user relationship |
|
766 | - * @author Julio Montoya |
|
767 | - * @param int user id |
|
768 | - * @param int url id |
|
765 | + * Deletes an url and user relationship |
|
766 | + * @author Julio Montoya |
|
767 | + * @param int user id |
|
768 | + * @param int url id |
|
769 | 769 | * |
770 | - * @return boolean true if success |
|
771 | - * */ |
|
770 | + * @return boolean true if success |
|
771 | + * */ |
|
772 | 772 | public static function delete_url_rel_user($user_id, $url_id) |
773 | 773 | { |
774 | 774 | $table = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
@@ -803,13 +803,13 @@ discard block |
||
803 | 803 | } |
804 | 804 | |
805 | 805 | /** |
806 | - * Deletes an url and course relationship |
|
807 | - * @author Julio Montoya |
|
808 | - * @param int $courseId |
|
809 | - * @param int $urlId |
|
806 | + * Deletes an url and course relationship |
|
807 | + * @author Julio Montoya |
|
808 | + * @param int $courseId |
|
809 | + * @param int $urlId |
|
810 | 810 | * |
811 | - * @return boolean true if success |
|
812 | - * */ |
|
811 | + * @return boolean true if success |
|
812 | + * */ |
|
813 | 813 | public static function delete_url_rel_course($courseId, $urlId) |
814 | 814 | { |
815 | 815 | $table = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE); |
@@ -860,13 +860,13 @@ discard block |
||
860 | 860 | } |
861 | 861 | |
862 | 862 | /** |
863 | - * Deletes an url and session relationship |
|
864 | - * @author Julio Montoya |
|
865 | - * @param char course code |
|
866 | - * @param int url id |
|
863 | + * Deletes an url and session relationship |
|
864 | + * @author Julio Montoya |
|
865 | + * @param char course code |
|
866 | + * @param int url id |
|
867 | 867 | * |
868 | - * @return boolean true if success |
|
869 | - * */ |
|
868 | + * @return boolean true if success |
|
869 | + * */ |
|
870 | 870 | public static function delete_url_rel_session($session_id, $url_id) |
871 | 871 | { |
872 | 872 | $table = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * Gets html pages and compose them into a learning path |
44 | 44 | * @param array The files that will compose the generated learning path. Unused so far. |
45 | - * @return boolean False if file does not exit. Nothing otherwise. |
|
45 | + * @return false|null False if file does not exit. Nothing otherwise. |
|
46 | 46 | */ |
47 | 47 | public function make_lp($files = array()) |
48 | 48 | { |
@@ -100,6 +100,7 @@ discard block |
||
100 | 100 | * Manages dir/chapter splitting |
101 | 101 | * @param string Chapter header |
102 | 102 | * @param string Content |
103 | + * @param string $content |
|
103 | 104 | * @return void |
104 | 105 | */ |
105 | 106 | public function dealPerChapter($header, $content) |
@@ -191,6 +192,7 @@ discard block |
||
191 | 192 | * Manages page splitting |
192 | 193 | * @param string Page header |
193 | 194 | * @param string Page body |
195 | + * @param string $body |
|
194 | 196 | * @return void |
195 | 197 | */ |
196 | 198 | public function dealPerPage($header, $body) |
@@ -32,8 +32,7 @@ |
||
32 | 32 | } |
33 | 33 | if ($this->form_type == self::TYPE_USER_INFO) { |
34 | 34 | $this->build_user_info_form(); |
35 | - } |
|
36 | - elseif ($this->form_type == self::TYPE_SIMPLE_SEARCH) { |
|
35 | + } elseif ($this->form_type == self::TYPE_SIMPLE_SEARCH) { |
|
37 | 36 | $this->build_simple_search(); |
38 | 37 | } |
39 | 38 | $this->setDefaults(); |
@@ -8,7 +8,8 @@ |
||
8 | 8 | namespace Chamilo\ThemeBundle\Helper; |
9 | 9 | |
10 | 10 | |
11 | -class WidgetHelper extends \Twig_Extension { |
|
11 | +class WidgetHelper extends \Twig_Extension |
|
12 | +{ |
|
12 | 13 | |
13 | 14 | /** |
14 | 15 | * Get widget helper name |
@@ -715,7 +715,7 @@ |
||
715 | 715 | } |
716 | 716 | |
717 | 717 | /** |
718 | - * @return mixed |
|
718 | + * @return null|BranchSync |
|
719 | 719 | */ |
720 | 720 | public function getParent() |
721 | 721 | { |
@@ -136,11 +136,11 @@ discard block |
||
136 | 136 | */ |
137 | 137 | private $lastSyncType; |
138 | 138 | |
139 | - /** |
|
140 | - * @var string |
|
141 | - * |
|
142 | - * @ORM\Column(name="ssl_pub_key", type="string", length=250, nullable=true, unique=false) |
|
143 | - */ |
|
139 | + /** |
|
140 | + * @var string |
|
141 | + * |
|
142 | + * @ORM\Column(name="ssl_pub_key", type="string", length=250, nullable=true, unique=false) |
|
143 | + */ |
|
144 | 144 | private $sslPubKey; |
145 | 145 | |
146 | 146 | /** |
@@ -530,12 +530,12 @@ discard block |
||
530 | 530 | return $this->sslPubKey; |
531 | 531 | } |
532 | 532 | |
533 | - /** |
|
534 | - * Set sslPubKey |
|
535 | - * |
|
536 | - * @param string $branchType |
|
537 | - * @return BranchSync |
|
538 | - */ |
|
533 | + /** |
|
534 | + * Set sslPubKey |
|
535 | + * |
|
536 | + * @param string $branchType |
|
537 | + * @return BranchSync |
|
538 | + */ |
|
539 | 539 | public function setBranchType($branchType) |
540 | 540 | { |
541 | 541 | $this->branchType = $branchType; |
@@ -120,12 +120,12 @@ discard block |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | if ($add_type == 'multiple') { |
123 | - $link_add_type_unique = '<a href="'.api_get_self().'?add_type=unique&access_url_id='.$access_url_id.'">'. |
|
123 | + $link_add_type_unique = '<a href="'.api_get_self().'?add_type=unique&access_url_id='.$access_url_id.'">'. |
|
124 | 124 | get_lang('SessionAddTypeUnique').'</a>'; |
125 | - $link_add_type_multiple = get_lang('SessionAddTypeMultiple'); |
|
125 | + $link_add_type_multiple = get_lang('SessionAddTypeMultiple'); |
|
126 | 126 | } else { |
127 | - $link_add_type_unique = get_lang('SessionAddTypeUnique'); |
|
128 | - $link_add_type_multiple = '<a href="'.api_get_self().'?add_type=multiple&access_url_id='.$access_url_id.'">'. |
|
127 | + $link_add_type_unique = get_lang('SessionAddTypeUnique'); |
|
128 | + $link_add_type_multiple = '<a href="'.api_get_self().'?add_type=multiple&access_url_id='.$access_url_id.'">'. |
|
129 | 129 | get_lang('SessionAddTypeMultiple').'</a>'; |
130 | 130 | } |
131 | 131 | |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | } else { |
229 | 229 | echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>'; |
230 | 230 | } |
231 | - ?> |
|
231 | + ?> |
|
232 | 232 | </td> |
233 | 233 | </tr> |
234 | 234 | </table> |