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 201632120140SIMPLICITY_Bug-189_Course_Delete_btn
parent
4e2e7f96bb
commit
25f9b4ff0f
14
Course.php
14
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)
|
|||
|
||||
<div id="menu2" class="container tab-pane"><br>
|
||||
<?php
|
||||
$group_id=$_SESSION['group_id'];
|
||||
$result = mysqli_query($con,"SELECT 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`
|
||||
FROM `lab_reports_table`
|
||||
where
|
||||
|
@ -236,6 +237,7 @@ if(mysqli_num_rows($result)==0)
|
|||
</div>
|
||||
<div id="menu3" class="container tab-pane"><br>
|
||||
<?php
|
||||
$group_id=$_SESSION['group_id'];
|
||||
$resultx = mysqli_query($con,"SELECT 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`
|
||||
FROM `lab_reports_table`
|
||||
|
||||
|
@ -293,7 +295,7 @@ 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'");
|
||||
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)
|
||||
{
|
||||
|
@ -353,18 +355,18 @@ if(mysqli_num_rows($Sub_result)==0)
|
|||
|
||||
<div id="menu4" class="container tab-pane"><br>
|
||||
<?php
|
||||
|
||||
$group_id=$_SESSION['group_id'];
|
||||
$resultx = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_reports_table.`Lab_Report_ID`, `Student_id`, "
|
||||
. "`Course_Group_id`, `Notes`, lab_report_submissions.`Marks`,
|
||||
lab_report_submissions.Remarking_Reason,
|
||||
`Status`, lab_reports_table.Title Lab_Title,lab_reports_table.Marks Original_marks FROM `lab_report_submissions` "
|
||||
. "INNER JOIN lab_reports_table on lab_reports_table.Lab_Report_ID=lab_report_submissions.Lab_Report_ID "
|
||||
. "WHERE lab_report_submissions.Student_id='$student_id' and"
|
||||
. "WHERE lab_report_submissions.Student_id='$student_id' or lab_report_submissions.Course_Group_id='$group_id'and"
|
||||
. ""
|
||||
. ""
|
||||
. ""
|
||||
. " lab_reports_table.Lab_Report_ID in (select Lab_Report_ID from lab_report_submissions"
|
||||
. " where (Status='Marked' or Status='Remarking') and (Student_id=$student_id) and Course_ID=$course_id) ORDER by Submission_ID DESC");
|
||||
. " where (Status='Marked' or Status='Remarking') and (Student_id=$student_id or Course_Group_id=$group_id) and Course_ID=$course_id) ORDER by Submission_ID DESC");
|
||||
|
||||
|
||||
|
||||
|
|
146
Courses.php
146
Courses.php
|
@ -106,27 +106,121 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
|
|||
";
|
||||
|
||||
echo "<div class='col-md-5'>";
|
||||
|
||||
|
||||
|
||||
if( $_SESSION['user_type']=="Lecturer"){
|
||||
echo "<h3> Post new Lab Assignment </h3><form method='post' enctype='multipart/form-data' action='Script.php'>
|
||||
<input type='hidden' name='frm_uploadlab' value='true' required=''/>
|
||||
<input type='hidden' name='course_id' value='".$id."' required=''/>
|
||||
<input type='hidden' name='url' value='".$course_url."' required=''/>
|
||||
|
||||
Dealine Date/Time
|
||||
<div class='row'>
|
||||
<div class='col-md-7'><input type='date' id='date' name='deadlinedate' placeholder='' class='form-control' required=''> </div>
|
||||
<div class='col-md-5'> <input type='time' class='form-control' name='deadlinetime'> </div>
|
||||
}
|
||||
|
||||
// ------------------------------Editing Lab Assignment by Lecture------------------------------------
|
||||
|
||||
|
||||
if($_GET['act']=="edit"){
|
||||
$getid = $_GET["cid"];
|
||||
$result1 = mysqli_query($con, "SELECT * from lab_reports_table WHERE Lab_Report_ID = '$getid'");
|
||||
|
||||
while($row1 = mysqli_fetch_assoc($result1)) {
|
||||
$Deadline=$row1['Deadline'];
|
||||
$_SESSION['Date'] = strstr($Deadline, ' ', true);
|
||||
$_SESSION['Time'] = strstr($Deadline, ' ');
|
||||
$_SESSION['Instructions']=$row1['Instructions'];
|
||||
$_SESSION['Title']=$row1['Title'];
|
||||
$_SESSION['Marks']=$row1['Marks'];
|
||||
|
||||
}
|
||||
if(isset($_POST['frm_uploadlab'])){
|
||||
$deadlinedate=$_POST["deadlinedate"];
|
||||
$deadlinetime=$_POST["deadlinetime"];
|
||||
$instructions=$_POST["instructions"];
|
||||
$title=$_POST["title"];
|
||||
$marks=$_POST["marks"];
|
||||
$Deadline = $deadlinedate." ".$deadlinetime;
|
||||
$date= date("Y-m-d H:i");
|
||||
|
||||
$sql = "UPDATE `lab_reports_table` SET `Deadline` = ('" . $Deadline . "'), `Instructions` = ('" . $instructions . "'), `Title` = ('" . $title . "'), `Marks` = ('" . $marks . "') WHERE `lab_reports_table`.`Lab_Report_ID` = '$getid'";
|
||||
if ($con->query($sql) === TRUE) {
|
||||
$_SESSION["info_Updated"]="Information Updated Successfull";
|
||||
|
||||
} else {
|
||||
echo "Error: " . $sql . "<br>" . $con->error;
|
||||
}
|
||||
}
|
||||
if( $_SESSION['user_type']=="Lecturer"){
|
||||
$Date=$_SESSION['Date'];
|
||||
$Time=$_SESSION['Time'];
|
||||
$Instructions=$_SESSION['Instructions'];
|
||||
$Title=$_SESSION['Title'];
|
||||
$Marks=$_SESSION['Marks'];
|
||||
|
||||
|
||||
echo " <h3><a href='Courses.php?course=".$url."'> Editing Lab Assignment </a></h3>";
|
||||
?>
|
||||
<form method='post' enctype='multipart/form-data' action=''>
|
||||
<input type='hidden' name='frm_uploadlab' value='true' required=''/>
|
||||
<input type='hidden' name='course_id' value='<?php echo ".$id." ?>' required=''/>
|
||||
<input type='hidden' name='url' value='<?php echo ".$course_url." ?>' required=''/>
|
||||
|
||||
Dealine Date/Time
|
||||
<div class='row'>
|
||||
<div class='col-md-7'><input type='date' id='date' name='deadlinedate' placeholder='' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Date : ""; ?>"> </div>
|
||||
<div class='col-md-5'> <input type='time' class='form-control' name='deadlinetime' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Time : ""; ?>"> </div>
|
||||
</div>
|
||||
|
||||
Title
|
||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required=''>
|
||||
Instructions
|
||||
<textarea name='instructions' placeholder='Assignment Instructions' class='form-control' required=''></textarea>
|
||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Title : ""; ?>">
|
||||
Instructions
|
||||
<textarea name='instructions' placeholder='Assignment Instructions' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=='edit' ? $Instructions : ''; ?>"></textarea>
|
||||
Marks
|
||||
<input type='text' name='marks' placeholder='Marks' class='form-control' required=''>
|
||||
<input type='text' name='marks' placeholder='Marks' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Marks : ""; ?>">
|
||||
Attachment 1
|
||||
<input type='file' name='attachment1' placeholder='Attachment 1' class='form-control'>
|
||||
|
||||
Attachment 2
|
||||
<input type='file' name='attachment2' placeholder='Attachment 1' class='form-control'>
|
||||
|
||||
Attachment 3
|
||||
<input type='file' name='attachment3' placeholder='Attachment 1' class='form-control' >
|
||||
|
||||
|
||||
Attachment 4
|
||||
<input type='file' name='attachment4' placeholder='Attachment 4' class='form-control' >
|
||||
<br>
|
||||
Submission Type <input type='radio' name='type' value='Individual' required=''> Invidual
|
||||
|
||||
<input type='radio' name='type' value='Group' required=''> Group
|
||||
<hr>
|
||||
<input type='submit' class='btn btn-primary' value='Post Lab Assignment'><br>
|
||||
</form><br><br><br><br>
|
||||
<?php
|
||||
}}else{
|
||||
|
||||
// ------------------------------Posting New Lab Assignment------------------------------------
|
||||
|
||||
// Mysql to split 1 string into 2 similar to the tsrstr in php
|
||||
// SELECT SUBSTRING_INDEX(Deadline, ' ', 1) as Date, SUBSTRING_INDEX(Deadline, ' ', -1) as Time from lab_reports_table
|
||||
|
||||
if( $_SESSION['user_type']=="Lecturer"){
|
||||
|
||||
?>
|
||||
|
||||
<h3> Post new Lab Assignment </a></h3>
|
||||
|
||||
<form method='post' enctype='multipart/form-data' action='Script.php'>
|
||||
<?php
|
||||
$_SESSION['url']=$url;
|
||||
?>
|
||||
<input type='hidden' name='frm_uploadlab' value='true' required=''/>
|
||||
<input type='hidden' name='course_id' value='<?php echo ".$id." ?>' required=''/>
|
||||
<input type='hidden' name='url' value='<?php echo ".$course_url." ?>' required=''/>
|
||||
|
||||
Dealine Date/Time
|
||||
<div class='row'>
|
||||
<div class='col-md-7'><input type='date' id='date' name='deadlinedate' placeholder='' class='form-control' required='' value=""> </div>
|
||||
<div class='col-md-5'> <input type='time' class='form-control' name='deadlinetime' value=""> </div>
|
||||
</div>
|
||||
|
||||
Title
|
||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required='' value="">
|
||||
Instructions
|
||||
<textarea name='instructions' placeholder='Assignment Instructions' class='form-control' required='' value=""></textarea>
|
||||
Marks
|
||||
<input type='text' name='marks' placeholder='Marks' class='form-control' required='' value="">
|
||||
Attachment 1
|
||||
<input type='file' name='attachment1' placeholder='Attachment 1' class='form-control'>
|
||||
|
||||
|
@ -146,16 +240,20 @@ Submission Type <input type='radio' name='type' value='Individual' required=''>
|
|||
<hr>
|
||||
<input type='submit' class='btn btn-primary' value='Post Lab Assignment'><br>
|
||||
</form><br><br><br><br>
|
||||
";
|
||||
|
||||
}
|
||||
}
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='col-md-7'> <h3> Lab Report Assignment list </h3>";
|
||||
|
||||
error_reporting(0);
|
||||
if(isset($_SESSION["info_Updated"])){
|
||||
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_Updated'] . '</div>';
|
||||
$_SESSION['info_Updated'] = null;
|
||||
}
|
||||
if (isset($_SESSION['info_courses'])) {
|
||||
echo '<hr><div class="alert alert-info" role="alert">' . $_SESSION['info_courses'] . '</div>';
|
||||
$_SESSION['info_courses'] = null;
|
||||
|
@ -171,7 +269,7 @@ if (isset($_SESSION['info_courses'])) {
|
|||
$result = mysqli_query($con," SELECT `Lab_Report_ID`,Type,Marks, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, "
|
||||
. "`Attachment_link_4` FROM `lab_reports_table` WHERE Course_ID=$id ORDER by Lab_Report_ID DESC");
|
||||
|
||||
|
||||
|
||||
if( $_SESSION['user_type']=="TA")
|
||||
{
|
||||
echo "<b style='color:orange'>* Only Lecturers can Post new Lab report Assignments </b><br>";
|
||||
|
@ -191,6 +289,7 @@ if (isset($_SESSION['info_courses'])) {
|
|||
$att3=$row['Attachment_link_3'];
|
||||
$att4=$row['Attachment_link_4'];
|
||||
$id=$row['Lab_Report_ID'];
|
||||
$cours_id=$row['Course_ID'];
|
||||
$as_type=$row['Type'];
|
||||
$full_link="<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
|
||||
|
||||
|
@ -219,10 +318,11 @@ if (isset($_SESSION['info_courses'])) {
|
|||
|
||||
echo " <div class='break-word btn btn-default' style='word-wrap: break-word;border-color:grey;'>
|
||||
$title ($as_type) <br> $ins
|
||||
|
||||
<br> <span style='font-size:8pt'>Posted : $posted Deadline : <b> $deadline </b> ($marks Marks) "
|
||||
. "<br>"
|
||||
|
||||
. "<span class='btn-default'> $count_subs Submissions ( $count_marked Marked ) <a href='~\..\Submissions.php?id=$id&header=$header&total=$marks' onclick=''> View </a> | <a href='#' onclick='extend_deadline($id)'> Extend Deadline </a> </span> <hr> Attachments : $full_link </span>"
|
||||
. "<span class='btn-default'> $count_subs Submissions ( $count_marked Marked ) <a href='Courses.php?course=".$url."&act=edit&cid=".$id."'>Edit</a> | <a href='~\..\Submissions.php?id=$id&header=$header&total=$marks' onclick=''> View </a> | <a href='#' onclick='extend_deadline($id)'> Extend Deadline </a> </span> <hr> Attachments : $full_link </span>"
|
||||
. " </div>
|
||||
";
|
||||
|
||||
|
|
416
Script.php
416
Script.php
|
@ -505,11 +505,11 @@ $mkDir = "";
|
|||
$course_id=mysqli_real_escape_string($con,$_POST["course_id"]);
|
||||
$deadlinedate=$_POST["deadlinedate"];
|
||||
$deadlinetime=$_POST["deadlinetime"];
|
||||
$instructions=mysqli_real_escape_string($con,$_POST["instructions"]);
|
||||
$title=mysqli_real_escape_string($con,$_POST["title"]);
|
||||
$marks=mysqli_real_escape_string($con,$_POST["marks"]);
|
||||
$url=mysqli_real_escape_string($con,$_POST["url"]);
|
||||
|
||||
$instructions=mysqli_real_escape_string($con,$_POST["instructions"]);
|
||||
$title=mysqli_real_escape_string($con,$_POST["title"]);
|
||||
$marks=mysqli_real_escape_string($con,$_POST["marks"]);
|
||||
// $url=mysqli_real_escape_string($con,$_POST["url"]);
|
||||
$url=$_SESSION['url']; //using real_escape_string was failing to redirect to the main page
|
||||
$type=mysqli_real_escape_string($con,$_POST["type"]);
|
||||
|
||||
|
||||
|
@ -531,19 +531,6 @@ $mkDir = "";
|
|||
$targetfile4 = $target_dir.$rnd.$_FILES['attachment4']['name'];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//$curDateTime = date("Y-m-d H:i");
|
||||
//$myDate = date("Y-m-d H:i", strtotime("2017-12-28 18:01"));
|
||||
//if($curDateTime <= $myDate ){
|
||||
// echo "active ".+$curDateTime." mydate= ".$myDate;
|
||||
//
|
||||
//}else{
|
||||
// echo "inactive c=".$curDateTime;
|
||||
//}
|
||||
//
|
||||
|
||||
$count=0;
|
||||
|
||||
|
@ -618,12 +605,6 @@ $targetfile2="";
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// return;
|
||||
|
||||
|
@ -682,50 +663,48 @@ if($result>20)
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
// ############################### Submit Assignment ##################################
|
||||
if (!empty($_POST["frm_submitlab"])) {
|
||||
// ############################### Submit Assignment ##################################
|
||||
if (!empty($_POST["frm_submitlab"])) {
|
||||
|
||||
|
||||
|
||||
$lab_id=mysqli_real_escape_string($con,$_POST["lab_id"]);
|
||||
$student_id=$_POST["student_id"];
|
||||
$group_id=$_POST["group_id"];
|
||||
|
||||
$lab_id=mysqli_real_escape_string($con,$_POST["lab_id"]);
|
||||
$student_id=$_POST["student_id"];
|
||||
$group_id=$_POST["group_id"];
|
||||
|
||||
|
||||
$instructions=mysqli_real_escape_string($con,$_POST["instructions"]);
|
||||
$title=mysqli_real_escape_string($con,$_POST["title"]);
|
||||
|
||||
$url=mysqli_real_escape_string($con,$_POST["url"]);
|
||||
|
||||
|
||||
$deadline=$deadlinedate." ".$deadlinetime;
|
||||
$date= date("Y-m-d H:i");
|
||||
|
||||
|
||||
|
||||
// GET UPLOADED FILES
|
||||
|
||||
|
||||
|
||||
$labName = mysqli_query($con,"SELECT Title FROM `lab_reports_table` WHERE Lab_Report_ID=$lab_id");
|
||||
while($row = mysqli_fetch_assoc($labName)) {$lab_name=$row['Title'];}
|
||||
|
||||
|
||||
$target_dir =Create_dir("Lab_Report_Submisions/".$student_id."/".$lab_name."/");
|
||||
|
||||
|
||||
|
||||
$targetfile = $target_dir.$_FILES['attachment1']['name'];
|
||||
$targetfile2 = $target_dir.$_FILES['attachment2']['name'];
|
||||
$targetfile3 = $target_dir.$_FILES['attachment3']['name'];
|
||||
$targetfile4 = $target_dir.$_FILES['attachment4']['name'];
|
||||
|
||||
|
||||
$instructions=mysqli_real_escape_string($con,$_POST["instructions"]);
|
||||
$title=mysqli_real_escape_string($con,$_POST["title"]);
|
||||
|
||||
$url=mysqli_real_escape_string($con,$_POST["url"]);
|
||||
|
||||
|
||||
$deadline=$deadlinedate." ".$deadlinetime;
|
||||
$date= date("Y-m-d H:i");
|
||||
|
||||
|
||||
|
||||
// GET UPLOADED FILES
|
||||
|
||||
|
||||
|
||||
$labName = mysqli_query($con,"SELECT Title FROM `lab_reports_table` WHERE Lab_Report_ID=$lab_id");
|
||||
while($row = mysqli_fetch_assoc($labName)) {$lab_name=$row['Title'];}
|
||||
|
||||
|
||||
$target_dir =Create_dir("Lab_Report_Submisions/".$student_id."/".$lab_name."/");
|
||||
|
||||
|
||||
|
||||
$targetfile = $target_dir.$_FILES['attachment1']['name'];
|
||||
$targetfile2 = $target_dir.$_FILES['attachment2']['name'];
|
||||
$targetfile3 = $target_dir.$_FILES['attachment3']['name'];
|
||||
$targetfile4 = $target_dir.$_FILES['attachment4']['name'];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//$curDateTime = date("Y-m-d H:i");
|
||||
//$myDate = date("Y-m-d H:i", strtotime("2017-12-28 18:01"));
|
||||
|
@ -737,136 +716,142 @@ if($result>20)
|
|||
//}
|
||||
//
|
||||
|
||||
$count=0;
|
||||
|
||||
|
||||
|
||||
$count=0;
|
||||
|
||||
|
||||
//check zise
|
||||
if(!checksize("attachment1"))
|
||||
{
|
||||
echo "20 MB is the maximum file size allowed";
|
||||
return;
|
||||
}
|
||||
if(!checksize("attachment2") && $_FILES["attachment2"]["name"]!="")
|
||||
{
|
||||
echo "20 MB is the maximum file size allowed";
|
||||
return;
|
||||
}
|
||||
if(!checksize("attachment3") && $_FILES["attachment3"]["name"]!="")
|
||||
{
|
||||
echo "20 MB is the maximum file size allowed";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(!is_valid("attachment1"))
|
||||
{
|
||||
echo "Invalid File Type for Attachment 1";
|
||||
return;
|
||||
}
|
||||
if(!is_valid("attachment2") && $_FILES["attachment2"]["name"]!="")
|
||||
{
|
||||
echo "Invalid File Type for Attachment 2";
|
||||
return;
|
||||
}
|
||||
if(!is_valid("attachment3") && $_FILES["attachment3"]["name"]!="")
|
||||
{
|
||||
echo "Invalid File Type for Attachment 3";
|
||||
return;
|
||||
}
|
||||
|
||||
if($_FILES["attachment1"]["error"] != 0) {
|
||||
echo "Error uploading the file ";
|
||||
return;
|
||||
|
||||
|
||||
//check zise
|
||||
if(!checksize("attachment1"))
|
||||
{
|
||||
echo "20 MB is the maximum file size allowed";
|
||||
return;
|
||||
}
|
||||
if(!checksize("attachment2") && $_FILES["attachment2"]["name"]!="")
|
||||
{
|
||||
echo "20 MB is the maximum file size allowed";
|
||||
return;
|
||||
}
|
||||
if(!checksize("attachment3") && $_FILES["attachment3"]["name"]!="")
|
||||
{
|
||||
echo "20 MB is the maximum file size allowed";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(!is_valid("attachment1"))
|
||||
{
|
||||
echo "Invalid File Type for Attachment 1";
|
||||
return;
|
||||
}
|
||||
if(!is_valid("attachment2") && $_FILES["attachment2"]["name"]!="")
|
||||
{
|
||||
echo "Invalid File Type for Attachment 2";
|
||||
return;
|
||||
}
|
||||
if(!is_valid("attachment3") && $_FILES["attachment3"]["name"]!="")
|
||||
{
|
||||
echo "Invalid File Type for Attachment 3";
|
||||
return;
|
||||
}
|
||||
|
||||
if($_FILES["attachment1"]["error"] != 0) {
|
||||
echo "Error uploading the file ";
|
||||
return;
|
||||
}
|
||||
|
||||
// use 4 for missing file
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (move_uploaded_file($_FILES['attachment1']['tmp_name'], $targetfile)) {
|
||||
$count++;
|
||||
} else {
|
||||
echo $_FILES['attachment1']['error'];
|
||||
}
|
||||
|
||||
if (move_uploaded_file($_FILES['attachment2']['tmp_name'], $targetfile2)) {
|
||||
$count++;
|
||||
} else {
|
||||
echo $_FILES['attachment2']['error'];
|
||||
}
|
||||
|
||||
if (move_uploaded_file($_FILES['attachment3']['tmp_name'], $targetfile3)) {
|
||||
$count++;
|
||||
} else {
|
||||
echo $_FILES['attachment3']['error'];
|
||||
}
|
||||
|
||||
if (move_uploaded_file($_FILES['attachment4']['tmp_name'], $targetfile4)) {
|
||||
$count++;
|
||||
} else {
|
||||
echo $_FILES['attachment4']['error'];
|
||||
}
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
echo $count." File(s) uploaded";
|
||||
|
||||
//CLEAN
|
||||
$targetfile1="";
|
||||
$targetfile2="";
|
||||
$targetfile3="";
|
||||
$targetfile4="";
|
||||
|
||||
if(strlen($_FILES['attachment1']['name']) > 2 ) {
|
||||
$targetfile="/".$student_id."/".$lab_name."/".$_FILES['attachment1']['name'];
|
||||
}
|
||||
|
||||
if(strlen($_FILES['attachment2']['name']) > 2 ) {
|
||||
$targetfile2="/".$student_id."/".$lab_name."/".$_FILES['attachment2']['name']; }
|
||||
|
||||
if(strlen($_FILES['attachment3']['name']) > 2 ) {
|
||||
$targetfile3= "/".$student_id."/".$lab_name."/".$_FILES['attachment3']['name'];}
|
||||
|
||||
if(strlen($_FILES['attachment4']['name']) > 2 ) {
|
||||
$targetfile4= "/".$student_id."/".$lab_name."/".$_FILES['attachment4']['name'];
|
||||
}
|
||||
|
||||
|
||||
$sql1="Delete from lab_report_submissions where Lab_Report_ID=$lab_id and Student_id=$student_id and Course_Group_id=$group_id";
|
||||
if ($con->query($sql1) === TRUE) {
|
||||
}
|
||||
|
||||
if($group_id>0)
|
||||
{
|
||||
$student_id=0;
|
||||
}
|
||||
|
||||
$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',"
|
||||
. "'Pending','$title','')";
|
||||
|
||||
|
||||
|
||||
if ($con->query($sql) === TRUE) {
|
||||
|
||||
$_SESSION["info_courses"]=$type." Lab Report Assignment Submitted successfully.";
|
||||
header("Location: Course.php?url=".$url);
|
||||
|
||||
} else {
|
||||
echo "Error: <br>" . $con->error;
|
||||
|
||||
|
||||
if (move_uploaded_file($_FILES['attachment1']['tmp_name'], $targetfile)) {
|
||||
$count++;
|
||||
} else {
|
||||
echo $_FILES['attachment1']['error'];
|
||||
}
|
||||
}
|
||||
|
||||
if (move_uploaded_file($_FILES['attachment2']['tmp_name'], $targetfile2)) {
|
||||
$count++;
|
||||
} else {
|
||||
echo $_FILES['attachment2']['error'];
|
||||
}
|
||||
|
||||
if (move_uploaded_file($_FILES['attachment3']['tmp_name'], $targetfile3)) {
|
||||
$count++;
|
||||
} else {
|
||||
echo $_FILES['attachment3']['error'];
|
||||
}
|
||||
|
||||
if (move_uploaded_file($_FILES['attachment4']['tmp_name'], $targetfile4)) {
|
||||
$count++;
|
||||
} else {
|
||||
echo $_FILES['attachment4']['error'];
|
||||
}
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
echo $count." File(s) uploaded";
|
||||
|
||||
//CLEAN
|
||||
$targetfile1="";
|
||||
$targetfile2="";
|
||||
$targetfile3="";
|
||||
$targetfile4="";
|
||||
|
||||
if(strlen($_FILES['attachment1']['name']) > 2 ) {
|
||||
$targetfile="/".$student_id."/".$lab_name."/".$_FILES['attachment1']['name'];
|
||||
}
|
||||
|
||||
if(strlen($_FILES['attachment2']['name']) > 2 ) {
|
||||
$targetfile2="/".$student_id."/".$lab_name."/".$_FILES['attachment2']['name']; }
|
||||
|
||||
if(strlen($_FILES['attachment3']['name']) > 2 ) {
|
||||
$targetfile3= "/".$student_id."/".$lab_name."/".$_FILES['attachment3']['name'];}
|
||||
|
||||
if(strlen($_FILES['attachment4']['name']) > 2 ) {
|
||||
$targetfile4= "/".$student_id."/".$lab_name."/".$_FILES['attachment4']['name'];
|
||||
}
|
||||
|
||||
|
||||
$sql1="Delete from lab_report_submissions where Lab_Report_ID=$lab_id and Student_id=$student_id and Course_Group_id=$group_id";
|
||||
if ($con->query($sql1) === TRUE) {
|
||||
}
|
||||
|
||||
if($group_id>0)
|
||||
{
|
||||
$student_id=0;
|
||||
}
|
||||
|
||||
$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',"
|
||||
. "'Pending','$title','')";
|
||||
|
||||
|
||||
|
||||
if ($con->query($sql) === TRUE) {
|
||||
|
||||
$_SESSION["info_courses"]=$type." Lab Report Assignment Submitted successfully.";
|
||||
header("Location: Course.php?url=".$url);
|
||||
|
||||
} else {
|
||||
echo "Error: <br>" . $con->error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1053,10 +1038,7 @@ if($result>20)
|
|||
$sql="INSERT INTO `course_groups_table`(`Group_Name`,
|
||||
`Group_Leader`, `Course_id`) VALUES ('$name',$student_id,$id)";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($con->query($sql) === TRUE) {
|
||||
|
||||
|
@ -1086,7 +1068,7 @@ if($result>20)
|
|||
|
||||
|
||||
|
||||
#Create Group Request
|
||||
//---------------------------------------Invite Group Request and add a new member into the database------------------------------------
|
||||
|
||||
if (!empty($_GET["groupinvite"])) {
|
||||
|
||||
|
@ -1094,22 +1076,54 @@ if($result>20)
|
|||
$url=$_GET["url"];
|
||||
$courseid=$_GET["courseid"];
|
||||
$groupid=$_GET["groupid"];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(($_SESSION['Group_Member4']!='0') or ($_SESSION['Group_Member3']!='0') or ($_SESSION['Group_Member2']!='0') or ($_SESSION['Group_Member']!='0')){
|
||||
$sql="INSERT INTO `course_group_members_table`( `Course_Group_id`, `Student_ID`, `Status`)
|
||||
VALUES ($groupid,$student_id,'Invited')";
|
||||
if ($con->query($sql) === TRUE) {
|
||||
$_SESSION["info_ReMarking"]=$student_id . " was invited to the group";
|
||||
header("Location: Course.php?url=".$url);
|
||||
} else {
|
||||
echo "Error: " . $sql . "<br>" . $con->error;
|
||||
}
|
||||
|
||||
$resultx1 = mysqli_query($con,"SELECT * FROM course_groups_table where Course_Group_id ='$groupid'");
|
||||
|
||||
while($row = mysqli_fetch_assoc($resultx1))
|
||||
{
|
||||
$Group_Member=$row['Group_Member'];
|
||||
$Group_Member4=$row['Group_Member4'];
|
||||
$Group_Member2=$row['Group_Member2'];
|
||||
$Group_Member3=$row['Group_Member3'];
|
||||
$_SESSION['Group_Member4']=$Group_Member4;
|
||||
$_SESSION['Group_Member3']=$Group_Member3;
|
||||
$_SESSION['Group_Member2']=$Group_Member2;
|
||||
$_SESSION['Group_Member']=$Group_Member;
|
||||
|
||||
if($Group_Member=='0'){
|
||||
mysqli_query($con,"UPDATE `course_groups_table` SET `Group_Member` = ('" . $student_id . "') WHERE `course_groups_table`.`Course_Group_id` = '$groupid'");
|
||||
$_SESSION["info_ReMarking"]=$student_id . " was invited to the group";
|
||||
header("Location: Course.php?url=".$url);
|
||||
}elseif($Group_Member2=='0'){
|
||||
mysqli_query($con,"UPDATE `course_groups_table` SET `Group_Member2` = ('" . $student_id . "') WHERE `course_groups_table`.`Course_Group_id` = '$groupid'");
|
||||
$_SESSION["info_ReMarking"]=$student_id . " was invited to the group";
|
||||
header("Location: Course.php?url=".$url);
|
||||
}elseif($Group_Member3=='0'){
|
||||
mysqli_query($con,"UPDATE `course_groups_table` SET `Group_Member3` = ('" . $student_id . "') WHERE `course_groups_table`.`Course_Group_id` = '$groupid'");
|
||||
$_SESSION["info_ReMarking"]=$student_id . " was invited to the group";
|
||||
header("Location: Course.php?url=".$url);
|
||||
}elseif($Group_Member4=='0'){
|
||||
mysqli_query($con,"UPDATE `course_groups_table` SET `Group_Member4` = ('" . $student_id . "') WHERE `course_groups_table`.`Course_Group_id` = '$groupid'");
|
||||
$_SESSION["info_ReMarking"]=$student_id . " was invited to the group";
|
||||
header("Location: Course.php?url=".$url);
|
||||
} else {
|
||||
$_SESSION["info_ReMarking"]= " You cant add any more members";
|
||||
header("Location: Course.php?url=".$url);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ if(mysqli_num_rows($result1)==0)
|
|||
} else { while($row = mysqli_fetch_assoc($result1)) {
|
||||
|
||||
$Course_ID=$row['Course_ID'];
|
||||
$title=$row['Title'];
|
||||
$title=$row['Title'];
|
||||
$ins=$row['Instructions'];
|
||||
$posted=$row['Posted_Date'];
|
||||
$deadline=$row['Deadline'];
|
||||
|
@ -37,11 +37,14 @@ if(mysqli_num_rows($result1)==0)
|
|||
$labid=$row['Lab_Report_ID'];
|
||||
|
||||
$type=$row['Type'];
|
||||
if($type=="Group"){
|
||||
$resultx1 = mysqli_query($con,"SELECT Course_Group_id FROM `course_groups_table` WHERE Group_Leader=$student_id and Course_id=$Course_ID");
|
||||
while($row = mysqli_fetch_assoc($resultx1)) {$group_id=$row['Course_Group_id'];}
|
||||
|
||||
//----------------------------------Giving both Group Admin and Group Members same priviledges to submit assignment--------------------------------------
|
||||
if($type=="Group"){
|
||||
$resultx1 = mysqli_query($con,"SELECT Course_Group_id FROM `course_groups_table` WHERE (Course_id=$Course_ID) and ((Group_Member=$student_id ) or (Group_Member2=$student_id ) or (Group_Member3=$student_id ) or (Group_Member4=$student_id ) or(Group_Leader=$student_id))");
|
||||
while($row = mysqli_fetch_assoc($resultx1)) {
|
||||
$_SESSION["Group_ID"]=$row['Course_Group_id'];}
|
||||
|
||||
if($group_id<1)
|
||||
if($_SESSION["Group_ID"]<1)
|
||||
{
|
||||
echo" <center><h3> This Lab report can only be submitted by Group Admin </h3> </center> ";
|
||||
return;
|
||||
|
@ -93,6 +96,7 @@ if(mysqli_num_rows($result1)==0)
|
|||
|
||||
|
||||
}
|
||||
$Group_ID=$_SESSION["Group_ID"];
|
||||
?>
|
||||
|
||||
|
||||
|
@ -117,7 +121,7 @@ if(mysqli_num_rows($result1)==0)
|
|||
<input type='hidden' name='lab_id' value='<?php echo $id; ?>' required=''/>
|
||||
<input type='hidden' name='student_id' value='<?php echo $student_id; ?>' required=''/>
|
||||
|
||||
<input type='hidden' name='group_id' value='0' required=''/>
|
||||
<input type='hidden' name='group_id' value='<?php echo $Group_ID; ?>' required=''/>
|
||||
<input type='hidden' name='url' value='<?php echo $url; ?>' required=''/>
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
|
||||
</ul>
|
||||
<h3>Contact</h3>
|
||||
<h3>About us</h3>
|
||||
<ul>
|
||||
|
||||
<li><a href="contact.html">Contact us</a></li>
|
||||
|
@ -67,14 +67,13 @@
|
|||
<div class="tabsLeft">
|
||||
<ul>
|
||||
<ul>
|
||||
<li class="menubox"><a href="index.html" class="menubox">Home</a></li>
|
||||
<li><a href="overview.html" class="active">Overview</a></li>
|
||||
<li><a href="features.html" class="menubox">Features</a></li>
|
||||
<li class="menubox"><a href="index.html" class="menubox" >Home</a></li>
|
||||
<li ><a href="overview.html" class="active">Overview</a></li>
|
||||
<li ><a href="features.html" class="menubox">Features</a></li>
|
||||
<li><a href="screenshots.html" class="menubox">Screenshots</a></li>
|
||||
<li><a href="sourcecode.html" class="menubox">Source Code</a></li>
|
||||
<li><a href="issues.html" class="menubox">Issues</a></li>
|
||||
<li><a href="contact.html" class="menubox">Contact us</a></li>
|
||||
|
||||
<li><a href="issues.html" class="menubox">Issues</a></li>
|
||||
<li ><a href="contact.html" class="menubox">Contact us</a></li>
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
@ -86,24 +85,24 @@
|
|||
<h2>Overview</h2>
|
||||
|
||||
|
||||
LRRS is an open source lab report management software for college students.
|
||||
LRRS is an open-source lab report management software for college students.
|
||||
|
||||
|
||||
<br>
|
||||
The lab report repository system was developed for general purposes and used to replace old
|
||||
paperwork and email-based systems . This system increases the efficiency of lab report
|
||||
The lab report repository system is developing for general purpose and used to replace old
|
||||
paperwork and email based systems . This system increases the efficiency of lab report
|
||||
submission and result reporting for both lecturers and students.
|
||||
<br><br>
|
||||
|
||||
|
||||
The project was developed at ZJNU by Mohamed nor and El-mahdi houzi.
|
||||
The Project was developed at ZJNU by Mohamed nor and El-mahdi houzi.
|
||||
|
||||
The project was tested by some undergraduate students at the Zhejiang Normal University.
|
||||
The project was tested by some undergraduates classes at ZJNU.
|
||||
<br> The system is developed using client/server architecture and its compatible with both Linux and Microsoft Windows Operating Systems. The system was developed using PHP Scripting language and MySQL as database management system.
|
||||
|
||||
|
||||
|
||||
<br> The LRRS project has seen incredible improvements since it's development earlier 2019.
|
||||
<br> The LRRS project have seen incredible improvements since it's development earlier 2019.
|
||||
The software includes a lot of features that simplify assignment submission and grading.
|
||||
|
||||
|
||||
|
@ -111,15 +110,9 @@
|
|||
|
||||
|
||||
|
||||
For helpful hints about how to get the most out of this project, see <a href="quickstart.html"> Quick Start </a> Section.
|
||||
For helpful hints about how to get the most out of this project, see <a href="quickstart.html"> Quick Start</a>.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="pagefooter">
|
||||
<div class="footerlinks">
|
||||
|
|
156
lrr (1).sql
156
lrr (1).sql
|
@ -1,4 +1,11 @@
|
|||
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 4.9.2
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: 127.0.0.1
|
||||
-- Generation Time: Apr 06, 2020 at 05:27 PM
|
||||
-- Server version: 10.4.10-MariaDB
|
||||
-- PHP Version: 7.3.12
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET AUTOCOMMIT = 0;
|
||||
|
@ -15,6 +22,24 @@ SET time_zone = "+00:00";
|
|||
-- Database: `lrr`
|
||||
--
|
||||
|
||||
DELIMITER $$
|
||||
--
|
||||
-- Procedures
|
||||
--
|
||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `count_submissions` (OUT `s_count` DECIMAL) BEGIN
|
||||
select count(Student_id) into s_count from lab_report_submissions;
|
||||
|
||||
END$$
|
||||
|
||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAllListings` () BEGIN
|
||||
SELECT nid, type, title FROM node where type = 'lms_listing' order by nid desc;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `courses_table`
|
||||
--
|
||||
|
||||
|
@ -35,7 +60,9 @@ CREATE TABLE `courses_table` (
|
|||
--
|
||||
|
||||
INSERT INTO `courses_table` (`Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`, `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members`) VALUES
|
||||
(13, 'ASE', '2019', 'Computing', 21, 0, 'ASE2019', 'ASE20192019', '0');
|
||||
(10, 'Software Engineering', '2018', 'Computing', 8, 0, 'CSC1234', 'CSC12342018', '1'),
|
||||
(11, 'Project Management', '2019', 'Computing', 8, 0, 'P.M2019', 'P.M20192019', '0'),
|
||||
(12, 'Ashly Course Testing', '2020', 'Testing', 8, 0, 'Teecloudy', 'Teecloudy2020', '1');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -47,9 +74,21 @@ CREATE TABLE `course_groups_table` (
|
|||
`Course_Group_id` int(11) NOT NULL,
|
||||
`Group_Name` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Group_Leader` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Course_id` int(11) NOT NULL
|
||||
`Course_id` int(11) NOT NULL,
|
||||
`Group_Member` varchar(50) COLLATE utf8mb4_bin DEFAULT '0',
|
||||
`Group_Member2` varchar(50) COLLATE utf8mb4_bin DEFAULT '0',
|
||||
`Group_Member3` varchar(50) COLLATE utf8mb4_bin DEFAULT '0',
|
||||
`Group_Member4` varchar(50) COLLATE utf8mb4_bin DEFAULT '0'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
--
|
||||
-- Dumping data for table `course_groups_table`
|
||||
--
|
||||
|
||||
INSERT INTO `course_groups_table` (`Course_Group_id`, `Group_Name`, `Group_Leader`, `Course_id`, `Group_Member`, `Group_Member2`, `Group_Member3`, `Group_Member4`) VALUES
|
||||
(1, 'Group 1', '201825800050', 10, '', '', '', ''),
|
||||
(31, 'Testing1', '201825800050', 12, '201632120150', '201825800054', '2016321201502', '11');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
|
@ -63,6 +102,18 @@ CREATE TABLE `course_group_members_table` (
|
|||
`Status` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
--
|
||||
-- Dumping data for table `course_group_members_table`
|
||||
--
|
||||
|
||||
INSERT INTO `course_group_members_table` (`ID`, `Course_Group_id`, `Student_ID`, `Status`) VALUES
|
||||
(1, 1, '201825800050', 'Created'),
|
||||
(78, 29, '201632120150', 'Created'),
|
||||
(83, 31, '201825800050', 'Created'),
|
||||
(84, 31, '201632120150', 'Joined'),
|
||||
(85, 31, '201825800054', 'Invited'),
|
||||
(86, 31, '2016321201502', 'Joined');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
|
@ -81,7 +132,12 @@ CREATE TABLE `course_students_table` (
|
|||
--
|
||||
|
||||
INSERT INTO `course_students_table` (`Course_ID`, `Student_ID`, `ID`, `Status`) VALUES
|
||||
(13, '201825800051', 17, 'Joined');
|
||||
(9, '201825800050', 12, 'Joined'),
|
||||
(10, '201825800050', 13, 'Joined'),
|
||||
(10, '201825800054', 14, 'Joined'),
|
||||
(12, '201632120150', 15, 'Joined'),
|
||||
(12, '2016321201502', 16, 'Joined'),
|
||||
(12, '201825800050', 17, 'Joined');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -94,6 +150,15 @@ CREATE TABLE `course_ta` (
|
|||
`TA` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
--
|
||||
-- Dumping data for table `course_ta`
|
||||
--
|
||||
|
||||
INSERT INTO `course_ta` (`Course_ID`, `TA`) VALUES
|
||||
(10, 11),
|
||||
(10, 10),
|
||||
(11, 10);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
|
@ -105,7 +170,7 @@ CREATE TABLE `extended_deadlines_table` (
|
|||
`Student_ID` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Lab_Report_ID` int(11) DEFAULT NULL,
|
||||
`Extended_Deadline_Date` date DEFAULT NULL,
|
||||
`ReasonsForExtension` longtext COLLATE utf8mb4_bin
|
||||
`ReasonsForExtension` longtext COLLATE utf8mb4_bin DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
@ -119,12 +184,12 @@ CREATE TABLE `lab_reports_table` (
|
|||
`Course_ID` int(11) DEFAULT NULL,
|
||||
`Posted_Date` varchar(1000) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Deadline` varchar(1000) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Instructions` longtext COLLATE utf8mb4_bin,
|
||||
`Title` longtext COLLATE utf8mb4_bin,
|
||||
`Attachment_link_1` longtext COLLATE utf8mb4_bin,
|
||||
`Attachment_link_2` longtext COLLATE utf8mb4_bin,
|
||||
`Attachment_link_3` longtext COLLATE utf8mb4_bin,
|
||||
`Attachment_link_4` longtext COLLATE utf8mb4_bin,
|
||||
`Instructions` longtext COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Title` longtext COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Attachment_link_1` longtext COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Attachment_link_2` longtext COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Attachment_link_3` longtext COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Attachment_link_4` longtext COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Marks` varchar(10) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Type` varchar(30) COLLATE utf8mb4_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
@ -134,7 +199,12 @@ CREATE TABLE `lab_reports_table` (
|
|||
--
|
||||
|
||||
INSERT INTO `lab_reports_table` (`Lab_Report_ID`, `Course_ID`, `Posted_Date`, `Deadline`, `Instructions`, `Title`, `Attachment_link_1`, `Attachment_link_2`, `Attachment_link_3`, `Attachment_link_4`, `Marks`, `Type`) VALUES
|
||||
(4, 13, '2019-03-19 21:36', '2019-03-19 22:10', 'Lab1 Ass', 'Lab1', '', '', '', '', '10', 'Individual');
|
||||
(1, 10, '2019-01-11 16:52', '2019-02-11 17:00', 'Description of the lab....', 'Reading 1', '700IMPORTANT WORDS.txt', '', '', '', '4', 'Individual'),
|
||||
(2, 10, '2019-01-17 11:12', '2019-01-25 23:59', 'Read this paper http://sunnyday.mit.edu/16.355/budgen-david.pdf', 'Reading 2', '586LRR-Test-caseS.pdf', '', '', '', '6', 'Individual'),
|
||||
(3, 12, '2020-04-05 02:48', '2020-04-12 ', 'Do this assignment in time for testing', 'First Assignment Testing', '', '', '', '', '3', 'Group'),
|
||||
(4, 12, '2020-04-05 05:36', '2020-04-06 ', 'We are testing to see if the instructor can be able to modify the work', 'Second Assignment Testing', '', '', '', '', '3', 'Individual'),
|
||||
(5, 12, '2020-04-05 05:51', '2020-04-08 ', 'ASQDASDASCDD', 'Third Assignment Testingas', '', '', '', '', '3', 'Individual'),
|
||||
(6, 0, '2020-04-06 11:02', '2020-04-10 10:00', 'random', 'random', '', '', '', '', '3', 'Individual');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -148,23 +218,26 @@ CREATE TABLE `lab_report_submissions` (
|
|||
`Lab_Report_ID` int(11) DEFAULT NULL,
|
||||
`Student_id` varchar(200) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Course_Group_id` int(11) DEFAULT NULL,
|
||||
`Attachment1` longtext COLLATE utf8mb4_bin,
|
||||
`Notes` longtext COLLATE utf8mb4_bin,
|
||||
`Attachment1` longtext COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Notes` longtext COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Attachment2` varchar(1000) COLLATE utf8mb4_bin NOT NULL,
|
||||
`Attachment3` varchar(1000) COLLATE utf8mb4_bin NOT NULL,
|
||||
`Attachment4` varchar(1000) COLLATE utf8mb4_bin NOT NULL,
|
||||
`Marks` double DEFAULT NULL,
|
||||
`Status` varchar(100) COLLATE utf8mb4_bin NOT NULL,
|
||||
`Title` varchar(500) COLLATE utf8mb4_bin NOT NULL,
|
||||
`Visibility` varchar(30) COLLATE utf8mb4_bin NOT NULL DEFAULT 'Private'
|
||||
`Visibility` varchar(30) COLLATE utf8mb4_bin NOT NULL DEFAULT 'Private',
|
||||
`Remarking_Reason` varchar(100) COLLATE utf8mb4_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
--
|
||||
-- Dumping data for table `lab_report_submissions`
|
||||
--
|
||||
|
||||
INSERT INTO `lab_report_submissions` (`Submission_ID`, `Submission_Date`, `Lab_Report_ID`, `Student_id`, `Course_Group_id`, `Attachment1`, `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, `Status`, `Title`, `Visibility`) VALUES
|
||||
(10, '2019-03-19 21:37:00', 4, '201825800051', 0, 'logo.png', '@2019-03-19 21:38 : Good Bro@2019-03-19 21:42 : Ok wan arkay note kaaga danbe', '', '', '', 9, 'Marked', 'Lab1 Submission', 'Private');
|
||||
INSERT INTO `lab_report_submissions` (`Submission_ID`, `Submission_Date`, `Lab_Report_ID`, `Student_id`, `Course_Group_id`, `Attachment1`, `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, `Status`, `Title`, `Visibility`, `Remarking_Reason`) VALUES
|
||||
(1, '2019-01-17 00:00:00', 1, '201825800050', 0, 'Reading list.txt', '-', '', '', '', 5, 'Marked', 'Reading 1 submission', 'Public', ''),
|
||||
(5, '2019-01-21 08:31:00', 2, '201825800050', 0, 'Trial Balance.txt', ' - @2019-01-21 09:35 : Sorry I missed some details from your report', 'Boorka.jpg', '', '', 6, 'Marked', 'Submission x', 'Private', ''),
|
||||
(30, '2020-04-06 23:18:00', 3, '0', 31, '/2016321201502/First Assignment Testing/UR Diagram.pdf', '<br>@2020-04-06 23:19 : ', '', '', '', 3, 'Marked', 'First Assignment Testing', 'Private', '');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -178,6 +251,16 @@ CREATE TABLE `students_data` (
|
|||
`Passport_Number` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
--
|
||||
-- Dumping data for table `students_data`
|
||||
--
|
||||
|
||||
INSERT INTO `students_data` (`ID`, `Student_ID`, `Passport_Number`) VALUES
|
||||
(1, '201825800054', 'LJ7951632'),
|
||||
(2, '201825800050', 'P00581929'),
|
||||
(3, '201632120150', 'FN524516'),
|
||||
(4, '11', '11');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
|
@ -188,6 +271,7 @@ CREATE TABLE `users_table` (
|
|||
`User_ID` int(11) NOT NULL,
|
||||
`Email` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Password` varchar(250) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`HashPassword` varchar(250) COLLATE utf8mb4_bin NOT NULL,
|
||||
`Full_Name` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`UserType` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`Student_ID` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
|
@ -199,11 +283,16 @@ CREATE TABLE `users_table` (
|
|||
-- Dumping data for table `users_table`
|
||||
--
|
||||
|
||||
INSERT INTO `users_table` (`User_ID`, `Email`, `Password`, `Full_Name`, `UserType`, `Student_ID`, `Passport_Number`, `Status`) VALUES
|
||||
(15, 'admin@qq.com', 'admin@123', 'System Admin', 'Admin', NULL, NULL, 'Active'),
|
||||
(20, 'ahamednor@qq.com', 'm@123', 'Ahmed Nor', 'Student', '201825800051', 'P00581930', 'Active'),
|
||||
(21, 'lanhui@qq.com', '1234', 'Lanhui', 'Lecturer', NULL, '1234', 'Active'),
|
||||
(22, 'engmohamednor@gmail.com', '123', 'Ta1', 'TA', NULL, '123', 'Active');
|
||||
INSERT INTO `users_table` (`User_ID`, `Email`, `Password`, `HashPassword`, `Full_Name`, `UserType`, `Student_ID`, `Passport_Number`, `Status`) VALUES
|
||||
(3, 'admin@qq.com', '123', '', 'Kamal', 'Admin', '0', NULL, 'Active'),
|
||||
(8, 'lanhui@qq.com', '1234', '', 'Lanhui', 'Lecturer', NULL, '123', 'Active'),
|
||||
(9, 'mohamed@qq.com', '123', '', 'Mohamed', 'Student', '201825800050', 'P00581929', 'Active'),
|
||||
(10, 'mark@qq.com', '123', '', 'Mark ', 'TA', NULL, '123', 'Active'),
|
||||
(11, 'john@qq.com', '123', '', 'John', 'TA', NULL, '123', 'Active'),
|
||||
(12, 'mehdi@qq.com', '123', '', 'El-mehdi Houzi', 'Student', '201825800054', 'LJ7951632', 'Active'),
|
||||
(17, 'teecloudy@qq.com', '$2y$10$8WqSK7QI.3YCb2yoclqutOxyGxojncUvzhqLcE8zjlSvjBdcIQ18O', '', 'Ashly Tafadzwa Dhani', 'Student', '201632120150', NULL, 'Active'),
|
||||
(18, 'ashly@qq.com', 'Testing2', '', 'Ashly 2 Testing', 'Student', '2016321201502', NULL, 'Active'),
|
||||
(19, '11@11.11', 'dfdf', '760a8f4f392f1f6bc3ecb118365c6cd039b59fdce96122897d5157970d9c9c129bd73b3c402dbeedd8fe94d319df7bd7de0025c22839fec06631a025ec1e0e69', '11', 'Student', '11', '', 'Active');
|
||||
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
|
@ -272,47 +361,56 @@ ALTER TABLE `users_table`
|
|||
-- AUTO_INCREMENT for table `courses_table`
|
||||
--
|
||||
ALTER TABLE `courses_table`
|
||||
MODIFY `Course_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
|
||||
MODIFY `Course_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `course_groups_table`
|
||||
--
|
||||
ALTER TABLE `course_groups_table`
|
||||
MODIFY `Course_Group_id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
MODIFY `Course_Group_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `course_group_members_table`
|
||||
--
|
||||
ALTER TABLE `course_group_members_table`
|
||||
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
|
||||
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=91;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `course_students_table`
|
||||
--
|
||||
ALTER TABLE `course_students_table`
|
||||
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `extended_deadlines_table`
|
||||
--
|
||||
ALTER TABLE `extended_deadlines_table`
|
||||
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `lab_reports_table`
|
||||
--
|
||||
ALTER TABLE `lab_reports_table`
|
||||
MODIFY `Lab_Report_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
|
||||
MODIFY `Lab_Report_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `lab_report_submissions`
|
||||
--
|
||||
ALTER TABLE `lab_report_submissions`
|
||||
MODIFY `Submission_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
|
||||
MODIFY `Submission_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `students_data`
|
||||
--
|
||||
ALTER TABLE `students_data`
|
||||
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
|
||||
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `users_table`
|
||||
--
|
||||
ALTER TABLE `users_table`
|
||||
MODIFY `User_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;COMMIT;
|
||||
MODIFY `User_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
|
|
Loading…
Reference in New Issue