Course.php: better indent HTML code.
parent
26bf3ec359
commit
d0781cde08
15
Course.php
15
Course.php
|
@ -16,8 +16,7 @@ include 'Header.php';
|
|||
$c_date = date("Y-m-d H:i");
|
||||
|
||||
|
||||
if(!empty($_GET["url"]))
|
||||
{
|
||||
if(!empty($_GET["url"])) {
|
||||
$course_url = mysqli_real_escape_string($con, $_GET["url"]);
|
||||
$result = mysqli_query($con,"SELECT Course_ID, Course_Name, Academic_Year, Faculty, Lecturer_User_ID, TA_User_ID, Course_Code, URL, Verify_New_Members, users_table.Full_Name
|
||||
FROM courses_table
|
||||
|
@ -38,16 +37,22 @@ include 'Header.php';
|
|||
$url = $row['URL'];
|
||||
$course_id = $row['Course_ID'];
|
||||
// also get teaching assistant names (if any)
|
||||
$ta_result = mysqli_query($con, "SELECT Full_Name FROM users_table where User_ID in (select TA from course_ta where Course_ID='$course_id');");
|
||||
$ta_result = mysqli_query($con, "SELECT Full_Name FROM users_table WHERE User_ID IN (SELECT TA FROM course_ta WHERE Course_ID='$course_id');");
|
||||
if (mysqli_num_rows($ta_result) == 0) {
|
||||
echo " <div class='alert' style='border-bottom:2px solid #eee;'> Courses > ($code) $name > Assignments <br> <span style='font-size:8pt'>Faculty: $faculty Year: $academic Lecturer: $lecturer </span></div> ";
|
||||
echo "<div class='alert' style='border-bottom:2px solid #eee;'>
|
||||
Courses > ($code) $name > Assignments <br>
|
||||
<span style='font-size:8pt'>Faculty: $faculty Year: $academic Lecturer: $lecturer</span>
|
||||
</div>";
|
||||
} else {
|
||||
$ta_name = "";
|
||||
while ($row = mysqli_fetch_assoc($ta_result)) {
|
||||
$ta_name = $ta_name.$row['Full_Name']." ";
|
||||
}
|
||||
$ta_name = trim($ta_name);
|
||||
echo " <div class='alert' style='border-bottom:2px solid #eee;'> Courses > ($code) $name > Assignments <br> <span style='font-size:8pt'>Faculty: $faculty Year: $academic Lecturer: $lecturer Teaching Assistant: $ta_name </span></div> ";
|
||||
echo "<div class='alert' style='border-bottom:2px solid #eee;'>
|
||||
Courses > ($code) $name > Assignments <br>
|
||||
<span style='font-size:8pt'>Faculty: $faculty Year: $academic Lecturer: $lecturer Teaching Assistant: $ta_name</span>
|
||||
</div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue