mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge from 1.6. Fix for scorm_option2text(). options field is now saved
proprely.
This commit is contained in:
parent
9ef80fa4aa
commit
da52f1523c
@ -542,17 +542,18 @@ function scorm_scandir($directory) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function scorm_option2text($scorm) {
|
||||
global $SCORM_POPUP_OPTIONS;
|
||||
|
||||
if (isset($scorm->popup)) {
|
||||
if ($scorm->popup) {
|
||||
$optionlist = array();
|
||||
foreach ($SCORM_POPUP_OPTIONS as $option) {
|
||||
if (isset($scorm->$option)) {
|
||||
$optionlist[] = $option.'='.$scorm->$option;
|
||||
foreach ($SCORM_POPUP_OPTIONS as $name => $option) {
|
||||
if (isset($scorm->$name)) {
|
||||
$optionlist[] = $name.'='.$scorm->$name;
|
||||
} else {
|
||||
$optionlist[] = $option.'=0';
|
||||
$optionlist[] = $name.'=0';
|
||||
}
|
||||
}
|
||||
$scorm->options = implode(',', $optionlist);
|
||||
@ -566,4 +567,4 @@ function scorm_option2text($scorm) {
|
||||
return $scorm;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user