Code Duplication    Length = 8-8 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 6280-6287 (lines=8) @@
6277
                case 'dokeos_chapter' :
6278
                case 'dir' :
6279
                case 'asset' :
6280
                case 'sco' :
6281
                    if (isset ($_GET['view']) && $_GET['view'] == 'build') {
6282
                        $return .= $this->display_manipulate($item_id, $row['item_type']);
6283
                        $return .= $this->display_item_form($row['item_type'], get_lang('EditCurrentChapter') . ' :', 'edit', $item_id, $row);
6284
                    } else {
6285
                        $return .= $this->display_item_small_form($row['item_type'], get_lang('EditCurrentChapter') . ' :', $row);
6286
                    }
6287
                    break;
6288
                case TOOL_DOCUMENT :
6289
                    $tbl_doc = Database :: get_course_table(TABLE_DOCUMENT);
6290
                    $sql = "SELECT lp.*, doc.path as dir
@@ 6334-6341 (lines=8) @@
6331
                    $return .= $this->display_manipulate($item_id, $row['item_type']);
6332
                    $return .= $this->display_document_form('edit', $item_id, $row_step);
6333
                    break;
6334
                case 'dokeos_module' :
6335
                    if (isset ($_GET['view']) && $_GET['view'] == 'build') {
6336
                        $return .= $this->display_manipulate($item_id, $row['item_type']);
6337
                        $return .= $this->display_item_form($row['item_type'], get_lang('EditCurrentModule') . ' :', 'edit', $item_id, $row);
6338
                    } else {
6339
                        $return .= $this->display_item_small_form($row['item_type'], get_lang('EditCurrentModule') . ' :', $row);
6340
                    }
6341
                    break;
6342
                case TOOL_QUIZ :
6343
                    $return .= $this->display_manipulate($item_id, $row['item_type']);
6344
                    $return .= $this->display_quiz_form('edit', $item_id, $row);