| @@ 349-356 (lines=8) @@ | ||
| 346 | * @param int kind of rating |
|
| 347 | * @return void() |
|
| 348 | */ |
|
| 349 | public static function qualify_friend($id_friend_qualify, $type_qualify) |
|
| 350 | { |
|
| 351 | $tbl_user_friend = Database::get_main_table(TABLE_MAIN_USER_REL_USER); |
|
| 352 | $user_id = api_get_user_id(); |
|
| 353 | $sql = 'UPDATE '.$tbl_user_friend.' SET relation_type='.((int) $type_qualify).' |
|
| 354 | WHERE user_id = '.((int) $user_id).' AND friend_user_id='.(int) $id_friend_qualify; |
|
| 355 | Database::query($sql); |
|
| 356 | } |
|
| 357 | ||
| 358 | /** |
|
| 359 | * Sends invitations to friends |
|
| @@ 716-729 (lines=14) @@ | ||
| 713 | * @param Integer $blog_id |
|
| 714 | * @param Integer $assignment_id |
|
| 715 | */ |
|
| 716 | public static function delete_assigned_task($blog_id, $task_id, $user_id) |
|
| 717 | { |
|
| 718 | $tbl_blogs_tasks_rel_user = Database::get_course_table(TABLE_BLOGS_TASKS_REL_USER); |
|
| 719 | $course_id = api_get_course_int_id(); |
|
| 720 | ||
| 721 | // Delete posts |
|
| 722 | $sql = "DELETE FROM $tbl_blogs_tasks_rel_user |
|
| 723 | WHERE |
|
| 724 | c_id = $course_id AND |
|
| 725 | blog_id = '".(int)$blog_id."' AND |
|
| 726 | task_id = '".(int)$task_id."' AND |
|
| 727 | user_id = '".(int)$user_id."'"; |
|
| 728 | Database::query($sql); |
|
| 729 | } |
|
| 730 | ||
| 731 | /** |
|
| 732 | * Get personal task list |
|