|
|
|
@ -8,9 +8,7 @@ |
|
|
|
|
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'); |
|
|
|
|
|
|
|
|
|
$show_description_field = false; //for now |
|
|
|
|
|
|
|
|
|
$nameTools = get_lang("Doc"); |
|
|
|
|
|
|
|
|
|
event_access_tool(TOOL_LEARNPATH); |
|
|
|
|
|
|
|
|
|
if (! $is_allowed_in_course) api_not_allowed(); |
|
|
|
@ -23,13 +21,17 @@ Display::display_header(null,'Path'); |
|
|
|
|
//Page subtitle |
|
|
|
|
echo '<h4>'.get_lang('_edit_learnpath').'</h4>'; |
|
|
|
|
|
|
|
|
|
$fck_attribute['Width'] = '400px'; |
|
|
|
|
$fck_attribute['Height'] = '150px'; |
|
|
|
|
$fck_attribute['ToolbarSet'] = 'Comment'; |
|
|
|
|
|
|
|
|
|
$defaults=array(); |
|
|
|
|
$form = new FormValidator('form1', 'post', 'lp_controller.php'); |
|
|
|
|
|
|
|
|
|
//Title |
|
|
|
|
$form -> addElement('text', 'lp_name', ucfirst(get_lang('_title'))); |
|
|
|
|
|
|
|
|
|
//Ecoding |
|
|
|
|
//Encoding |
|
|
|
|
$encoding_select = &$form->addElement('select', 'lp_encoding', get_lang('Charset')); |
|
|
|
|
$encodings = array('UTF-8','ISO-8859-1','ISO-8859-15','cp1251','cp1252','KOI8-R','BIG5','GB2312','Shift_JIS','EUC-JP'); |
|
|
|
|
foreach($encodings as $encoding){ |
|
|
|
@ -80,12 +82,12 @@ if (api_get_setting('allow_course_theme') == 'true') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//Author |
|
|
|
|
$form -> addElement('text', 'lp_author', ucfirst(get_lang('Author'))); |
|
|
|
|
|
|
|
|
|
//$form -> addElement('text', 'lp_author', ucfirst(get_lang('Author'))); |
|
|
|
|
//$form->add_html_editor('lp_author', get_lang('Author')); |
|
|
|
|
|
|
|
|
|
$form->addElement('html_editor','lp_author',get_lang('Author')); |
|
|
|
|
|
|
|
|
|
// LP image |
|
|
|
|
|
|
|
|
|
$form->add_progress_bar(); |
|
|
|
|
if( strlen($_SESSION['oLP']->get_preview_image() ) > 0) |
|
|
|
|
{ |
|
|
|
@ -98,7 +100,6 @@ if( strlen($_SESSION['oLP']->get_preview_image() ) > 0) |
|
|
|
|
</div>'; |
|
|
|
|
$form->addElement('html', $div .'<br/>'); |
|
|
|
|
$form->addElement('checkbox', 'remove_picture', null, get_lang('DelImage')); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$form->addElement('file', 'lp_preview_image', ($_SESSION['oLP']->get_preview_image() != '' ? get_lang('UpdateImage') : get_lang('AddImage'))); |
|
|
|
@ -113,8 +114,6 @@ $form->addElement('html', $div); |
|
|
|
|
$form->addRule('lp_preview_image', get_lang('OnlyImagesAllowed'), 'mimetype', array('image/gif', 'image/jpeg', 'image/png')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//default values |
|
|
|
|
$content_proximity_select -> setSelected($s_selected_proximity); |
|
|
|
|
$origin_select -> setSelected($s_selected_origin); |
|
|
|
@ -129,10 +128,7 @@ $form->addElement('submit', 'Submit', get_lang('Ok')); |
|
|
|
|
$form->addElement('hidden', 'action', 'update_lp'); |
|
|
|
|
$form->addElement('hidden', 'lp_id', $_SESSION['oLP']->get_id()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$form->setDefaults($defaults); |
|
|
|
|
$form -> display(); |
|
|
|
|
|
|
|
|
|
Display::display_footer(); |
|
|
|
|
|
|
|
|
|
?> |