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
            }
@@ 9125-9127 (lines=3) @@
9122
                    $possible_parent = &$this->get_scorm_xml_node($children, 'ITEM_'.$item->parent);
9123
                    if (is_object($possible_parent)) {
9124
                        $possible_parent->appendChild($my_item);
9125
                    } else {
9126
                        if ($this->debug > 0) { error_log('Parent ITEM_'.$item->parent.' of item ITEM_'.$my_item_id.' not found'); }
9127
                    }
9128
                } else {
9129
                    if ($this->debug > 0) { error_log('No parent'); }
9130
                    $organization->appendChild($my_item);