[svn r15984] FCKeditor 2.6.2 Added - fckeditor configuration set (see FS#2528)

skala
Julio Montoya 18 years ago
parent e8d9e336ed
commit 52c702b209
  1. 46
      main/calendar/agenda.inc.php
  2. 19
      main/calendar/agenda.php
  3. 10
      main/course_description/index.php
  4. 5
      main/course_home/course_home.php
  5. 31
      main/document/create_document.php
  6. 14
      main/document/edit_document.php
  7. 12
      main/exercice/exercise.class.php
  8. 24
      main/exercice/exercise_show.php
  9. 5
      main/exercice/feedback.php
  10. 4
      main/exercice/multiple_answer.class.php
  11. 8
      main/exercice/question.class.php
  12. 3
      main/exercice/unique_answer.class.php
  13. 3
      main/forum/editpost.php
  14. 3
      main/forum/index.php
  15. 5
      main/forum/newthread.php
  16. 4
      main/forum/reply.php
  17. 17
      main/inc/lib/blog.lib.php
  18. 77
      main/inc/lib/formvalidator/Element/html_editor.php
  19. 4
      main/newscorm/lp_controller.php
  20. 4
      main/survey/create_new_survey.php

@ -1,4 +1,4 @@
<?php //$Id: agenda.inc.php 15546 2008-06-11 04:50:51Z yannoo $
<?php //$Id: agenda.inc.php 15984 2008-08-13 17:24:24Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -2361,17 +2361,55 @@ function show_add_form($id = '')
$oFCKeditor->Width = '100%';
$oFCKeditor->Value = $content;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Middle";
$oFCKeditor->ToolbarSet = 'Agenda';
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$result_sql=api_sql_query($sql);
$isocode_language=Database::result($result_sql,0,0);
$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
//FCKeditor Configuration for documents
if(isset($_SESSION['_course']) && $_SESSION['_course']['path']!='')
{
$upload_path = api_get_path(REL_COURSE_PATH).$_SESSION['_course']['path'].'/document/';
}
else
{
$upload_path = api_get_path(REL_PATH).'main/default_course_document/';
}
// if we don't find the CreateDocumentWebDir set we change it with th absolute path http://www.dok..
if ($oFCKeditor->Config['CreateDocumentWebDir']=='')
{
$oFCKeditor->Config['CreateDocumentWebDir']=api_get_path('WEB_COURSE_PATH').api_get_course_path().'/document/';
$oFCKeditor->Config['CreateDocumentDir'] = api_get_path('WEB_COURSE_PATH').api_get_course_path().'/document/';
};
//for images
$oFCKeditor->Config['ImageBrowserURL'] = $oFCKeditor->BasePath . "editor/filemanager/browser/default/browser.html?Type=Images&Connector=connectors/php/connector.php&ServerPath=$upload_path";
$oFCKeditor->Config['ImageUploadURL'] = $oFCKeditor->BasePath . "editor/filemanager/upload/php/upload.php?Type=Images&ServerPath=$upload_path" ;
//for flash
$oFCKeditor->Config['FlashBrowserURL'] = $oFCKeditor->BasePath . "editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/php/connector.php&ServerPath=$upload_path";
$oFCKeditor->Config['FlashUploadURL'] = $oFCKeditor->BasePath . "editor/filemanager/upload/php/upload.php?Type=Flash&ServerPath=$upload_path" ;
$oFCKeditor->Config['MediaBrowserURL'] = $oFCKeditor->Config['FlashBrowserURL'];
//for MP3
$oFCKeditor->Config['MP3BrowserURL'] = $oFCKeditor->BasePath . "editor/filemanager/browser/default/browser.html?Type=MP3&Connector=connectors/php/connector.php&ServerPath=$upload_path";
$oFCKeditor->Config['MP3UploadURL'] = $oFCKeditor->BasePath . "editor/filemanager/upload/php/upload.php?Type=MP3&ServerPath=$upload_path" ;
//for Videos
$oFCKeditor->Config['VideoBrowserURL'] = $oFCKeditor->BasePath . "editor/filemanager/browser/default/browser.html?Type=Video&Connector=connectors/php/connector.php&ServerPath=$upload_path";
$oFCKeditor->Config['VideoUploadURL'] = $oFCKeditor->BasePath . "editor/filemanager/upload/php/upload.php?Type=Video&ServerPath=$upload_path" ;
$return = $oFCKeditor->CreateHtml();
//link
$oFCKeditor->Config['LinkBrowserURL'] = $oFCKeditor->BasePath . "editor/filemanager/browser/default/browser.html?Type=Images&Connector=connectors/php/connector.php&ServerPath=$upload_path";
$return = $oFCKeditor->CreateHtml();
echo $return;
echo $return;
?>
</td>

@ -1,4 +1,4 @@
<?php //$Id: agenda.php 15372 2008-05-23 10:29:42Z yannoo $
<?php //$Id: agenda.php 15984 2008-08-13 17:24:24Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -290,6 +290,23 @@ $fck_attribute['Width'] = '600';
$fck_attribute['Height'] = '400';
$fck_attribute['ToolbarSet'] = 'Middle';
$fck_attribute['Config']['CreateDocumentDir'] = api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/';
$fck_attribute['Config']['CreateDocumentWebDir'] = api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/';
if(isset($_SESSION['_course']) && $_SESSION['_course']['path']!='')
{
$upload_path = api_get_path(REL_COURSE_PATH).$_SESSION['_course']['path'].'/document/';
}
else
{
$upload_path = api_get_path(REL_PATH).'main/default_course_document/';
}
// THE RIGHT PART
echo "<td valign=\"top\">";

@ -1,4 +1,4 @@
<?php // $Id: index.php 15189 2008-04-30 14:58:34Z elixir_inter $
<?php // $Id: index.php 15984 2008-08-13 17:24:24Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -156,7 +156,13 @@ if (api_is_allowed_to_edit() && !is_null($description_id))
$fck_attribute['Width'] = '100%';
$fck_attribute['Height'] = '225';
$fck_attribute['ToolbarSet'] = 'Middle';
$fck_attribute['ToolbarSet'] = 'Middle';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../';
$fck_attribute['Config']['CreateDocumentWebDir'] = api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/';
echo '
<style>

@ -1,4 +1,4 @@
<?php // $Id: course_home.php 13970 2007-12-05 16:56:20Z yannoo $
<?php // $Id: course_home.php 15984 2008-08-13 17:24:24Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -196,6 +196,9 @@ $fck_attribute['Width'] = '100%';
$fck_attribute['Height'] = '400';
$fck_attribute['ToolbarSet'] = 'Full';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = 'document/';
Display::display_introduction_section(TOOL_COURSE_HOMEPAGE);

@ -1,5 +1,5 @@
<?php
// $Id: create_document.php 15322 2008-05-19 16:31:13Z juliomontoya $
// $Id: create_document.php 15984 2008-08-13 17:24:24Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -64,7 +64,7 @@ function InnerDialogLoaded()
//document.getElementById(\'content___Frame\').width=\'70%\';
//window.frames[0].FCKToolbarItems.GetItem("Template").Click;
}
function FCKeditor_OnComplete( editorInstance )
{
editorInstance.Events.AttachEvent( \'OnSelectionChange\', check_for_title ) ;
@ -171,7 +171,6 @@ $fck_attribute['Config']['FullPage'] = true;
-----------------------------------------------------------
*/
$dir = isset($_GET['dir']) ? $_GET['dir'] : $_POST['dir']; // please do not modify this dirname formatting
/*
==============================================================================
MAIN CODE
@ -197,15 +196,36 @@ if ($dir[strlen($dir) - 1] != '/')
$dir .= '/';
}
// Configuration for the FCKEDITOR
$doc_tree= explode('/', $dir);
$count_dir = count($doc_tree) -2; // "2" because at the begin and end there are 2 "/"
$relative_url='';
for($i=0;$i<($count_dir);$i++)
{
$relative_url.='../';
}
// we do this in order to avoid the condition in html_editor.php ==> if ($this -> fck_editor->Config['CreateDocumentWebDir']=='' || $this -> fck_editor->Config['CreateDocumentDir']== '')
if ($relative_url== '')
{
$relative_url = '/';
}
$fck_attribute['Config']['InDocument'] = true;
$fck_attribute['Config']['CreateDocumentDir'] = $relative_url;
$fck_attribute['Config']['CreateDocumentWebDir'] = api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/';
$filepath = api_get_path('SYS_COURSE_PATH').$_course['path'].'/document'.$dir;
if (!is_dir($filepath))
{
$filepath = api_get_path('SYS_COURSE_PATH').$_course['path'].'/document/';
$dir = '/';
}
//------------
/**************************************************/
$to_group_id = 0;
@ -220,8 +240,7 @@ if (isset ($_SESSION['_gid']) && $_SESSION['_gid'] != '')
if ('/'.$path[1] != $group['directory'])
{
api_not_allowed(true);
}
}
}
$interbreadcrumb[] = array ("url" => "./document.php?curdirpath=".urlencode($_GET['dir']).$req_gid, "name" => get_lang('Documents'));

@ -1,4 +1,4 @@
<?php // $Id: edit_document.php 15716 2008-07-02 23:10:47Z juliomontoya $
<?php // $Id: edit_document.php 15984 2008-08-13 17:24:24Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -94,6 +94,7 @@ $fck_attribute['ToolbarSet'] = 'Full';
$fck_attribute['Config']['FullPage'] = true;
/*
------------------------------------------------------------------------------
Constants & Variables
@ -114,6 +115,17 @@ $courseDir = $_course['path']."/document";
$baseWorkDir = $baseServDir.$courseDir;
$group_document = false;
$doc_tree= explode('/', $file);
$count_dir = count($doc_tree) -2; // "2" because at the begin and end there are 2 "/"
$relative_url='';
for($i=0;$i<($count_dir);$i++)
{
$relative_url.='../';
}
$fck_attribute['Config']['InDocument'] = true;
$fck_attribute['Config']['CreateDocumentDir'] = $relative_url;
$fck_attribute['Config']['CreateDocumentWebDir'] = api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/';
$use_document_title = (get_setting('use_document_title')=='true')?true:false;
$noPHP_SELF=true;

@ -25,7 +25,7 @@
* Exercise class: This class allows to instantiate an object of type Exercise
* @package dokeos.exercise
* @author Olivier Brouckaert
* @version $Id: exercise.class.php 15944 2008-08-07 13:47:39Z elixir_julian $
* @version $Id: exercise.class.php 15984 2008-08-13 17:24:24Z juliomontoya $
*/
@ -666,7 +666,15 @@ class Exercise
$fck_attribute = array();
$fck_attribute['Height'] = '250';
$fck_attribute['Width'] = '100%';
$fck_attribute['ToolbarSet'] = 'NewTest';
$fck_attribute['ToolbarSet'] = 'NewTest';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
//$fck_attribute['Config']['CreateDocumentWebDir'] = api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/';
$form -> addElement ('html_editor', 'exerciseDescription', get_lang('ExerciseDescription').' : ');
// type

@ -760,7 +760,7 @@ $result =api_sql_query($query, __FILE__, __LINE__);
$objAnswerTmp=new Answer($questionId);
$table_ans = Database :: get_course_table(TABLE_QUIZ_ANSWER);
$TBL_TRACK_ATTEMPT = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$TBL_TRACK_ATTEMPT= Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$sql_select_answer = 'SELECT id, answer, correct, position FROM '.$table_ans.' WHERE question_id="'.Database::escape_string($questionId).'" AND correct<>0';
$res_answers = api_sql_query($sql_select_answer, __FILE__, __LINE__);
@ -777,12 +777,12 @@ $result =api_sql_query($query, __FILE__, __LINE__);
while($a_answers = mysql_fetch_array($res_answers)){
$i_answer_id = $a_answers['id'];
$s_answer_label = $a_answers['answer'];
$i_answer_correct_answer = $a_answers['correct'];
$i_answer_position = $a_answers['position'];
$i_answer_id = $a_answers['id']; //3
$s_answer_label = $a_answers['answer']; // your dady - you mother
$i_answer_correct_answer = $a_answers['correct']; //1 - 2
$i_answer_position = $a_answers['position']; // 3 - 4
$sql_user_answer =
echo $sql_user_answer =
'SELECT answers.answer
FROM '.$TBL_TRACK_ATTEMPT.' as track_e_attempt
INNER JOIN '.$table_ans.' as answers
@ -795,13 +795,14 @@ $result =api_sql_query($query, __FILE__, __LINE__);
$res_user_answer = api_sql_query($sql_user_answer, __FILE__, __LINE__);
$s_user_answer = mysql_result($res_user_answer,0,0);
$s_user_answer = mysql_result($res_user_answer,0,0); // rich - good looking
$s_correct_answer = $s_answer_label;
$s_correct_answer = $s_answer_label; // your ddady - your mother
$i_answerWeighting=$objAnswerTmp->selectWeighting($i_answer_id);
if($s_user_answer == $s_correct_answer){
if($s_user_answer == $s_correct_answer) // rich == your ddady?? wrong
{
$questionScore+=$i_answerWeighting;
$totalScore+=$i_answerWeighting;
}
@ -898,6 +899,9 @@ $result =api_sql_query($query, __FILE__, __LINE__);
$fck_attribute['Height'] = '150';
$fck_attribute['ToolbarSet'] = 'Comment';
$fck_attribute['Config']['IMUploadPath'] = 'upload/test/';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
$$questionId = new FormValidator('frmcomments'.$questionId,'post','');
$renderer =& $$questionId->defaultRenderer();
$renderer->setFormTemplate(
@ -1015,4 +1019,4 @@ $totalWeighting+=$questionWeighting;
<?php } ?>
</td>
</tr>
</table>
</table>

@ -65,6 +65,11 @@ Display::display_header($nameTools,"Exercise");
$fck_attribute['Height'] = '200';
$fck_attribute['ToolbarSet'] = 'Small';
$fck_attribute['Config']['IMUploadPath'] = 'upload/test/';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
$form = new FormValidator('feedbackform','post',api_get_self()."?modifyQuestion=".$modifyQuestion."&newQuestion=".$newQuestion);
$obj_registration_form = new HTML_QuickForm('frmRegistration', 'POST');
$renderer =& $obj_registration_form->defaultRenderer();

@ -65,6 +65,10 @@ class MultipleAnswer extends Question {
$fck_attribute['ToolbarSet'] = 'Test';
$fck_attribute['Config']['IMUploadPath'] = 'upload/test/';
$fck_attribute['Config']['FlashUploadPath'] = 'upload/test/';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
$nb_answers = isset($_POST['nb_answers']) ? $_POST['nb_answers'] : 2;
$nb_answers += (isset($_POST['lessAnswers']) ? -1 : (isset($_POST['moreAnswers']) ? 1 : 0));

@ -22,7 +22,7 @@
* File containing the Question class.
* @package dokeos.exercise
* @author Olivier Brouckaert
* @version $Id: question.class.php 15797 2008-07-16 22:04:57Z yannoo $
* @version $Id: question.class.php 15984 2008-08-13 17:24:24Z juliomontoya $
*/
@ -791,6 +791,12 @@ abstract class Question
$fck_attribute['Config']['IMUploadPath'] = 'upload/test/';
$fck_attribute['Config']['FlashUploadPath'] = 'upload/test/';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
if(is_array($fck_config)){
$fck_attribute = array_merge($fck_attribute,$fck_config);
}

@ -65,6 +65,9 @@ class UniqueAnswer extends Question {
$fck_attribute['ToolbarSet'] = 'Test';
$fck_attribute['Config']['IMUploadPath'] = 'upload/test/';
$fck_attribute['Config']['FlashUploadPath'] = 'upload/test/';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
//this line define how many question by default appear when creating a choice question
$nb_answers = isset($_POST['nb_answers']) ? (int) $_POST['nb_answers'] : 4;
$nb_answers += (isset($_POST['lessAnswers']) ? -1 : (isset($_POST['moreAnswers']) ? 1 : 0));

@ -77,6 +77,9 @@ $fck_attribute['ToolbarSet'] = 'Middle';
$fck_attribute['Config']['IMUploadPath'] = 'upload/forum/';
$fck_attribute['Config']['FlashUploadPath'] = 'upload/forum/';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
// including additional library scripts
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
include_once (api_get_path(LIBRARY_PATH).'groupmanager.lib.php');

@ -72,6 +72,9 @@ $fck_attribute['Height'] = '175';
$fck_attribute['ToolbarSet'] = 'Middle';
$fck_attribute['Config']['IMUploadPath'] = 'upload/forum/';
$fck_attribute['Config']['FlashUploadPath'] = 'upload/forum/';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
if(!api_is_allowed_to_edit()) $fck_attribute['Config']['UserStatus'] = 'student';
//error_reporting(E_ALL);

@ -65,6 +65,11 @@ $fck_attribute['Height'] = '300';
$fck_attribute['ToolbarSet'] = 'Middle';
$fck_attribute['Config']['IMUploadPath'] = 'upload/forum/';
$fck_attribute['Config']['FlashUploadPath'] = 'upload/forum/';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
if(!api_is_allowed_to_edit())
{
$fck_attribute['Config']['UserStatus'] = 'student';

@ -60,6 +60,10 @@ $fck_attribute['Height'] = '300';
$fck_attribute['ToolbarSet'] = 'Middle';
$fck_attribute['Config']['IMUploadPath'] = 'upload/forum/';
$fck_attribute['Config']['FlashUploadPath'] = 'upload/forum/';
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
if(!api_is_allowed_to_edit())
{
$fck_attribute['Config']['UserStatus'] = 'student';

@ -1331,6 +1331,11 @@ class Blog
$result_sql=api_sql_query($sql);
$isocode_language=mysql_result($result_sql,0,0);
$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
$oFCKeditor->Config['InDocument'] = false;
$oFCKeditor->Config['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
$oFCKeditor->Create() ;
echo ' <br /></td>
@ -1405,6 +1410,11 @@ class Blog
$result_sql=api_sql_query($sql);
$isocode_language=mysql_result($result_sql,0,0);
$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
$oFCKeditor->Config['InDocument'] = false;
$oFCKeditor->Config['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
$oFCKeditor->Create() ;
echo ' <br /></td>
@ -2447,7 +2457,12 @@ class Blog
$result_sql=api_sql_query($sql);
$isocode_language=mysql_result($result_sql,0,0);
$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
$oFCKeditor->Config['InDocument'] = false;
$oFCKeditor->Config['CreateDocumentDir'] = '../../courses/'.api_get_course_path().'/document/';
$oFCKeditor->Create() ;
echo ' <br /></td>
</tr>

@ -1,5 +1,5 @@
<?php
// $Id: html_editor.php 15169 2008-04-29 06:27:22Z yannoo $
// $Id: html_editor.php 15984 2008-08-13 17:24:24Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -66,68 +66,77 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
//We get the optionnals config parameters in $fck_attribute array
$this -> fck_editor->Config = !empty($fck_attribute['Config']) ? $fck_attribute['Config'] : array();
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
//We are in a course
if(isset($_SESSION["_course"]["language"])){
if(isset($_SESSION["_course"]["language"]))
{
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
}
//Else, we get the current session language
elseif(isset($_SESSION["_user"]["language"])){
elseif(isset($_SESSION["_user"]["language"]))
{
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_user"]["language"]."'";
}
}
//Else we get the default platform language
else{
else
{
$platform_language=api_get_setting("platformLanguage");
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='$platform_language'";
}
$result_sql=api_sql_query($sql);
$isocode_language=mysql_result($result_sql,0,0);
$this -> fck_editor->Config['DefaultLanguage'] = $isocode_language;
if(isset($_SESSION['_course']) && $_SESSION['_course']['path']!=''){
$upload_path = api_get_path(REL_COURSE_PATH).$_SESSION['_course']['path'].'/document/';
}else{
$upload_path = api_get_path(REL_PATH)."main/upload/";
}
$this -> fck_editor->Config['DefaultLanguage'] = $isocode_language;
$this -> fck_editor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$this -> fck_editor->ToolbarSet = $fck_attribute['ToolbarSet'] ;
$this -> fck_editor->Config['LinkBrowserURL'] = $this -> fck_editor->BasePath . "editor/filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath=$upload_path";
$this -> fck_editor->Config['EditorAreaCSS'] = api_get_path(REL_PATH).'main/css/'.api_get_setting('stylesheets').'/course.css';
//for image
$this -> fck_editor->Config['ImageBrowserURL'] = $this -> fck_editor->BasePath . "editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php&ServerPath=$upload_path";
$this -> fck_editor->Config['ImageUploadURL'] = $this -> fck_editor->BasePath . "editor/filemanager/upload/php/upload.php?Type=Image&ServerPath=$upload_path" ;
//FCKeditor Configuration for documents
if(isset($_SESSION['_course']) && $_SESSION['_course']['path']!='')
{
$upload_path = api_get_path(REL_COURSE_PATH).$_SESSION['_course']['path'].'/document/';
}
else
{
$upload_path = api_get_path(REL_PATH).'main/default_course_document/';
}
// if we don't find the CreateDocumentWebDir set we change it with th absolute path http://www.dok..
if ($this -> fck_editor->Config['CreateDocumentWebDir']=='' )
{
$this -> fck_editor->Config['CreateDocumentWebDir']=api_get_path('WEB_COURSE_PATH').api_get_course_path().'/document/';
};
// if we don't find the CreateDocumentWebDir set we change it with th absolute path http://www.dok..
if ($this -> fck_editor->Config['CreateDocumentDir']== '')
{
$this -> fck_editor->Config['CreateDocumentDir'] = api_get_path('WEB_COURSE_PATH').api_get_course_path().'/document/';
};
//for images
$this -> fck_editor->Config['ImageBrowserURL'] = $this -> fck_editor->BasePath . "editor/filemanager/browser/default/browser.html?Type=Images&Connector=connectors/php/connector.php&ServerPath=$upload_path";
$this -> fck_editor->Config['ImageUploadURL'] = $this -> fck_editor->BasePath . "editor/filemanager/upload/php/upload.php?Type=Images&ServerPath=$upload_path" ;
//for flash
$this -> fck_editor->Config['FlashBrowserURL'] = $this -> fck_editor->BasePath . "editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/php/connector.php&ServerPath=$upload_path";
$this -> fck_editor->Config['FlashUploadURL'] = $this -> fck_editor->BasePath . "editor/filemanager/upload/php/upload.php?Type=Flash&ServerPath=$upload_path" ;
$this -> fck_editor->Config['MediaBrowserURL'] = $this -> fck_editor->Config['FlashBrowserURL'];
//for MP3
$this -> fck_editor->Config['MP3BrowserURL'] = $this -> fck_editor->BasePath . "editor/filemanager/browser/default/browser.html?Type=MP3&Connector=connectors/php/connector.php&ServerPath=$upload_path";
$this -> fck_editor->Config['MP3UploadURL'] = $this -> fck_editor->BasePath . "editor/filemanager/upload/php/upload.php?Type=MP3&ServerPath=$upload_path" ;
//for other media
//for Videos
$this -> fck_editor->Config['VideoBrowserURL'] = $this -> fck_editor->BasePath . "editor/filemanager/browser/default/browser.html?Type=Video&Connector=connectors/php/connector.php&ServerPath=$upload_path";
$this -> fck_editor->Config['VideoUploadURL'] = $this -> fck_editor->BasePath . "editor/filemanager/upload/php/upload.php?Type=Video&ServerPath=$upload_path" ;
//link
$this -> fck_editor->Config['LinkBrowserURL'] = $this -> fck_editor->BasePath . "editor/filemanager/browser/default/browser.html?Type=Images&Connector=connectors/php/connector.php&ServerPath=$upload_path";
}
/**
* Check if the browser supports FCKeditor
@ -189,4 +198,4 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
return $result;
}
}
?>
?>

@ -160,6 +160,10 @@ $fck_attribute['Height'] = '950';
$fck_attribute['ToolbarSet'] = 'Full';
$fck_attribute['Config']['FullPage'] = true;
$fck_attribute['Config']['InDocument'] = false;
$fck_attribute['Config']['CreateDocumentDir'] = '/'; // this means that fck editor will add the mp3, video files like this audio/fil.mp3 and not the absolute path
$fck_attribute['Config']['CreateDocumentWebDir'] = api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/';
if(isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'true')
{
if($_REQUEST['action'] != 'list' AND $_REQUEST['action'] != 'view')

@ -25,9 +25,9 @@
* @author unknown, the initial survey that did not make it in 1.8 because of bad code
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts (if not all) of the code
* @author Julio Montoya Armas <gugli100@gmail.com>, Dokeos: Personality Test modification and rewriting large parts of the code
* @version $Id: create_new_survey.php 15947 2008-08-07 16:12:49Z juliomontoya $
* @version $Id: create_new_survey.php 15984 2008-08-13 17:24:24Z juliomontoya $
*
* TODO only the available platform languages should be used => need an api get_languages and and api_get_available_languages (or a parameter)
* @todo only the available platform languages should be used => need an api get_languages and and api_get_available_languages (or a parameter)
*/
// name of the language file that needs to be included

Loading…
Cancel
Save