Source for file lp_header.php
Documentation is available at lp_header.php
* Script that displays the header frame for lp_view.php
* @package dokeos.learnpath
* @author Yannick Warnier <ywarnier@beeznest.org>
//flag to allow for anonymous user - needs to be set before global.inc.php
// name of the language file that needs to be included
$language_file[] = "scormdocument";
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'])){
$temp = $_SESSION['lpobject'];
$path_name = $_SESSION['oLP']->get_name();
$path_id = $_SESSION['oLP']->get_id();
// use the flag set in lp_view.php to check if this script has been loaded
// as a frame of lp_view.php. Otherwise, redirect to lp_controller
if(!isset ($_SESSION['loaded_lp_view']) || $_SESSION['loaded_lp_view']== false)
//unset the flag as it has been used already
$_SESSION['loaded_lp_view'] = false;
// Check if the learnpaths list should be accessible to the user
$result = api_sql_query("SELECT * FROM $course_tool_table WHERE name='learnpath'",__FILE__ ,__LINE__ );
if($row['visibility'] == '0') //if the tool is *not* visible
$header_hide_main_div = true;
// else we don't display get_lang(ucfirst(TOOL_LEARNPATH)) in the breadcrumb since the learner accessed it directly from the course homepage
$interbreadcrumb[] = array("url"=> "./lp_controller.php?action=view&lp_id=". $path_id,'name'=> $path_name);
$lp_theme_css= $_SESSION['oLP']->get_theme();
include('../inc/reduced_header.inc.php');
echo '<a class="link" href="./lp_controller.php?action=return_to_course_homepage" target="_top" onclick="window.parent.API.save_asset();">'. get_lang('CourseHomepageLink'). '</a>';
|