Return to Teacher view in LP - refs #7420

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 26ac77779b
commit 277ae1e5b3
  1. 2
      main/newscorm/lp_add_item.php
  2. 2
      main/newscorm/lp_controller.php
  3. 2
      main/newscorm/lp_list.php

@ -140,7 +140,7 @@ $action = isset($_GET['action']) ? $_GET['action'] : null;
if ($action == 'add' && $type == 'learnpathitem') { if ($action == 'add' && $type == 'learnpathitem') {
$htmlHeadXtra[] = "<script type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>"; $htmlHeadXtra[] = "<script type='text/javascript'> 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)) {
error_log('New LP - User not authorized in lp_add_item.php'); error_log('New LP - User not authorized in lp_add_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;

@ -547,7 +547,7 @@ switch ($action) {
$_SESSION['oLP'] = new learnpath(api_get_course_id(),$new_lp_id,api_get_user_id()); $_SESSION['oLP'] = new learnpath(api_get_course_id(),$new_lp_id,api_get_user_id());
//require 'lp_build.php'; //require 'lp_build.php';
$url = api_get_self().'?action=add_item&type=step&lp_id='.intval($new_lp_id); $url = api_get_self().'?action=add_item&type=step&lp_id='.intval($new_lp_id);
header('Location: '.$url); header("Location: $url&isStudentView=false");
exit; exit;
} }
} }

@ -263,7 +263,7 @@ if (!empty($flat_list)) {
// BUILD // BUILD
if ($current_session == $details['lp_session']) { if ($current_session == $details['lp_session']) {
if ($details['lp_type'] == 1 || $details['lp_type'] == 2) { if ($details['lp_type'] == 1 || $details['lp_type'] == 2) {
$dsp_build = '<a href="lp_controller.php?'.api_get_cidreq().'&amp;action=add_item&amp;type=step&amp;lp_id='.$id.'">'. $dsp_build = '<a href="lp_controller.php?'.api_get_cidreq().'&amp;action=add_item&amp;type=step&amp;lp_id='.$id.'&isStudentView=false">'.
Display::return_icon('edit.png', get_lang('LearnpathEditLearnpath'), '', ICON_SIZE_SMALL).'</a>'; Display::return_icon('edit.png', get_lang('LearnpathEditLearnpath'), '', ICON_SIZE_SMALL).'</a>';
} else { } else {
$dsp_build = Display::return_icon('edit_na.png', get_lang('LearnpathEditLearnpath'), '', ICON_SIZE_SMALL); $dsp_build = Display::return_icon('edit_na.png', get_lang('LearnpathEditLearnpath'), '', ICON_SIZE_SMALL);

Loading…
Cancel
Save