Adding some LP UI changes see #5593

skala
Julio Montoya 13 years ago
parent 489c52bf31
commit 553570a968
  1. 18
      main/newscorm/learnpath.class.php
  2. 4
      main/newscorm/lp_controller.php
  3. 3
      main/newscorm/lp_list.php
  4. 24
      main/newscorm/lp_view.php

@ -2717,10 +2717,10 @@ class learnpath {
public function get_html_toc($toc_list = null) {
$course_id = api_get_course_int_id();
$course_code = api_get_course_id();
$is_allowed_to_edit = api_is_allowed_to_edit(null, true);
//$is_allowed_to_edit = api_is_allowed_to_edit(null, true);
$charset = api_get_system_encoding();
$display_action_links_with_icons = false;
//$display_action_links_with_icons = false;
if ($this->debug > 0) {
error_log('New LP - In learnpath::get_html_toc()', 0);
@ -2732,7 +2732,8 @@ class learnpath {
//$parent = $this->items[$this->current]->get_parent();
//if (empty($parent)) { $parent = $this->ordered_items[$this->items[$this->current]->get_previous_index()]; }
$html = '<div id="scorm_title" class="scorm_title">' . Security::remove_XSS($this->get_name()) . '</div>';
// Build, display.
/*
if ($is_allowed_to_edit) {
$gradebook = Security :: remove_XSS($_GET['gradebook']);
if ($this->get_lp_session_id() == api_get_session_id()) {
@ -2754,8 +2755,7 @@ class learnpath {
}
$html .= '</div>';
}
}
}*/
$html .= '<div id="inner_lp_toc" class="inner_lp_toc">';
require_once 'resourcelinker.inc.php';
@ -5259,10 +5259,10 @@ class learnpath {
$gradebook = isset($_GET['gradebook']) ? Security :: remove_XSS($_GET['gradebook']) : null;
$return = '<div class="actions">';
$return .= '<a href="lp_controller.php?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&action=build&lp_id=' . $this->lp_id . '">' . Display :: return_icon('home.png', get_lang('Build'),'',ICON_SIZE_MEDIUM).'</a>';
//$return .= '<a href="lp_controller.php?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&action=build&lp_id=' . $this->lp_id . '">' . Display :: return_icon('home.png', get_lang('Build'),'',ICON_SIZE_MEDIUM).'</a>';
//$return .= '<a href="' . api_get_self().'?'.api_get_cidreq().'&amp;gradebook=' . $gradebook . '&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="' . get_lang('BasicOverview') . '">' . Display :: return_icon('move_learnpath.png', get_lang('BasicOverview'),'',ICON_SIZE_MEDIUM).'</a>';
$return .= '<a href="lp_controller.php?'.api_get_cidreq().'&amp;gradebook=' . $gradebook . '&action=view&lp_id=' . $_SESSION['oLP']->lp_id . '">' . Display :: return_icon('view_left_right.png', get_lang('Display'),'',ICON_SIZE_MEDIUM).'</a> ';
//$return .= '<a href="lp_controller.php?'.api_get_cidreq().'&amp;gradebook=' . $gradebook . '&action=view&lp_id=' . $_SESSION['oLP']->lp_id . '">' . Display :: return_icon('view_left_right.png', get_lang('Display'),'',ICON_SIZE_MEDIUM).'</a> ';
$return .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;gradebook=' . $gradebook . '&amp;action=add_item&amp;type=step&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="' . get_lang('NewStep') . '">' . Display :: return_icon('new_learnigpath_object.png', get_lang('NewStep'),'',ICON_SIZE_MEDIUM).'</a>';
// echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;gradebook=' . $gradebook . '&amp;action=add_item&amp;type=chapter&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="' . get_lang('NewChapter') . '">' . Display :: return_icon('add_learnpath_section.png', get_lang('NewChapter'),'',ICON_SIZE_MEDIUM).'</a>';
@ -5732,8 +5732,8 @@ class learnpath {
Display::return_icon('forum.png', get_lang('Forums'), array(), 64),
Display::return_icon('add_learnpath_section.png', get_lang('NewChapter'), array(), 64)
);
$chapter = $_SESSION['oLP']->display_item_form('chapter', get_lang('EnterDataNewChapter'), 'add_item');
echo Display::display_normal_message(get_lang('ClickOnTheLearnerViewToSeeYourLearningPath'));
$chapter = $_SESSION['oLP']->display_item_form('chapter', get_lang('EnterDataNewChapter'), 'add_item');
echo Display::tabs($headers, array($documents, $exercises, $links, $works, $forums, $chapter), 'resource_tab');
return true;
}

@ -380,7 +380,9 @@ switch ($action) {
if (!$lp_found) { error_log('New LP - No learnpath given for build', 0); require 'lp_list.php'; }
else {
$_SESSION['refresh'] = 1;
require 'lp_build.php';
//require 'lp_build.php';
header('Location: lp_add_item.php?type=step');
exit;
}
break;
case 'edit_item':

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

@ -315,9 +315,20 @@ if (Database::num_rows($res_media) > 0) {
if (!empty($row_media['audio'])) {$show_audioplayer = true; break;}
}
}
?>
<div id="learning_path_main" style="width:100%;height:100%;">
echo '<div id="learning_path_main" style="width:100%;height:100%;">';
$is_allowed_to_edit = api_is_allowed_to_edit(null, true, false, false);
if ($is_allowed_to_edit) {
echo '<div id="learning_path_breadcrumb_zone">';
global $interbreadcrumb;
$interbreadcrumb[] = array('url' => 'lp_controller.php?action=list', 'name' => get_lang('LearningPaths'));
$interbreadcrumb[] = array('url' => api_get_self()."?action=build&lp_id=".$_SESSION['oLP']->id, 'name' => $_SESSION['oLP']->get_name());
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Preview'));
echo return_breadcrumb($interbreadcrumb, null, null);
echo '</div>';
}
?>
<div id="learning_path_left_zone" style="<?php echo $display_none;?>">
<!-- header -->
<div id="header">
@ -392,10 +403,11 @@ if (Database::num_rows($res_media) > 0) {
</div>
<!-- end TOC layout -->
</div>
<!-- end left Zone -->
<!-- right Zone -->
<!-- end left zone -->
<!-- right zone -->
<div id="learning_path_right_zone" style="margin-left:<?php echo $margin_left;?>;height:100%">
<?php
// hub 26-05-2010 Fullscreen or not fullscreen

Loading…
Cancel
Save