Comment unused code.

pull/3064/head
Julio 6 years ago
parent a9d63dcc1d
commit 0eeefd1964
  1. 1
      public/main/inc/global.inc.php
  2. 4
      public/main/inc/lib/document.lib.php
  3. 22
      public/main/inc/lib/fileUpload.lib.php
  4. 6
      public/main/lp/learnpath.class.php

@ -48,6 +48,7 @@ try {
$context = $router->getContext();
$router->setContext($context);
$response = $kernel->handle($request);
$context = Container::getRouter()->getContext();

@ -1191,9 +1191,9 @@ class DocumentManager
$row['url'] = api_get_path(WEB_CODE_PATH).'document/showinframes.php?id='.$id.$courseParam;
$row['document_url'] = api_get_path(WEB_CODE_PATH).'document/document.php?id='.$id.$courseParam;
$row['absolute_path'] = api_get_path(SYS_COURSE_PATH).$course_info['path'].'/document'.$row['path'];
//$row['absolute_path'] = api_get_path(SYS_COURSE_PATH).$course_info['path'].'/document'.$row['path'];
$row['absolute_path_from_document'] = '/document'.$row['path'];
$row['absolute_parent_path'] = api_get_path(SYS_COURSE_PATH).$course_info['path'].'/document'.$pathinfo['dirname'].'/';
//$row['absolute_parent_path'] = api_get_path(SYS_COURSE_PATH).$course_info['path'].'/document'.$pathinfo['dirname'].'/';
$row['direct_url'] = $www.$path;
$row['basename'] = basename($row['path']);

@ -1413,6 +1413,28 @@ function create_unexisting_directory(
$course_id = $_course['real_id'];
$session_id = (int) $session_id;
$document = DocumentManager::addDocument(
$_course,
$desired_dir_name,
'folder',
0,
$title,
null,
0,
true,
$to_group_id,
$session_id,
$user_id,
$sendNotification,
'',
null
);
if ($document) {
return $document;
}
$folderExists = DocumentManager::folderExists(
$desired_dir_name,
$_course,

@ -6576,10 +6576,8 @@ class learnpath
public static function generate_learning_path_folder($course, $creatorId = 0)
{
// Creating learning_path folder
$dir = '/learning_path';
$filepath = api_get_path(SYS_COURSE_PATH).$course['path'].'/document';
$dir = 'learning_path';
$creatorId = empty($creatorId) ? api_get_user_id() : $creatorId;
$folder = false;
$folderData = create_unexisting_directory(
$course,
@ -6587,7 +6585,7 @@ class learnpath
0,
null,
0,
$filepath,
'',
$dir,
get_lang('Learning paths'),
0

Loading…
Cancel
Save