Code Duplication    Length = 8-8 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

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