Code Duplication    Length = 11-18 lines in 2 locations

main/inc/lib/AnnouncementManager.php 1 location

@@ 907-924 (lines=18) @@
904
     * this function gets all the groups of the course,
905
     * not including linked courses
906
     */
907
    public static function get_course_groups()
908
    {
909
        $session_id = api_get_session_id();
910
        if ($session_id != 0) {
911
            $new_group_list = CourseManager::get_group_list_of_course(
912
                api_get_course_id(),
913
                $session_id,
914
                1
915
            );
916
        } else {
917
            $new_group_list = CourseManager::get_group_list_of_course(
918
                api_get_course_id(),
919
                0,
920
                1
921
            );
922
        }
923
        return $new_group_list;
924
    }
925
926
    /**
927
     * This tools loads all the users and all the groups who have received

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

@@ 5623-5633 (lines=11) @@
5620
     * this function gets all the groups of the course,
5621
     * not including linked courses
5622
     */
5623
    public static function getCourseGroups()
5624
    {
5625
        $session_id = api_get_session_id();
5626
        if ($session_id != 0) {
5627
            $new_group_list = self::get_group_list_of_course(api_get_course_id(), $session_id, 1);
5628
        } else {
5629
            $new_group_list = self::get_group_list_of_course(api_get_course_id(), 0, 1);
5630
        }
5631
5632
        return $new_group_list;
5633
    }
5634
5635
    /**
5636
     * @param FormValidator $form