Code Duplication    Length = 3-3 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 1859-1861 (lines=3) @@
1856
            if ($this->debug > 2) {
1857
                error_log('$index ' . $index);
1858
            }
1859
            if ($this->debug > 2) {
1860
                error_log('New LP - In learnpath::first() - No last item seen. New last = ' . $this->last . '(' . $this->ordered_items[$index] . ')', 0);
1861
            }
1862
        }
1863
        if ($this->debug > 2) {
1864
            error_log('New LP - In learnpath::first() - First item is ' . $this->get_current_item_id());
@@ 2030-2032 (lines=3) @@
2027
        // TODO
2028
        $index = $this->index;
2029
        $index++;
2030
        if ($this->debug > 2) {
2031
            error_log('New LP - Now looking at ordered_items[' . ($index) . '] - type is ' . $this->items[$this->ordered_items[$index]]->type, 0);
2032
        }
2033
        while (!empty ($this->ordered_items[$index]) AND ($this->items[$this->ordered_items[$index]]->get_type() == 'dir' || $this->items[$this->ordered_items[$index]]->get_type() == 'dokeos_chapter') AND $index < $this->max_ordered_items) {
2034
            $index++;
2035
            if ($index == $this->max_ordered_items){