Courses.php: indent code
parent
6f689a2296
commit
0e22600816
48
Courses.php
48
Courses.php
|
@ -365,36 +365,36 @@ include 'Header.php';
|
||||||
WHERE course_ta.TA=$user_id");
|
WHERE course_ta.TA=$user_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mysqli_num_rows($result) != 0)
|
if (mysqli_num_rows($result) != 0) {
|
||||||
{
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
while($row = mysqli_fetch_assoc($result)) {
|
$id = $row['Course_ID'];
|
||||||
$id = $row['Course_ID'];
|
$name = $row['Course_Name'];
|
||||||
$name = $row['Course_Name'];
|
$code = $row['Course_Code'];
|
||||||
$code = $row['Course_Code'];
|
$faculty = $row['Faculty'];
|
||||||
$faculty = $row['Faculty'];
|
$lecturer = $row['Full_Name'];
|
||||||
$lecturer = $row['Full_Name'];
|
$academic = $row['Academic_Year'];
|
||||||
$academic = $row['Academic_Year'];
|
$url = $row['URL'];
|
||||||
$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");
|
||||||
|
$ta = "";
|
||||||
|
|
||||||
$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");
|
while ($rowTA = mysqli_fetch_assoc($resultTA)) {
|
||||||
|
$ta = $ta." ".$rowTA['TA_NAME'];
|
||||||
|
}
|
||||||
|
|
||||||
$ta = "";
|
if ($ta == "") {
|
||||||
while($rowTA = mysqli_fetch_assoc($resultTA)) {
|
$ta = " None";
|
||||||
$ta = $ta." ".$rowTA['TA_NAME'];
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($ta == "") {
|
|
||||||
$ta = " None";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
echo" <a href='~\..\Courses.php?course=$url'>
|
echo" <a href='~\..\Courses.php?course=$url'>
|
||||||
<div class='btn btn-default'>
|
<div class='btn btn-default'>
|
||||||
($code) - $name
|
($code) - $name
|
||||||
<p class='text-muted'><small> Faculty: $faculty Year: $academic Lecturer: $lecturer TA:$ta </small></p>
|
<p class='text-muted'><small> Faculty: $faculty Year: $academic Lecturer: $lecturer TA:$ta </small></p>
|
||||||
</div>
|
</div>
|
||||||
</a>";
|
</a>";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -404,11 +404,9 @@ include 'Header.php';
|
||||||
<br>
|
<br>
|
||||||
<b> Course joining requests </b>
|
<b> Course joining requests </b>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$lecturer_id= $_SESSION['user_id'];
|
$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 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
|
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'");
|
WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'");
|
||||||
|
|
Loading…
Reference in New Issue