Lab Report Assignment list
";
+
+ error_reporting(0);
+ if(isset($_SESSION["info_Updated"])){
+ echo '
' . $_SESSION['info_Updated'] . '
';
+ $_SESSION['info_Updated'] = null;
+ }
+ if (isset($_SESSION['info_courses'])) {
+ echo '
' . $_SESSION['info_courses'] . '
';
+ $_SESSION['info_courses'] = null;
+ }
+ if (isset($_SESSION['info_courses'])) {
+ echo '
' . $_SESSION['info_courses'] . '
';
+ $_SESSION['info_courses']=null;
}
- }
- echo '
Lab Report Assignment list
";
- error_reporting(0);
- if (isset($_SESSION['info_Updated'])) {
- echo '
' .
- $_SESSION['info_Updated'] .
- '
';
- $_SESSION['info_Updated'] = null;
- }
- if (isset($_SESSION['info_courses'])) {
- echo '
' .
- $_SESSION['info_courses'] .
- '
';
- $_SESSION['info_courses'] = null;
- }
- if (isset($_SESSION['info_courses'])) {
- echo '
' .
- $_SESSION['info_courses'] .
- '
';
- $_SESSION['info_courses'] = null;
- }
-
- $result = mysqli_query(
- $con,
- ' SELECT `Lab_Report_ID`,Type,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, ' .
- "`Attachment_link_4` FROM `lab_reports_table` WHERE Course_ID=$id ORDER by Lab_Report_ID DESC"
- );
-
- if ($_SESSION['user_type'] == 'TA') {
- echo "
*Only Lecturer can post a new lab report assignment";
- }
- if (mysqli_num_rows($result) == 0) {
- echo 'No assignments posted so far.';
- } else {
- while ($row = mysqli_fetch_assoc($result)) {
- $marks = $row['Marks'];
- $title = $row['Title'];
- $ins = $row['Instructions'];
- $posted = $row['Posted_Date'];
- $deadline = $row['Deadline'];
- $att1 = $row['Attachment_link_1'];
- $att2 = $row['Attachment_link_2'];
- $att3 = $row['Attachment_link_3'];
- $att4 = $row['Attachment_link_4'];
- $id = $row['Lab_Report_ID'];
- $cours_id = $row['Course_ID'];
- $as_type = $row['Type'];
- $full_link = "
$att1";
-
- if ($att2 != '') {
- $full_link =
- $full_link .
- "  | 
$att2";
- }
- if ($att3 != '') {
- $full_link =
- $full_link .
- "  | 
$att3";
- }
-
- if ($att4 != '') {
- $full_link =
- $full_link .
- " |  
$att4";
- }
-
- $resultx1 = mysqli_query(
- $con,
- "Select Count(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id"
- );
- while ($row = mysqli_fetch_assoc($resultx1)) {
- $count_subs = $row['cnt'];
- }
-
- $resultx2 = mysqli_query(
- $con,
- "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Marks is not null"
- );
- if (mysqli_num_rows($resultx2) == 0) {
- $count_marked = 0;
- } else {
- while ($row = mysqli_fetch_assoc($resultx2)) {
- $count_marked = $row['cnt'];
+
+
+ $result = mysqli_query($con," SELECT `Lab_Report_ID`,Type,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, "
+ . "`Attachment_link_4` FROM `lab_reports_table` WHERE Course_ID=$id ORDER by Lab_Report_ID DESC");
+
+
+ if( $_SESSION['user_type']=="TA")
+ {
+ echo "
*Only Lecturer can post a new lab report assignment";
+ }
+ if(mysqli_num_rows($result)==0)
+ {
+ echo "No assignments posted so far.";
+
+ } else { while($row = mysqli_fetch_assoc($result)) {
+ $marks=$row['Marks'];
+ $title=$row['Title'];
+ $ins=$row['Instructions'];
+ $posted=$row['Posted_Date'];
+ $deadline=$row['Deadline'];
+ $att1=$row['Attachment_link_1'];
+ $att2=$row['Attachment_link_2'];
+ $att3=$row['Attachment_link_3'];
+ $att4=$row['Attachment_link_4'];
+ $id=$row['Lab_Report_ID'];
+ $cours_id=$row['Course_ID'];
+ $as_type=$row['Type'];
+ $full_link="
$att1";
+
+ if($att2!=""){
+ $full_link= $full_link."  | 
$att2";
}
- }
-
- $header =
- 'Courses > ' . $name . "($code) > Assignments > " . $title;
-
- echo "
+ if($att3!=""){
+ $full_link= $full_link."  | 
$att3";
+ }
+
+ if($att4!=""){
+ $full_link= $full_link." |  
$att4";
+ }
+
+
+
+
+ $resultx1 = mysqli_query($con,"Select Count(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id");
+ while($row = mysqli_fetch_assoc($resultx1)) {$count_subs=$row['cnt'];}
+
+ $resultx2 = mysqli_query($con,"Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Marks is not null");
+ if(mysqli_num_rows($resultx2)==0){$count_marked=0;} else { while($row = mysqli_fetch_assoc($resultx2)) {$count_marked =$row['cnt'];}}
+
+
+ $header="Courses > ".$name."($code) > Assignments > ".$title;
+
+ echo "
$title ($as_type)
$ins
-
Posted : $posted Deadline : $deadline ($marks Marks) " .
- '
' .
- " $count_subs Submissions ( $count_marked Marked ) Edit | View | Extend Deadline
Attachments : $full_link " .
- "
- ";
- }
- }
- echo '
';
+
Posted : $posted Deadline : $deadline ($marks Marks) "
+ . "
"
- $resultx1 = mysqli_query(
- $con,
- "SELECT course_students_table.Student_ID,users_table.Full_Name FROM
+ . " $count_subs Submissions ( $count_marked Marked ) Edit | View | Extend Deadline
Attachments : $full_link "
+ . "
+ ";
+
+
+
+ }}
+ echo "