From 4e66a3976ccf8e01a91671db2d49a1741f47cfae Mon Sep 17 00:00:00 2001 From: Jeannick94 Date: Sat, 17 Apr 2021 13:02:29 +0800 Subject: [PATCH 1/5] ENOCK JEANNICK OMAR bug41:need to be submitted by whom information. the system shows the information of the person that submit the assignement. --- Submissions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Submissions.php b/Submissions.php index 79bf09f..95ca05a 100644 --- a/Submissions.php +++ b/Submissions.php @@ -121,8 +121,9 @@ echo "
Date: Wed, 21 Apr 2021 20:11:09 +0800 Subject: [PATCH 2/5] Update Script.php Corrected the wrong spelling which was spelt as "happend" instead of "Happened". --- Script.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Script.php b/Script.php index f311050..c157078 100644 --- a/Script.php +++ b/Script.php @@ -131,7 +131,7 @@ if (!empty($_POST["frm_signup_2"])) { if ($con->query($sql) === TRUE) { header("Location: Courses.php"); } else { - echo "Something really bad (SQL insertion error) happend during sign up."; + echo "Something really bad (SQL insertion error) happened during sign up."; } } From cb0e4568ad13328ddbca570f1028acfbdbb31040 Mon Sep 17 00:00:00 2001 From: Jeannick94 <73539808+Jeannick94@users.noreply.github.com> Date: Thu, 29 Apr 2021 12:27:14 +0800 Subject: [PATCH 3/5] Update Submissions.php We replace "$names $submitted_std (GROUP) $groupname " with "$names ($submitted_std) for group $groupname"? We made variable names more descriptive by replacing submitted_std with submitter_student_number and also names with student_name --- Submissions.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Submissions.php b/Submissions.php index 95ca05a..c29bf23 100644 --- a/Submissions.php +++ b/Submissions.php @@ -160,19 +160,19 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub $att4=$row['Attachment4']; $labid=$row['Lab_Report_ID']; - $submitted_std=$row['Student_id']; + $submitter_student_number=$row['Student_id']; $submitted_group=$row['Course_Group_id']; $Submission_ID=$row['Submission_ID']; - $names=$row['Full_Name']; + $student_name=$row['Full_Name']; $groupname=$row['Group_Name']; $groupleader=$row['Group_Leader']; $student_id=$row['sub_std']; if($submitted_group==0) { - $submitted_by= $names."(".$student_id.")"; + $submitted_by= $student_name."(".$student_id.")"; } else { - $submitted_by="$names $submitted_std (GROUP) $groupname "; + $submitted_by="$student_name ($submitter_student_number) for group $groupname "; } $base_att1 = basename($att1); @@ -196,7 +196,7 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub echo "
$title
by: $submitted_by -
Submitted at $posted
Attachments : $full_link
+
Submitted : $posted
Attachments : $full_link
"; } @@ -256,17 +256,17 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Marked' Order by lab $att4=$row['Attachment4']; $labid=$row['Lab_Report_ID']; - $submitted_std=$row['Student_id']; + $submitter_student_number=$row['Student_id']; $submitted_group=$row['Course_Group_id']; $Submission_ID=$row['Submission_ID']; - $names=$row['Full_Name']; + $student_name=$row['Full_Name']; $student_id=$row['sub_std']; $Visibility=$row['Visibility']; $notes=$row['Notes']; if($submitted_group==0) { - $submitted_by= $names."(".$student_id.")"; + $submitted_by= $student_name."(".$student_id.")"; } else { $submitted_by="(GROUP) Group X " ; } @@ -352,16 +352,16 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'"); $remarking_reason=$row['Remarking_Reason']; - $submitted_std=$row['Student_id']; + $submitter_student_number=$row['Student_id']; $submitted_group=$row['Course_Group_id']; $Submission_ID=$row['Submission_ID']; - $names=$row['Full_Name']; + $student_name=$row['Full_Name']; $student_id=$row['sub_std']; $gname=$row['Group_Name ']; if($submitted_group==0) { - $submitted_by= $names."(".$student_id.")"; + $submitted_by= $student_name."(".$student_id.")"; } else { $submitted_by="(GROUP) $gname" ; } From aab5ce503aebf4830c5f66ab958b01fb2c9857f0 Mon Sep 17 00:00:00 2001 From: Jeannick94 Date: Wed, 5 May 2021 17:49:16 +0800 Subject: [PATCH 4/5] Mabasa, Samantha, and Nafis - Fixed Bug 201 Unable to download an attachment from a student's submission (file name containing commas) --- Download.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Download.php b/Download.php index 71b49bd..1b6e1f8 100644 --- a/Download.php +++ b/Download.php @@ -8,7 +8,7 @@ session_start(); // 修改这一行设置你的文件下载目录 $file = "./../../lrr_submission".$_GET['file']; -$filename = basename($file); +$filename =basename($file); // 判断文件是否存在 if(!file_exists($file)) die("File does not exist."); @@ -22,8 +22,9 @@ $time = time(); if ( (isset($_SESSION["user_student_id"]) && strpos($file, $_SESSION["user_student_id"])) || $_SESSION['user_type'] == "Lecturer" || $_SESSION['user_type'] == "TA") { // 发送文件头部 + header("Content-type: $type"); - header("Content-Disposition: attachment;filename=$filename"); + header('Content-Disposition: attachment;filename="'.urldecode($filename).'"' ); header("Content-Transfer-Encoding: binary"); header('Pragma: no-cache'); header('Expires: 0'); From 8b40765c1751c310b89a58c261fbad270300b30a Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Fri, 21 May 2021 14:55:55 +0800 Subject: [PATCH 5/5] Download.php: remove the redundant space before the closing parenthesis ')'. --- Download.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Download.php b/Download.php index 1b6e1f8..987a485 100644 --- a/Download.php +++ b/Download.php @@ -8,7 +8,7 @@ session_start(); // 修改这一行设置你的文件下载目录 $file = "./../../lrr_submission".$_GET['file']; -$filename =basename($file); +$filename = basename($file); // 判断文件是否存在 if(!file_exists($file)) die("File does not exist."); @@ -22,9 +22,8 @@ $time = time(); if ( (isset($_SESSION["user_student_id"]) && strpos($file, $_SESSION["user_student_id"])) || $_SESSION['user_type'] == "Lecturer" || $_SESSION['user_type'] == "TA") { // 发送文件头部 - header("Content-type: $type"); - header('Content-Disposition: attachment;filename="'.urldecode($filename).'"' ); + header('Content-Disposition: attachment;filename="'.urldecode($filename).'"'); header("Content-Transfer-Encoding: binary"); header('Pragma: no-cache'); header('Expires: 0');