Minor - format code

1.10.x
jmontoya 10 years ago
parent ff07ecb82e
commit 72ce8cee82
  1. 2
      main/course_home/course_home.php
  2. 4
      main/inc/ajax/admin.ajax.php
  3. 28
      main/newscorm/lp_view_item.php

@ -294,8 +294,8 @@ if (api_get_setting('homepage_view') == 'activity' ||
require 'vertical_activity.php'; require 'vertical_activity.php';
} }
$content = '<div id="course_tools">'.$content.'</div>'; $content = '<div id="course_tools">'.$content.'</div>';
$tpl = new Template(null); $tpl = new Template(null);
$tpl->assign('message', $show_message); $tpl->assign('message', $show_message);
$tpl->assign('content', $content); $tpl->assign('content', $content);

@ -114,8 +114,8 @@ function version_check()
*/ */
function check_system_version() function check_system_version()
{ {
global $_configuration; // the chamilo version of your installation
$system_version = trim($_configuration['system_version']); // the chamilo version of your installation $system_version = trim(api_get_configuration_value('system_version'));
if (ini_get('allow_url_fopen') == 1) { if (ini_get('allow_url_fopen') == 1) {
// The number of courses // The number of courses

@ -12,7 +12,6 @@
*/ */
// Prevents FF 3.6 + Adobe Reader 9 bug see BT#794 when calling a pdf file in a LP // Prevents FF 3.6 + Adobe Reader 9 bug see BT#794 when calling a pdf file in a LP
require_once '../inc/global.inc.php'; require_once '../inc/global.inc.php';
api_protect_course_script(); api_protect_course_script();
@ -44,8 +43,6 @@ if (isset($_GET['lp_item_id'])) {
$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : 'fullpage'; $mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : 'fullpage';
/* INIT SECTION */
$_SESSION['whereami'] = 'lp/build'; $_SESSION['whereami'] = 'lp/build';
if (isset($_SESSION['oLP']) && isset($_GET['id'])) { if (isset($_SESSION['oLP']) && isset($_GET['id'])) {
$_SESSION['oLP'] -> current = intval($_GET['id']); $_SESSION['oLP'] -> current = intval($_GET['id']);
@ -66,7 +63,7 @@ $learnpath_id = (int) $_REQUEST['lp_id'];
if ($action == 'add' && $type == 'learnpathitem') { if ($action == 'add' && $type == 'learnpathitem') {
$htmlHeadXtra[] = "<script> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>"; $htmlHeadXtra[] = "<script> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
} }
if ((!$is_allowed_to_edit) || ($isStudentView)) { if ((!$is_allowed_to_edit) || $isStudentView) {
error_log('New LP - User not authorized in lp_view_item.php'); error_log('New LP - User not authorized in lp_view_item.php');
header('location:lp_controller.php?action=view&lp_id='.$learnpath_id); header('location:lp_controller.php?action=view&lp_id='.$learnpath_id);
exit; exit;
@ -80,20 +77,25 @@ $therow=Database::fetch_array($result);
/* SHOWING THE ADMIN TOOLS */ /* SHOWING THE ADMIN TOOLS */
if (isset($_SESSION['gradebook'])) { if (api_is_in_gradebook()) {
$gradebook = $_SESSION['gradebook'];
}
if (!empty($gradebook) && $gradebook == 'view') {
$interbreadcrumb[] = array ( $interbreadcrumb[] = array (
'url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php?'.api_get_cidreq(),
'name' => get_lang('ToolGradebook') 'name' => get_lang('ToolGradebook')
); );
} }
$interbreadcrumb[] = array('url' => 'lp_controller.php?action=list', 'name' => get_lang('LearningPaths')); $interbreadcrumb[] = array(
$interbreadcrumb[] = array('url' => api_get_self()."?action=build&lp_id=$learnpath_id", 'name' => $therow['name']); 'url' => api_get_path(WEB_CODE_PATH).'newscorm/lp_controller.php?action=list&'.api_get_cidreq(),
$interbreadcrumb[] = array('url' => api_get_self()."?action=add_item&type=step&lp_id=$learnpath_id", 'name' => get_lang('NewStep')); 'name' => get_lang('LearningPaths')
);
$interbreadcrumb[] = array(
'url' => api_get_self()."?action=build&lp_id=$learnpath_id&".api_get_cidreq(),
'name' => $therow['name']
);
$interbreadcrumb[] = array(
'url' => api_get_self()."?action=add_item&type=step&lp_id=$learnpath_id&".api_get_cidreq(),
'name' => get_lang('NewStep')
);
// Theme calls // Theme calls
$show_learn_path = true; $show_learn_path = true;

Loading…
Cancel
Save