From 25f9b4ff0f308b2b7acce3dcedc298dcb2acdc35 Mon Sep 17 00:00:00 2001 From: CloudStarTreck <37251906+Teecloudy@users.noreply.github.com> Date: Mon, 6 Apr 2020 23:45:30 +0800 Subject: [PATCH] Allowing all group member to submit assignment and allowing Lecture to Edit Assignments Two Issues have been Fixed 1)Firstly Only Group Admins were able to submit group assignments and the system was indicating to other members that they missed the deadline. This Problems was solved through the following stages: Create 4 new columns 'Member_ID1-4 Varchar(50) DEFAULT 0' in the database table 'course_group_table' (this will limit each group to max 5 members you can check the file Script.php from line 1071.) Changing the SQL query in SubmitLab.php to allow both Group Member and Group Admin to submit assignment. (However for this feature to take effect with backward compat, the group admin might need to invite other members again into the group or else they still wont be able to submit but all the group assignments will indicate that they have been submitted by the admin. For any new group after the update it works perfect.) Changing the Course.php allows other members to be updated once 1 member submit the assignment. 2)Secondly The Tutor couldnt modify assignments once posted. Adding an 'Edit' Button on the Tutor's page allows him to modify new and old assignment without any duplications. This feature afftected Courses.php from line 109. Group Ashly Tafadzwa Dhani 201632120150 Samantha Rusike 201632120140 --- Course.php | 14 +- Courses.php | 146 ++++++++++++--- Script.php | 416 +++++++++++++++++++++-------------------- SubmitLab.php | 16 +- homepage/overview.html | 33 ++-- lrr (1).sql | 156 +++++++++++++--- 6 files changed, 496 insertions(+), 285 deletions(-) diff --git a/Course.php b/Course.php index d0a61cf..5ba362d 100644 --- a/Course.php +++ b/Course.php @@ -103,11 +103,11 @@ WHERE course_group_members_table.Student_ID=$student_id and course_groups_table. $resultx1 = mysqli_query($con,$sql); -while($row = mysqli_fetch_assoc($resultx1)) {$group_id=$row['Course_Group_id'];} +while($row = mysqli_fetch_assoc($resultx1)) {$_SESSION['group_id']=$row['Course_Group_id'];} if($group_id==""){$group_id=-1;} - + $group_id=$_SESSION['group_id']; $var="SELECT Type,Lab_Report_ID,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, lab_reports_table.Title, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4` @@ -169,6 +169,7 @@ if(mysqli_num_rows($result1)==0)