|
|
|
|
@ -5034,14 +5034,17 @@ class learnpath { |
|
|
|
|
$move_icon .= '</a>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($arrLP[$i]['item_type'] != 'dokeos_chapter' && $arrLP[$i]['item_type'] != 'dokeos_module') { |
|
|
|
|
$edit_icon .= '<a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&action=edit_item&view=build&id=' . $arrLP[$i]['id'] . '&lp_id=' . $this->lp_id . '&path_item=' . $arrLP[$i]['path'] . '">'; |
|
|
|
|
$edit_icon .= Display::return_icon('edit.png', get_lang('_edit_learnpath_module'), array(), ICON_SIZE_TINY); |
|
|
|
|
$edit_icon .= '</a>'; |
|
|
|
|
} else { |
|
|
|
|
$edit_icon .= '<a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&action=edit_item&id=' . $arrLP[$i]['id'] . '&lp_id=' . $this->lp_id . '&path_item=' . $arrLP[$i]['path'] . '">'; |
|
|
|
|
$edit_icon .= Display::return_icon('edit.png', get_lang('_edit_learnpath_module'), array(), ICON_SIZE_TINY); |
|
|
|
|
$edit_icon .= '</a>'; |
|
|
|
|
// No edit for this item types |
|
|
|
|
if (!in_array($arrLP[$i]['item_type'], array('sco', 'asset'))) { |
|
|
|
|
if (!in_array($arrLP[$i]['item_type'], array('dokeos_chapter', 'dokeos_module'))) { |
|
|
|
|
$edit_icon .= '<a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&action=edit_item&view=build&id=' . $arrLP[$i]['id'] . '&lp_id=' . $this->lp_id . '&path_item=' . $arrLP[$i]['path'] . '">'; |
|
|
|
|
$edit_icon .= Display::return_icon('edit.png', get_lang('_edit_learnpath_module'), array(), ICON_SIZE_TINY); |
|
|
|
|
$edit_icon .= '</a>'; |
|
|
|
|
} else { |
|
|
|
|
$edit_icon .= '<a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&action=edit_item&id=' . $arrLP[$i]['id'] . '&lp_id=' . $this->lp_id . '&path_item=' . $arrLP[$i]['path'] . '">'; |
|
|
|
|
$edit_icon .= Display::return_icon('edit.png', get_lang('_edit_learnpath_module'), array(), ICON_SIZE_TINY); |
|
|
|
|
$edit_icon .= '</a>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$delete_icon .= ' <a href="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&action=delete_item&id=' . $arrLP[$i]['id'] . '&lp_id=' . $this->lp_id . '" onClick="return confirmation(\'' . addslashes($title) . '\');">'; |
|
|
|
|
@ -5053,7 +5056,7 @@ class learnpath { |
|
|
|
|
if (!in_array($arrLP[$i]['item_type'], array('dokeos_chapter', 'dokeos_module', 'dir'))) { |
|
|
|
|
$prerequisities_icon = Display::url(Display::return_icon('accept.png', get_lang('Prerequisites'), array(), ICON_SIZE_TINY), $url.'&action=edit_item_prereq'); |
|
|
|
|
$move_item_icon = Display::url(Display::return_icon('move.png', get_lang('Move'), array(), ICON_SIZE_TINY), $url.'&action=move_item'); |
|
|
|
|
$audio_icon = Display::url(Display::return_icon('audio.png', get_lang('Upload'), array(), ICON_SIZE_TINY), $url.'&action=add_audio'); |
|
|
|
|
$audio_icon = Display::url(Display::return_icon('audio.png', get_lang('UplUpload'), array(), ICON_SIZE_TINY), $url.'&action=add_audio'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ($update_audio != 'true') { |
|
|
|
|
@ -6574,6 +6577,7 @@ class learnpath { |
|
|
|
|
$legend .= '</legend>'; |
|
|
|
|
|
|
|
|
|
$gradebook = isset($_GET['gradebook']) ? Security :: remove_XSS($_GET['gradebook']) : null; |
|
|
|
|
|
|
|
|
|
$url = api_get_self() . '?' .api_get_cidreq().'&gradeboook='.$gradebook.'&action='.$action.'&type='.$item_type.'&lp_id='.$this->lp_id; |
|
|
|
|
|
|
|
|
|
$form = new FormValidator('form', 'POST', $url); |
|
|
|
|
@ -6698,7 +6702,9 @@ class learnpath { |
|
|
|
|
'BaseHref' => api_get_path(WEB_COURSE_PATH) . api_get_course_path().$item_path_fck |
|
|
|
|
); |
|
|
|
|
$form->addElement('html_editor', 'content_lp', '', null, $editor_config); |
|
|
|
|
$defaults['content_lp'] = file_get_contents($item_path); |
|
|
|
|
$content_path = (api_get_path(SYS_COURSE_PATH).api_get_course_path().$item_path_fck); |
|
|
|
|
//$defaults['content_lp'] = file_get_contents($item_path); |
|
|
|
|
$defaults['content_lp'] = file_get_contents($content_path); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$form->addElement('hidden', 'type', 'dokeos_' . $item_type); |
|
|
|
|
|