|
|
|
@ -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; |
|
|
|
|