feedback.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. // Note by Ivan Tcholakov, 14-JUL-2009: I can't see where this file is used. Is it obsolete?
  4. /**
  5. * Feedback
  6. * @package chamilo.exercise
  7. * @author
  8. * @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
  9. */
  10. include("../inc/global.inc.php");
  11. $this_section=SECTION_COURSES;
  12. $nameTools = get_lang('ExerciseManagement');
  13. if (api_is_in_gradebook()) {
  14. $interbreadcrumb[]= array(
  15. 'url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php?'.api_get_cidreq(),
  16. 'name' => get_lang('ToolGradebook')
  17. );
  18. }
  19. $interbreadcrumb[]=array("url" => "exercise.php","name" => get_lang('Exercises'));
  20. Display::display_header($nameTools,"Exercises");
  21. ?>
  22. <table border="0" align="center" cellpadding="2" cellspacing="2" width="100%">
  23. <h4>
  24. <?php echo "Add Feedback"; ?>
  25. </h4>
  26. <?php
  27. $id = $_REQUEST['question'];
  28. $objQuestionTmp = Question::read($id);
  29. echo "<tr><td><b>".get_lang('Question')." : </b>";
  30. echo $objQuestionTmp->selectTitle();
  31. echo "</td></tr>";
  32. echo " <br><tr><td><b><br>".get_lang('Answer')." : </b></td></tr>";
  33. $objAnswerTmp=new Answer($id);
  34. $num = $objAnswerTmp->selectNbrAnswers();
  35. $objAnswerTmp->read();
  36. for($i=1;$i<=$num;$i++)
  37. {
  38. echo "<tr><td width='10%'> ";
  39. $ans = $objAnswerTmp->answer[$i];
  40. $form = new FormValidator('feedbackform','post',api_get_self()."?".api_get_cidreq()."&modifyQuestion=".$modifyQuestion."&newQuestion=".$newQuestion);
  41. $obj_registration_form = new HTML_QuickForm('frmRegistration', 'POST');
  42. $renderer =& $obj_registration_form->defaultRenderer();
  43. $renderer->setCustomElementTemplate(
  44. '<tr>
  45. <td align="left" style="" valign="top" width=30%>{label}
  46. <!-- BEGIN required --><span style="color: #ff0000">*</span><!-- END required -->
  47. </td>
  48. <td align="left" width=70%>{element}
  49. <!-- BEGIN error --><br /><span style="color: #ff0000;font-size:10px">{error}</span><!-- END error -->
  50. </td>
  51. </tr>');
  52. $form->addHtmlEditor('Feedback', $i.'.'.$ans, false, false, array('ToolbarSet' => 'TestAnswerFeedback', 'Width' => '600', 'Height' => '200'));
  53. $form->display();
  54. echo "</td>";
  55. }?>
  56. <form name="frm" action="javascript: void(0);" method="post">
  57. Click Ok to finish <input type="submit" value="Ok" />
  58. </form>