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

@@ 2462-2470 (lines=9) @@
2459
    $group_id = api_get_group_id();
2460
    $new_group_user_list = array();
2461
2462
    if ($group_id) {
2463
        $groupInfo = GroupManager::get_group_properties($group_id);
2464
        $group_user_list = GroupManager::get_subscribed_users($groupInfo['iid']);
2465
        if (!empty($group_user_list)) {
2466
            foreach($group_user_list as $group_user) {
2467
                $new_group_user_list[] = $group_user['user_id'];
2468
            }
2469
        }
2470
    }
2471
2472
    $result_users = Database::query($sql_users);
2473
    $users_without_tasks = array();