Course.php: better spacing; removed unused code: echo '<ul>';

Bug430-Eden2
Lan Hui 2023-08-23 20:49:00 +08:00
parent 1875028472
commit b477edca1b
1 changed files with 17 additions and 25 deletions

View File

@ -459,21 +459,15 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
<?php <?php
$result = mysqli_query($con," SELECT `ID`, course_group_members_table.Course_Group_id, `Student_ID`, $result = mysqli_query($con, "SELECT ID, course_group_members_table.Course_Group_id, Student_ID, Status,course_groups_table.Group_Name, course_groups_table.Course_id FROM course_group_members_table INNER JOIN course_groups_table ON course_groups_table.Course_Group_id=course_group_members_table.Course_Group_id WHERE Student_id=$student_id and course_groups_table.Course_id=$course_id");
`Status`,course_groups_table.Group_Name,course_groups_table.Course_id
FROM `course_group_members_table` INNER JOIN course_groups_table on
course_groups_table.Course_Group_id=course_group_members_table.Course_Group_id WHERE Student_id=$student_id and course_groups_table.Course_id=$course_id");
if(mysqli_num_rows($result)==0) if(mysqli_num_rows($result) == 0) {
{
echo "You have no group in this course."; echo "You have no group in this course.";
} else { } else {
while($row = mysqli_fetch_assoc($result)) { while($row = mysqli_fetch_assoc($result)) {
$name = $row['Group_Name']; $name = $row['Group_Name'];
$id = $row['Course_Group_id']; $id = $row['Course_Group_id'];
$status = $row['Status']; $status = $row['Status'];
$extra = " - <a href='#' class='' onclick='invite($id)'> Invite Others</a></small>"; $extra = " - <a href='#' class='' onclick='invite($id)'> Invite Others</a></small>";
if($status == "Invited") if($status == "Invited")
@ -514,9 +508,7 @@ where course_group_members_table.Course_Group_id=$id");
} else{ } else{
echo "<li class='list-group-item'><small> $name - $Student_ID ($status)</small>"; echo "<li class='list-group-item'><small> $name - $Student_ID ($status)</small>";
} }
} }
echo "<ul>";
} }
} }
?> ?>