瀏覽代碼

[svn r10596] survey : replace textarea by fckeditor

Eric Marguin 18 年之前
父節點
當前提交
f1f0d9e451

+ 38 - 10
main/survey/attach_existingsurvey.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: attach_existingsurvey.php 10583 2007-01-02 14:47:19Z pcool $
+* 	@version $Id: attach_existingsurvey.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 /*
@@ -353,14 +353,25 @@ december -->
 <tr><td valign="top"><?php echo get_lang('SurveyIntroduction'); ?>&nbsp;</td>
  <td>
    <?php
-         api_disp_html_area('content',$content,'300px');
-			/*$oFCKeditor = new FCKeditor('content') ;
-			$oFCKeditor->BasePath = 'FCKeditor/';
-			$oFCKeditor->Value = 'Enter your introduction text here';
-			$oFCKeditor->Width  = '600' ;
-			$oFCKeditor->Height = '400' ;
-			$oFCKeditor->Create();
-*/
+        require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+		$oFCKeditor = new FCKeditor('content') ;
+		$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+		$oFCKeditor->Height		= '300';
+		$oFCKeditor->Width		= '600';
+		$oFCKeditor->Value		= $content;
+		$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+		$oFCKeditor->ToolbarSet = "Survey";
+
+		$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=mysql_result($result_sql,0,0);
+		$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+		
+		$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return;
+
    ?>
           <br>
         </td>
@@ -368,7 +379,24 @@ december -->
   <tr><td valign="top"><?php echo get_lang('Thanks'); ?>&nbsp;</td>
  <td>
    <?php
-         api_disp_html_area('thanks',$thanks,'200px');
+         require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+		$oFCKeditor = new FCKeditor('thanks') ;
+		$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+		$oFCKeditor->Height		= '300';
+		$oFCKeditor->Width		= '600';
+		$oFCKeditor->Value		= $thanks;
+		$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+		$oFCKeditor->ToolbarSet = "Survey";
+		
+		$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=mysql_result($result_sql,0,0);
+		$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+		
+		$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return;
    ?>
           <br>
         </td>

+ 37 - 10
main/survey/attach_question.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: attach_question.php 10583 2007-01-02 14:47:19Z pcool $
+* 	@version $Id: attach_question.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 /*
@@ -364,14 +364,24 @@ december -->
 <tr><td valign="top"><?php echo get_lang('SurveyIntroduction'); ?>&nbsp;</td>
  <td>
    <?php
-         api_disp_html_area('content',$content,'300px');
-			/*$oFCKeditor = new FCKeditor('content') ;
-			$oFCKeditor->BasePath = 'FCKeditor/';
-			$oFCKeditor->Value = 'Enter your introduction text here';
-			$oFCKeditor->Width  = '600' ;
-			$oFCKeditor->Height = '400' ;
-			$oFCKeditor->Create();
-*/
+         require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+		$oFCKeditor = new FCKeditor('content') ;
+		$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+		$oFCKeditor->Height		= '300';
+		$oFCKeditor->Width		= '600';
+		$oFCKeditor->Value		= $content;
+		$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+		$oFCKeditor->ToolbarSet = "Survey";
+		
+		$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=mysql_result($result_sql,0,0);
+		$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+		
+		$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return;
    ?>
           <br>
         </td>
@@ -379,7 +389,24 @@ december -->
  <tr><td valign="top"><?php echo get_lang('Thanks'); ?>&nbsp;</td>
  <td>
  <?php
-      api_disp_html_area('thanks',$thanks,'200px');
+      require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+		$oFCKeditor = new FCKeditor('thanks') ;
+		$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+		$oFCKeditor->Height		= '300';
+		$oFCKeditor->Width		= '600';
+		$oFCKeditor->Value		= $thanks;
+		$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+		$oFCKeditor->ToolbarSet = "Survey";
+		
+		$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=mysql_result($result_sql,0,0);
+		$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+		
+		$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return;
  ?>
  <br>
  </td>

+ 37 - 10
main/survey/attach_survey.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: attach_survey.php 10583 2007-01-02 14:47:19Z pcool $
+* 	@version $Id: attach_survey.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 /*
@@ -361,14 +361,24 @@ december -->
 <tr><td valign="top"><?php echo get_lang('SurveyIntroduction'); ?>&nbsp;</td>
  <td>
    <?php
-         api_disp_html_area('content',$content,'300px');
-			/*$oFCKeditor = new FCKeditor('content') ;
-			$oFCKeditor->BasePath = 'FCKeditor/';
-			$oFCKeditor->Value = 'Enter your introduction text here';
-			$oFCKeditor->Width  = '600' ;
-			$oFCKeditor->Height = '400' ;
-			$oFCKeditor->Create();
-*/
+         require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+		$oFCKeditor = new FCKeditor('content') ;
+		$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+		$oFCKeditor->Height		= '300';
+		$oFCKeditor->Width		= '600';
+		$oFCKeditor->Value		= $content;
+		$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+		$oFCKeditor->ToolbarSet = "Survey";
+		
+		$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=mysql_result($result_sql,0,0);
+		$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+		
+		$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return;
    ?>
           <br>
         </td>
@@ -376,7 +386,24 @@ december -->
  <tr><td valign="top"><?php echo get_lang('Thanks'); ?>&nbsp;</td>
  <td>
  <?php
-      api_disp_html_area('thanks',$thanks,'200px');
+       require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+		$oFCKeditor = new FCKeditor('thanks') ;
+		$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+		$oFCKeditor->Height		= '300';
+		$oFCKeditor->Width		= '600';
+		$oFCKeditor->Value		= $thanks;
+		$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+		$oFCKeditor->ToolbarSet = "Survey";
+		
+		$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=mysql_result($result_sql,0,0);
+		$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+		
+		$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return;
  ?>
  <br>
  </td>

+ 19 - 2
main/survey/create_new_group.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: create_new_group.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: create_new_group.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 /*
@@ -234,7 +234,24 @@ api_display_tool_title($tool_name);
 	   <tr><td valign="top"><?php echo get_lang('GroupIntroduction'); ?>&nbsp;</td>
         <td>
    <?php
-         api_disp_html_area('content',$content,'300px');
+          require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+		$oFCKeditor = new FCKeditor('content') ;
+		$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+		$oFCKeditor->Height		= '300';
+		$oFCKeditor->Width		= '600';
+		$oFCKeditor->Value		= $content;
+		$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+		$oFCKeditor->ToolbarSet = "Survey";
+		
+		$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=mysql_result($result_sql,0,0);
+		$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+		
+		$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return;
    ?>
           <br>
         </td>

+ 79 - 8
main/survey/create_new_survey.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: create_new_survey.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: create_new_survey.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -28,7 +28,6 @@ $language_file = 'survey';
 
 // including the global dokeos file
 require_once ('../inc/global.inc.php');
-
 // including additional libraries
 /** @todo check if these are all needed */
 /** @todo check if the starting / is needed. api_get_path probably ends with an / */
@@ -120,7 +119,7 @@ if($surveyid = $_REQUEST['surveyid'])
 		$availabletill = $_POST['end_fyear']."-".$_POST['end_fmonth']."-".$_POST['end_fday'];
 		$isshare = $_POST['isshare'];
 		$surveytemplate = $_POST['template'];
-		$surveyintroduction = $_POST['content'];
+		$surveyintroduction = $_POST['introduction'];
 	    $surveythanks = $_POST['thanks'];
 		$savailablefrom=mktime(0,0,0,$_POST['fmonth'],$_POST['fday'], $_POST['fyear']); 
 	    $savailabletill=mktime(0,0,0,$_POST['end_fmonth'],$_POST['end_fday'], $_POST['end_fyear']); 
@@ -321,7 +320,23 @@ if($surveyid = $_REQUEST['surveyid'])
 	<tr><td valign="top"><?php echo get_lang('SurveyIntroduction'); ?>&nbsp;</td>
 	<td>
 	<?php
-	   api_disp_html_area('content',$obj->intro,'300px');
+	   require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+		$oFCKeditor = new FCKeditor('introduction') ;
+		$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+		$oFCKeditor->Height		= '300';
+		$oFCKeditor->Width		= '600';
+		$oFCKeditor->Value		= $obj->intro;
+		$oFCKeditor->Config		= Array("Survey");
+		
+		$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=mysql_result($result_sql,0,0);
+		$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+		
+		$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return;
 	?>
 	 <br>
 	 </td>
@@ -329,7 +344,21 @@ if($surveyid = $_REQUEST['surveyid'])
 	<tr><td valign="top"><?php echo get_lang('Thanks'); ?>&nbsp;</td>
 	<td>
 	<?php
-	   api_disp_html_area('thanks',$obj->surveythanks,'200px');
+	   $oFCKeditor = new FCKeditor('thanks') ;
+		$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+		$oFCKeditor->Height		= '300';
+		$oFCKeditor->Width		= '600';
+		$oFCKeditor->Value		= $obj->surveythanks;
+		
+		$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=mysql_result($result_sql,0,0);
+		$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+		
+		$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return; 
 	?>
 	 <br>
 	 </td>
@@ -376,7 +405,7 @@ else
 		$availabletill = $_POST['end_fyear']."-".$_POST['end_fmonth']."-".$_POST['end_fday'];
 		$isshare = $_POST['isshare'];
 		$surveytemplate = $_POST['template'];
-		$surveyintroduction = $_POST['content'];
+		$surveyintroduction = $_POST['introduction'];
 		$surveythanks = $_POST['thanks'];
 		$savailablefrom=mktime(0,0,0,$_POST['fmonth'],$_POST['fday'], $_POST['fyear']); 
 	    $savailabletill=mktime(0,0,0,$_POST['end_fmonth'],$_POST['end_fday'], $_POST['end_fyear']); 
@@ -648,11 +677,53 @@ else
 	
 	<tr>
 		<td valign="top"><?php echo get_lang('SurveyIntroduction'); ?>&nbsp;</td>
-		<td><?php api_disp_html_area('content',$content); ?></td>
+		<td>
+		<?php 
+			require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+			$oFCKeditor = new FCKeditor('introduction') ;
+			$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+			$oFCKeditor->Height		= '300';
+			$oFCKeditor->Width		= '600';
+			$oFCKeditor->Value		= $surveyintroduction;
+			$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+			$oFCKeditor->ToolbarSet = "Survey";
+			
+			$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=mysql_result($result_sql,0,0);
+			$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+			
+			$return =	$oFCKeditor->CreateHtml();
+			
+			echo $return;
+		?>
+		</td>
 	 </tr>
 	 <tr>
 	 	<td valign="top"><?php echo get_lang('Thanks'); ?>&nbsp;</td>
-	 	<td><?php api_disp_html_area('thanks',$thanks); ?></td>
+	 	<td>
+	 	<?php
+	 	require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+			$oFCKeditor = new FCKeditor('thanks') ;
+			$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+			$oFCKeditor->Height		= '300';
+			$oFCKeditor->Width		= '600';
+			$oFCKeditor->Value		= $surveythanks;
+			$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+			$oFCKeditor->ToolbarSet = "Survey";
+			
+			$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=mysql_result($result_sql,0,0);
+			$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+			
+			$return =	$oFCKeditor->CreateHtml();
+			
+			echo $return; 
+ 		?>
+ 		</td>
 	 </tr>
 	 </table>
 	 <tr>

+ 19 - 2
main/survey/group_edit.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: group_edit.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: group_edit.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 /*
@@ -155,7 +155,24 @@ $introduction = $obj->introduction;
 	   <tr><td valign="top"><?php echo get_lang('GroupIntroduction'); ?>&nbsp;</td>
         <td>
    <?php
-         api_disp_html_area('content',$introduction,'300px');
+          require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+		$oFCKeditor = new FCKeditor('content') ;
+		$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+		$oFCKeditor->Height		= '300';
+		$oFCKeditor->Width		= '600';
+		$oFCKeditor->Value		= $introduction;
+		$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+		$oFCKeditor->ToolbarSet = "Survey";
+		
+		$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=mysql_result($result_sql,0,0);
+		$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+		
+		$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return;
    ?>
           <br>
         </td>

+ 23 - 2
main/survey/mcma.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: mcma.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: mcma.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -281,7 +281,28 @@ function checkLength(form){
 					</td>
 				</tr>
 				<tr class="form_bg"> 
-					<td width="542" height="30" colspan="2" ><?php  api_disp_html_area('enterquestion',stripslashes($enterquestion),'200px');?><!--<textarea name="enterquestion" id="enterquestion" cols="50" rows="6" class="text_field" style="width:100%;" ><?if(isset($_POST['enterquestion']))echo $_POST['enterquestion'];?></textarea>-->
+					<td width="542" height="30" colspan="2" >
+					<?php 
+					
+					 require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+					$oFCKeditor = new FCKeditor('enterquestion') ;
+					$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+					$oFCKeditor->Height		= '300';
+					$oFCKeditor->Width		= '400';
+					$oFCKeditor->Value		= stripslashes($enterquestion);
+					$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+					$oFCKeditor->ToolbarSet = "Survey";
+					
+					$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=mysql_result($result_sql,0,0);
+					$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+					
+					$return =	$oFCKeditor->CreateHtml();
+		
+		echo $return;
+					?>
 					</td>
 				</tr>
 			</table>

+ 23 - 2
main/survey/mcma_edit.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: mcma_edit.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: mcma_edit.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -182,7 +182,28 @@ if( isset($error_message) )
 					</td>
 				</tr>
 				<tr class="form_bg"> 
-					<td width="542" height="30" colspan="2" ><?php  api_disp_html_area('enterquestion',$rs->caption,'200px');?><!--<textarea name="enterquestion" id="enterquestion" cols="50" rows="6" class="text_field" style="width:100%;" ><?
+					<td width="542" height="30" colspan="2" >
+					<?php 
+					
+					 require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+					$oFCKeditor = new FCKeditor('enterquestion') ;
+					$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+					$oFCKeditor->Height		= '300';
+					$oFCKeditor->Width		= '300';
+					$oFCKeditor->Value		= $rs->caption;
+					$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+					$oFCKeditor->ToolbarSet = "Survey";
+					
+					$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=mysql_result($result_sql,0,0);
+					$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+					
+					$return =	$oFCKeditor->CreateHtml();
+					
+					echo $return;
+					
 					if(isset($_POST['enterquestion']))
 						echo $_POST['enterquestion'];
 						else

+ 25 - 2
main/survey/mcsa.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: mcsa.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: mcsa.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -272,7 +272,30 @@ function checkLength(form){
 					</td>
 				</tr>
 				<tr class="form_bg"> 
-					<td width="542" height="30" colspan="2" ><?php  api_disp_html_area('enterquestion',stripslashes($enterquestion),'200px');?><!--<textarea name="enterquestion" id="enterquestion" cols="50" rows="6" class="text_field" style="width:100%;"><?if(isset($_POST['enterquestion']))echo $_POST['enterquestion'];?></textarea>-->
+					<td width="542" height="30" colspan="2" >
+					<?php
+						
+						require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+						$oFCKeditor = new FCKeditor('enterquestion') ;
+						$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+						$oFCKeditor->Height		= '300';
+						$oFCKeditor->Width		= '400';
+						$oFCKeditor->Value		= stripslashes($enterquestion);
+						$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+						$oFCKeditor->ToolbarSet = "Survey";
+						
+						$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=mysql_result($result_sql,0,0);
+						$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+						
+						$return =	$oFCKeditor->CreateHtml();
+		
+						echo $return;
+						
+						?>
+						
 					</td>
 				</tr>
 			</table>

+ 22 - 7
main/survey/mcsa_edit.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: mcsa_edit.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: mcsa_edit.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -188,12 +188,27 @@ if( isset($error_message) )
 					</td>
 				</tr>
 				<tr class="form_bg"> 
-					<td width="542" height="30" colspan="2" ><?php  api_disp_html_area('enterquestion',$rs->caption,'200px');?><!-- <textarea name="enterquestion" id="enterquestion" cols="50" rows="6" class="text_field" style="width:100%;"><?
-					if(isset($_POST['enterquestion']))
-						echo $_POST['enterquestion'];
-						else
-						echo $rs->caption;
-					?></textarea>-->
+					<td width="542" height="30" colspan="2" >
+					<?php
+					 require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+					$oFCKeditor = new FCKeditor('enterquestion') ;
+					$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+					$oFCKeditor->Height		= '300';
+					$oFCKeditor->Width		= '600';
+					$oFCKeditor->Value		= $rs->caption;
+					$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+					$oFCKeditor->ToolbarSet = "Survey";
+					
+					$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=mysql_result($result_sql,0,0);
+					$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+					
+					$return =	$oFCKeditor->CreateHtml();
+					
+					echo $return;
+					?>
 					</td>
 				</tr>
 			</table>

+ 23 - 2
main/survey/numbered.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: numbered.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: numbered.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -238,7 +238,28 @@ function checkLength(form){
 					</td>
 				</tr>
 				<tr class="form_bg"> 
-					<td width="542" height="30" colspan="2" ><?php  api_disp_html_area('enterquestion',stripslashes($enterquestion),'200px');?><!-- <textarea name="enterquestion" id="enterquestion" cols="50" rows="6" class="text_field" style="width:100%;"><?if(isset($_POST['enterquestion']))echo $_POST['enterquestion'];?></textarea>-->
+					<td width="542" height="30" colspan="2" >
+					<?php
+
+						require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+						$oFCKeditor = new FCKeditor('enterquestion') ;
+						$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+						$oFCKeditor->Height		= '300';
+						$oFCKeditor->Width		= '400';
+						$oFCKeditor->Value		= stripslashes($enter_question);
+						$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+						$oFCKeditor->ToolbarSet = "Survey";
+						
+						$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=mysql_result($result_sql,0,0);
+						$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+						
+						$return =	$oFCKeditor->CreateHtml();
+		
+						echo $return;
+					?>
 					</td>
 				</tr>
 			</table>

+ 23 - 7
main/survey/numbered_edit.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: numbered_edit.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: numbered_edit.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -156,12 +156,28 @@ if( isset($error_message) )
 					</td>
 				</tr>
 				<tr class="form_bg"> 
-					<td width="542" height="30" colspan="2" ><?php  api_disp_html_area('enterquestion',$rs->caption,'200px');?><!-- <textarea name="enterquestion" id="enterquestion" cols="50" rows="6" class="text_field" style="width:75%;" ><?
-					if(isset($_POST['enterquestion']))
-						echo $_POST['enterquestion'];
-						else
-						echo $rs->caption;
-					?></textarea>-->
+					<td width="542" height="30" colspan="2" >
+					<?php
+
+						require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+						$oFCKeditor = new FCKeditor('enterquestion') ;
+						$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+						$oFCKeditor->Height		= '300';
+						$oFCKeditor->Width		= '400';
+						$oFCKeditor->Value		= $rs->caption;
+						$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+						$oFCKeditor->ToolbarSet = "Survey";
+						
+						$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=mysql_result($result_sql,0,0);
+						$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+						
+						$return =	$oFCKeditor->CreateHtml();
+		
+						echo $return;
+					?>
 					</td>
 				</tr>
 			</table>

+ 26 - 6
main/survey/open.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: open.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: open.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -195,11 +195,31 @@ align=center border=0>
   <TR class=white_bg>
     <TD height=30>Enter the question. </TD>
   </TR>
-  <TR class=form_bg>
-    <TD width=542 height=30><?php  api_disp_html_area('enterquestion','','200px');?><!-- <textarea name="enterquestion" id="enterquestion" cols="50" rows="6" class="text_field" style="width:100%;" ><?
-					if(isset($_POST['enterquestion']))
-						echo $_POST['enterquestion'];
-					?></textarea>--></TD></TR>
+  <tr class="form_bg"> 
+					<td width="542" height="30" colspan="2" >
+					<?php
+
+						require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+						$oFCKeditor = new FCKeditor('enterquestion') ;
+						$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+						$oFCKeditor->Height		= '300';
+						$oFCKeditor->Width		= '400';
+						$oFCKeditor->Value		= "";
+						$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+						$oFCKeditor->ToolbarSet = "Survey";
+						
+						$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=mysql_result($result_sql,0,0);
+						$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+						
+						$return =	$oFCKeditor->CreateHtml();
+		
+						echo $return;
+					?>
+					</td>
+				</tr>
  </TBODY></TABLE><BR>
 <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
   <TBODY>

+ 25 - 8
main/survey/open_edit.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: open_edit.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: open_edit.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -152,13 +152,30 @@ if( isset($error_message) )
 					</td>
 				</tr>
 				<tr class="form_bg"> 
-					<td width="542" height="30" colspan="2" ><?php  api_disp_html_area('enterquestion',$rs->caption,'200px');?><!-- <textarea name="enterquestion" id="enterquestion" cols="50" rows="6" class="text_field" style="width:100%;" ><?
-					if(isset($_POST['enterquestion']))
-						echo $_POST['enterquestion'];
-						else
-						echo $rs->caption;
-					?></textarea>-->
-					</TD></TR>
+					<td width="542" height="30" colspan="2" >
+					<?php
+
+						require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+						$oFCKeditor = new FCKeditor('enterquestion') ;
+						$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+						$oFCKeditor->Height		= '300';
+						$oFCKeditor->Width		= '400';
+						$oFCKeditor->Value		= $rs->caption;
+						$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+						$oFCKeditor->ToolbarSet = "Survey";
+						
+						$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=mysql_result($result_sql,0,0);
+						$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+						
+						$return =	$oFCKeditor->CreateHtml();
+		
+						echo $return;
+					?>
+					</td>
+				</tr>
 </TABLE><BR>
 <!-- <TABLE class=outerBorder_innertable cellSpacing=0 cellPadding=0 width="100%" 
 border=0>

+ 32 - 3
main/survey/survey_edit.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: survey_edit.php 10583 2007-01-02 14:47:19Z pcool $
+* 	@version $Id: survey_edit.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 /*
 ==============================================================================
@@ -300,7 +300,25 @@ december -->
 <tr><td valign="top"><?php echo get_lang('SurveyIntroduction'); ?>&nbsp;</td>
 <td>
 <?php
-   api_disp_html_area('content',$obj->intro,'300px');
+
+   require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+	$oFCKeditor = new FCKeditor('content') ;
+	$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+	$oFCKeditor->Height		= '300';
+	$oFCKeditor->Width		= '500';
+	$oFCKeditor->Value		= $obj->intro;
+	$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+	$oFCKeditor->ToolbarSet = "Survey";
+	
+	$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=mysql_result($result_sql,0,0);
+	$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+	
+	$return =	$oFCKeditor->CreateHtml();
+	
+	echo $return;
 ?>
  <br>
  </td>
@@ -308,7 +326,18 @@ december -->
  <tr><td valign="top"><?php echo get_lang('Thanks'); ?>&nbsp;</td>
 <td>
 <?php
-   api_disp_html_area('thanks',$obj->surveythanks,'200px');
+
+   require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+	$oFCKeditor = new FCKeditor('thanks') ;
+	$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+	$oFCKeditor->Height		= '300';
+	$oFCKeditor->Width		= '500';
+	$oFCKeditor->Value		= $obj->surveythanks;
+	$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+	$oFCKeditor->ToolbarSet = "Survey";
+	$return =	$oFCKeditor->CreateHtml();
+	
+	echo $return;
 ?>
  <br>
  </td>

+ 23 - 2
main/survey/yesno.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: yesno.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: yesno.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -228,7 +228,28 @@ function checkLength(form){
 					</td>
 				</tr>
 				<tr class="form_bg"> 
-					<td width="542" height="30" colspan="2" ><?php  api_disp_html_area('enterquestion',$enterquestion,'200px');?>
+					<td width="542" height="30" colspan="2" >
+					<?php
+
+						require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+						$oFCKeditor = new FCKeditor('enterquestion') ;
+						$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+						$oFCKeditor->Height		= '300';
+						$oFCKeditor->Width		= '400';
+						$oFCKeditor->Value		= $enterquestion;
+						$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+						$oFCKeditor->ToolbarSet = "Survey";
+						
+						$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=mysql_result($result_sql,0,0);
+						$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+						
+						$return =	$oFCKeditor->CreateHtml();
+			
+			echo $return;
+					?>
 					</td>
 				</tr>
 			</table>

+ 22 - 2
main/survey/yesno_edit.php

@@ -20,7 +20,7 @@
 /**
 *	@package dokeos.survey
 * 	@author 
-* 	@version $Id: yesno_edit.php 10584 2007-01-02 15:09:21Z pcool $
+* 	@version $Id: yesno_edit.php 10596 2007-01-05 14:09:55Z elixir_inter $
 */
 
 // name of the language file that needs to be included 
@@ -186,7 +186,27 @@ if( isset($error_message) )
 					<td class="form_text1" align="right">&nbsp;
 					</td>
 				<tr class="form_bg"> 
-					<td width="542" height="30" colspan="2" ><?php  api_disp_html_area('enterquestion',$rs->caption,'200px');?>
+					<td width="542" height="30" colspan="2" >
+					<?php
+						require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+						$oFCKeditor = new FCKeditor('enterquestion') ;
+						$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+						$oFCKeditor->Height		= '300';
+						$oFCKeditor->Width		= '400';
+						$oFCKeditor->Value		= $rs->caption;
+						$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+						$oFCKeditor->ToolbarSet = "Survey";
+						
+						$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=mysql_result($result_sql,0,0);
+						$oFCKeditor->Config['DefaultLanguage'] = $isocode_language;
+						
+						$return =	$oFCKeditor->CreateHtml();
+			
+			echo $return;
+					?>
 					</td>
 					<!--<textarea name="enterquestion" id="enterquestion" cols="50" rows="6" class="text_field" style="width:75%;"><?
 					if(isset($_POST['enterquestion']))