Permalink
Browse files

Fix for bug 2227 "bug in pclzip.php causing scorm errors"

  • Loading branch information...
martinlanghoff
martinlanghoff committed Nov 26, 2004
1 parent 9430b5a commit d9399f4cafb880c0e715505e0cddf6e8a75b70d3
Showing with 1 addition and 10 deletions.
  1. +1 −10 mod/scorm/details.php
View
@@ -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";

0 comments on commit d9399f4

Please sign in to comment.