mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 19:36:41 +02:00
MDL-82193 scorm: Don't store header with multiline AICC content
This commit is contained in:
parent
fd487cd3f2
commit
c72de81827
1 changed files with 9 additions and 2 deletions
|
@ -181,7 +181,13 @@ if (!empty($command)) {
|
|||
}
|
||||
echo 'Lesson_Mode='.$userdata->mode."\r\n";
|
||||
if (isset($userdata->{'cmi.suspend_data'})) {
|
||||
echo "[Core_Lesson]\r\n".rawurldecode($userdata->{'cmi.suspend_data'})."\r\n";
|
||||
$decoded = rawurldecode($userdata->{'cmi.suspend_data'});
|
||||
$header = "[Core_Lesson]\r\n";
|
||||
if (stripos($decoded, $header) === 0) {
|
||||
// The header may have been stored with the content. If it was, trim it off the front.
|
||||
$decoded = core_text::substr($decoded, core_text::strlen($header));
|
||||
}
|
||||
echo "[Core_Lesson]\r\n".$decoded."\r\n";
|
||||
} else {
|
||||
echo "[Core_Lesson]\r\n";
|
||||
}
|
||||
|
@ -229,8 +235,9 @@ if (!empty($command)) {
|
|||
// An element was passed by the external AICC package is not one we care about.
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
$multirowvalue .= $datarow . "\r\n";
|
||||
}
|
||||
$multirowvalue .= $datarow."\r\n";
|
||||
if (isset($datarows[$did + 1]) && substr($datarows[$did + 1], 0, 1) != '[') {
|
||||
// This is a multiline row, we haven't found the end yet.
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue