]> git.mjollnir.org Git - moodle.git/commitdiff
Merge from 1.6. Fix for scorm_option2text(). options field is now saved
authorvyshane <vyshane>
Thu, 8 Jun 2006 07:39:37 +0000 (07:39 +0000)
committervyshane <vyshane>
Thu, 8 Jun 2006 07:39:37 +0000 (07:39 +0000)
proprely.

mod/scorm/lib.php

index b8c8f28f63ce9fa0a7866bd68dfe04489905deea..f814162a85d1ec3907f686181e1adbe5fde2942f 100755 (executable)
@@ -542,17 +542,18 @@ function scorm_scandir($directory) {
     }\r
 }\r
 \r
+\r
 function scorm_option2text($scorm) {\r
     global $SCORM_POPUP_OPTIONS;\r
 \r
     if (isset($scorm->popup)) {\r
         if ($scorm->popup) {\r
             $optionlist = array();\r
-            foreach ($SCORM_POPUP_OPTIONS as $option) {\r
-                if (isset($scorm->$option)) {\r
-                    $optionlist[] = $option.'='.$scorm->$option;\r
+            foreach ($SCORM_POPUP_OPTIONS as $name => $option) {\r
+                if (isset($scorm->$name)) {\r
+                    $optionlist[] = $name.'='.$scorm->$name;\r
                 } else {\r
-                    $optionlist[] = $option.'=0';\r
+                    $optionlist[] = $name.'=0';\r
                 }\r
             }       \r
             $scorm->options = implode(',', $optionlist);\r
@@ -566,4 +567,4 @@ function scorm_option2text($scorm) {
     return $scorm;\r
 }\r
 \r
-?>\r
+?>
\ No newline at end of file