Skip to content
Browse files

MDL-12161 Stripped slashes in LO titles

  • Loading branch information...
1 parent 894722e commit 552254834b23ec6c988f7e21296637c3ec23b92f bobopinna committed Nov 15, 2007
View
3 mod/scorm/datamodels/aicclib.php
@@ -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,7 +481,7 @@ 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 {
View
7 mod/scorm/datamodels/scorm_12lib.php
@@ -213,13 +213,14 @@ 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;
}
+ } else {
+ $isvisible = true;
}
- else
- $isvisible = true;
if ($parents[$level]!=$sco->parent) {
if ($newlevel = array_search($sco->parent,$parents)) {
for ($i=0; $i<($level-$newlevel); $i++) {
@@ -336,7 +337,7 @@ 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 {
View
1 mod/scorm/datamodels/scorm_13lib.php
@@ -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'))) {

0 comments on commit 5522548

Please sign in to comment.
Something went wrong with that request. Please try again.