MDL-12161 Stripped slashes in LO titles

This commit is contained in:
bobopinna 2007-11-15 08:37:11 +00:00
parent e2eb2edbad
commit c852a628ac
3 changed files with 7 additions and 4 deletions

View File

@ -357,6 +357,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
foreach ($scoes as $sco) {
$isvisible = false;
$sco->title = stripslashes($sco->title);
if ($optionaldatas = scorm_get_sco($sco->id, SCO_DATA)) {
if (!isset($optionaldatas->isvisible) || (isset($optionaldatas->isvisible) && ($optionaldatas->isvisible == 'true'))) {
$isvisible = true;
@ -480,11 +481,11 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
if ($sco->id == $scoid) {
$result->prerequisites = false;
}
$result->toc .= $statusicon.'&nbsp;'.$sco->title."</li>\n";
$result->toc .= $statusicon.'&nbsp;'.format_string($sco->title)."</li>\n";
}
}
} else {
$result->toc .= '&nbsp;'.$sco->title."</li>\n";
$result->toc .= '&nbsp;'.format_string($sco->title)."</li>\n";
}
if (($nextsco !== false) && ($nextid == 0) && ($findnext)) {
if (!empty($nextsco->launch)) {

View File

@ -213,6 +213,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
foreach ($scoes as $sco) {
$isvisible = false;
$sco->title = stripslashes($sco->title);
if ($optionaldatas = scorm_get_sco($sco->id, SCO_DATA)) {
if (!isset($optionaldatas->isvisible) || (isset($optionaldatas->isvisible) && ($optionaldatas->isvisible == 'true'))) {
$isvisible = true;
@ -338,11 +339,11 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
if ($sco->id == $scoid) {
$result->prerequisites = false;
}
$result->toc .= $statusicon.'&nbsp;'.$sco->title."</li>\n";
$result->toc .= $statusicon.'&nbsp;'.format_string($sco->title)."</li>\n";
}
}
} else {
$result->toc .= '&nbsp;'.$sco->title."</li>\n";
$result->toc .= '&nbsp;'.format_string($sco->title)."</li>\n";
}
if (($nextsco !== false) && ($nextid == 0) && ($findnext)) {
if (!empty($nextsco->launch)) {

View File

@ -63,6 +63,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
$parents[$level]='/';
foreach ($scoes as $sco) {
$isvisible = false;
$sco->title = stripslashes($sco->title);
if (isset($optionaldatas[$sco->identifier])) {
if (!isset($optionaldatas[$sco->identifier]->isvisible) ||
(isset($optionaldatas[$sco->identifier]->isvisible) && ($optionaldatas[$sco->identifier]->isvisible == 'true'))) {