Adding new icons, improving UI when building a LP

skala
Julio Montoya 13 years ago
parent 29450bb6c0
commit 7ac2525106
  1. 62
      main/css/base.css
  2. BIN
      main/img/icons/64/settings.png
  3. BIN
      main/img/icons/64/tools.png
  4. BIN
      main/img/icons/64/view.png
  5. 2
      main/inc/ajax/lp.ajax.php
  6. 21
      main/inc/lib/document.lib.php
  7. 48
      main/newscorm/learnpath.class.php
  8. 32
      main/newscorm/lp_add_item.php
  9. 6
      main/newscorm/lp_admin_view.php
  10. 47
      main/newscorm/lp_build.php
  11. 22
      main/newscorm/lp_edit.php

@ -153,6 +153,15 @@ form .formw input {
padding: 19px;
}
.well_login {
margin: 0 auto;
width: 200px;
}
.well_login button {
margin-left: 0px;
}
#progress_bar img {
height:26px;
}
@ -1981,13 +1990,18 @@ input.maininput:focus {
/* LP tool*/
#lp_overview .thumbnail {
text-align: center;
}
.lp_resource {
padding:5px 10px;
list-style-type: none;
margin: 0;
padding: 0;
float:left;
width:70%;
width:50%;
}
.lp_resource_element, .lp_resource_element_no_link {
@ -2004,18 +2018,8 @@ input.maininput:focus {
list-style: none outside none;
}
.lp_resource_element_new {
background-image:-moz-linear-gradient(top,#fefefe,#eee);
background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fdfdfd),color-stop(1,#eee));
border: 1px solid #CCCCCC;
color: #444444;
cursor: pointer;
font-weight: bold;
text-decoration: none;
text-shadow: 0 1px 1px #F6F6F6;
margin:5px;
padding:5px;
list-style: none outside none;
.lp_resource_element_new a {
font-size: 14px;
}
.doc_resource {
@ -2036,9 +2040,6 @@ table.lp_build td.tree {
min-height:380px;
}
#logo {
}
div.system_announcement {
background-color: #EEEEEE;
}
@ -2066,7 +2067,6 @@ div.system_announcement {
width: 98%;
}
div.admin_section {
min-height: 260px;
}
@ -2737,6 +2737,8 @@ form .formw .freeze {
color:#999;
}
/* jsPlumb */
.skill_root {
@ -3073,7 +3075,7 @@ a:active{
margin-right: 4px;
}
.thumbnail .caption {
#online_grid_container .thumbnail .caption {
text-align:center;
}
@ -3847,13 +3849,16 @@ footer {
font-weight: normal;
}
.ui-state-highlight_lp {
border: 1px solid #FEAA18;
background: #FFB738;
color: #363636;
height:20px;
width: 70%;
}
.bottom_actions {
/*background:#efefef;
border:1px solid #ccc;
padding:10px;
vertical-align:middle;
*/
.bottom_actions {
display: block;
width: 100%;
}
@ -3864,4 +3869,13 @@ footer {
bottom: 0;
left: 0px;
margin-bottom: 0px;
}
.doc_folder {
margin-right:5px;
margin-top:5px;
}
.doc_resource{
margin: 5px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

@ -27,7 +27,7 @@ switch ($action) {
$sections = explode('^', $new_order);
$new_array = array();
$i = 0;
foreach($sections as $items) {
foreach ($sections as $items) {
list($id, $parent_id) = explode('|', $items);
$new_array[$i]['id'] = intval($id);
$new_array[$i]['parent_id'] = intval($parent_id);

@ -2498,10 +2498,10 @@ class DocumentManager {
"ORDER BY docs.title ASC";
$res_doc = Database::query($sql_doc);
$resources = Database::store_result($res_doc, 'ASSOC');
$return = '';
$resources_sorted = array();
$return = '';
if ($lp_id) {
$return .= '<div class="lp_resource_element">';
$return .= Display::return_icon('new_doc.gif', '', array(), ICON_SIZE_SMALL);
@ -2565,11 +2565,10 @@ class DocumentManager {
$new_array[$label] = array('id' => 0, 'files' => $resources_sorted);
$write_result = self::write_resources_tree($course_info, $session_id, $new_array, 0, $lp_id, $target, $add_move_button);
$write_result = self::write_resources_tree($course_info, $session_id, $new_array, 0, $lp_id, $target, $add_move_button, true);
$return .= $write_result ;
$return = Display::div($return, array('class'=>'lp_resource'));
$img_path = api_get_path(WEB_IMG_PATH);
if ($lp_id == false) {
@ -2593,9 +2592,11 @@ class DocumentManager {
function testResources(id, img) {
if (document.getElementById(id).style.display=='block'){
document.getElementById(id).style.display='none';
var id = id.split('_')[1];
document.getElementById('img_'+id).src='".$img_path."nolines_plus.gif';
} else {
document.getElementById(id).style.display='block';
var id = id.split('_')[1];
document.getElementById('img_'+id).src='".$img_path."nolines_minus.gif';
}
}
@ -2615,7 +2616,7 @@ class DocumentManager {
* @param integer Enables the tree display by shifting the new elements a certain distance to the right
* @return string The HTML list
*/
public function write_resources_tree($course_info, $session_id, $resources_sorted, $num = 0, $lp_id = false, $target = '', $add_move_button = false) {
public function write_resources_tree($course_info, $session_id, $resources_sorted, $num = 0, $lp_id = false, $target = '', $add_move_button = false, $first = false) {
require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php';
$img_path = api_get_path(WEB_IMG_PATH);
@ -2623,6 +2624,7 @@ class DocumentManager {
$web_code_path = api_get_path(WEB_CODE_PATH);
$return = '';
if (count($resources_sorted) > 0) {
foreach ($resources_sorted as $key => $resource) {
$title = isset($resource['title']) ? $resource['title'] : null;
@ -2663,8 +2665,9 @@ class DocumentManager {
}
$return .= '<ul class="lp_resource">';
$return .= '<div class="doc_folder" id="doc_id_'.$resource['id'].'" style="margin-left:'.($num * 18).'px; margin-right:5px;">';
$return .= '<li class="doc_folder" id="doc_id_'.$resource['id'].'" style="margin-left:'.($num * 18).'px; ">';
if ($lp_id) {
$return .= '<img style="cursor: pointer;" src="'.$img_path.'nolines_plus.gif" align="absmiddle" id="img_' . $resource['id'] . '" '.$onclick.' >';
} else {
@ -2673,7 +2676,7 @@ class DocumentManager {
$return .= '<img alt="" src="'.$img_path.'lp_folder.gif" title="" align="absmiddle" />&nbsp;';
$return .= '<span '.$onclick.' style="cursor: pointer;" >'.$title.'</span>';
$return .= '</div>
$return .= '</li>
<div style="display: none;" id="res_'.$resource['id'].'">';
if (isset($resource['files'])) {
@ -2712,7 +2715,7 @@ class DocumentManager {
$link = Display::url('<img alt="" src="'.$img.'" title="" />&nbsp;' . $my_file_title, $url, array('target' => $target));
$return .= '<li class="doc_resource lp_resource_element" data_id="'.$key.'" data_type="document" title="'.$my_file_title.'" >';
$return .= '<li class="doc_resource " data_id="'.$key.'" data_type="document" title="'.$my_file_title.'" >';
$return .= '<div style="margin-left:' . (($num +1) * 18) . 'px;margin-right:5px;">';

@ -2687,16 +2687,16 @@ class learnpath {
if ($display_action_links_with_icons) {
$html .= '<div class = "btn-group">';
$html .= "<a href='lp_controller.php?" . api_get_cidreq() . "&amp;action=build&amp;lp_id=" . $this->lp_id . "' target='_parent'>" . Display :: return_icon('build_learnpath.png', get_lang('Build'),'',ICON_SIZE_MEDIUM)."</a>";
$html .= "<a href='lp_controller.php?" . api_get_cidreq() . "&amp;action=admin_view&amp;lp_id=" . $this->lp_id . "' target='_parent'>" . Display :: return_icon('move_learnpath.png', get_lang('BasicOverview'),'',ICON_SIZE_MEDIUM)."</a>";
//$html .= "<a href='lp_controller.php?" . api_get_cidreq() . "&amp;action=admin_view&amp;lp_id=" . $this->lp_id . "' target='_parent'>" . Display :: return_icon('move_learnpath.png', get_lang('BasicOverview'),'',ICON_SIZE_MEDIUM)."</a>";
//$html .= '<span>' . Display :: return_icon('view_remove_na.png', get_lang('Display'),'',ICON_SIZE_MEDIUM).'</span><br />';
$html .= '<a href="lp_controller.php?' . api_get_cidreq() . '">'. get_lang('ReturnToLPList') . '</a>';
$html .= '</div>';
} else {
$html .= '<div class="btn-group">';
$html .= "<a class='btn' href='lp_controller.php?" . api_get_cidreq() . "&amp;gradebook=$gradebook&amp;action=build&amp;lp_id=" . $this->lp_id . "' target='_parent'>" . get_lang('Build') . "</a>";
$html .= "<a class='btn' href='lp_controller.php?" . api_get_cidreq() . "&amp;action=admin_view&amp;lp_id=" . $this->lp_id . "' target='_parent'>" . get_lang('BasicOverview') . "</a>";
$html .= "<a class='btn' href='lp_controller.php?" . api_get_cidreq()."&amp;gradebook=$gradebook&amp;action=build&amp;lp_id=" . $this->lp_id . "' target='_parent'>" . get_lang('Overview') . "</a>";
$html .= "<a class='btn' href='lp_controller.php?" . api_get_cidreq()."&amp;action=add_item&amp;type=step&amp;lp_id=" . $this->lp_id . "' target='_parent'>" . get_lang('Edit') . "</a>";
//$html .= '<span><b>' . get_lang('Display') . '</b></span><br />';
$html .= '<a class="btn" href="lp_controller.php?'.api_get_cidreq().'">'.get_lang('Back').'</a>';
$html .= '<a class="btn" href="lp_controller.php?'.api_get_cidreq()."&amp;gradebook=$gradebook&amp;action=edit&amp;lp_id=" . $this->lp_id.'">'.get_lang('Settings').'</a>';
$html .= '</div>';
}
$html .= '</div>';
@ -4755,27 +4755,28 @@ class learnpath {
$return = '';
$update_audio = isset($_GET['updateaudio']) ? $_GET['updateaudio'] : null;
if ($is_allowed_to_edit) {
if ($is_allowed_to_edit) {
$gradebook = isset($_GET['gradebook']) ? Security :: remove_XSS($_GET['gradebook']) : null;
$return .= '<div class="actions">';
$return .= '<a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&amp;gradebook=' . $gradebook . '&amp;action=build&amp;lp_id=' . $this->lp_id . '" title="' . get_lang('Build') . '">' . Display :: return_icon('build_learnpath.png', get_lang('Build'),'',ICON_SIZE_MEDIUM).'</a>';
//$return .= '<a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&amp;gradebook=' . $gradebook . '&amp;action=build&amp;lp_id=' . $this->lp_id . '" title="' . get_lang('Build') . '">' . Display :: return_icon('build_learnpath.png', get_lang('Build'),'',ICON_SIZE_MEDIUM).'</a>';
if ($update_audio == 'true') {
$return .='<a href="lp_controller.php?cidReq='.Security::remove_XSS($_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?cidReq='.Security::remove_XSS($_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>';
} else {
$return .= Display :: return_icon('move_learnpath_na.png', get_lang('BasicOverview'),'',ICON_SIZE_MEDIUM);
//$return .= Display :: return_icon('move_learnpath_na.png', get_lang('BasicOverview'),'',ICON_SIZE_MEDIUM);
}
$return .= '<a href="lp_controller.php?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&action=view&lp_id=' . $this->lp_id . '">' . Display :: return_icon('view_left_right.png', get_lang('Display'),'',ICON_SIZE_MEDIUM).'</a>';
$return .= ' '.Display :: return_icon('i.gif');
$return .= '<a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&amp;gradebook=' . $gradebook . '&amp;action=add_item&amp;type=step&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" title="' . get_lang('NewStep') . '">
//$return .= ' '.Display :: return_icon('i.gif');
/*$return .= '<a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_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>';
*
*/
if ($update_audio == 'true') {
$return .= Display::url(Display :: return_icon('upload_audio_na.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM),'#');
// $return .= Display::url(Display :: return_icon('upload_audio_na.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM),'#');
} else {
$return .= '<a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&amp;action=' . Security :: remove_XSS($_GET['action']) . '&amp;lp_id=' . $_SESSION['oLP']->lp_id . '&amp;updateaudio=true">' . Display :: return_icon('upload_audio.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM).'</a>';
// $return .= '<a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&amp;action=' . Security :: remove_XSS($_GET['action']) . '&amp;lp_id=' . $_SESSION['oLP']->lp_id . '&amp;updateaudio=true">' . Display :: return_icon('upload_audio.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM).'</a>';
}
$return .= '<a href="lp_controller.php?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&amp;action=edit&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">' . Display :: return_icon('settings.png', get_lang('CourseSettings'),'',ICON_SIZE_MEDIUM).'</a>';
//$return .= '<a href="lp_controller.php?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&amp;action=edit&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">' . Display :: return_icon('settings.png', get_lang('CourseSettings'),'',ICON_SIZE_MEDIUM).'</a>';
$return .= '</div>';
}
@ -4983,7 +4984,12 @@ class learnpath {
}
$return = '<ul id="lp_item_list" class="well">';
$return .= self::print_recursive($elements, $default_data, $default_content);
$tree = self::print_recursive($elements, $default_data, $default_content);
if (!empty($tree)) {
$return .= $tree;
} else {
$return .= Display::return_message(get_lang("DragAndDropElementHere"));
}
$return .= '</ul>';
if ($update_audio == 'true') {
$return = $return_audio;
@ -5024,15 +5030,15 @@ class learnpath {
public function build_action_menu() {
$gradebook = isset($_GET['gradebook']) ? Security :: remove_XSS($_GET['gradebook']) : null;
echo '<div class="actions">';
echo Display :: return_icon('build_learnpath_na.png', get_lang('Build'),'',ICON_SIZE_MEDIUM);
//echo Display :: return_icon('build_learnpath_na.png', get_lang('Build'),'',ICON_SIZE_MEDIUM);
echo '<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>';
//echo '<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>';
echo '<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> ';
Display :: display_icon('i.gif');
echo '<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=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>';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '&amp;updateaudio=true">' . Display :: return_icon('upload_audio.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="lp_controller.php?'.api_get_cidreq().'&amp;action=edit&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">' . Display :: return_icon('settings.png', get_lang('CourseSettings'),'',ICON_SIZE_MEDIUM).'</a>';
//echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;action=admin_view&amp;lp_id=' . $_SESSION['oLP']->lp_id . '&amp;updateaudio=true">' . Display :: return_icon('upload_audio.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM).'</a>';
//echo '<a href="lp_controller.php?'.api_get_cidreq().'&amp;action=edit&amp;lp_id=' . $_SESSION['oLP']->lp_id . '">' . Display :: return_icon('settings.png', get_lang('CourseSettings'),'',ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
}

@ -60,14 +60,14 @@ $(function() {
$(".item_data").live("mouseover", function(event) {
$(".button_actions", this).show();
});
$(".item_data").live("mouseout", function() {
$(".button_actions",this).hide();
});
$(".button_actions").hide();
$( ".lp_resource" ).sortable({
$( ".lp_resource" ).sortable({
items: ".lp_resource_element ",
handle: ".moved", //only the class "moved"
cursor: "move",
@ -75,7 +75,7 @@ $(function() {
placeholder: "ui-state-highlight", //defines the yellow highlight
});
$("#lp_item_list").sortable({
$("#lp_item_list").sortable({
items: "li",
handle: ".moved", //only the class "moved"
cursor: "move",
@ -107,7 +107,7 @@ $(function() {
var order = "new_order="+ newOrderData + "&a=update_lp_item_order";
$.post("'.$ajax_url.'", order, function(reponse){
$("#message").html(reponse);
});
});
},
receive: function(event, ui) {
@ -135,25 +135,22 @@ $(function() {
data: params,
async: false,
success: function(data) {
if (data == -1) {
if (data == -1) {
} else {
$(".normal-message").hide();
$(ui.item).attr("id", data);
$(ui.item).addClass("lp_resource_element_new");
$(ui.item).addClass("record li_container");
$(ui.item).removeClass("lp_resource_element");
$(ui.item).removeClass("doc_resource");
}
$(ui.item).removeClass("doc_resource");
}
}
});
}
}
}
});
}//
}//end receive
});
});
@ -307,7 +304,6 @@ if (!empty($gradebook) && $gradebook == 'view') {
);
}
$interbreadcrumb[] = array('url' => 'lp_controller.php?action=list', 'name' => get_lang('LearningPaths'));
$interbreadcrumb[] = array('url' => api_get_self()."?action=build&lp_id=$learnpath_id", 'name' => $_SESSION['oLP']->get_name());

@ -92,12 +92,10 @@ $show_learn_path = true;
$lp_theme_css = $_SESSION['oLP']->get_theme();
Display::display_header(null, 'Path');
//api_display_tool_title($therow['name']);
$suredel = trim(get_lang('AreYouSureToDelete'));
//$suredelstep = trim(get_lang('AreYouSureToDeleteSteps'));
?>
<script type='text/javascript'>
<script>
var newOrderData= "";
//source code found in http://www.swartzfager.org/blog/dspNestedList.cfm

@ -122,15 +122,17 @@ function confirmation(name) {
/* DISPLAY SECTION */
echo $_SESSION['oLP']->build_action_menu();
//echo $_SESSION['oLP']->build_action_menu();
echo '<div class="row-fluid">';
echo '<div class="span3">';
echo '<div class="lp_tree">';
echo '<div class="span12">';
/* echo '<div class="lp_tree">';
// Build the tree with the menu items in it.
echo $_SESSION['oLP']->build_tree();
echo '</div>';
echo '</div>';
echo '<div class="span9">';
echo '<div class="span9">'; */
if (isset($is_success) && $is_success === true) {
Display::display_confirmation_message(get_lang('ItemRemoved'));
} else {
@ -140,14 +142,35 @@ if (isset($is_success) && $is_success === true) {
// Display::display_normal_message(get_lang('LPCreatedAddChapterStep'), false);
$gradebook = isset($_GET['gradebook']) ? Security::remove_XSS($_GET['gradebook']) : null;
$learnpathadded = '<p><h2>'.get_lang('LearnPathAddedTitle').'</h2><br />';
$learnpathadded .= '<a href="lp_controller.php?'.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'), array('style' => 'vertical-align: middle;'),ICON_SIZE_SMALL).' '.get_lang('NewStep').'</a>: '.get_lang('NewStepComment').'<br />';
//$learnpathadded .= '<a href="lp_controller.php?'.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'), array('style' => 'vertical-align: middle;'),ICON_SIZE_SMALL).' '.get_lang('NewChapter').'</a>: '.get_lang('NewChapterComment').'<br />';
$learnpathadded .= '<a href="lp_controller.php?'.api_get_cidreq().'&amp;action=build&amp;lp_id='.Security::remove_XSS($_GET['lp_id']).'" target="_parent">'.Display::return_icon('build_learnpath.png', get_lang('Build'), array('style' => 'vertical-align: middle;'),ICON_SIZE_SMALL).' '.get_lang('Build')."</a>: ".get_lang('BuildComment').'<br />';
$learnpathadded .= '<a href="lp_controller.php?'.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'), array('style' => 'vertical-align: middle;'),ICON_SIZE_SMALL).' '.get_lang('BasicOverview').'</a>: '.get_lang('BasicOverviewComment').'<br />';
$learnpathadded .= '<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'),array('style' => 'vertical-align: middle;'),ICON_SIZE_SMALL).' '.get_lang('Display').'</a>: '.get_lang('DisplayComment').'<br />';
$learnpathadded .= '<br /></p>';
echo $learnpathadded;
echo Display::page_header(get_lang('LearnPathAddedTitle'));
echo '<ul id="lp_overview" class="thumbnails">';
echo show_block('lp_controller.php?'.api_get_cidreq().'&amp;gradebook='.$gradebook.'&amp;action=add_item&amp;type=step&amp;lp_id=' . $_SESSION['oLP']->lp_id, get_lang("NewStep"), get_lang('NewStepComment'), 'tools.png');
echo show_block('lp_controller.php?'.api_get_cidreq().'&amp;gradebook='.$gradebook.'&amp;action=admin_view&amp;updateaudio=true&amp;lp_id=' . $_SESSION['oLP']->lp_id, get_lang("BasicOverview"), get_lang('BasicOverviewComment'), 'audio.png');
echo show_block('lp_controller.php?'.api_get_cidreq().'&amp;gradebook='.$gradebook.'&amp;action=view&amp;lp_id=' . $_SESSION['oLP']->lp_id, get_lang("Display"), get_lang('DisplayComment'), 'view.png');
echo show_block('lp_controller.php?'.api_get_cidreq().'&amp;gradebook='.$gradebook.'&amp;action=edit&amp;lp_id=' . $_SESSION['oLP']->lp_id, get_lang("Settings"), null, 'settings.png');
echo '</ul>';
}
function show_block($link, $title, $subtitle, $icon) {
$html = '<li class="span3">';
$html .= '<div class="thumbnail">';
$html .= '<a href="'.$link.'" title="'.$title.'">';
$html .= Display::return_icon($icon, $title, array(), ICON_SIZE_BIG);
$html .= '</a>';
$html .= '<div class="caption">';
$html .= '<strong>'.$title.'</strong></a> '.$subtitle;
$html .= '</div>';
$html .= '</div>';
$html .= '</li>';
return $html;
}
echo '</div>';
echo '</div>';

@ -29,7 +29,7 @@ if (!empty($gradebook) && $gradebook == 'view') {
);
}
$interbreadcrumb[] = array('url' => 'lp_controller.php?action=list', 'name' => get_lang('LearningPaths'));
$interbreadcrumb[] = array('url' => api_get_self()."?action=admin_view&lp_id=$learnpath_id", 'name' => $_SESSION['oLP']->get_name());
$interbreadcrumb[] = array('url' => api_get_self()."?action=build&lp_id=".$_SESSION['oLP']->get_id(), 'name' => $_SESSION['oLP']->get_name());
$htmlHeadXtra[] = '<script type="text/javascript">
function activate_start_date() {
@ -54,24 +54,24 @@ function activate_end_date() {
Display::display_header(get_lang('CourseSettings'), 'Path');
// Action links
echo '<div class="actions">';
//echo '<div class="actions">';
$gradebook = isset($_GET['gradebook']) ? Security::remove_XSS($_GET['gradebook']) : null;
echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=build&amp;lp_id=' . Security::remove_XSS($_GET['lp_id']) . '" title="'.get_lang('Build').'">'.Display::return_icon('build_learnpath.png', get_lang('Build'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=admin_view&amp;lp_id=' . Security::remove_XSS($_GET['lp_id']) . '" title="'.get_lang('BasicOverview').'">'.Display::return_icon('move_learnpath.png', get_lang('BasicOverview'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=view&lp_id='.Security::remove_XSS($_GET['lp_id']).'">'.Display::return_icon('view_remove.png', get_lang('Display'),'',ICON_SIZE_MEDIUM).'</a>';
echo ' '.Display::return_icon('i.gif');
echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=add_item&amp;type=step&amp;lp_id=' . Security::remove_XSS($_GET['lp_id']) . '" title="'.get_lang('NewStep').'">
'.Display::return_icon('add.png', get_lang('NewStep'),'',ICON_SIZE_MEDIUM).'</a>';
//echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=build&amp;lp_id=' . Security::remove_XSS($_GET['lp_id']) . '" title="'.get_lang('Build').'">'.Display::return_icon('build_learnpath.png', get_lang('Build'),'',ICON_SIZE_MEDIUM).'</a>';
//echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=admin_view&amp;lp_id=' . Security::remove_XSS($_GET['lp_id']) . '" title="'.get_lang('BasicOverview').'">'.Display::return_icon('move_learnpath.png', get_lang('BasicOverview'),'',ICON_SIZE_MEDIUM).'</a>';
//echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=view&lp_id='.Security::remove_XSS($_GET['lp_id']).'">'.Display::return_icon('view_remove.png', get_lang('Display'),'',ICON_SIZE_MEDIUM).'</a>';
//echo ' '.Display::return_icon('i.gif');
/*echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=add_item&amp;type=step&amp;lp_id=' . Security::remove_XSS($_GET['lp_id']) . '" title="'.get_lang('NewStep').'">
'.Display::return_icon('add.png', get_lang('NewStep'),'',ICON_SIZE_MEDIUM).'</a>';*/
/*echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=add_item&amp;type=chapter&amp;lp_id=' . Security::remove_XSS($_GET['lp_id']) . '" title="'.get_lang('NewChapter').'">
'.Display::return_icon('add_learnpath_section.png', get_lang('NewChapter'),'',ICON_SIZE_MEDIUM).'</a>';*/
echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=admin_view&amp;lp_id='.Security::remove_XSS($_GET['lp_id']).'&amp;updateaudio=true">'.Display::return_icon('upload_audio.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM).'</a>';
//echo '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;gradebook='.$gradebook.'&amp;action=admin_view&amp;lp_id='.Security::remove_XSS($_GET['lp_id']).'&amp;updateaudio=true">'.Display::return_icon('upload_audio.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM).'</a>';
echo Display::url(Display::return_icon('settings_na.png', get_lang('CourseSettings'),'',ICON_SIZE_MEDIUM), '#');
//echo Display::url(Display::return_icon('settings_na.png', get_lang('CourseSettings'),'',ICON_SIZE_MEDIUM), '#');
//echo '<a href="../newscorm/lp_controller.php?cidReq='.$_course['sysCode'].'">'.Display::return_icon('scorms_na.png',get_lang('ReturnToLearningPaths'),'',ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
//echo '</div>';
$defaults=array();
$form = new FormValidator('form1', 'post', 'lp_controller.php');

Loading…
Cancel
Save