Browse Source

Removing requires

Julio Montoya 10 years ago
parent
commit
9fed62e976

+ 2 - 3
main/inc/lib/search/tool_processors/document_processor.class.php

@@ -77,12 +77,12 @@ class document_processor extends search_processor {
 
             $doc_id = intval($doc_id);
             $sql = "SELECT * FROM       $doc_table
-                    WHERE      $doc_table.id = $doc_id AND c_id = $course_id 
+                    WHERE      $doc_table.id = $doc_id AND c_id = $course_id
                     LIMIT 1";
             $dk_result = Database::query($sql);
 
             $sql = "SELECT insert_user_id FROM       $item_property_table
-                    WHERE   ref = $doc_id AND tool = '" . TOOL_DOCUMENT . "' AND c_id = $course_id 
+                    WHERE   ref = $doc_id AND tool = '" . TOOL_DOCUMENT . "' AND c_id = $course_id
                     LIMIT 1";
             $name = '';
             if ($row = Database::fetch_array($dk_result)) {
@@ -90,7 +90,6 @@ class document_processor extends search_processor {
                 $url = api_get_path(WEB_PATH) . 'courses/%s/document%s';
                 $url = sprintf($url, $course_path, $row['path']);
                 // Get the image path
-                include_once api_get_path(LIBRARY_PATH) . 'fileDisplay.lib.php';
                 $icon = choose_image(basename($row['path']));
                 $thumbnail = api_get_path(WEB_CODE_PATH) . 'img/' . $icon;
                 $image = $thumbnail;

+ 3 - 0
main/newscorm/learnpath.class.php

@@ -7240,6 +7240,7 @@ class learnpath
             $renderer->setElementTemplate('<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{label}<br />{element}', 'content_lp');
 
             $relative_prefix = '';
+
             $editor_config = array( 'ToolbarSet' 			=> 'LearningPathDocuments',
                 'Width' 				=> '100%',
                 'Height' 				=> '500',
@@ -7248,6 +7249,7 @@ class learnpath
                 'CreateDocumentWebDir' 	=> api_get_path(WEB_COURSE_PATH) . api_get_course_path().'/scorm/',
                 'BaseHref' 				=> api_get_path(WEB_COURSE_PATH) . api_get_course_path().$item_path_fck
             );
+
             $form->addElement('html_editor', 'content_lp', '', null, $editor_config);
             $content_path = (api_get_path(SYS_COURSE_PATH).api_get_course_path().$item_path_fck);
             //$defaults['content_lp'] = file_get_contents($item_path);
@@ -7534,6 +7536,7 @@ class learnpath
                             'CreateDocumentDir' 	=> $relative_prefix,
                             'CreateDocumentWebDir' 	=> api_get_path(WEB_COURSE_PATH) . api_get_course_path().'/document/',
                             'BaseHref' 				=> api_get_path(WEB_COURSE_PATH) . api_get_course_path().'/document/'.$relative_path
+
                         );
 
                         if ($_GET['action'] == 'add_item') {