update_intervention.php 656 B

123456789101112131415161718
  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. $table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
  9. $ex_id = isset($_POST['exe_id']) ? (int) $_POST['exe_id'] : '';
  10. $student_id = isset($_POST['student_id']) ? (int) $_POST['student_id'] : '';
  11. $inter_coment = isset($_POST['inter_coment']) ? Database::escape_string($_POST['inter_coment']) : '';
  12. $sql = "UPDATE $table SET inter_coment='$inter_coment' WHERE exe_id = $ex_id";
  13. Database::query($sql);
  14. header("location:../extra/myStudents.php?student=$student_id");
  15. exit;