From: bobopinna <bobopinna> Date: Mon, 24 May 2004 07:15:40 +0000 (+0000) Subject: Fixed two lost PHP short tags X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=478ef4492b2b92bca79a5d9bd55a70ad19c293e7;p=moodle.git Fixed two lost PHP short tags --- 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 @@ <input type="submit" name=cancel value="<?php print_string("cancel") ?>"> </center> </form> -<? +<?php } else { ?> <center> <input type="button" value="<?php print_string("continue") ?>" onClick="document.location='<?php echo $CFG->wwwroot ?>/course/view.php?id=<?php echo $course->id ?>';"> </center> -<? +<?php } print_simple_box_end(); print_footer($course);