From aab5ce503aebf4830c5f66ab958b01fb2c9857f0 Mon Sep 17 00:00:00 2001 From: Jeannick94 Date: Wed, 5 May 2021 17:49:16 +0800 Subject: [PATCH 1/6] 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'); -- 2.17.1 From 8b40765c1751c310b89a58c261fbad270300b30a Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Fri, 21 May 2021 14:55:55 +0800 Subject: [PATCH 2/6] 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'); -- 2.17.1 From 8fb4c893296c18a2b89856a16355d2ed47d96d0c Mon Sep 17 00:00:00 2001 From: enockkays Date: Fri, 21 May 2021 20:14:43 +0800 Subject: [PATCH 3/6] Enock Jeanick & Omar Bug 189 - students should be able to drop a course. http://118.25.96.118/bugzilla/show_bug.cgi?id=189. We Implemented a button that will enable students to drop a course in case they join a wrong course or something else. --- Course.php | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/Course.php b/Course.php index 60677ce..9af0b0a 100644 --- a/Course.php +++ b/Course.php @@ -99,6 +99,119 @@ if( $_SESSION['user_type'] == "Student") + + + +
  • + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + + + +
  • -- 2.17.1 From dd46a636115996c543bc55660f1bd74e8547df2d Mon Sep 17 00:00:00 2001 From: enockkays <32764779+enockkays@users.noreply.github.com> Date: Sat, 12 Jun 2021 17:26:06 +0800 Subject: [PATCH 4/6] Update Course.php Changed the Mysql connection names because at first we used the local server and forgot to change the details when pushing to gitHub. --- Course.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Course.php b/Course.php index 9af0b0a..6ab84f1 100644 --- a/Course.php +++ b/Course.php @@ -144,7 +144,7 @@ if( $_SESSION['user_type'] == "Student") Date: Sat, 12 Jun 2021 19:07:54 +0800 Subject: [PATCH 5/6] Update Course.php --- Course.php | 67 ++++++++++++++++-------------------------------------- 1 file changed, 20 insertions(+), 47 deletions(-) diff --git a/Course.php b/Course.php index 6ab84f1..5ad5d2e 100644 --- a/Course.php +++ b/Course.php @@ -100,17 +100,11 @@ if( $_SESSION['user_type'] == "Student") Marked - - -
  • - - - - - + +
  • + - +
  • - +
    - +
    - + + - - - - - -- 2.17.1 From d5fc7c425ef6c49ea848047001d1dd150c310a28 Mon Sep 17 00:00:00 2001 From: enockkays <32764779+enockkays@users.noreply.github.com> Date: Sat, 12 Jun 2021 19:09:43 +0800 Subject: [PATCH 6/6] Update Course.php --- Course.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Course.php b/Course.php index 5ad5d2e..d7683ef 100644 --- a/Course.php +++ b/Course.php @@ -139,7 +139,7 @@ if( $_SESSION['user_type'] == "Student")