dokeos-exercise
[ class tree: dokeos-exercise ] [ index: dokeos-exercise ] [ all elements ]

Source for file feedback.php

Documentation is available at feedback.php

  1. <?php
  2. /*
  3.     DOKEOS - elearning and course management software
  4.  
  5.     For a full list of contributors, see documentation/credits.html
  6.  
  7.     This program is free software; you can redistribute it and/or
  8.     modify it under the terms of the GNU General Public License
  9.     as published by the Free Software Foundation; either version 2
  10.     of the License, or (at your option) any later version.
  11.     See "documentation/licence.html" more details.
  12.  
  13.     Contact:
  14.         Dokeos
  15.         Rue des Palais 44 Paleizenstraat
  16.         B-1030 Brussels - Belgium
  17.         Tel. +32 (2) 211 34 56
  18. */
  19.  
  20.  
  21. /**
  22. *    Feedback
  23. *    @package dokeos.exercise
  24. *     @author
  25. *     @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
  26. */
  27. include('exercise.class.php');
  28. include('question.class.php');
  29. include('answer.class.php');
  30.  
  31. include('exercise.lib.php');
  32.  
  33. // name of the language file that needs to be included
  34. $language_file='exercice';
  35.  
  36. include("../inc/global.inc.php");
  37. $this_section=SECTION_COURSES;
  38.  
  39. include_once(api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
  40. include_once(api_get_path(LIBRARY_PATH).'document.lib.php');
  41. include_once(api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
  42. $nameTools=get_lang('ExerciseManagement');
  43. $interbreadcrumb[]=array("url" => "exercice.php","name" => get_lang('Exercices'));
  44. Display::display_header($nameTools,"Exercise");
  45. ?>
  46. <table border="0" align="center" cellpadding="2" cellspacing="2" width="100%">
  47. <h4>
  48.   <?php echo "Add Feedback"?>
  49. </h4>
  50. <?php
  51.     $id $_REQUEST['question'];
  52.     $objQuestionTmp Question::read($id);
  53.     echo "<tr><td><b>".get_lang('Question')." : </b>";
  54.     echo $objQuestionTmp->selectTitle();
  55.     echo "</td></tr>";
  56.     echo " <br><tr><td><b><br>".get_lang('Answer')." : </b></td></tr>";
  57.     $objAnswerTmp=new Answer($id);
  58.     $num $objAnswerTmp->selectNbrAnswers();
  59.     $objAnswerTmp->read();
  60.     for($i=1;$i<=$num;$i++)
  61.     {
  62.     echo "<tr><td width='10%'> ";
  63.     $ans =  $objAnswerTmp->answer[$i];
  64.     $fck_attribute['Width''600';
  65.     $fck_attribute['Height''200';
  66.     $fck_attribute['ToolbarSet''Small';
  67.     $fck_attribute['Config']['IMUploadPath''upload/test/';
  68.     $form new FormValidator('feedbackform','post',api_get_self()."?modifyQuestion=".$modifyQuestion."&newQuestion=".$newQuestion);
  69.     $obj_registration_form new HTML_QuickForm('frmRegistration''POST');
  70. $renderer =$obj_registration_form->defaultRenderer();
  71. $renderer->setElementTemplate(
  72.     '<tr>
  73.         <td align="left" style="" valign="top" width=30%>{label}
  74.             <!-- BEGIN required --><span style="color: #ff0000">*</span><!-- END required -->
  75.         </td>
  76.         <td align="left" width=70%>{element}
  77.             <!-- BEGIN error --><br /><span style="color: #ff0000;font-size:10px">{error}</span><!-- END error -->
  78.         </td>
  79.     </tr>'
  80. );
  81.     $form->add_html_editor('Feedback',$i.'.'.$ans,false);
  82.     $form->display();
  83.     echo "</td>";
  84.     }?>
  85.     <form name="frm" action="#" method="post">
  86.      Click Ok to finish <input  type="submit" value="Ok" />
  87.     </form>

Documentation generated on Thu, 12 Jun 2008 13:28:23 -0500 by phpDocumentor 1.4.1