]> git.mjollnir.org Git - moodle.git/commitdiff
removed an unrequired require_once
authorbobopinna <bobopinna>
Sun, 27 May 2007 16:26:05 +0000 (16:26 +0000)
committerbobopinna <bobopinna>
Sun, 27 May 2007 16:26:05 +0000 (16:26 +0000)
optimized an if branch

mod/scorm/lib.php

index 65a9b7a98b9b4b7bd980f14610ba36841c60d6bb..e53e8a6b6832904de0a49e7d3434981c99c2d5f8 100755 (executable)
@@ -9,7 +9,7 @@
 * @param mixed $scorm Form data
 * @return int
 */
-require_once('locallib.php');
+//require_once('locallib.php');
 function scorm_add_instance($scorm) {
     global $CFG;
 
@@ -76,6 +76,7 @@ function scorm_update_instance($scorm) {
 
     require_once('locallib.php');
 
+    $scorm->parse = 0;
     if (($packagedata = scorm_check_package($scorm)) != null) {
         $scorm->pkgtype = $packagedata->pkgtype;
         if ($packagedata->launch == 0) {
@@ -88,9 +89,6 @@ function scorm_update_instance($scorm) {
                 $scorm->dir = $CFG->dataroot.'/'.$scorm->course.'/moddata/scorm';
                 $scorm->md5hash = md5_file($scorm->dir.$scorm->datadir.'/'.basename($scorm->reference));
             }
-            mtrace($scorm->md5hash);
-        } else {
-            $scorm->parse = 0;
         }
     }