Skip to content

Commit

Permalink
Merge branch 'm35_MDL-58015' of https://github.com/danmarsden/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_35_STABLE
  • Loading branch information
David Monllao committed Jul 31, 2018
2 parents 98fe6ee + c1a29fc commit 43eadce
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions mod/scorm/view.php
Expand Up @@ -66,23 +66,22 @@


$launch = false; // Does this automatically trigger a launch based on skipview. $launch = false; // Does this automatically trigger a launch based on skipview.
if (!empty($scorm->popup)) { if (!empty($scorm->popup)) {
$orgidentifier = '';

$scoid = 0; $scoid = 0;
$orgidentifier = ''; $orgidentifier = '';


$result = scorm_get_toc($USER, $scorm, $cm->id, TOCFULLURL); $result = scorm_get_toc($USER, $scorm, $cm->id, TOCFULLURL);
// Set last incomplete sco to launch first. // Set last incomplete sco to launch first.
if (!empty($result->sco->id)) { if (!empty($result->sco->id)) {
$scoid = $result->sco->id; $sco = $result->sco;
} else { } else {
if ($sco = scorm_get_sco($scorm->launch, SCO_ONLY)) { $sco = scorm_get_sco($scorm->launch, SCO_ONLY);
if (($sco->organization == '') && ($sco->launch == '')) { }
$orgidentifier = $sco->identifier; if (!empty($sco)) {
} else { $scoid = $sco->id;
$orgidentifier = $sco->organization; if (($sco->organization == '') && ($sco->launch == '')) {
} $orgidentifier = $sco->identifier;
$scoid = $sco->id; } else {
$orgidentifier = $sco->organization;
} }
} }


Expand Down

0 comments on commit 43eadce

Please sign in to comment.