<?php //$id: $
/**
 * Script opened in an iframe and containing the learning path's table of contents
 * @package iilearn.learnpath
 * @author Yannick Warnier <ywarnier@beeznest.org>
 * @license	GNU/GPL - See Dokeos license directory for details
 */
/**
 * Script
 */
$language_file[] = "scormdocument";
$language_file[] = "scorm";
$language_file[] = "learnpath";
require_once('back_compat.inc.php');
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');

if(isset($_SESSION['lpobject']))
{
	$oLP = unserialize($_SESSION['lpobject']);
	if(is_object($oLP)){
		$_SESSION['oLP'] = $oLP;
	}else{
		die('Could not instanciate lp object');
	}
}
$charset = $_SESSION['oLP']->encoding;
$htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
  var dokeos_xajax_handler = window.parent.oxajax;
</script>';

$css_url = api_get_path(WEB_CODE_PATH) . 'css/' . api_get_setting('stylesheets') . '/scorm.css';
$htmlHeadXtra[] = '' .
'<style type="text/css" media="screen, projection">
	/*<![CDATA[*/
	@import "' . $css_url . '";
	/*]]>*/
</style>';
include_once('../inc/reduced_header.inc.php');
?>
<body>
  <?php echo $_SESSION['oLP']->get_html_toc();?>
</body>
</html>
<?php
if(!empty($_SESSION['oLP'])){
	$_SESSION['lpobject'] = serialize($_SESSION['oLP']);
}
?>