Skip to content

Commit

Permalink
Course.php: the lab report was not appearing when groupid is empty, s…
Browse files Browse the repository at this point in the history
…o I corrected that
  • Loading branch information
tabithakipanga committed Jun 13, 2020
1 parent f5f5a57 commit 7a11cb6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Course.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@

while($row = mysqli_fetch_assoc($resultx1)) {$_SESSION['group_id']=$row['Course_Group_id'];}

if($group_id==""){$group_id=-1;}

$group_id=$_SESSION['group_id'];

if($group_id==""){$group_id=-1;}


$var="SELECT Type,Lab_Report_ID,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, lab_reports_table.Title, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4`
FROM `lab_reports_table` WHERE Course_ID=$course_id "
Expand Down Expand Up @@ -170,6 +170,9 @@
<div id="menu2" class="container tab-pane"><br>
<?php
$group_id=$_SESSION['group_id'];

if($group_id==""){$group_id=-1;}

$result = mysqli_query($con,"SELECT Lab_Report_ID,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, lab_reports_table.Title, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4`
FROM `lab_reports_table`
where
Expand Down Expand Up @@ -239,6 +242,8 @@
<div id="menu3" class="container tab-pane"><br>
<?php
$group_id=$_SESSION['group_id'];
if($group_id==""){$group_id=-1;}

$resultx = mysqli_query($con,"SELECT Lab_Report_ID,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, lab_reports_table.Title, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4`
FROM `lab_reports_table`
Expand Down

1 comment on commit 7a11cb6

@GuedaliaBonheurSPM
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done dear!

Please sign in to comment.