Code Duplication    Length = 8-8 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 6275-6282 (lines=8) @@
6272
                case 'dokeos_chapter' :
6273
                case 'dir' :
6274
                case 'asset' :
6275
                case 'sco' :
6276
                    if (isset ($_GET['view']) && $_GET['view'] == 'build') {
6277
                        $return .= $this->display_manipulate($item_id, $row['item_type']);
6278
                        $return .= $this->display_item_form($row['item_type'], get_lang('EditCurrentChapter') . ' :', 'edit', $item_id, $row);
6279
                    } else {
6280
                        $return .= $this->display_item_small_form($row['item_type'], get_lang('EditCurrentChapter') . ' :', $row);
6281
                    }
6282
                    break;
6283
                case TOOL_DOCUMENT :
6284
                    $tbl_doc = Database :: get_course_table(TABLE_DOCUMENT);
6285
                    $sql = "SELECT lp.*, doc.path as dir
@@ 6314-6321 (lines=8) @@
6311
                    $return .= $this->display_manipulate($item_id, $row['item_type']);
6312
                    $return .= $this->display_link_form('edit', $item_id, $row);
6313
                    break;
6314
                case 'dokeos_module' :
6315
                    if (isset ($_GET['view']) && $_GET['view'] == 'build') {
6316
                        $return .= $this->display_manipulate($item_id, $row['item_type']);
6317
                        $return .= $this->display_item_form($row['item_type'], get_lang('EditCurrentModule') . ' :', 'edit', $item_id, $row);
6318
                    } else {
6319
                        $return .= $this->display_item_small_form($row['item_type'], get_lang('EditCurrentModule') . ' :', $row);
6320
                    }
6321
                    break;
6322
                case TOOL_QUIZ :
6323
                    $return .= $this->display_manipulate($item_id, $row['item_type']);
6324
                    $return .= $this->display_quiz_form('edit', $item_id, $row);