Code Duplication    Length = 9-9 lines in 2 locations

main/inc/lib/attendance.lib.php 1 location

@@ 643-651 (lines=9) @@
640
            );
641
        }
642
643
        if (!empty($groupId)) {
644
            $groupInfo = GroupManager::get_group_properties($groupId);
645
            $students = GroupManager::getStudents($groupInfo['iid']);
646
            if (!empty($students)) {
647
                foreach ($students as $student) {
648
                    $studentInGroup[$student['user_id']] = true;
649
                }
650
            }
651
        }
652
653
        // get registered users inside current course
654
        $a_users = array();

main/work/work.lib.php 1 location

@@ 2450-2458 (lines=9) @@
2447
    $group_id = api_get_group_id();
2448
    $new_group_user_list = array();
2449
2450
    if ($group_id) {
2451
        $groupInfo = GroupManager::get_group_properties($group_id);
2452
        $group_user_list = GroupManager::get_subscribed_users($groupInfo['iid']);
2453
        if (!empty($group_user_list)) {
2454
            foreach($group_user_list as $group_user) {
2455
                $new_group_user_list[] = $group_user['user_id'];
2456
            }
2457
        }
2458
    }
2459
2460
    $result_users = Database::query($sql_users);
2461
    $users_without_tasks = array();