Permalink
Browse files

Merge branch 'm34_MDL-58015' of https://github.com/danmarsden/moodle

…into MOODLE_34_STABLE
  • Loading branch information...
dmonllao committed Jul 31, 2018
2 parents 09fd0f4 + f3a4d3f commit 389a43143ee3582f8e7c8f67501a76b8d7c74aac
Showing with 9 additions and 10 deletions.
  1. +9 −10 mod/scorm/view.php
@@ -66,23 +66,22 @@
$launch = false; // Does this automatically trigger a launch based on skipview.
if (!empty($scorm->popup)) {
$orgidentifier = '';
$scoid = 0;
$orgidentifier = '';
$result = scorm_get_toc($USER, $scorm, $cm->id, TOCFULLURL);
// Set last incomplete sco to launch first.
if (!empty($result->sco->id)) {
$scoid = $result->sco->id;
$sco = $result->sco;
} else {
if ($sco = scorm_get_sco($scorm->launch, SCO_ONLY)) {
if (($sco->organization == '') && ($sco->launch == '')) {
$orgidentifier = $sco->identifier;
} else {
$orgidentifier = $sco->organization;
}
$scoid = $sco->id;
$sco = scorm_get_sco($scorm->launch, SCO_ONLY);
}
if (!empty($sco)) {
$scoid = $sco->id;
if (($sco->organization == '') && ($sco->launch == '')) {
$orgidentifier = $sco->identifier;
} else {
$orgidentifier = $sco->organization;
}
}

0 comments on commit 389a431

Please sign in to comment.