diff --git a/Courses.php b/Courses.php
index 88d7ad3..ed7c864 100644
--- a/Courses.php
+++ b/Courses.php
@@ -139,7 +139,7 @@ New Date/Time
query($sql) === TRUE) {
- $_SESSION["info_Updated"]="Information Updated Successfull";
+ $_SESSION["info_updated"]="Assignment information updated successfully.";
} else {
echo "Error: " . $sql . "
" . $con->error;
@@ -253,9 +253,9 @@ Submission Type
echo "
Lab Report Assignment list
";
error_reporting(0);
- if(isset($_SESSION["info_Updated"])){
- echo '
' . $_SESSION['info_Updated'] . '
';
- $_SESSION['info_Updated'] = null;
+ if(isset($_SESSION["info_updated"])){
+ echo '
' . $_SESSION['info_updated'] . '
';
+ $_SESSION['info_updated'] = null;
}
if (isset($_SESSION['info_courses'])) {
echo '
' . $_SESSION['info_courses'] . '
';
diff --git a/Script.php b/Script.php
index 5adff14..a09609c 100644
--- a/Script.php
+++ b/Script.php
@@ -827,7 +827,13 @@ if(strlen($_FILES['attachment1']['name']) > 2 ) {
if ($con->query($sql1) === TRUE) {
}
-
+
+ // When $group_id is not properly initialized, use integer 0 as its value.
+ // This temporarily fixed the "Students unable to submit assignment after a recent change" bug at http://118.25.96.118/bugzilla/show_bug.cgi?id=65
+ if (trim($group_id) === '') { // when $group_id is an empty string or contains only whitespace characters.
+ $group_id = 0; // FIXME
+ }
+
$sql="INSERT INTO `lab_report_submissions`(`Submission_Date`, `Lab_Report_ID`, `Student_id`,"
. " `Course_Group_id`, `Attachment1`, `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Status`, `Title`,`Remarking_Reason`)"
. " VALUES ('$date',$lab_id,$student_id,$group_id,'$targetfile','$instructions','$targetfile2','$targetfile3','$targetfile4',"