Code Duplication    Length = 3-6 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 307-312 (lines=6) @@
304
                        // Don't use reference here as the next loop will make the pointed object change.
305
                        $this->items[$my_item_id] = $oItem;
306
                        $this->refs_list[$my_item_id] = $my_item_id;
307
                        if ($this->debug > 2) {
308
                            error_log(
309
                                'New LP - learnpath::__construct() ' . __LINE__ .
310
                                ' - object with id ' . $my_item_id . ' set in items[]',
311
                                0);
312
                        }
313
                    }
314
                    break;
315
            }
@@ 9047-9049 (lines=3) @@
9044
                    $possible_parent = &$this->get_scorm_xml_node($children, 'ITEM_'.$item->parent);
9045
                    if (is_object($possible_parent)) {
9046
                        $possible_parent->appendChild($my_item);
9047
                    } else {
9048
                        if ($this->debug > 0) { error_log('Parent ITEM_'.$item->parent.' of item ITEM_'.$my_item_id.' not found'); }
9049
                    }
9050
                } else {
9051
                    if ($this->debug > 0) { error_log('No parent'); }
9052
                    $organization->appendChild($my_item);