Code Duplication    Length = 8-8 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 6289-6296 (lines=8) @@
6286
                case 'dokeos_chapter':
6287
                case 'dir':
6288
                case 'asset':
6289
                case 'sco':
6290
                    if (isset($_GET['view']) && $_GET['view'] == 'build') {
6291
                        $return .= $this->display_manipulate($item_id, $row['item_type']);
6292
                        $return .= $this->display_item_form($row['item_type'], get_lang('EditCurrentChapter') . ' :', 'edit', $item_id, $row);
6293
                    } else {
6294
                        $return .= $this->display_item_small_form($row['item_type'], get_lang('EditCurrentChapter') . ' :', $row);
6295
                    }
6296
                    break;
6297
                case TOOL_DOCUMENT:
6298
                    $tbl_doc = Database :: get_course_table(TABLE_DOCUMENT);
6299
                    $sql = "SELECT lp.*, doc.path as dir
@@ 6343-6350 (lines=8) @@
6340
                    $return .= $this->display_manipulate($item_id, $row['item_type']);
6341
                    $return .= $this->display_document_form('edit', $item_id, $row_step);
6342
                    break;
6343
                case 'dokeos_module':
6344
                    if (isset ($_GET['view']) && $_GET['view'] == 'build') {
6345
                        $return .= $this->display_manipulate($item_id, $row['item_type']);
6346
                        $return .= $this->display_item_form($row['item_type'], get_lang('EditCurrentModule') . ' :', 'edit', $item_id, $row);
6347
                    } else {
6348
                        $return .= $this->display_item_small_form($row['item_type'], get_lang('EditCurrentModule') . ' :', $row);
6349
                    }
6350
                    break;
6351
                case TOOL_QUIZ:
6352
                    $return .= $this->display_manipulate($item_id, $row['item_type']);
6353
                    $return .= $this->display_quiz_form('edit', $item_id, $row);