mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-51123 mod_scorm: Do not display SCO with invisible = false
This commit is contained in:
parent
ea3ebbf20e
commit
7f28e8a58f
1 changed files with 66 additions and 68 deletions
|
@ -1444,7 +1444,7 @@ function scorm_get_toc_object($user, $scorm, $currentorg='', $scoid='', $mode='n
|
|||
|
||||
if (!empty($organizationsco)) {
|
||||
$result[0] = $organizationsco;
|
||||
$result[0]->isvisible = true;
|
||||
$result[0]->isvisible = 'true';
|
||||
$result[0]->statusicon = '';
|
||||
$result[0]->url = '';
|
||||
}
|
||||
|
@ -1464,7 +1464,7 @@ function scorm_get_toc_object($user, $scorm, $currentorg='', $scoid='', $mode='n
|
|||
}
|
||||
foreach ($scoes as $sco) {
|
||||
if (!isset($sco->isvisible)) {
|
||||
$sco->isvisible = true;
|
||||
$sco->isvisible = 'true';
|
||||
}
|
||||
|
||||
if (empty($sco->title)) {
|
||||
|
@ -1477,7 +1477,7 @@ function scorm_get_toc_object($user, $scorm, $currentorg='', $scoid='', $mode='n
|
|||
$sco->prereq = empty($sco->prerequisites) || scorm_eval_prerequisites($sco->prerequisites, $usertracks);
|
||||
}
|
||||
|
||||
if ($sco->isvisible) {
|
||||
if ($sco->isvisible === 'true') {
|
||||
if (!empty($sco->launch)) {
|
||||
if (empty($scoid) && ($mode != 'normal')) {
|
||||
$scoid = $sco->id;
|
||||
|
@ -1667,12 +1667,14 @@ function scorm_format_toc_for_treeview($user, $scorm, $scoes, $usertracks, $cmid
|
|||
$prevsco = '';
|
||||
if (!empty($scoes)) {
|
||||
foreach ($scoes as $sco) {
|
||||
|
||||
if ($sco->isvisible === 'false') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$result->toc .= html_writer::start_tag('li');
|
||||
$scoid = $sco->id;
|
||||
|
||||
$sco->isvisible = true;
|
||||
|
||||
if ($sco->isvisible) {
|
||||
$score = '';
|
||||
|
||||
if (isset($usertracks[$sco->identifier])) {
|
||||
|
@ -1747,10 +1749,6 @@ function scorm_format_toc_for_treeview($user, $scorm, $scoes, $usertracks, $cmid
|
|||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$result->toc .= " ".format_string($sco->title);
|
||||
}
|
||||
|
||||
if (!empty($sco->children)) {
|
||||
$result->toc .= html_writer::start_tag('ul');
|
||||
$childresult = scorm_format_toc_for_treeview($user, $scorm, $sco->children, $usertracks, $cmid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue