From 29ad8f4499c8ed326c04254de27ef085df4a136b Mon Sep 17 00:00:00 2001 From: CloudStarTreck <37251906+Teecloudy@users.noreply.github.com> Date: Thu, 16 Apr 2020 14:46:43 +0800 Subject: [PATCH] Regression Test Failure with 4441 Upload Error Following the previous update, the system failed a regression test and reported a 4441 error while trying to submit a new Lab report. This was due to the condition added on line 298 in Course.php and reversing this change solved the problem. This condition was added to allow all Group members to be updated once the Tutor Marks the Lab Report but a better method to archieve this has been implemented on line 367 in Course.php --- Course.php | 29 +++++++++++++++++++---------- Script.php | 29 ++++++++++++++++++----------- index.php | 2 +- 3 files changed, 38 insertions(+), 22 deletions(-) diff --git a/Course.php b/Course.php index 5ba362d..a9d514b 100644 --- a/Course.php +++ b/Course.php @@ -295,7 +295,8 @@ lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_i FROM `lab_report_submissions` Left JOIN users_table on users_table.Student_ID=lab_report_submissions.Student_id left JOIN course_group_members_table on course_group_members_table.Course_Group_id=lab_report_submissions.Course_Group_id -where Lab_Report_ID=$lab_repo_id and lab_report_submissions.Student_id='$student_id' or lab_report_submissions.Course_Group_id='$group_id'"); +where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$student_id')"); +// or lab_report_submissions.Course_Group_id='$group_id' if(mysqli_num_rows($Sub_result)==0) { @@ -343,25 +344,33 @@ if(mysqli_num_rows($Sub_result)==0) - - - - - - - +