Code Duplication    Length = 3-6 lines in 2 locations

main/lp/learnpath.class.php 2 locations

@@ 293-298 (lines=6) @@
290
                                // Don't use reference here as the next loop will make the pointed object change.
291
                                $this->items[$my_item_id] = $oItem;
292
                                $this->refs_list[$my_item_id] = $my_item_id;
293
                                if ($this->debug > 2) {
294
                                    error_log(
295
                                        'New LP - learnpath::__construct() '.__LINE__.
296
                                        ' - object with id '.$my_item_id.' set in items[]',
297
                                        0
298
                                    );
299
                                }
300
                            }
301
                            break;
@@ 9800-9802 (lines=3) @@
9797
                    $possible_parent = $this->get_scorm_xml_node($children, 'ITEM_'.$item->parent);
9798
                    if (is_object($possible_parent)) {
9799
                        $possible_parent->appendChild($my_item);
9800
                    } else {
9801
                        if ($this->debug > 0) { error_log('Parent ITEM_'.$item->parent.' of item ITEM_'.$my_item_id.' not found'); }
9802
                    }
9803
                } else {
9804
                    if ($this->debug > 0) { error_log('No parent'); }
9805
                    $organization->appendChild($my_item);