Code Duplication    Length = 3-6 lines in 2 locations

main/lp/learnpath.class.php 2 locations

@@ 301-306 (lines=6) @@
298
                                // Don't use reference here as the next loop will make the pointed object change.
299
                                $this->items[$my_item_id] = $oItem;
300
                                $this->refs_list[$my_item_id] = $my_item_id;
301
                                if ($this->debug > 2) {
302
                                    error_log(
303
                                        'New LP - learnpath::__construct() '.__LINE__.
304
                                        ' - object with id '.$my_item_id.' set in items[]',
305
                                        0
306
                                    );
307
                                }
308
                            }
309
                            break;
@@ 9852-9854 (lines=3) @@
9849
                    $possible_parent = $this->get_scorm_xml_node($children, 'ITEM_'.$item->parent);
9850
                    if (is_object($possible_parent)) {
9851
                        $possible_parent->appendChild($my_item);
9852
                    } else {
9853
                        if ($this->debug > 0) { error_log('Parent ITEM_'.$item->parent.' of item ITEM_'.$my_item_id.' not found'); }
9854
                    }
9855
                } else {
9856
                    if ($this->debug > 0) { error_log('No parent'); }
9857
                    $organization->appendChild($my_item);