Minor - format code.

1.10.x
Julio Montoya 10 years ago
parent dc8af33a23
commit aa6364a738
  1. 2
      certificates/index.php
  2. 5
      main/admin/course_intro_pdf_import.php
  3. 21
      main/document/create_audio.php
  4. 2
      main/document/document.php
  5. 1
      main/gradebook/index.php
  6. 5
      main/inc/lib/usergroup.lib.php

@ -43,6 +43,6 @@ switch ($action) {
} }
break; break;
default: default:
//Show certificate HTML // Show certificate HTML
$certificate->show(); $certificate->show();
} }

@ -86,8 +86,8 @@ Display :: display_footer();
* @param string Filename * @param string Filename
* @param string The subdirectory in which to put the files in each course * @param string The subdirectory in which to put the files in each course
*/ */
function import_pdfs($file, $subDir = '/') { function import_pdfs($file, $subDir = '/')
global $_configuration; {
$baseDir = api_get_path(SYS_ARCHIVE_PATH); $baseDir = api_get_path(SYS_ARCHIVE_PATH);
$uploadPath = 'pdfimport/'; $uploadPath = 'pdfimport/';
$errors = array (); $errors = array ();
@ -146,5 +146,6 @@ function import_pdfs($file, $subDir = '/') {
if ($i == 0) { if ($i == 0) {
$errors[] = array('Line' => 0, 'Code' => '.', 'Title' => get_lang('NoPDFFoundAtRoot')); $errors[] = array('Line' => 0, 'Code' => '.', 'Title' => get_lang('NoPDFFoundAtRoot'));
} }
return $errors; return $errors;
} }

@ -424,8 +424,25 @@ function downloadMP3_google($filepath, $dir)
$current_session_id = api_get_session_id(); $current_session_id = api_get_session_id();
$groupId = api_get_group_id(); $groupId = api_get_group_id();
$relativeUrlPath=$dir; $relativeUrlPath=$dir;
$doc_id = add_document($_course, $relativeUrlPath.$audio_filename, 'file', filesize($documentPath), $audio_title); $doc_id = add_document(
api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $_user['user_id'], $groupId, null, null, null, $current_session_id); $_course,
$relativeUrlPath.$audio_filename,
'file',
filesize($documentPath),
$audio_title
);
api_item_property_update(
$_course,
TOOL_DOCUMENT,
$doc_id,
'DocumentAdded',
$_user['user_id'],
$groupId,
null,
null,
null,
$current_session_id
);
Display::display_confirmation_message(get_lang('DocumentCreated')); Display::display_confirmation_message(get_lang('DocumentCreated'));
//return to location //return to location
echo '<script>window.location.href="'.$location.'"</script>'; echo '<script>window.location.href="'.$location.'"</script>';

@ -1437,7 +1437,6 @@ if ($is_allowed_to_edit ||
$message = Display::return_message(get_lang('DocumentUnsetAsTemplate'), 'confirmation'); $message = Display::return_message(get_lang('DocumentUnsetAsTemplate'), 'confirmation');
Session::write('message', $message); Session::write('message', $message);
} }
} }
// END ACTION MENU // END ACTION MENU
@ -1455,7 +1454,6 @@ if (isset($_GET['curdirpath']) &&
Session::write('message', $message); Session::write('message', $message);
} }
} }
/* GET ALL DOCUMENT DATA FOR CURDIRPATH */ /* GET ALL DOCUMENT DATA FOR CURDIRPATH */
if (isset($_GET['keyword']) && !empty($_GET['keyword'])) { if (isset($_GET['keyword']) && !empty($_GET['keyword'])) {
$documentAndFolders = DocumentManager::get_all_document_data( $documentAndFolders = DocumentManager::get_all_document_data(

@ -877,7 +877,6 @@ if (isset($first_time) && $first_time==1 && api_is_allowed_to_edit(null,true)) {
} }
} }
$i = 0; $i = 0;
$allcat = array(); $allcat = array();
/** @var Category $cat */ /** @var Category $cat */

@ -44,10 +44,7 @@ class UserGroup extends Model
$this->table_course = Database::get_main_table(TABLE_MAIN_COURSE); $this->table_course = Database::get_main_table(TABLE_MAIN_COURSE);
$this->table_user = Database::get_main_table(TABLE_MAIN_USER); $this->table_user = Database::get_main_table(TABLE_MAIN_USER);
global $_configuration; $this->useMultipleUrl = api_get_configuration_value('enable_multiple_url_support_for_classes');
if (isset($_configuration['enable_multiple_url_support_for_classes'])) {
$this->useMultipleUrl = $_configuration['enable_multiple_url_support_for_classes'];
}
} }
/** /**

Loading…
Cancel
Save