Courses.php: indent code

Bug430-Eden2
Lan Hui 2023-09-06 19:50:32 +08:00
parent 6f689a2296
commit 0e22600816
1 changed files with 23 additions and 25 deletions

View File

@ -365,9 +365,8 @@ include 'Header.php';
WHERE course_ta.TA=$user_id");
}
if(mysqli_num_rows($result) != 0)
{
while($row = mysqli_fetch_assoc($result)) {
if (mysqli_num_rows($result) != 0) {
while ($row = mysqli_fetch_assoc($result)) {
$id = $row['Course_ID'];
$name = $row['Course_Name'];
$code = $row['Course_Code'];
@ -375,11 +374,13 @@ include 'Header.php';
$lecturer = $row['Full_Name'];
$academic = $row['Academic_Year'];
$url = $row['URL'];
$resultTA = mysqli_query($con,"SELECT `Course_ID`, `TA`,users_table.Full_Name as TA_NAME FROM `course_ta` INNER JOIN users_table on users_table.User_ID=course_ta.TA where course_ta.Course_ID=$id");
$resultTA = mysqli_query($con, "SELECT Course_ID, TA, users_table.Full_Name AS TA_NAME
FROM course_ta
INNER JOIN users_table ON users_table.User_ID=course_ta.TA
WHERE course_ta.Course_ID=$id");
$ta = "";
while($rowTA = mysqli_fetch_assoc($resultTA)) {
while ($rowTA = mysqli_fetch_assoc($resultTA)) {
$ta = $ta." ".$rowTA['TA_NAME'];
}
@ -394,7 +395,6 @@ include 'Header.php';
<p class='text-muted'><small> Faculty: $faculty &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Year: $academic &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lecturer: $lecturer &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TA:$ta </small></p>
</div>
</a>";
}
}
?>
@ -404,11 +404,9 @@ include 'Header.php';
<br>
<b> Course joining requests </b>
<?php
$lecturer_id= $_SESSION['user_id'];
$result = mysqli_query($con,"SELECT course_students_table.ID,users_table.Full_Name, courses_table.Course_ID, `Course_Name`, `Academic_Year`, `Faculty`, `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` FROM `courses_table`
$result = mysqli_query($con,"SELECT course_students_table.ID,users_table.Full_Name, courses_table.Course_ID, Course_Name, Academic_Year, Faculty, Lecturer_User_ID, TA_User_ID, Course_Code, URL, Verify_New_Members FROM courses_table
INNER JOIN course_students_table on course_students_table.Course_ID=courses_table.Course_ID
INNER JOIN users_table on users_table.Student_ID=course_students_table.Student_ID
WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'");