Courses.php & Script.php: replace stdid with studentid

Bug430-Eden2
Lan Hui 2023-09-06 19:33:59 +08:00
parent 399ac535a5
commit 666ccd7260
2 changed files with 5 additions and 5 deletions

View File

@ -329,13 +329,13 @@ include 'Header.php';
INNER JOIN users_table on users_table.Student_ID=course_students_table.Student_ID INNER JOIN users_table on users_table.Student_ID=course_students_table.Student_ID
WHERE Course_ID=$course_id"); WHERE Course_ID=$course_id");
echo "<span id='dropstudents' style='display:none;'> <select name='stdid'>"; echo "<span id='dropstudents' style='display:none;'> <select name='studentid'>";
while($row = mysqli_fetch_assoc($resultx1)) while($row = mysqli_fetch_assoc($resultx1))
{ {
$stdid=$row['Student_ID']; $studentid=$row['Student_ID'];
$stdname=$row['Full_Name']; $stdname=$row['Full_Name'];
echo "<option value='$stdid'> $stdname($stdid) </option> "; echo "<option value='$studentid'> $stdname($studentid) </option> ";
} }
echo "</select><br>Reason <input type='text' name='reason'>" echo "</select><br>Reason <input type='text' name='reason'>"
. "<input type='hidden' name='url' value='$course_url'>" . "<input type='hidden' name='url' value='$course_url'>"

View File

@ -867,7 +867,7 @@ if (!empty($_GET["extenddeadline"])) {
$time = mysqli_real_escape_string($con, $_GET["time"]); $time = mysqli_real_escape_string($con, $_GET["time"]);
$type = mysqli_real_escape_string($con, $_GET["type"]); $type = mysqli_real_escape_string($con, $_GET["type"]);
$stdid = mysqli_real_escape_string($con, $_GET["stdid"]); $studentid = mysqli_real_escape_string($con, $_GET["studentid"]);
$reason = mysqli_real_escape_string($con, $_GET["reason"]); $reason = mysqli_real_escape_string($con, $_GET["reason"]);
$url = mysqli_real_escape_string($con, $_GET["url"]); $url = mysqli_real_escape_string($con, $_GET["url"]);
$deadline = $date . " " . $time; $deadline = $date . " " . $time;
@ -877,7 +877,7 @@ if (!empty($_GET["extenddeadline"])) {
} else { } else {
$sql = "INSERT INTO `extended_deadlines_table`(`Student_ID`, " $sql = "INSERT INTO `extended_deadlines_table`(`Student_ID`, "
. "`Lab_Report_ID`, `Extended_Deadline_Date`," . "`Lab_Report_ID`, `Extended_Deadline_Date`,"
. " `ReasonsForExtension`) VALUES ('$stdid','$id','$deadline','$reason')"; . " `ReasonsForExtension`) VALUES ('$studentid','$id','$deadline','$reason')";
} }
if ($con->query($sql) === TRUE) { if ($con->query($sql) === TRUE) {