[svn r22047] FS#2867 - The exercises tool: Eliminating the global variable $fck_attribute within the file feedback.php.

skala
Ivan Tcholakov 17 years ago
parent e9a06f6510
commit c4f34cb83d
  1. 28
      main/exercice/feedback.php
  2. 15
      main/inc/lib/formvalidator/FormValidator.class.php

@ -17,6 +17,7 @@
Tel. +32 (2) 211 34 56
*/
// Note by Ivan Tcholakov, 14-JUL-2009: I can't see where this file is used. Is it obsolete?
/**
* Feedback
@ -73,24 +74,21 @@ Display::display_header($nameTools,"Exercise");
{
echo "<tr><td width='10%'> ";
$ans = $objAnswerTmp->answer[$i];
$fck_attribute['Width'] = '600';
$fck_attribute['Height'] = '200';
$fck_attribute['ToolbarSet'] = 'Small'; //TODO: check where run? for customize buttons bar
$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();
$renderer->setElementTemplate(
'<tr>
<td align="left" style="" valign="top" width=30%>{label}
<!-- BEGIN required --><span style="color: #ff0000">*</span><!-- END required -->
</td>
<td align="left" width=70%>{element}
<!-- BEGIN error --><br /><span style="color: #ff0000;font-size:10px">{error}</span><!-- END error -->
</td>
</tr>'
);
$form->add_html_editor('Feedback',$i.'.'.$ans,false);
$renderer =& $obj_registration_form->defaultRenderer();
$renderer->setElementTemplate(
'<tr>
<td align="left" style="" valign="top" width=30%>{label}
<!-- BEGIN required --><span style="color: #ff0000">*</span><!-- END required -->
</td>
<td align="left" width=70%>{element}
<!-- BEGIN error --><br /><span style="color: #ff0000;font-size:10px">{error}</span><!-- END error -->
</td>
</tr>');
//TODO: Maybe another toolbar set would be better.
$form->add_html_editor('Feedback', $i.'.'.$ans, false, false, array('ToolbarSet' => 'Small', 'Width' => '600', 'Height' => '200'));
$form->display();
echo "</td>";
}?>

@ -151,6 +151,21 @@ EOT;
{
$html_type = $_SESSION['status'] == COURSEMANAGER ? TEACHER_HTML : STUDENT_HTML;
}
if (is_array($config))
{
if (isset($config['FullPage']))
{
$full_page = is_bool($config['FullPage']) ? $config['FullPage'] : ($config['FullPage'] === 'true');
}
else
{
$config['FullPage'] = $full_page;
}
}
else
{
$config = array('FullPage' => (bool) $full_page);
}
if($full_page)
{
$html_type = $_SESSION['status'] == COURSEMANAGER ? TEACHER_HTML_FULLPAGE : STUDENT_HTML_FULLPAGE;

Loading…
Cancel
Save