Permalink
Browse files

MDL-27947 - fix TOC display on skipview - use correct org in TOC title

  • Loading branch information...
1 parent a938306 commit 0ae4c47c76d3d3e5d8dff41c6e1508f3711728c2 @danmarsden danmarsden committed Jul 8, 2011
Showing with 11 additions and 2 deletions.
  1. +11 −2 mod/scorm/locallib.php
View
@@ -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 0ae4c47

Please sign in to comment.