[svn r12652] Important - Fullscreen SCORM is now fully full-screen with no frame added and opens as a popup. Keep track of this commit for possible later removal.

skala
Yannick Warnier 19 years ago
parent c9a2feaaa1
commit e8d7f3b542
  1. 26
      main/newscorm/lp_view.php
  2. 21
      main/newscorm/scorm_api.php

@ -126,17 +126,31 @@ if($_SESSION['oLP']->mode == 'fullscreen'){
$htmlHeadXtra[] = $htmlHeadXtra[] =
'<style type="text/css" media="screen, projection"> '<style type="text/css" media="screen, projection">
/*<![CDATA[*/ /*<![CDATA[*/
@import "scormfs.css"; @import "scorm.css";
/*]]>*/ /*]]>*/
</style>'; </style>';
$htmlHeadXtra[] = "<script>window.open('$src','content_name','toolbar=0,location=0,status=0');</script>";
include_once('../inc/reduced_header.inc.php'); include_once('../inc/reduced_header.inc.php');
?><frameset rows="40,*"> //set flag to ensure lp_header.php is loaded by this script (flag is unset in lp_header.php)
<frameset cols="50%,*"> $_SESSION['loaded_lp_view'] = true;
<frame id="nav_id" name="nav_name" class="lp_nav" align="middle" src="lp_nav.php" frameborder="0"></frame> ?>
<frame id="message_id" name="message_name" class="message" src="lp_message.php" frameborder="0"></frame> <frameset rows="130,*">
<frame id="header" src="lp_header.php" border="0" frameborder="0" scrolling="no" />
<frameset cols="195,*">
<frameset rows="475,95,80,*">
<frame id="toc_id" name="toc_name" class="lp_toc" src="lp_toc.php" border="0" frameborder="0" scrolling="no"/>
<frame id="nav_id" name="nav_name" class="lp_nav" src="lp_nav.php" border="0" frameborder="0" />
<frame id="message_id" name="message_name" class="message" src="lp_message.php" border="0" frameborder="0" />
<frame id="lp_log_id" name="lp_log_name" class="lp_log" src="lp_log.php" border="0" frameborder="0" />
</frameset>
<frame id="content_id_blank" name="content_name_blank" src="blank.php" border="0" frameborder="0">
</frame>
</frameset> </frameset>
<frame id="content_id" name="content_frame" class="iframe" valign="top" src="<?php echo $src; ?>" frameborder="0"></frame> <noframes>
This page relies heavily on frames. If your browser doesn't support frames, please try to find a better one. Some are available for free and run on multiple platforms. We recommend you try <a href="http://www.mozilla.com/firefox/">Firefox</a>. Get it from its official website by clicking the link.
</noframes>
</frameset> </frameset>
</html>
<?php <?php
}else{ }else{
$htmlHeadXtra[] = $htmlHeadXtra[] =

@ -716,7 +716,7 @@ function logit_lms(message,priority){
*/ */
function update_toc(update_action,update_id) function update_toc(update_action,update_id)
{ {
<?php if($oLP->mode != 'fullscreen'){ ?> <?php //if($oLP->mode != 'fullscreen'){ ?>
var myframe = frames["toc_name"]; var myframe = frames["toc_name"];
var myelem = myframe.document.getElementById("toc_"+update_id); var myelem = myframe.document.getElementById("toc_"+update_id);
var myelemimg = myframe.document.getElementById("toc_img_"+update_id); var myelemimg = myframe.document.getElementById("toc_img_"+update_id);
@ -771,7 +771,7 @@ function update_toc(update_action,update_id)
} }
} }
return true; return true;
<?php } ?> <?php //} ?>
return true; return true;
} }
/** /**
@ -860,8 +860,6 @@ function switch_item(current_item, next_item){
xajax_switch_item_details(lms_lp_id,lms_user_id,lms_view_id,lms_item_id,next_item); xajax_switch_item_details(lms_lp_id,lms_user_id,lms_view_id,lms_item_id,next_item);
//(3) open the new item in the content_id frame //(3) open the new item in the content_id frame
var cont_f = document.getElementById('content_id');
if(!cont_f){logit_lms('In switch - content frame not found',0);return false;}
switch(next_item){ switch(next_item){
case 'next': case 'next':
next_item = lms_next_item; next_item = lms_next_item;
@ -872,7 +870,20 @@ function switch_item(current_item, next_item){
default: default:
break; break;
} }
cont_f.src = 'lp_controller.php?action=content&lp_id='+lms_lp_id+'&item_id='+next_item; var mysrc = 'lp_controller.php?action=content&lp_id='+lms_lp_id+'&item_id='+next_item;
var cont_f = document.getElementById('content_id');
if(!cont_f){
logit_lms('In switch - content frame not found',0);
<?php if($oLP->mode = 'fullscreen'){ ?>
cont_f = window.open(''+mysrc,'content_name','toolbar=0,location=0,status=0');
<?php } else { ?>
return false;
<?php } ?>
}
else
{
cont_f.src = mysrc;
}
if(lms_lp_type==1 || lms_item_type=='asset'){ if(lms_lp_type==1 || lms_item_type=='asset'){
xajax_start_timer(); xajax_start_timer();
} }

Loading…
Cancel
Save