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

@@ 5720-5730 (lines=11) @@
5717
     * this function gets all the groups of the course,
5718
     * not including linked courses
5719
     */
5720
    public static function getCourseGroups()
5721
    {
5722
        $session_id = api_get_session_id();
5723
        if ($session_id != 0) {
5724
            $new_group_list = self::get_group_list_of_course(api_get_course_id(), $session_id, 1);
5725
        } else {
5726
            $new_group_list = self::get_group_list_of_course(api_get_course_id(), 0, 1);
5727
        }
5728
5729
        return $new_group_list;
5730
    }
5731
5732
    /**
5733
     * @param FormValidator $form