Browse Source

[svn r22094] FS#2867 - The learning path tool: Eliminating the global variable $fck_attribute, part 1.

Ivan Tcholakov 15 years ago
parent
commit
bbc2ff3079

+ 1 - 1
main/inc/lib/fckeditor/toolbars/comment_learning_path.php

@@ -37,4 +37,4 @@ $config['ToolbarSets']['Maximized'] = array(
 // Here new width and height of the editor may be set.
 // Possible values, examples: 300 , '250' , '100%' , ...
 //$config['Width'] = '100%';
-//$config['Height'] = '300';
+//$config['Height'] = '150';

+ 1 - 10
main/newscorm/document.php

@@ -192,21 +192,12 @@ api_display_tool_title($nameTools);
 	(editable by course admins)
 -----------------------------------------------------------
 */
-//TODO: check see if we need, it seems not working here
-$fck_attribute['Width'] = '100%';
-$fck_attribute['Height'] = '400';
-$fck_attribute['ToolbarSet'] = 'LearnPath';
-// TODO: These settings to be checked when it is possible.
-$fck_attribute['Config']['InDocument'] = false;
-$fck_attribute['Config']['CreateDocumentWebDir'] = api_get_path('WEB_COURSE_PATH').api_get_course_path().'/document/';
-$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
-$fck_attribute['Config']['BaseHref'] = api_get_path('WEB_COURSE_PATH').api_get_course_path().'/';
+
 if($my_version=='1.8'){
 	Display::display_introduction_section(TOOL_LEARNPATH);
 }else{
 	api_introductionsection(TOOL_LEARNPATH);
 }
-$fck_attribute = null; // Clearing this global variable immediatelly after it has been used.
 
 
 if(api_is_allowed_to_edit())

+ 2 - 8
main/newscorm/lp_edit.php

@@ -30,10 +30,6 @@ $interbreadcrumb[]= array ("url"=>api_get_self()."?action=admin_view&lp_id=$lear
 
 Display::display_header(null,'Path');
 
-$fck_attribute['Width'] = '400px';
-$fck_attribute['Height'] = '150px';
-$fck_attribute['ToolbarSet'] = 'CommentLearningPath';
-
 // actions link
 echo '<div class="actions">';
 $gradebook = Security::remove_XSS($_GET['gradebook']);
@@ -109,11 +105,9 @@ if (api_get_setting('allow_course_theme') == 'true')
 }
 
 //Author
-//$form -> addElement('text', 'lp_author', api_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), array('ToolbarSet' => 'CommentLearningPath', 'Width' => '100%', 'Height' => '150px') ); 
 $form->applyFilter('lp_author', 'html_filter');
+
 // LP image	
 $form->add_progress_bar();
 if( strlen($_SESSION['oLP']->get_preview_image() ) > 0)