Removing unused scripts + replacing the reduced_header.inc.php with the Display::display_reduced_header() function
parent
911ec5a9d2
commit
33b2fc8871
@ -1,24 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
/** |
||||
* DEPRECATED (temporarily left here) |
||||
* Script that displays the footer frame for lp_view.php |
||||
* @package chamilo.learnpath |
||||
* @author Yannick Warnier <ywarnier@beeznest.org> |
||||
*/ |
||||
/** |
||||
* Code |
||||
*/ |
||||
// Flag to allow for anonymous user - needs to be set before global.inc.php. |
||||
$use_anonymous = true; |
||||
|
||||
require_once 'back_compat.inc.php'; |
||||
//require_once 'lp_comm.common.php'; // xajax functions |
||||
//$htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/')."\n"; |
||||
//$htmlHeadXtra[] = '<script language="javascript">var myxajax = window.parent.oxajax;</script>'; |
||||
include_once '../inc/reduced_header.inc.php'; |
||||
?> |
||||
<body> |
||||
<!--div id="clickme" style="border: 1px solid black; width:10px; height:7px;" onclick="myxajax.xajax_get_statuses();"></div--> |
||||
</body> |
||||
</html> |
@ -1,52 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
/** |
||||
* Script that displays the author name and image of a LP |
||||
* @package chamilo.learnpath |
||||
* @author Julio Montoya Armas <gugli100@gmail.com> |
||||
*/ |
||||
/** |
||||
* Code |
||||
*/ |
||||
$use_anonymous = true; |
||||
require_once 'back_compat.inc.php'; |
||||
require_once 'learnpath.class.php'; |
||||
require_once 'scorm.class.php'; |
||||
require_once 'aicc.class.php'; |
||||
|
||||
// Getting the LP. |
||||
if (isset($_SESSION['lpobject'])) { |
||||
$oLP = unserialize($_SESSION['lpobject']); |
||||
if (is_object($oLP)) { |
||||
$_SESSION['oLP'] = $oLP; |
||||
} else { |
||||
die('Could not instanciate lp object'); |
||||
} |
||||
} |
||||
/* |
||||
$lp_theme_css = $_SESSION['oLP']->get_theme(); |
||||
*/ |
||||
|
||||
$scorm_css_header = true; |
||||
// scorm.css loaded |
||||
require_once '../inc/reduced_header.inc.php'; |
||||
|
||||
echo '<body dir="'.api_get_text_direction().'">'; |
||||
$image = '../img/lp_author_background.gif'; |
||||
echo '<div id="image_preview">'; |
||||
echo '<table STYLE="width:250px;height:110px;background-image: url('.$image.');">'; |
||||
echo '<tr><td align="center">'; |
||||
if ($_SESSION['oLP']->get_preview_image()!='') |
||||
echo '<img alt="" src="'.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/upload/learning_path/images/'.$_SESSION['oLP']->get_preview_image().'">'; |
||||
else |
||||
echo Display::display_icon('unknown_250_100.jpg', ' '); |
||||
echo '</td></tr>'; |
||||
echo '</table>'; |
||||
echo '<div id="author_name">'; |
||||
echo $_SESSION['oLP']->get_author(); |
||||
echo '</div>'; |
||||
echo '</div>'; |
||||
?> |
||||
</body> |
||||
</html> |
@ -1,18 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
/** |
||||
* Script that displays the footer frame for lp_view.php |
||||
* @package chamilo.learnpath |
||||
* @author Yannick Warnier <ywarnier@beeznest.org> |
||||
*/ |
||||
/** |
||||
* Code |
||||
*/ |
||||
// Flag to allow for anonymous user - needs to be set before global.inc.php. |
||||
$use_anonymous = true; |
||||
|
||||
require_once 'back_compat.inc.php'; |
||||
include_once '../inc/reduced_header.inc.php'; |
||||
|
||||
Display::display_footer(); |
@ -1,83 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
/** |
||||
* Script that displays the header frame for lp_view.php |
||||
* @package chamilo.learnpath |
||||
* @author Yannick Warnier <ywarnier@beeznest.org> |
||||
*/ |
||||
/** |
||||
* Code |
||||
*/ |
||||
// Flag to allow for anonymous user - needs to be set before global.inc.php. |
||||
$use_anonymous = true; |
||||
|
||||
// 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']; |
||||
$_SESSION['oLP'] = unserialize($temp); |
||||
} |
||||
|
||||
$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 (!$_SESSION['loaded_lp_view']) { |
||||
header('location: lp_controller.php?'.api_get_cidreq().'&action=view&item_id='.$path_id); |
||||
} |
||||
// 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. |
||||
$show_link = true; |
||||
if (!api_is_allowed_to_edit()) { // If the user has no edit permission (simple user). |
||||
$course_tool_table = Database::get_course_table(TABLE_TOOL_LIST); |
||||
$result = Database::query("SELECT * FROM $course_tool_table WHERE name='learnpath'"); |
||||
if (Database::num_rows($result) > 0) { |
||||
$row = Database::fetch_array($result); |
||||
if ($row['visibility'] == '0') { // If the tool is *not* visible. |
||||
$show_link = false; |
||||
} |
||||
} else { |
||||
$show_link = false; |
||||
} |
||||
} |
||||
|
||||
if (isset($_SESSION['gradebook'])){ |
||||
$gradebook = $_SESSION['gradebook']; |
||||
} |
||||
|
||||
if (!empty($gradebook) && $gradebook == 'view') { |
||||
$interbreadcrumb[] = array ( |
||||
'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
||||
'name' => get_lang('ToolGradebook') |
||||
); |
||||
} |
||||
if ($show_link) { |
||||
$interbreadcrumb[] = array('url' => './lp_controller.php?action=list', 'name' => get_lang(ucfirst(TOOL_LEARNPATH))); |
||||
} |
||||
// 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); |
||||
|
||||
$noPHP_SELF = true; |
||||
$lp_theme_css = $_SESSION['oLP']->get_theme(); |
||||
include '../inc/reduced_header.inc.php'; |
||||
|
||||
echo '<div style="font-size:14px;padding-left: 17px;">'; |
||||
echo '<table ><tr><td>'; |
||||
echo '<a href="./lp_controller.php?action=return_to_course_homepage" target="_self" onclick="javascript: window.parent.API.save_asset();">'; |
||||
echo '<img src="../img/lp_arrow.gif">'; |
||||
echo '<a>'; |
||||
echo '</td><td>'; |
||||
echo '<a class="link" href="./lp_controller.php?action=return_to_course_homepage" target="_self" onclick="javascript: window.parent.API.save_asset();">'.get_lang('CourseHomepageLink').'</a>'; |
||||
echo '</td></tr><table>'; |
||||
echo '</div>'; |
||||
?> |
||||
</body> |
||||
</html> |
@ -1,44 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
/** |
||||
* Container script for the messages coming from the learnpath object. Initially, this wasn't supposed to be |
||||
* a separate file but rather some text included in lp_view.php, but SCORM involves loading a script that |
||||
* saves the data asynchronously while the SCORM learning path carries on. Having an informational iframe |
||||
* helps not popping up an additional window when saving data. |
||||
* |
||||
* This script is also used to refresh the TOC as sometimes the SCORM JS messages are taken into account |
||||
* only after the TOC is drawn. As such, you might complete an item, browse to the next page, have the |
||||
* TOC drawn with your 'incomplete' status, while the SCORM messages generally arrives just after the TOC |
||||
* is drawn. By updating it here and in lp_save.php, we avoid funny visual effect like having a complete |
||||
* item showing as incomplete. |
||||
* @package chamilo.learnpath |
||||
* @author Yannick Warnier <ywarnier@beeznest.org> |
||||
*/ |
||||
/** |
||||
* Code |
||||
*/ |
||||
// Flag to allow for anonymous user - needs to be set before global.inc.php. |
||||
$use_anonymous = true; |
||||
|
||||
require_once 'back_compat.inc.php'; |
||||
|
||||
$htmlHeadXtra[] = '<script language="javascript"> |
||||
function cleanlog(){ |
||||
if(document.getElementById){ |
||||
document.getElementById("log_content").innerHTML = ""; |
||||
} |
||||
} |
||||
</script>'; |
||||
|
||||
$scorm_css_header = true; |
||||
$display_mode = ''; |
||||
$lp_theme_log = true; |
||||
include_once '../inc/reduced_header.inc.php'; |
||||
?> |
||||
<body dir="<?php echo api_get_text_direction(); ?>">
|
||||
<div id="log_content"> |
||||
</div> |
||||
<div style="color: white;" onclick="javascript: cleanlog();">.</div> |
||||
</body> |
||||
</html> |
@ -1,56 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
/** |
||||
* Container script for the messages coming from the learnpath object. Initially, this wasn't supposed to be |
||||
* a separate file but rather some text included in lp_view.php, but SCORM involves loading a script that |
||||
* saves the data asynchronously while the SCORM learning path carries on. Having an informational iframe |
||||
* helps not popping up an additional window when saving data. |
||||
* |
||||
* This script is also used to refresh the TOC as sometimes the SCORM JS messages are taken into account |
||||
* only after the TOC is drawn. As such, you might complete an item, browse to the next page, have the |
||||
* TOC drawn with your 'incomplete' status, while the SCORM messages generally arrives just after the TOC |
||||
* is drawn. By updating it here and in lp_save.php, we avoid funny visual effect like having a complete |
||||
* item showing as incomplete. |
||||
* @package chamilo.learnpath |
||||
* @author Yannick Warnier <ywarnier@beeznest.org> |
||||
*/ |
||||
/** |
||||
* Code |
||||
*/ |
||||
// Flag to allow for anonymous user - needs to be set before global.inc.php. |
||||
$use_anonymous = true; |
||||
|
||||
// Name of the language file that needs to be included. |
||||
$language_file = 'learnpath'; |
||||
|
||||
require_once 'back_compat.inc.php'; |
||||
require_once 'learnpath.class.php'; |
||||
require_once 'scorm.class.php'; |
||||
|
||||
if (empty($debug)) { $debug = 0; } |
||||
$error = ''; |
||||
$display_mode = ''; |
||||
if (isset($_SESSION['lpobject'])) { |
||||
$temp = $_SESSION['lpobject']; |
||||
$_SESSION['oLP'] = unserialize($temp); |
||||
$error = $_SESSION['oLP']->error; |
||||
$display_mode = $_SESSION['oLP']->mode; |
||||
} |
||||
if ($debug > 0) { error_log('New LP - Loaded lp_message : '.$_SERVER['REQUEST_URI'].' from '.$_SERVER['HTTP_REFERER'], 0); } |
||||
|
||||
$htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript"> |
||||
var dokeos_xajax_handler = window.parent.oxajax; |
||||
</script>'; |
||||
$lp_theme_css=$_SESSION['oLP']->get_theme(); |
||||
$scorm_css_header = true; |
||||
include_once '../inc/reduced_header.inc.php'; |
||||
// Close the session immediately to avoid concurrent access problems. |
||||
session_write_close(); |
||||
?> |
||||
<body dir="<?php echo api_get_text_direction(); ?>">
|
||||
<div id="msg_div_id"> |
||||
<?php |
||||
echo $error; |
||||
?> |
||||
</div> |
||||
</body></html> |
@ -1,52 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
/** |
||||
* Script opened in an iframe and containing the learning path's table of contents |
||||
* @package chamilo.learnpath |
||||
* @author Yannick Warnier <ywarnier@beeznest.org> |
||||
*/ |
||||
/** |
||||
* Code |
||||
*/ |
||||
// Flag to allow for anonymous user - needs to be set before global.inc.php. |
||||
$use_anonymous = true; |
||||
|
||||
$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'])) { |
||||
//if ($debug > 0) error_log('New LP - in lp_toc.php - SESSION[lpobject] is defined', 0); |
||||
$oLP = unserialize($_SESSION['lpobject']); |
||||
if (is_object($oLP)) { |
||||
$_SESSION['oLP'] = $oLP; |
||||
} else { |
||||
//error_log('New LP - in lp_toc.php - SESSION[lpobject] is not object - dying', 0); |
||||
die('Could not instanciate lp object'); |
||||
} |
||||
} |
||||
|
||||
$htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript"> |
||||
var dokeos_xajax_handler = window.parent.oxajax; |
||||
</script>'; |
||||
|
||||
$scorm_css_header = true; |
||||
$display_mode = ''; |
||||
$lp_theme_css = $_SESSION['oLP']->get_theme(); |
||||
|
||||
include_once '../inc/reduced_header.inc.php'; |
||||
?> |
||||
<body dir="<?php echo api_get_text_direction(); ?>">
|
||||
<?php echo $_SESSION['oLP']->get_html_toc();?><br />
|
||||
</body> |
||||
</html> |
||||
<?php |
||||
if (!empty($_SESSION['oLP'])) { |
||||
$_SESSION['lpobject'] = serialize($_SESSION['oLP']); |
||||
} |
Loading…
Reference in new issue