Code Duplication    Length = 7-7 lines in 2 locations

main/inc/lib/tracking.lib.php 2 locations

@@ 3382-3388 (lines=7) @@
3379
        $tbl_item_property = Database :: get_course_table(TABLE_ITEM_PROPERTY);
3380
        $tbl_student_publication = Database :: get_course_table(TABLE_STUDENT_PUBLICATION);
3381
3382
        if (is_array($student_id)) {
3383
            $studentList = array_map('intval', $student_id);
3384
            $conditions[]= " ip.insert_user_id IN ('".implode("','", $studentList)."') ";
3385
        } else {
3386
            $student_id = intval($student_id);
3387
            $conditions[]= " ip.insert_user_id = '$student_id' ";
3388
        }
3389
        if (isset($session_id)) {
3390
            $session_id = intval($session_id);
3391
            $conditions[]= " pub.session_id = $session_id ";
@@ 3432-3438 (lines=7) @@
3429
        $tbl_forum_post = Database :: get_course_table(TABLE_FORUM_POST);
3430
        $tbl_forum = Database :: get_course_table(TABLE_FORUM);
3431
3432
        if (is_array($student_id)) {
3433
            $studentList = array_map('intval', $student_id);
3434
            $conditions[]= " post.poster_id IN ('".implode("','", $studentList)."') ";
3435
        } else {
3436
            $student_id = intval($student_id);
3437
            $conditions[]= " post.poster_id = '$student_id' ";
3438
        }
3439
3440
        if (isset($session_id)) {
3441
            $session_id = intval($session_id);