SubmitLab.php: make the link text and link better by showing course name and by redirecting to the correct page after clicking
parent
71e835f3fd
commit
702f7ebb19
|
@ -22,6 +22,11 @@ include 'Header.php';
|
|||
$id = mysqli_real_escape_string($con, $_GET["id"]);
|
||||
$url = mysqli_real_escape_string($con, $_GET["url"]);
|
||||
|
||||
// Get course name
|
||||
$result0 = mysqli_query($con,"SELECT Course_Name FROM courses_table WHERE URL='$url'");
|
||||
$row = mysqli_fetch_assoc($result0);
|
||||
$course_name = $row['Course_Name'];
|
||||
|
||||
$result1 = mysqli_query($con," SELECT `Type`, `Lab_Report_ID`, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4` FROM `lab_reports_table` WHERE Lab_Report_ID=$id and Deadline > '$c_date' ORDER by Lab_Report_ID DESC");
|
||||
if(mysqli_num_rows($result1) == 0)
|
||||
{
|
||||
|
@ -43,7 +48,7 @@ include 'Header.php';
|
|||
$labid = $row['Lab_Report_ID'];
|
||||
$type = $row['Type'];
|
||||
|
||||
//----------------------------------Giving both the Group Admin and Group Members same priviledges to submit assignment--------------------------------------
|
||||
// Giving both the Group Admin and Group Members same priviledges to submit assignment
|
||||
if($type=="Group"){
|
||||
$resultx1 = mysqli_query($con,"SELECT Course_Group_id FROM `course_groups_table` WHERE (Course_id=$Course_ID) and ((Group_Member=$student_id ) or (Group_Member2=$student_id ) or (Group_Member3=$student_id ) or (Group_Member4=$student_id ) or (Group_Leader=$student_id))");
|
||||
while($row = mysqli_fetch_assoc($resultx1)) {
|
||||
|
@ -71,7 +76,7 @@ include 'Header.php';
|
|||
$full_link = $full_link."| <a href='~\..\Lab_Report_Assignments\\$att4'>$att4</a>";
|
||||
}
|
||||
|
||||
echo "<div><a href='~\..\Courses.php?course=$url'> Courses > $url > Submit > $title </a></div>";
|
||||
echo "<div><a href='~\..\Course.php?url=$url'> Courses > ($url) $course_name > $title </a></div>";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue