Code Duplication    Length = 11-18 lines in 2 locations

main/inc/lib/AnnouncementManager.php 1 location

@@ 972-989 (lines=18) @@
969
     * this function gets all the groups of the course,
970
     * not including linked courses
971
     */
972
    public static function get_course_groups()
973
    {
974
        $session_id = api_get_session_id();
975
        if ($session_id != 0) {
976
            $new_group_list = CourseManager::get_group_list_of_course(
977
                api_get_course_id(),
978
                $session_id,
979
                1
980
            );
981
        } else {
982
            $new_group_list = CourseManager::get_group_list_of_course(
983
                api_get_course_id(),
984
                0,
985
                1
986
            );
987
        }
988
        return $new_group_list;
989
    }
990
991
    /**
992
     * This tools loads all the users and all the groups who have received

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

@@ 5670-5680 (lines=11) @@
5667
     * this function gets all the groups of the course,
5668
     * not including linked courses
5669
     */
5670
    public static function getCourseGroups()
5671
    {
5672
        $session_id = api_get_session_id();
5673
        if ($session_id != 0) {
5674
            $new_group_list = self::get_group_list_of_course(api_get_course_id(), $session_id, 1);
5675
        } else {
5676
            $new_group_list = self::get_group_list_of_course(api_get_course_id(), 0, 1);
5677
        }
5678
5679
        return $new_group_list;
5680
    }
5681
5682
    /**
5683
     * @param FormValidator $form