From: martinlanghoff Date: Fri, 26 Nov 2004 00:57:58 +0000 (+0000) Subject: Merge from MOODLE_14_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1da35f294213062fdf9f968944fdfced0a9c817f;p=moodle.git Merge from MOODLE_14_STABLE Fix for bug 2227 "bug in pclzip.php causing scorm errors" http://moodle.org/bugs/bug.php?op=show&bugid=2227 Credits go to skodak --- diff --git a/mod/scorm/details.php b/mod/scorm/details.php index a49ebdeeee..a9a5ee73aa 100755 --- a/mod/scorm/details.php +++ b/mod/scorm/details.php @@ -35,16 +35,7 @@ if ($scormdir = make_upload_directory("$course->id/$CFG->moddata/scorm")) { if ($tempdir = scorm_datadir($scormdir, $form->datadir)) { copy ("$coursedir/$form->reference", $tempdir."/".basename($form->reference)); - if (empty($CFG->unzip)) { // Use built-in php-based unzip function - include_once($CFG->dirroot.'/lib/pclzip/pclzip.lib.php'); - $archive = new PclZip($tempdir."/".basename($form->reference)); - if (!$list = $archive->extract($tempdir)) { - error($archive->errorInfo(true)); - } - } else { - $command = "cd $tempdir; $CFG->unzip -o ".basename($form->reference)." 2>&1"; - exec($command); - } + unzip_file($tempdir."/".basename($form->reference), $tempdir, false); $result = scorm_validate($tempdir."/imsmanifest.xml"); } else { $result = "packagedir";