| @@ 356-363 (lines=8) @@ | ||
| 353 | * @param int kind of rating |
|
| 354 | * @return void() |
|
| 355 | */ |
|
| 356 | public static function qualify_friend($id_friend_qualify, $type_qualify) |
|
| 357 | { |
|
| 358 | $tbl_user_friend = Database::get_main_table(TABLE_MAIN_USER_REL_USER); |
|
| 359 | $user_id = api_get_user_id(); |
|
| 360 | $sql = 'UPDATE '.$tbl_user_friend.' SET relation_type='.((int) $type_qualify).' |
|
| 361 | WHERE user_id = '.((int) $user_id).' AND friend_user_id='.(int) $id_friend_qualify; |
|
| 362 | Database::query($sql); |
|
| 363 | } |
|
| 364 | ||
| 365 | /** |
|
| 366 | * Get user's feeds |
|
| @@ 724-737 (lines=14) @@ | ||
| 721 | * Deletes an assigned task from a blog |
|
| 722 | * @param Integer $blog_id |
|
| 723 | */ |
|
| 724 | public static function delete_assigned_task($blog_id, $task_id, $user_id) |
|
| 725 | { |
|
| 726 | $tbl_blogs_tasks_rel_user = Database::get_course_table(TABLE_BLOGS_TASKS_REL_USER); |
|
| 727 | $course_id = api_get_course_int_id(); |
|
| 728 | ||
| 729 | // Delete posts |
|
| 730 | $sql = "DELETE FROM $tbl_blogs_tasks_rel_user |
|
| 731 | WHERE |
|
| 732 | c_id = $course_id AND |
|
| 733 | blog_id = '".(int)$blog_id."' AND |
|
| 734 | task_id = '".(int)$task_id."' AND |
|
| 735 | user_id = '".(int)$user_id."'"; |
|
| 736 | Database::query($sql); |
|
| 737 | } |
|
| 738 | ||
| 739 | /** |
|
| 740 | * Get personal task list |
|