From 2aa691bf87b0fa4cbfc085ef86ffa8e6cf472c3d Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 21:52:05 +0800 Subject: [PATCH 01/20] Courses.php: fix typo 'Invidual' --- Courses.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Courses.php b/Courses.php index e7ea2ee..51373a9 100644 --- a/Courses.php +++ b/Courses.php @@ -181,9 +181,9 @@ New Date/Time
Invidual Group"; + echo "Submission Type Individual Group"; } else { - echo "Submission Type Invidual Group"; + echo "Submission Type Individual Group"; } ?> @@ -238,7 +238,7 @@ New Date/Time

- Submission Type Invidual + Submission Type Individual Group
From c243f38af6ebcbcce24f58ee94dea190b119c74d Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 22:06:09 +0800 Subject: [PATCH 02/20] Remove Readme.txt as it is no longer useful. --- Readme.txt | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 Readme.txt diff --git a/Readme.txt b/Readme.txt deleted file mode 100644 index b28306e..0000000 --- a/Readme.txt +++ /dev/null @@ -1,5 +0,0 @@ -* Student Registration Process is now simplified, Student Passport/ID checking process skipped as there is nowhere find that information currently. The system now checks Student Passport / National ID from users’ tables instead of verifying from school database. - - - -* From 17b00178826bffd3607678937320bbf9c1589b93 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 22:10:50 +0800 Subject: [PATCH 03/20] homepage/installation.html: the first letter should be a capital letter. --- homepage/installation.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homepage/installation.html b/homepage/installation.html index e5f811f..38a54bf 100644 --- a/homepage/installation.html +++ b/homepage/installation.html @@ -89,7 +89,7 @@
1. Install Web server
- You need web server to run this web application. you can use any webserver that can run PHP Scripts. some good web servers include APACHE web server , XAMPP and easy PHP Server. + You need web server to run this web application. you can use any webserver that can run PHP Scripts. Some good web servers include APACHE web server, XAMPP and easy PHP Server.
From a883dda3f5cecfb1bbbd62d276476b4537995166 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 22:12:01 +0800 Subject: [PATCH 04/20] homepage/installation.html: a good example. --- homepage/installation.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homepage/installation.html b/homepage/installation.html index 38a54bf..216b0bb 100644 --- a/homepage/installation.html +++ b/homepage/installation.html @@ -101,7 +101,7 @@
- 4. Install Database Management tool to easily manage MYSQL databases. PhpMyAdmin is good example. + 4. Install Database Management tool to easily manage MYSQL databases. PhpMyAdmin is a good example.
From e64af95eee25c71fdd5e2120c45a18cee047d037 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 23:03:36 +0800 Subject: [PATCH 05/20] Admin.php: format code using visual studio code's PHP Intelephense. --- .vscode/extensions.json | 5 + Admin.php | 602 ++++++++++----------- Course.php | 1117 +++++++++++++++++++-------------------- 3 files changed, 823 insertions(+), 901 deletions(-) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..5570731 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "thamaraiselvam.remove-blank-lines" + ] +} \ No newline at end of file diff --git a/Admin.php b/Admin.php index fcbe519..0c8b4ca 100644 --- a/Admin.php +++ b/Admin.php @@ -1,367 +1,323 @@ -
-

Administration Panel

- -
+
+

Administration Panel

+
+ +
- - - - -
-

User Account Management


- - Lecturer / TA Accounts
- - - - - - -
+
+

User Account Management

+
+ Lecturer / TA Accounts
+
- - -

- - Create Lecturer/TA Accounts -
- - Full_Name - -Email - - - Passport_Number / ID (Used as Intial Password) - -
User Type : - Lecturer - T/A -
- +
-error_reporting(E_ALL); -if(isset($_SESSION['info_Admin_Users'])) { - echo '
'; - $_SESSION['info_Admin_Users']=null; -} -if(isset($_SESSION['info_Admin_Users'])) { - echo '
'; - $_SESSION['info_Admin_Users']=null; -} +

-?> + Create Lecturer/TA Accounts + + + Full_Name + + Email + - - -
+ Passport_Number / ID (Used as Intial Password) + +
User Type : + Lecturer + T/A +
+ '; + $_SESSION['info_Admin_Users'] = null; + } + if (isset($_SESSION['info_Admin_Users'])) { + echo '
'; + $_SESSION['info_Admin_Users'] = null; + } + ?> -
- - - - +
- - - - - -
-
- - -
- -
- - - -
- - - - -
- - - - - + + + + + + + +
- - -
- - - - - + +
+ +
+ +
+ + + + +
+ + + + +
+ +
+ + \ No newline at end of file diff --git a/Course.php b/Course.php index d7683ef..0dc6dbc 100644 --- a/Course.php +++ b/Course.php @@ -4,30 +4,28 @@ include 'NoDirectPhpAcess.php'; Courses > $name ($code) > Lab Reports
Faculty: $faculty | Year: $academic | Lecturer: $lecturer -
"; +
"; } else { $ta_name = ""; while ($row = mysqli_fetch_assoc($ta_result)) { - $ta_name = $ta_name.$row['Full_Name']." "; + $ta_name = $ta_name . $row['Full_Name'] . " "; } - $ta_name = trim ($ta_name); + $ta_name = trim($ta_name); echo " "; +
"; } } } @@ -54,79 +52,79 @@ if(!empty($_GET["url"])) ?>
- -'; - $_SESSION['info_ReMarking']=null; -} - -if (isset($_SESSION['info_courses'])) { - echo '
'; - $_SESSION['info_courses']=null; -} -?> - + + '; + $_SESSION['info_ReMarking'] = null; + } + + if (isset($_SESSION['info_courses'])) { + echo '
'; + $_SESSION['info_courses'] = null; + } + ?> +
+if ($_SESSION['user_type'] == "Student") { + +?>
-
- - +
-
@@ -134,523 +132,487 @@ if( $_SESSION['user_type'] == "Student")
-
- - -// Connect to MySQL database -$con = mysqli_connect("localhost", $mysql_username, $mysql_password, "lrr"); + + // Connect to MySQL database + $con = mysqli_connect("localhost", $mysql_username, $mysql_password, "lrr"); - - - - - - - - - -
- -
- +
- +
-

Class Groups

- -Class Groups - - echo " "; - - ?> - - - -
- Create Group"; + + ?> + + + +
+ Invite Others"; - - if($status=="Invited") - { - $extra2=" Accept"; - $extra3=" Decline"; - - } - echo "
$name ($status) $extra $extra2 $extra3
"; - - $rs2=mysqli_query($con,"SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID, + + if (mysqli_num_rows($result) == 0) { + echo "You have no Group in this Course"; + } else { + while ($row = mysqli_fetch_assoc($result)) { + $name = $row['Group_Name']; + $id = $row['Course_Group_id']; + $status = $row['Status']; + + + $extra = " - Invite Others"; + + if ($status == "Invited") { + $extra2 = " Accept"; + $extra3 = " Decline"; + } + echo "
$name ($status) $extra $extra2 $extra3
"; + + $rs2 = mysqli_query($con, "SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID, course_group_members_table.`Status`,users_table.Full_Name FROM `course_group_members_table` INNER JOIN users_table on users_table.Student_ID=course_group_members_table.Student_ID where course_group_members_table.Course_Group_id=$id"); - - while($row = mysqli_fetch_assoc($rs2)) { - $name=$row['Full_Name']; - $id=$row['Course_Group_id']; - $status=$row['Status']; - $Student_ID=$row['Student_ID']; - - - echo "
  • $name-$Student_ID ($status)
  • "; - - } - - - - - - - - } - } - ?> - - - - + while ($row = mysqli_fetch_assoc($rs2)) { + $name = $row['Full_Name']; + $id = $row['Course_Group_id']; + $status = $row['Status']; + $Student_ID = $row['Student_ID']; + + + echo "
  • $name-$Student_ID ($status)
  • "; + } + } + } + ?> + + + + +
    - + - + @@ -665,67 +627,68 @@ include 'Footer.php'; - + function remarking(data) { + + var details = prompt("Please enter your remarking reasons", ""); + + window.location.href = data + "&details=" + details; + } + \ No newline at end of file From 0fca11a8bde1641633183abb879d395847888a04 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 23:09:39 +0800 Subject: [PATCH 06/20] Overview.html and .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..600d2d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode \ No newline at end of file From 30359f4667d321ff84568e4fc35ea823ed564128 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 23:15:59 +0800 Subject: [PATCH 07/20] update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 600d2d3..c1ea37f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.vscode \ No newline at end of file +.vscode +homepage/Overview.html From a3606a2938b6853f7814d22f0627dd2dcf2c7816 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 23:20:27 +0800 Subject: [PATCH 08/20] udpate .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c1ea37f..dd9c765 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -.vscode +./.vscode homepage/Overview.html From 05fb239efe4ae31ea32aa29a29170a7d4f1a18a7 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 23:22:42 +0800 Subject: [PATCH 09/20] no .vscode --- .vscode/extensions.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 5570731..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "thamaraiselvam.remove-blank-lines" - ] -} \ No newline at end of file From 29426f102f986d7d854c93ad2df71729d3546ba2 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 23:23:34 +0800 Subject: [PATCH 10/20] update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dd9c765..c1ea37f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -./.vscode +.vscode homepage/Overview.html From 55753cc88fbd54793edd11005590e6c25c622e3d Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Mon, 18 Oct 2021 23:27:03 +0800 Subject: [PATCH 11/20] Courses.php: indent code. --- Course.php | 65 ------------------------------------------------------ 1 file changed, 65 deletions(-) diff --git a/Course.php b/Course.php index 0dc6dbc..8946d75 100644 --- a/Course.php +++ b/Course.php @@ -2,7 +2,6 @@ include 'NoDirectPhpAcess.php'; ?> - - - - - - - - "; } } echo ""; ?> - - - - - - @@ -555,13 +520,10 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen $count_groups = $row['Course_Group_id']; } - echo " "; ?> - -
    Invite Others"; if ($status == "Invited") { @@ -598,30 +559,21 @@ where course_group_members_table.Course_Group_id=$id"); $status = $row['Status']; $Student_ID = $row['Student_ID']; - echo "
  • $name-$Student_ID ($status)
  • "; } } } ?> - - - - - - - - @@ -629,10 +581,8 @@ include 'Footer.php'; - - + + + + + + - -