From 1da35f294213062fdf9f968944fdfced0a9c817f Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Fri, 26 Nov 2004 00:57:58 +0000 Subject: [PATCH] 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 --- mod/scorm/details.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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"; -- 2.39.5