Courses.php: better spacing and better variable name (academic -> academic_year)

Bug430-Eden2
Lan Hui 2023-09-08 19:36:42 +08:00
parent aa349a8d6c
commit 5683013655
1 changed files with 11 additions and 12 deletions

View File

@ -567,8 +567,7 @@ include 'Header.php';
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
WHERE course_students_table.Student_ID=$student_id ORDER BY Academic_Year DESC, URL ASC"); WHERE course_students_table.Student_ID=$student_id ORDER BY Academic_Year DESC, URL ASC");
if(mysqli_num_rows($result)==0) if (mysqli_num_rows($result) == 0) {
{
echo "<i class='fa fa-exclamation-circle'></i> You are not enrolled in any Course"; echo "<i class='fa fa-exclamation-circle'></i> You are not enrolled in any Course";
} else { } else {
while($row = mysqli_fetch_assoc($result)) { while($row = mysqli_fetch_assoc($result)) {
@ -576,7 +575,7 @@ include 'Header.php';
$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_year = $row['Academic_Year'];
$url = $row['URL']; $url = $row['URL'];
$id = $row['Course_ID']; $id = $row['Course_ID'];
$Status = $row['Status']; $Status = $row['Status'];
@ -585,14 +584,14 @@ include 'Header.php';
{ {
echo "<a href='~\..\Course.php?url=$url'> <div class='btn btn-default' style='word-wrap:break-word'> echo "<a href='~\..\Course.php?url=$url'> <div class='btn btn-default' style='word-wrap:break-word'>
($code) - $name <br>($url) &nbsp;&nbsp;&nbsp; <i class='fa fa-check-circle'></i> $Status &nbsp;&nbsp;&nbsp;&nbsp; ($code) - $name <br>($url) &nbsp;&nbsp;&nbsp; <i class='fa fa-check-circle'></i> $Status &nbsp;&nbsp;&nbsp;&nbsp;
<br> <span style='font-size:8pt'>Faculty: $faculty &nbsp; Year: $academic &nbsp; Lecturer: $lecturer </span></div></a> <br> <span style='font-size:8pt'>Faculty: $faculty &nbsp; Year: $academic_year &nbsp; Lecturer: $lecturer </span></div></a>
"; ";
} }
else else
{ {
echo "<div class='btn btn-default'> echo "<div class='btn btn-default'>
($code) - $name <i class='btn btn-sm btn-danger'> $Status</i> ($code) - $name <i class='btn btn-sm btn-danger'> $Status</i>
<br> <span style='font-size:8pt'>Faculty: $faculty &nbsp; Year: $academic &nbsp; Lecturer: $lecturer </span></div> <br> <span style='font-size:8pt'>Faculty: $faculty &nbsp; Year: $academic_year &nbsp; Lecturer: $lecturer </span></div>
"; ";
} }
} }