Course.php: better spacing; removed unused code: echo '<ul>';
parent
1875028472
commit
b477edca1b
12
Course.php
12
Course.php
|
@ -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>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue