diff --git a/main/inc/lib/fckeditor/myconfig.js b/main/inc/lib/fckeditor/myconfig.js index d486adc88e..b1451138af 100644 --- a/main/inc/lib/fckeditor/myconfig.js +++ b/main/inc/lib/fckeditor/myconfig.js @@ -236,6 +236,10 @@ FCKConfig.ToolbarSets["LearnPath"] = [ ['Source'] ] ;//save, FitWindow don't run well here +FCKConfig.ToolbarSets["CommentLearningPath"] = [ + ['FitWindow','Link','Unlink','Image','flvPlayer','Table','Bold','Italic','TextColor','BGColor','Source'] +] ; + //Notebook FCKConfig.ToolbarSets["Notebook"] = [ ['NewPage','Save','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Find'], diff --git a/main/newscorm/lp_edit.php b/main/newscorm/lp_edit.php index e5d6744bf8..4de04eb245 100644 --- a/main/newscorm/lp_edit.php +++ b/main/newscorm/lp_edit.php @@ -6,29 +6,29 @@ */ require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'); -require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'); - +require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'); + $show_description_field = false; //for now $nameTools = get_lang("Doc"); event_access_tool(TOOL_LEARNPATH); if (! $is_allowed_in_course) api_not_allowed(); $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); $interbreadcrumb[]= array ("url"=>api_get_self()."?action=admin_view&lp_id=$learnpath_id", "name" => $_SESSION['oLP']->get_name()); - + Display::display_header(null,'Path'); //Page subtitle -echo '

'.get_lang('EditLPSettings').'

'; +echo '

'.get_lang('EditLPSettings').'

'; $fck_attribute['Width'] = '400px'; $fck_attribute['Height'] = '150px'; -$fck_attribute['ToolbarSet'] = 'Comment'; +$fck_attribute['ToolbarSet'] = 'CommentLearningPath'; $defaults=array(); $form = new FormValidator('form1', 'post', 'lp_controller.php'); //Title -$form -> addElement('text', 'lp_name', ucfirst(get_lang('_title')),array('size'=>47)); +$form -> addElement('text', 'lp_name', ucfirst(get_lang('_title')),array('size'=>47)); //Encoding $encoding_select = &$form->addElement('select', 'lp_encoding', get_lang('Charset')); @@ -84,7 +84,7 @@ if (api_get_setting('allow_course_theme') == 'true') //$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'),array('size'=>80) ); +$form->addElement('html_editor','lp_author',get_lang('Author'),array('size'=>80) ); // LP image $form->add_progress_bar(); @@ -113,22 +113,22 @@ $form->addElement('html', $div); $form->addRule('lp_preview_image', get_lang('OnlyImagesAllowed'), 'mimetype', array('image/gif', 'image/jpeg', 'image/png')); // Search terms (only if search is activated) -if (api_get_setting('search_enabled') === 'true') +if (api_get_setting('search_enabled') === 'true') { - $specific_fields = get_specific_field_list(); - foreach ($specific_fields as $specific_field) { - $form -> addElement ('text', $specific_field['code'], $specific_field['name']); - - $filter = array('course_code'=> "'". api_get_course_id() ."'", 'field_id' => $specific_field['id'], 'ref_id' => $_SESSION['oLP']->lp_id, 'tool_id' => '\''. TOOL_LEARNPATH .'\''); - $values = get_specific_field_values_list($filter, array('value')); - if ( !empty($values) ) { - $arr_str_values = array(); - foreach ($values as $value) { - $arr_str_values[] = $value['value']; - } - $defaults[$specific_field['code']] = implode(', ', $arr_str_values); - } - } + $specific_fields = get_specific_field_list(); + foreach ($specific_fields as $specific_field) { + $form -> addElement ('text', $specific_field['code'], $specific_field['name']); + + $filter = array('course_code'=> "'". api_get_course_id() ."'", 'field_id' => $specific_field['id'], 'ref_id' => $_SESSION['oLP']->lp_id, 'tool_id' => '\''. TOOL_LEARNPATH .'\''); + $values = get_specific_field_values_list($filter, array('value')); + if ( !empty($values) ) { + $arr_str_values = array(); + foreach ($values as $value) { + $arr_str_values[] = $value['value']; + } + $defaults[$specific_field['code']] = implode(', ', $arr_str_values); + } + } } //default values @@ -140,16 +140,16 @@ $defaults['lp_author']=$_SESSION['oLP']->get_author(); //Submit button $form->addElement('style_submit_button', 'Submit',get_lang('SaveLPSettings'),'class="save"'); -//'' +//'' //Hidden fields $form->addElement('hidden', 'action', 'update_lp'); $form->addElement('hidden', 'lp_id', $_SESSION['oLP']->get_id()); -$form->setDefaults($defaults); -echo '
'; +$form->setDefaults($defaults); +echo '
'; $form -> display(); -echo '
'; - +echo '
'; + Display::display_footer(); ?> \ No newline at end of file