This commit is contained in:
Huong Nguyen 2024-07-22 09:39:15 +07:00
commit b8831f566b
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A

View File

@ -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;