Code Duplication    Length = 4-4 lines in 2 locations

main/course_progress/thematic_plan.php 1 location

@@ 13-16 (lines=4) @@
10
// actions menu
11
$new_thematic_plan_data = array();
12
if (!empty($thematic_plan_data))
13
foreach($thematic_plan_data as $thematic_item) {
14
    $thematic_simple_list[] = $thematic_item['description_type'];
15
    $new_thematic_plan_data[$thematic_item['description_type']] = $thematic_item;
16
}
17
18
$new_id = ADD_THEMATIC_PLAN;
19
if (!empty($thematic_simple_list)) {

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

@@ 627-630 (lines=4) @@
624
625
        foreach ($data as $thematic_id => $thematic_plan_data) {
626
            $new_thematic_plan_data = array();
627
            foreach($thematic_plan_data as $thematic_item) {
628
                $thematic_simple_list[] = $thematic_item['description_type'];
629
                $new_thematic_plan_data[$thematic_item['description_type']] = $thematic_item;
630
            }
631
632
            if (!empty($thematic_simple_list)) {
633
                foreach($thematic_simple_list as $item) {