edit_intervention.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once '../inc/global.inc.php';
  4. $allow = api_get_configuration_value('extra');
  5. if (empty($allow)) {
  6. exit;
  7. }
  8. api_block_anonymous_users();
  9. Display::display_header();
  10. $num = isset($_GET['num']) ? (int) $_GET['num'] : 0;
  11. $student_idd = isset($_GET['student_id']) ? (int) $_GET['student_id'] : 0;
  12. $tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
  13. ?>
  14. <form action="update_intervention.php" method="post" name="save_intercention">
  15. <table class='data_table'>
  16. <tr>
  17. <th colspan="4"><?php echo get_lang('Edit'); ?>
  18. <tr>
  19. <th><?php echo get_lang('Level'); ?></th>
  20. <th><?php echo get_lang('Date'); ?></th>
  21. <th><?php echo get_lang('interventions_commentaires'); ?></th>
  22. <th><?php echo get_lang('Action'); ?></th>
  23. </tr>
  24. <?php
  25. $sqlinter = "SELECT * FROM $tbl_stats_exercices WHERE exe_id = $num";
  26. $resultinter = Database::query($sqlinter);
  27. while ($a_inter = Database::fetch_array($resultinter)) {
  28. $level = $a_inter['level'];
  29. $mod_no = $a_inter['mod_no'];
  30. $score_ex = $a_inter['score_ex'];
  31. $inter_coment = stripslashes($a_inter['inter_coment']);
  32. echo "
  33. <tr>
  34. <td> ".$a_inter['level']."
  35. </td>
  36. <td>
  37. ".$a_inter['exe_date']."
  38. </td>";
  39. $exe_id = $a_inter['exe_id']; ?>
  40. <td>
  41. <textarea name="inter_coment" cols="65" rows="2">
  42. <?php echo $inter_coment; ?>
  43. </textarea>
  44. </td>
  45. <INPUT type=hidden name=exe_id value= <?php echo "$exe_id"; ?>/>
  46. <INPUT type=hidden name=student_id value= <?php echo "$student_idd"; ?>/>
  47. <td><input type="submit" value="Sauvegarder" name="B1"></td>
  48. </tr>
  49. <?php
  50. }
  51. ?>
  52. </table>
  53. </form>
  54. <?php
  55. Display::display_footer();