Admin: Add configuration setting 'scorm_upload_from_cache' to enable upload of large SCORM files from the app/cache/ folder

pull/3932/head
Yannick Warnier 4 years ago
parent 211cf6cf9f
commit 18098fb5de
  1. 4
      main/install/configuration.dist.php
  2. 17
      main/upload/form.scorm.php

@ -1965,6 +1965,10 @@ ALTER TABLE gradebook_comment ADD CONSTRAINT FK_C3B70763AD3ED51C FOREIGN KEY (gr
// Configuration setting to make required course category in course creation form.
//$_configuration['course_creation_form_set_course_category_mandatory'] = false;
// Enable upload of large SCORM files from FTP by uploading them to app/cache/
// and showing them in the SCORM upload form
//$_configuration['scorm_upload_from_cache'] = false;
// KEEP THIS AT THE END
// -------- Custom DB changes
// Add user activation by confirmation email

@ -92,6 +92,23 @@ if (api_get_configuration_value('allow_htaccess_import_from_scorm')) {
$form->addButtonUpload(get_lang('Upload'));
if (api_get_configuration_value('scorm_upload_from_cache')) {
$list = get_zip_files_in_garbage();
$select_file_name = &$form->addElement(
'select',
'file_name',
get_lang('Or').' '.api_strtolower(get_lang('UploadLocalFileFromGarbageDir'))
);
if (count($list) > 0) {
foreach ($list as $file) {
$select_file_name->addOption($file, $file);
}
$form->addButtonUpload(get_lang('Upload'));
} else {
$select_file_name->addOption(get_lang('ImportNoFile'), get_lang('ImportNoFile'));
}
}
// the default values for the form
$defaults = ['index_document' => 'checked="checked"', 'use_max_score' => 1];
$form->setDefaults($defaults);

Loading…
Cancel
Save