[svn r20860] add fckedito to hotspot see FS#4050

skala
Carlos Vargas 16 years ago
parent 8726cabb5a
commit 819d42c270
  1. 10
      main/exercice/exercise.lib.php
  2. 20
      main/exercice/hotspot_admin.inc.php

@ -1,4 +1,4 @@
<?php // $Id: exercise.lib.php 20843 2009-05-19 17:19:12Z cvargas1 $
<?php // $Id: exercise.lib.php 20860 2009-05-20 00:09:00Z cvargas1 $
/*
==============================================================================
@ -29,7 +29,7 @@
* shows a question and its answers
* @package dokeos.exercise
* @author Olivier Brouckaert <oli.brouckaert@skynet.be>
* @version $Id: exercise.lib.php 20843 2009-05-19 17:19:12Z cvargas1 $
* @version $Id: exercise.lib.php 20860 2009-05-20 00:09:00Z cvargas1 $
*/
/**
@ -315,12 +315,12 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it
$objAnswerTmp=new Answer($questionId);
$nbrAnswers=$objAnswerTmp->selectNbrAnswers();
$answer_list = '<div style="padding: 10px; margin-left: 0px; border: 1px solid #A4A4A4; height: 414px; width: 200px;"><b>'.get_lang('HotspotZones').'</b><ol>';
$answer_list = '<div style="padding: 10px; margin-left: 0px; border: 1px solid #A4A4A4; height: 390px; width: 200px;"><b>'.get_lang('HotspotZones').'</b><dl>';
for($answerId=1;$answerId <= $nbrAnswers;$answerId++)
{
$answer_list .= '<li>'.$objAnswerTmp->selectAnswer($answerId).'</li>';
$answer_list .= '<dt>'.$answerId.'.- '.$objAnswerTmp->selectAnswer($answerId).'</dt><br>';
}
$answer_list .= '</ol></div>';
$answer_list .= '</dl></div>';
if(!$onlyAnswers)
{

@ -309,10 +309,22 @@ if($modifyAnswers)
<tr>
<td valign="top"><div style="height: 15px; width: 15px; background-color: <?php echo $hotspot_colors[$i]; ?>"> </div></td>
<td valign="top" align="left"><input type="text" name="reponse[<?php echo $i; ?>]" value="<?php echo api_htmlentities($reponse[$i], ENT_QUOTES, api_get_system_encoding()); ?>" size="45" /></td>
<td align="left"><textarea wrap="virtual" rows="1" cols="25" name="comment[<?php echo $i; ?>]" style="width: 100%"><?php echo api_htmlentities($comment[$i], ENT_QUOTES, api_get_system_encoding()); ?></textarea></td>
<td valign="top"><input type="text" name="weighting[<?php echo $i; ?>]" size="5" value="<?php echo (isset($weighting[$i]) ? float_format($weighting[$i],1) : 10); ?>" />
<input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php echo (empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]); ?>" />
<input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="<?php echo (empty($hotspot_type[$i]) ? 'square' : $hotspot_type[$i]); ?>" /></td>
<?php
require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
$oFCKeditor = new FCKeditor("comment[$i]") ;
$content = $comment[$i];
$oFCKeditor->ToolbarSet = 'Answer';
$oFCKeditor->Config['ToolbarStartExpanded'] = 'false';
$oFCKeditor->Width = '100%';
$oFCKeditor->Height = '100';
$oFCKeditor->Value = $content;
$return = $oFCKeditor->CreateHtml();
/*<td align="left"><textarea wrap="virtual" rows="1" cols="25" name="comment[<?php echo $i; ?>]" style="width: 100%"><?php echo api_htmlentities($comment[$i], ENT_QUOTES, api_get_system_encoding()); ?></textarea></td>*/
?>
<td align="left"><?php echo $return; ?></td>
<td valign="top"><input type="text" name="weighting[<?php echo $i; ?>]" size="5" value="<?php echo (isset($weighting[$i]) ? float_format($weighting[$i],1) : 10); ?>" />
<input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php echo (empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]); ?>" />
<input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="<?php echo (empty($hotspot_type[$i]) ? 'square' : $hotspot_type[$i]); ?>" /></td>
</tr>
<?php

Loading…
Cancel
Save