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
            }
@@ 9039-9041 (lines=3) @@
9036
                    $possible_parent = &$this->get_scorm_xml_node($children, 'ITEM_'.$item->parent);
9037
                    if (is_object($possible_parent)) {
9038
                        $possible_parent->appendChild($my_item);
9039
                    } else {
9040
                        if ($this->debug > 0) { error_log('Parent ITEM_'.$item->parent.' of item ITEM_'.$my_item_id.' not found'); }
9041
                    }
9042
                } else {
9043
                    if ($this->debug > 0) { error_log('No parent'); }
9044
                    $organization->appendChild($my_item);