From 6a4f44df73e359a758fecff5a4b92cafbac39ebd Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Fri, 4 Aug 2023 20:42:40 +0800 Subject: [PATCH] Better information display for the student's assignment status. --- Course.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Course.php b/Course.php index 9ba9f86..d735c3f 100644 --- a/Course.php +++ b/Course.php @@ -153,7 +153,7 @@ if( $_SESSION['user_type'] == "Student") $att3=$row['Attachment_link_3']; $att4=$row['Attachment_link_4']; $labid=$row['Lab_Report_ID']; - + $days_remaining = date_diff(date_create($deadline), date_create())->format('%a days, %h hours, %i minutes'); $full_link = "$att1"; if($att2!=""){ @@ -166,10 +166,11 @@ if( $_SESSION['user_type'] == "Student") if($att4!=""){ $full_link= $full_link."| $att4"; } - echo "
+ echo "
+
Time left: $days_remaining
$title ($Marks Marks, $type)
$ins -
Posted:$posted   Deadline:$deadline        Submit
Attachments : $full_link
-
"; +
Posted:$posted   Deadline:$deadline        Submit
Attachments : $full_link
+
"; }} echo ""; @@ -198,7 +199,7 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St if(mysqli_num_rows($result)==0) { - echo "You missed no lab reports in this course."; + echo '
You missed no lab reports.
'; } else { while($row = mysqli_fetch_assoc($result)) { @@ -257,7 +258,7 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St if(mysqli_num_rows($resultx)==0) { - echo "You have no lab report submissions in this course."; + echo '
You have no unmarked submissions. Check the Marked tab for your marked submissions (if any).
'; } else { while($row = mysqli_fetch_assoc($resultx)) { @@ -381,7 +382,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen if(mysqli_num_rows($resultx)==0) { - echo "You have no marked submissions in this course"; + echo '
You have no marked submissions.
'; } else { while($row = mysqli_fetch_assoc($resultx)) { $title=$row['Lab_Title'];