MDL-52429 mod_scorm: Fix SCORM completion checking in nested SCOs

This commit is contained in:
Juan Leyva 2015-12-07 10:54:49 +01:00
parent ea5c18dfce
commit a6c11677a8

View file

@ -1755,6 +1755,9 @@ function scorm_format_toc_for_treeview($user, $scorm, $scoes, $usertracks, $cmid
$result->toc .= html_writer::start_tag('ul'); $result->toc .= html_writer::start_tag('ul');
$childresult = scorm_format_toc_for_treeview($user, $scorm, $sco->children, $usertracks, $cmid, $childresult = scorm_format_toc_for_treeview($user, $scorm, $sco->children, $usertracks, $cmid,
$toclink, $currentorg, $attempt, $play, $organizationsco, true); $toclink, $currentorg, $attempt, $play, $organizationsco, true);
// Is any of the children incomplete?
$sco->incomplete = $childresult->incomplete;
$result->toc .= $childresult->toc; $result->toc .= $childresult->toc;
$result->toc .= html_writer::end_tag('ul'); $result->toc .= html_writer::end_tag('ul');
$result->toc .= html_writer::end_tag('li'); $result->toc .= html_writer::end_tag('li');