Code Duplication    Length = 7-7 lines in 2 locations

src/Chamilo/CourseBundle/Component/CourseCopy/CourseBuilder.php 2 locations

@@ 1301-1307 (lines=7) @@
1298
                );
1299
            }
1300
            //@todo check this queries are the same ...
1301
            if (!empty($this->course->type) && $this->course->type == 'partial') {
1302
                $sql = 'SELECT * FROM '.$table_glossary.' g
1303
                        WHERE g.c_id = '.$courseId.' '.$session_condition;
1304
            } else {
1305
                $sql = 'SELECT * FROM '.$table_glossary.' g
1306
                        WHERE g.c_id = '.$courseId.' '.$session_condition;
1307
            }
1308
        } else {
1309
            $table_glossary = Database:: get_course_table(TABLE_GLOSSARY);
1310
            //@todo check this queries are the same ... ayayay
@@ 1311-1317 (lines=7) @@
1308
        } else {
1309
            $table_glossary = Database:: get_course_table(TABLE_GLOSSARY);
1310
            //@todo check this queries are the same ... ayayay
1311
            if (!empty($this->course->type) && $this->course->type == 'partial') {
1312
                $sql = 'SELECT * FROM '.$table_glossary.' g
1313
                        WHERE g.c_id = '.$courseId.' AND (session_id = 0 OR session_id IS NULL)';
1314
            } else {
1315
                $sql = 'SELECT * FROM '.$table_glossary.' g
1316
                        WHERE g.c_id = '.$courseId.' AND (session_id = 0 OR session_id IS NULL)';
1317
            }
1318
        }
1319
        $db_result = Database::query($sql);
1320
        while ($obj = Database::fetch_object($db_result)) {