Bugfix : take into account the quota of the course instead of 1G harcoded value in scorm upload changeset 2b4abcdf7fc3 from Dokeos

skala
Julio Montoya 15 years ago
parent 841cd514c9
commit c66bad105f
  1. 10
      main/newscorm/scorm.class.php

@ -1,4 +1,6 @@
<?php <?php
/* For licensing terms, see /license.txt */
/** /**
* Defines the scorm class, which is meant to contain the scorm items (nuclear elements) * Defines the scorm class, which is meant to contain the scorm items (nuclear elements)
* @package dokeos.learnpath.scorm * @package dokeos.learnpath.scorm
@ -6,12 +8,13 @@
*/ */
/** /**
* Defines the "scorm" child of class "learnpath" * Defines the "scorm" child of class "learnpath"
* @package dokeos.learnpath * @package chamilo.learnpath
*/ */
require_once('scormItem.class.php'); require_once('scormItem.class.php');
require_once('scormMetadata.class.php'); require_once('scormMetadata.class.php');
require_once('scormOrganization.class.php'); require_once('scormOrganization.class.php');
require_once('scormResource.class.php'); require_once('scormResource.class.php');
class scorm extends learnpath { class scorm extends learnpath {
var $manifest = array(); var $manifest = array();
var $resources = array(); var $resources = array();
@ -559,7 +562,10 @@ class scorm extends learnpath {
function import_package($zip_file_info,$current_dir = '') function import_package($zip_file_info,$current_dir = '')
{ {
if($this->debug>0){error_log('In scorm::import_package('.print_r($zip_file_info,true).',"'.$current_dir.'") method',0);} if($this->debug>0){error_log('In scorm::import_package('.print_r($zip_file_info,true).',"'.$current_dir.'") method',0);}
$maxFilledSpace = 1000000000; require_once(api_get_path(LIBRARY_PATH).'document.lib.php');
$maxFilledSpace = DocumentManager :: get_course_quota();
//$maxFilledSpace = 1000000000;
$zip_file_path = $zip_file_info['tmp_name']; $zip_file_path = $zip_file_info['tmp_name'];
$zip_file_name = $zip_file_info['name']; $zip_file_name = $zip_file_info['name'];
if($this->debug>1){error_log('New LP - import_package() - zip file path = '.$zip_file_path.', zip file name = '.$zip_file_name,0);} if($this->debug>1){error_log('New LP - import_package() - zip file path = '.$zip_file_path.', zip file name = '.$zip_file_name,0);}

Loading…
Cancel
Save