Code Duplication    Length = 8-8 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

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