Skip to content
Permalink
Browse files

Fix issue with SCORM upload file sizing - refs BT#10012

  • Loading branch information...
ywarnier committed Jun 17, 2015
1 parent 6ab6e62 commit e39ceab4e91918f6e193ca28a99eb8abda7de03d
Showing with 10 additions and 0 deletions.
  1. +10 −0 main/newscorm/learnpath.class.php
@@ -9814,7 +9814,17 @@ public function copy()
public function verify_document_size($s)
{
$post_max = ini_get('post_max_size');
if (substr($post_max, -1, 1) == 'M') {
$post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024;
} elseif (substr($post_max, -1, 1) == 'G') {
$post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
}
$upl_max = ini_get('upload_max_filesize');
if (substr($upl_max, -1, 1) == 'M') {
$upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
} elseif (substr($upl_max, -1, 1) == 'G') {
$upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024 * 1024;
}
$documents_total_space = DocumentManager::documents_total_space();
$course_max_space = DocumentManager::get_course_quota();
$total_size = filesize($s) + $documents_total_space;

0 comments on commit e39ceab

Please sign in to comment.
You can’t perform that action at this time.