Permalink
Browse files

Merge branch 'm20_MDL-27947' of git://github.com/danmarsden/moodle in…

…to MOODLE_20_STABLE
  • Loading branch information...
2 parents 19dd687 + 056d268 commit 05deeaacdb5b52e0ae0c2743bf5c0743e51fe25a Sam Hemelryk committed Jul 11, 2011
Showing with 11 additions and 2 deletions.
  1. +11 −2 mod/scorm/locallib.php
@@ -812,13 +812,22 @@ function scorm_simple_play($scorm,$user, $context) {
$scoes = $DB->get_records_select('scorm_scoes', 'scorm = ? AND '.$DB->sql_isnotempty('scorm_scoes', 'launch', false, true), array($scorm->id), 'id', 'id');
if ($scoes) {
+ $orgidentifier = '';
+ if ($sco = scorm_get_sco($scorm->launch, SCO_ONLY)) {
+ if (($sco->organization == '') && ($sco->launch == '')) {
+ $orgidentifier = $sco->identifier;
+ } else {
+ $orgidentifier = $sco->organization;
+ }
+ }
+
if ($scorm->skipview >= 1) {
$sco = current($scoes);
if (scorm_get_tracks($sco->id,$user->id) === false) {
- header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id);
+ header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id.'&currentorg='.$orgidentifier);
$result = true;
} else if ($scorm->skipview == 2) {
- header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id);
+ header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id.'&currentorg='.$orgidentifier);
$result = true;
}
}

0 comments on commit 05deeaa

Please sign in to comment.