From 478ef4492b2b92bca79a5d9bd55a70ad19c293e7 Mon Sep 17 00:00:00 2001 From: bobopinna Date: Mon, 24 May 2004 07:15:40 +0000 Subject: [PATCH] Fixed two lost PHP short tags --- mod/scorm/details.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mod/scorm/details.php b/mod/scorm/details.php index 7eb7d64277..6ed8b14f3d 100755 --- a/mod/scorm/details.php +++ b/mod/scorm/details.php @@ -33,22 +33,22 @@ $coursedir = "$CFG->dataroot/$course->id"; 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)); + 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); } + $result = scorm_validate($tempdir."/imsmanifest.xml"); } else { - $command = "cd $tempdir; $CFG->unzip -o ".basename($form->reference)." 2>&1"; - exec($command); + $result = "packagedir"; } - $result = scorm_validate($tempdir."/imsmanifest.xml"); - } else { - $result = "packagedir"; - } } else { $result = "datadir"; } @@ -103,13 +103,13 @@ "> -
" onClick="document.location='wwwroot ?>/course/view.php?id=id ?>';">
-