parent
c4a1e8eb1a
commit
e3fcfb1863
@ -1,21 +1,21 @@ |
|||||||
<?php |
<?php |
||||||
/* For licensing terms, see /license.txt */ |
/* For licensing terms, see /license.txt */ |
||||||
|
|
||||||
require_once '../inc/global.inc.php'; |
require_once '../inc/global.inc.php'; |
||||||
|
|
||||||
$allow = api_get_configuration_value('extra'); |
$allow = api_get_configuration_value('extra'); |
||||||
if (empty($allow)) { |
if (empty($allow)) { |
||||||
exit; |
exit; |
||||||
} |
} |
||||||
|
|
||||||
$table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
$table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||||
$comment = isset($_POST['inter_coment']) ? Database::escape_string($_POST['inter_coment']) : ''; |
$comment = isset($_POST['inter_coment']) ? Database::escape_string($_POST['inter_coment']) : ''; |
||||||
$date = isset($_POST['date']) ? Database::escape_string($_POST['date']) : ''; |
$date = isset($_POST['date']) ? Database::escape_string($_POST['date']) : ''; |
||||||
$level = isset($_POST['level']) ? Database::escape_string($_POST['level']) : ''; |
$level = isset($_POST['level']) ? Database::escape_string($_POST['level']) : ''; |
||||||
$ex_user_id = isset($_POST['ex_user_id']) ? Database::escape_string($_POST['ex_user_id']) : ''; |
$ex_user_id = isset($_POST['ex_user_id']) ? Database::escape_string($_POST['ex_user_id']) : ''; |
||||||
|
|
||||||
$sql = "INSERT INTO $table (exe_user_id,c_id,level,exe_date,inter_coment) |
$sql = "INSERT INTO $table (exe_user_id,c_id,level,exe_date,inter_coment) |
||||||
VALUES ('$ex_user_id','0','$level','$date', '$comment')"; |
VALUES ('$ex_user_id','0','$level','$date', '$comment')"; |
||||||
Database::query($sql); |
Database::query($sql); |
||||||
header("location: myStudents.php?student=$ex_user_id"); |
header("location: myStudents.php?student=$ex_user_id"); |
||||||
exit; |
exit; |
||||||
|
|||||||
@ -1,28 +1,28 @@ |
|||||||
<?php |
<?php |
||||||
/* For licensing terms, see /license.txt */ |
/* For licensing terms, see /license.txt */ |
||||||
|
|
||||||
require_once '../inc/global.inc.php'; |
require_once '../inc/global.inc.php'; |
||||||
|
|
||||||
$allow = api_get_configuration_value('extra'); |
$allow = api_get_configuration_value('extra'); |
||||||
if (empty($allow)) { |
if (empty($allow)) { |
||||||
exit; |
exit; |
||||||
} |
} |
||||||
|
|
||||||
$tbl_stats_exercices = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
$tbl_stats_exercices = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||||
|
|
||||||
$ex_idd = isset($_POST['exe_id']) ? (int) $_POST['exe_id'] : ''; |
$ex_idd = isset($_POST['exe_id']) ? (int) $_POST['exe_id'] : ''; |
||||||
$ex_user_id = isset($_POST['ex_user_id']) ? (int) $_POST['ex_user_id'] : ''; |
$ex_user_id = isset($_POST['ex_user_id']) ? (int) $_POST['ex_user_id'] : ''; |
||||||
$mod_no = isset($_POST['mod_no']) ? Database::escape_string($_POST['mod_no']) : ''; |
$mod_no = isset($_POST['mod_no']) ? Database::escape_string($_POST['mod_no']) : ''; |
||||||
$score_ex = isset($_POST['score_ex']) ? Database::escape_string($_POST['score_ex']) : ''; |
$score_ex = isset($_POST['score_ex']) ? Database::escape_string($_POST['score_ex']) : ''; |
||||||
$score_rep1 = isset($_POST['score_rep1']) ? Database::escape_string($_POST['score_rep1']) : ''; |
$score_rep1 = isset($_POST['score_rep1']) ? Database::escape_string($_POST['score_rep1']) : ''; |
||||||
$score_rep2 = isset($_POST['score_rep2']) ? Database::escape_string($_POST['score_rep2']) : ''; |
$score_rep2 = isset($_POST['score_rep2']) ? Database::escape_string($_POST['score_rep2']) : ''; |
||||||
$coment = isset($_POST['coment']) ? Database::escape_string($_POST['coment']) : ''; |
$coment = isset($_POST['coment']) ? Database::escape_string($_POST['coment']) : ''; |
||||||
$student_id = isset($_POST['student_id']) ? Database::escape_string($_POST['student_id']) : ''; |
$student_id = isset($_POST['student_id']) ? Database::escape_string($_POST['student_id']) : ''; |
||||||
|
|
||||||
$sql = "UPDATE $tbl_stats_exercices SET |
$sql = "UPDATE $tbl_stats_exercices SET |
||||||
mod_no='$mod_no', score_ex='$score_ex', score_rep1='$score_rep1', score_rep2='$score_rep2', coment='$coment' |
mod_no='$mod_no', score_ex='$score_ex', score_rep1='$score_rep1', score_rep2='$score_rep2', coment='$coment' |
||||||
WHERE exe_id = '$ex_idd' |
WHERE exe_id = '$ex_idd' |
||||||
"; |
"; |
||||||
Database::query($sql); |
Database::query($sql); |
||||||
header("location:../extra/myStudents.php?student=$student_id"); |
header("location:../extra/myStudents.php?student=$student_id"); |
||||||
exit; |
exit; |
||||||
|
|||||||
@ -1,18 +1,18 @@ |
|||||||
<?php |
<?php |
||||||
/* For licensing terms, see /license.txt */ |
/* For licensing terms, see /license.txt */ |
||||||
|
|
||||||
require_once '../inc/global.inc.php'; |
require_once '../inc/global.inc.php'; |
||||||
|
|
||||||
$allow = api_get_configuration_value('extra'); |
$allow = api_get_configuration_value('extra'); |
||||||
if (empty($allow)) { |
if (empty($allow)) { |
||||||
exit; |
exit; |
||||||
} |
} |
||||||
|
|
||||||
$table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
$table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
||||||
$ex_id = isset($_POST['exe_id']) ? (int) $_POST['exe_id'] : ''; |
$ex_id = isset($_POST['exe_id']) ? (int) $_POST['exe_id'] : ''; |
||||||
$student_id = isset($_POST['student_id']) ? (int) $_POST['student_id'] : ''; |
$student_id = isset($_POST['student_id']) ? (int) $_POST['student_id'] : ''; |
||||||
$inter_coment = isset($_POST['inter_coment']) ? Database::escape_string($_POST['inter_coment']) : ''; |
$inter_coment = isset($_POST['inter_coment']) ? Database::escape_string($_POST['inter_coment']) : ''; |
||||||
$sql = "UPDATE $table SET inter_coment='$inter_coment' WHERE exe_id = '$ex_id' "; |
$sql = "UPDATE $table SET inter_coment='$inter_coment' WHERE exe_id = '$ex_id' "; |
||||||
Database::query($sql); |
Database::query($sql); |
||||||
header("location:../extra/myStudents.php?student=$student_id"); |
header("location:../extra/myStudents.php?student=$student_id"); |
||||||
exit; |
exit; |
||||||
|
|||||||
Loading…
Reference in new issue