forked from mrlan/LRR
				
			Submissions.php: indent code
							parent
							
								
									4b278fbcd1
								
							
						
					
					
						commit
						431dee9699
					
				
							
								
								
									
										197
									
								
								Submissions.php
								
								
								
								
							
							
						
						
									
										197
									
								
								Submissions.php
								
								
								
								
							|  | @ -9,26 +9,21 @@ $student_id = $_SESSION["user_student_id"]; | ||||||
| $group_id = $_SESSION["user_group_id"]; | $group_id = $_SESSION["user_group_id"]; | ||||||
| $c_date = date("Y-m-d H:i"); | $c_date = date("Y-m-d H:i"); | ||||||
| 
 | 
 | ||||||
| if(!empty($_GET["id"])) | if (!empty($_GET["id"])) { | ||||||
| { |  | ||||||
|     $id = $_GET["id"]; |     $id = $_GET["id"]; | ||||||
|     $course_id = $id; |     $course_id = $id; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| if(!empty($_GET["header"])) | if (!empty($_GET["header"])) { | ||||||
| { |  | ||||||
|     $header = $_GET["header"]; |     $header = $_GET["header"]; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| if(!empty($_GET["total"])) | if (!empty($_GET["total"])) { | ||||||
| { |  | ||||||
|     $total = $_GET["total"]; |     $total = $_GET["total"]; | ||||||
| } else | } else { | ||||||
| { |  | ||||||
|     $total = 0; |     $total = 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|    |  | ||||||
| $resultx1 = mysqli_query($con, "SELECT `Lab_Report_ID`,Title, lab_reports_table.Course_ID, `Posted_Date`, `Deadline`, `Marks`, `Type` , courses_table.URL FROM `lab_reports_table` INNER JOIN courses_table ON courses_table.Course_ID=lab_reports_table.Course_ID WHERE Lab_Report_ID=$id"); | $resultx1 = mysqli_query($con, "SELECT `Lab_Report_ID`,Title, lab_reports_table.Course_ID, `Posted_Date`, `Deadline`, `Marks`, `Type` , courses_table.URL FROM `lab_reports_table` INNER JOIN courses_table ON courses_table.Course_ID=lab_reports_table.Course_ID WHERE Lab_Report_ID=$id"); | ||||||
| while ($row = mysqli_fetch_assoc($resultx1)) { | while ($row = mysqli_fetch_assoc($resultx1)) { | ||||||
|     $Report_Type = $row['Type']; |     $Report_Type = $row['Type']; | ||||||
|  | @ -37,9 +32,6 @@ while($row = mysqli_fetch_assoc($resultx1)) { | ||||||
|     $url = $row['URL']; |     $url = $row['URL']; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|   |  | ||||||
|    |  | ||||||
| echo "<div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='Courses.php?course=$url'>
 | echo "<div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='Courses.php?course=$url'>
 | ||||||
|  $header  |  $header  | ||||||
| </a></div> | </a></div> | ||||||
|  | @ -47,25 +39,17 @@ echo "<div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| <div class="row" style="width:80%;margin:auto; text-align:left;"> | <div class="row" style="width:80%;margin:auto; text-align:left;"> | ||||||
| 
 | 
 | ||||||
|      |  | ||||||
|      |  | ||||||
|   |  | ||||||
|      |  | ||||||
|     <!--    Lecturer  CODE--> |     <!--    Lecturer  CODE--> | ||||||
|     <?php |     <?php | ||||||
| 
 | 
 | ||||||
|     if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA") |     if ($_SESSION['user_type'] == "Lecturer" || $_SESSION['user_type'] == "TA") { | ||||||
|     { |  | ||||||
| 
 | 
 | ||||||
|     ?>
 |     ?>
 | ||||||
| 
 | 
 | ||||||
|         <div class="col-md-12"> |         <div class="col-md-12"> | ||||||
| 
 | 
 | ||||||
|      |  | ||||||
|      |  | ||||||
|             <?php |             <?php | ||||||
| 
 | 
 | ||||||
|             error_reporting(0); |             error_reporting(0); | ||||||
|  | @ -75,21 +59,37 @@ echo "<div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF | ||||||
|                 $_SESSION['info_Marking'] = null; |                 $_SESSION['info_Marking'] = null; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|             $resultx1 = mysqli_query($con, "Select Count(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id"); |             $resultx1 = mysqli_query($con, "Select Count(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id"); | ||||||
|         while($row = mysqli_fetch_assoc($resultx1)) {$count_subs=$row['cnt'];}     |             while ($row = mysqli_fetch_assoc($resultx1)) { | ||||||
|  |                 $count_subs = $row['cnt']; | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
|             $resultx2 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Marked'"); |             $resultx2 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Marked'"); | ||||||
|         if(mysqli_num_rows($resultx2)==0){$count_marked=0;} else { while($row = mysqli_fetch_assoc($resultx2)) {$count_marked =$row['cnt'];}}      |             if (mysqli_num_rows($resultx2) == 0) { | ||||||
|  |                 $count_marked = 0; | ||||||
|  |             } else { | ||||||
|  |                 while ($row = mysqli_fetch_assoc($resultx2)) { | ||||||
|  |                     $count_marked = $row['cnt']; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
|             $resultx3 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Pending'"); |             $resultx3 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Pending'"); | ||||||
|         if(mysqli_num_rows($resultx3)==0){$count_unmarked=0;} else { while($row = mysqli_fetch_assoc($resultx3)) {$count_unmarked =$row['cnt'];}}  |             if (mysqli_num_rows($resultx3) == 0) { | ||||||
|  |                 $count_unmarked = 0; | ||||||
|  |             } else { | ||||||
|  |                 while ($row = mysqli_fetch_assoc($resultx3)) { | ||||||
|  |                     $count_unmarked = $row['cnt']; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
|             $resultx4 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Remarking'"); |             $resultx4 = mysqli_query($con, "Select COUNT(*) as cnt from lab_report_submissions where lab_report_submissions.Lab_Report_ID=$id and Status='Remarking'"); | ||||||
|         if(mysqli_num_rows($resultx4)==0){$count_remark=0;} else { while($row = mysqli_fetch_assoc($resultx4)) {$count_remark =$row['cnt'];}}  |             if (mysqli_num_rows($resultx4) == 0) { | ||||||
| 
 |                 $count_remark = 0; | ||||||
|  |             } else { | ||||||
|  |                 while ($row = mysqli_fetch_assoc($resultx4)) { | ||||||
|  |                     $count_remark = $row['cnt']; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
|             ?>
 |             ?>
 | ||||||
| 
 | 
 | ||||||
|  | @ -107,7 +107,6 @@ echo "<div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF | ||||||
|                     <a class="nav-link" data-toggle="tab" href="#menu3">Re-Marking Requests <b>(<?php echo $count_remark; ?>)</b></a>
 |                     <a class="nav-link" data-toggle="tab" href="#menu3">Re-Marking Requests <b>(<?php echo $count_remark; ?>)</b></a>
 | ||||||
|                 </li> |                 </li> | ||||||
| 
 | 
 | ||||||
|      |  | ||||||
|                 <li class="nav-item"> |                 <li class="nav-item"> | ||||||
|                     <a class="nav-link" data-toggle="tab" href="#menu4"> View Course Groups</a> |                     <a class="nav-link" data-toggle="tab" href="#menu4"> View Course Groups</a> | ||||||
|                 </li> |                 </li> | ||||||
|  | @ -117,9 +116,7 @@ echo "<div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF | ||||||
| 
 | 
 | ||||||
|                     <?php |                     <?php | ||||||
| 
 | 
 | ||||||
|   |                     if ($Report_Type == "Group") { | ||||||
|         if($Report_Type=="Group") |  | ||||||
|         { |  | ||||||
|                         $result1 = mysqli_query($con, "SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 |                         $result1 = mysqli_query($con, "SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||||
|     lab_report_submissions.Course_Group_id, `Attachment1`, |     lab_report_submissions.Course_Group_id, `Attachment1`, | ||||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  |      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  | ||||||
|  | @ -128,9 +125,7 @@ FROM `lab_report_submissions` | ||||||
| Left JOIN users_table  on users_table.Student_ID=lab_report_submissions.Student_id | Left JOIN users_table  on users_table.Student_ID=lab_report_submissions.Student_id | ||||||
| left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id | left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id | ||||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Submission_Date desc");
 | where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Submission_Date desc");
 | ||||||
|         } |                     } else { | ||||||
|         else |  | ||||||
|         { |  | ||||||
|                         $result1 = mysqli_query($con, "SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 |                         $result1 = mysqli_query($con, "SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||||
|      lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`, |      lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`, | ||||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  |      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  | ||||||
|  | @ -141,15 +136,8 @@ left JOIN course_group_members_table on course_group_members_table.Course_Group_ | ||||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Submission_Date desc");
 | where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Submission_Date desc");
 | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
| 
 |                     if (mysqli_num_rows($result1) == 0) { | ||||||
|   |  | ||||||
|   |  | ||||||
|   |  | ||||||
|     |  | ||||||
|         if(mysqli_num_rows($result1)==0) |  | ||||||
|         { |  | ||||||
|                         echo "No Un-Marked Submissions for this Lab Report."; |                         echo "No Un-Marked Submissions for this Lab Report."; | ||||||
|       |  | ||||||
|                     } else { |                     } else { | ||||||
|                         while ($row = mysqli_fetch_assoc($result1)) { |                         while ($row = mysqli_fetch_assoc($result1)) { | ||||||
|                             $title = $row['Title']; |                             $title = $row['Title']; | ||||||
|  | @ -170,8 +158,7 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub | ||||||
|                             $groupleader = $row['Group_Leader']; |                             $groupleader = $row['Group_Leader']; | ||||||
|                             $student_id = $row['sub_std']; |                             $student_id = $row['sub_std']; | ||||||
| 
 | 
 | ||||||
|                 if($submitted_group==0) |                             if ($submitted_group == 0) { | ||||||
|                 { |  | ||||||
|                                 $submitted_by = $student_name . "(" . $student_id . ")"; |                                 $submitted_by = $student_name . "(" . $student_id . ")"; | ||||||
|                             } else { |                             } else { | ||||||
|                                 $submitted_by = "$student_name ($submitter_student_number) for group $groupname "; |                                 $submitted_by = "$student_name ($submitter_student_number) for group $groupname "; | ||||||
|  | @ -195,12 +182,10 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub | ||||||
|                                 $full_link = $full_link . " | <a href='~\..\Download.php?file=$att4&attachment=4'>$base_att4</a>"; |                                 $full_link = $full_link . " | <a href='~\..\Download.php?file=$att4&attachment=4'>$base_att4</a>"; | ||||||
|                             } |                             } | ||||||
| 
 | 
 | ||||||
|                                         |  | ||||||
|                             echo "   <k href='#'>   <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
 |                             echo "   <k href='#'>   <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
 | ||||||
|   $title  <br> by: <b> $submitted_by </b> |   $title  <br> by: <b> $submitted_by </b> | ||||||
|    <br> <span style='font-size:8pt'>Submitted : $posted   <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'>  Mark Submission</button><br> Attachments : $full_link </span>   |    <br> <span style='font-size:8pt'>Submitted : $posted   <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'>  Mark Submission</button><br> Attachments : $full_link </span>   | ||||||
| </div></k>";
 | </div></k>";
 | ||||||
|                  |  | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                     echo ""; |                     echo ""; | ||||||
|  | @ -210,14 +195,9 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub | ||||||
| 
 | 
 | ||||||
|                 <div id="menu2" class="container tab-pane"><br> |                 <div id="menu2" class="container tab-pane"><br> | ||||||
| 
 | 
 | ||||||
|         |  | ||||||
|             |  | ||||||
|             |  | ||||||
|                     <?php |                     <?php | ||||||
| 
 | 
 | ||||||
|            |                     if ($Report_Type == "Group") { | ||||||
|         if($Report_Type=="Group") |  | ||||||
|         { |  | ||||||
|                         $result = mysqli_query($con, "SELECT `Submission_ID`,Visibility, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 |                         $result = mysqli_query($con, "SELECT `Submission_ID`,Visibility, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||||
|     lab_report_submissions.Course_Group_id, `Attachment1`, |     lab_report_submissions.Course_Group_id, `Attachment1`, | ||||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  |      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  | ||||||
|  | @ -225,9 +205,7 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub | ||||||
| FROM `lab_report_submissions` | FROM `lab_report_submissions` | ||||||
| left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id | left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id | ||||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Marked'");
 | where Lab_Report_ID=$id and lab_report_submissions.Status='Marked'");
 | ||||||
|         } |                     } else { | ||||||
|         else |  | ||||||
|         { |  | ||||||
|                         $result = mysqli_query($con, "SELECT `Submission_ID`,Visibility, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 |                         $result = mysqli_query($con, "SELECT `Submission_ID`,Visibility, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||||
|      lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`, |      lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`, | ||||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  |      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  | ||||||
|  | @ -238,10 +216,8 @@ left JOIN course_group_members_table on course_group_members_table.Course_Group_ | ||||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Marked'  Order by lab_report_submissions.Student_id Desc");
 | where Lab_Report_ID=$id and lab_report_submissions.Status='Marked'  Order by lab_report_submissions.Student_id Desc");
 | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|         if(mysqli_num_rows($result)==0) |                     if (mysqli_num_rows($result) == 0) { | ||||||
|         { |  | ||||||
|                         echo "No Marked submissions for this lab"; |                         echo "No Marked submissions for this lab"; | ||||||
|       |  | ||||||
|                     } else { |                     } else { | ||||||
| 
 | 
 | ||||||
|                         echo "<h3><a href='~\..\Script.php?exportgrade=true&lab=$id&lab_name=$Report_Title'><i class='fa fa-book'></i> Export Grade Sheet </a></h3>"; |                         echo "<h3><a href='~\..\Script.php?exportgrade=true&lab=$id&lab_name=$Report_Title'><i class='fa fa-book'></i> Export Grade Sheet </a></h3>"; | ||||||
|  | @ -266,8 +242,7 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Marked'  Order by lab | ||||||
|                             $Visibility = $row['Visibility']; |                             $Visibility = $row['Visibility']; | ||||||
|                             $notes = $row['Notes']; |                             $notes = $row['Notes']; | ||||||
| 
 | 
 | ||||||
|                 if($submitted_group==0) |                             if ($submitted_group == 0) { | ||||||
|                 { |  | ||||||
|                                 $submitted_by = $student_name . "(" . $student_id . ")"; |                                 $submitted_by = $student_name . "(" . $student_id . ")"; | ||||||
|                             } else { |                             } else { | ||||||
|                                 $submitted_by = "<i>(GROUP)</i> Group X "; |                                 $submitted_by = "<i>(GROUP)</i> Group X "; | ||||||
|  | @ -289,30 +264,18 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Marked'  Order by lab | ||||||
|   $title  <br> by : <b> $submitted_by         [ Marked $Marks ] </b>    Visibility : <b>$Visibility </b>  <button class='btn-sm btn-success' style='margin-left:50px;' onclick='updatev($Submission_ID)'>Update visibility</button>  |   $title  <br> by : <b> $submitted_by         [ Marked $Marks ] </b>    Visibility : <b>$Visibility </b>  <button class='btn-sm btn-success' style='margin-left:50px;' onclick='updatev($Submission_ID)'>Update visibility</button>  | ||||||
|    <hr> Lecturer/TA notes : $notes<br> <span style='font-size:8pt'>Submitted : $posted        <b>  </b> <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'>  Re-Mark Submission</button><br> Attachments : $full_link </span>   |    <hr> Lecturer/TA notes : $notes<br> <span style='font-size:8pt'>Submitted : $posted        <b>  </b> <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'>  Re-Mark Submission</button><br> Attachments : $full_link </span>   | ||||||
| </div></k>";
 | </div></k>";
 | ||||||
|                  |                         } | ||||||
|                 |                     } | ||||||
|                  |  | ||||||
|             }} |  | ||||||
|                     echo ""; |                     echo ""; | ||||||
|                     ?>
 |                     ?>
 | ||||||
| 
 | 
 | ||||||
|             |  | ||||||
|                 </div> |                 </div> | ||||||
| 
 | 
 | ||||||
|            |  | ||||||
|            |  | ||||||
|            |  | ||||||
|            |  | ||||||
|            |  | ||||||
|                 <div id="menu3" class="container tab-pane"><br> |                 <div id="menu3" class="container tab-pane"><br> | ||||||
| 
 | 
 | ||||||
|         |  | ||||||
|             |  | ||||||
|             |  | ||||||
|                     <?php |                     <?php | ||||||
| 
 | 
 | ||||||
|         if($Report_Type=="Group") |                     if ($Report_Type == "Group") { | ||||||
|         { |  | ||||||
|                         $resulty  = mysqli_query($con, "SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 |                         $resulty  = mysqli_query($con, "SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
 | ||||||
|       lab_report_submissions.Course_Group_id, `Attachment1`, |       lab_report_submissions.Course_Group_id, `Attachment1`, | ||||||
|      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, lab_report_submissions.Marks, lab_report_submissions.Status,  |      `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, lab_report_submissions.Marks, lab_report_submissions.Status,  | ||||||
|  | @ -321,9 +284,7 @@ FROM `lab_report_submissions` | ||||||
| 
 | 
 | ||||||
| left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id | left JOIN course_groups_table on course_groups_table.Course_Group_id=lab_report_submissions.Course_Group_id | ||||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'");
 | where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'");
 | ||||||
|         }  |                     } else { | ||||||
|         else |  | ||||||
|         { |  | ||||||
|                         $resulty  = mysqli_query($con, "SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID, 
 |                         $resulty  = mysqli_query($con, "SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID, 
 | ||||||
|     lab_report_submissions.Remarking_Reason, |     lab_report_submissions.Remarking_Reason, | ||||||
|      lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`, |      lab_report_submissions.Student_id sub_std, lab_report_submissions.Course_Group_id, `Attachment1`, | ||||||
|  | @ -335,11 +296,10 @@ left JOIN course_group_members_table on course_group_members_table.Course_Group_ | ||||||
| where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'");
 | where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'");
 | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|         if(mysqli_num_rows($resulty)==0) |                     if (mysqli_num_rows($resulty) == 0) { | ||||||
|         { |  | ||||||
|                         echo "No Remarking Request for this lab"; |                         echo "No Remarking Request for this lab"; | ||||||
|       |                     } else { | ||||||
|         } else { while($row = mysqli_fetch_assoc($resulty)) { |                         while ($row = mysqli_fetch_assoc($resulty)) { | ||||||
|                             $title = $row['Title']; |                             $title = $row['Title']; | ||||||
|                             $Marks = $row['Marks']; |                             $Marks = $row['Marks']; | ||||||
|                             //$ins=$row['Notes']; 
 |                             //$ins=$row['Notes']; 
 | ||||||
|  | @ -361,8 +321,7 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'"); | ||||||
|                             $student_id = $row['sub_std']; |                             $student_id = $row['sub_std']; | ||||||
|                             $gname = $row['Group_Name ']; |                             $gname = $row['Group_Name ']; | ||||||
| 
 | 
 | ||||||
|                 if($submitted_group==0) |                             if ($submitted_group == 0) { | ||||||
|                 { |  | ||||||
|                                 $submitted_by = $student_name . "(" . $student_id . ")"; |                                 $submitted_by = $student_name . "(" . $student_id . ")"; | ||||||
|                             } else { |                             } else { | ||||||
|                                 $submitted_by = "<i>(GROUP)</i> $gname"; |                                 $submitted_by = "<i>(GROUP)</i> $gname"; | ||||||
|  | @ -387,47 +346,33 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'"); | ||||||
|                                 . "      <a href='~\..\Script.php?ignoreremarking=yes&id=$id&subid=$Submission_ID&header=$header&total=$total&status=Marked' class='btn-sm btn-warning'>  Ignore Request </a>" |                                 . "      <a href='~\..\Script.php?ignoreremarking=yes&id=$id&subid=$Submission_ID&header=$header&total=$total&status=Marked' class='btn-sm btn-warning'>  Ignore Request </a>" | ||||||
|                                 . "<br> Attachments : $full_link </span>  
 |                                 . "<br> Attachments : $full_link </span>  
 | ||||||
| </div></k>";
 | </div></k>";
 | ||||||
|                  |                         } | ||||||
|                 |                     } | ||||||
|                  |  | ||||||
|             }} |  | ||||||
|                     echo ""; |                     echo ""; | ||||||
|                     ?>
 |                     ?>
 | ||||||
| 
 | 
 | ||||||
|             |  | ||||||
|                 </div> |                 </div> | ||||||
| 
 | 
 | ||||||
|            |  | ||||||
|            |  | ||||||
|            |  | ||||||
|            |  | ||||||
|            |  | ||||||
|            |  | ||||||
|                 <div id="menu4" class="container tab-pane"><br> |                 <div id="menu4" class="container tab-pane"><br> | ||||||
| 
 | 
 | ||||||
|                     <h3>Course Groups</h3> |                     <h3>Course Groups</h3> | ||||||
| 
 | 
 | ||||||
|   |  | ||||||
|      |  | ||||||
|    |  | ||||||
|                     <hr> |                     <hr> | ||||||
|                     <?php |                     <?php | ||||||
| 
 | 
 | ||||||
|      |  | ||||||
|                     $result = mysqli_query($con, "  SELECT `Course_Group_id`, `Group_Name`, `Group_Leader`, `Course_id`,users_table.Full_Name
 |                     $result = mysqli_query($con, "  SELECT `Course_Group_id`, `Group_Name`, `Group_Leader`, `Course_id`,users_table.Full_Name
 | ||||||
| FROM `course_groups_table` | FROM `course_groups_table` | ||||||
| INNER JOIN users_table on users_table.Student_ID=course_groups_table.Group_Leader | INNER JOIN users_table on users_table.Student_ID=course_groups_table.Group_Leader | ||||||
| WHERE Course_id=$c_id");
 | WHERE Course_id=$c_id");
 | ||||||
| 
 | 
 | ||||||
|         if(mysqli_num_rows($result)==0) |                     if (mysqli_num_rows($result) == 0) { | ||||||
|         { |  | ||||||
|                         echo "You have no Group in this Course"; |                         echo "You have no Group in this Course"; | ||||||
|         } else { while($row = mysqli_fetch_assoc($result)) { |                     } else { | ||||||
|  |                         while ($row = mysqli_fetch_assoc($result)) { | ||||||
|                             $name = $row['Group_Name']; |                             $name = $row['Group_Name']; | ||||||
|                             $leader = $row['Full_Name'] . "(" . $row['Group_Leader'] . ")"; |                             $leader = $row['Full_Name'] . "(" . $row['Group_Leader'] . ")"; | ||||||
|                             $id = $row['Course_Group_id']; |                             $id = $row['Course_Group_id']; | ||||||
| 
 | 
 | ||||||
|                          |  | ||||||
|                             echo "<div  class='btn-default'><small> $name -  Leader : $leader </small></div>"; |                             echo "<div  class='btn-default'><small> $name -  Leader : $leader </small></div>"; | ||||||
| 
 | 
 | ||||||
|                             $rs2 = mysqli_query($con, "SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID, 
 |                             $rs2 = mysqli_query($con, "SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID, 
 | ||||||
|  | @ -441,25 +386,12 @@ where course_group_members_table.Course_Group_id=$id"); | ||||||
|                                 $status = $row['Status']; |                                 $status = $row['Status']; | ||||||
|                                 $Student_ID = $row['Student_ID']; |                                 $Student_ID = $row['Student_ID']; | ||||||
| 
 | 
 | ||||||
|                          |  | ||||||
|                                 echo "<li><small> $name-$Student_ID ($status)</small></li>"; |                                 echo "<li><small> $name-$Student_ID ($status)</small></li>"; | ||||||
|                          |  | ||||||
|                             } |                             } | ||||||
|                          |  | ||||||
|                          |  | ||||||
|                          |  | ||||||
|                          |  | ||||||
|                          |  | ||||||
|                          |  | ||||||
|                          |  | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                     ?>
 |                     ?>
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|      |  | ||||||
|    |  | ||||||
|             |  | ||||||
|                 </div> |                 </div> | ||||||
| 
 | 
 | ||||||
|             </div> |             </div> | ||||||
|  | @ -473,7 +405,6 @@ where course_group_members_table.Course_Group_id=$id"); | ||||||
|     include 'Footer.php'; |     include 'Footer.php'; | ||||||
| ?>
 | ?>
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| <script src="http://118.25.96.118/nor/css/jquery-1.11.1.min.js"></script> | <script src="http://118.25.96.118/nor/css/jquery-1.11.1.min.js"></script> | ||||||
| 
 | 
 | ||||||
| <script src="http://118.25.96.118/nor/css/jquery-ui.min.js"></script> | <script src="http://118.25.96.118/nor/css/jquery-ui.min.js"></script> | ||||||
|  | @ -481,14 +412,9 @@ include 'Footer.php'; | ||||||
| <link rel="stylesheet" href="http://118.25.96.118/nor/css/jquery-ui.css" /> | <link rel="stylesheet" href="http://118.25.96.118/nor/css/jquery-ui.css" /> | ||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     function mark(id, title, marks) { |     function mark(id, title, marks) { | ||||||
| 
 | 
 | ||||||
|     |         try { | ||||||
|         try |  | ||||||
|         { |  | ||||||
|         |  | ||||||
| 
 | 
 | ||||||
|             $('<form id="submit-form" method="get" action="Script.php">' + title + '(' + marks + ' marks) <input type="hidden" name="savemarks" value="true">\n\ |             $('<form id="submit-form" method="get" action="Script.php">' + title + '(' + marks + ' marks) <input type="hidden" name="savemarks" value="true">\n\ | ||||||
|  <input type="hidden" name="total" value="' + marks + '" > <input type="hidden" name="id" value="' + id + '" ><br> Marks <input type="text" name="marks">\n\ |  <input type="hidden" name="total" value="' + marks + '" > <input type="hidden" name="id" value="' + id + '" ><br> Marks <input type="text" name="marks">\n\ | ||||||
|  | @ -510,19 +436,14 @@ include 'Footer.php'; | ||||||
|                 } |                 } | ||||||
|             }); |             }); | ||||||
| 
 | 
 | ||||||
|         }catch(e){ alert(e); } |         } catch (e) { | ||||||
|  |             alert(e); | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     function updatev(id) { | ||||||
| 
 | 
 | ||||||
|      |         try { | ||||||
|      |  | ||||||
| function updatev(id) |  | ||||||
| { |  | ||||||
|      |  | ||||||
|     |  | ||||||
|     try |  | ||||||
|     { |  | ||||||
|          |  | ||||||
| 
 | 
 | ||||||
|             $('<form id="submit-form" method="get" action="Script.php"> <input type="hidden" name="updatevisibility" value="true">\n\ |             $('<form id="submit-form" method="get" action="Script.php"> <input type="hidden" name="updatevisibility" value="true">\n\ | ||||||
|  <input type="hidden" name="id" value="' + id + '" > <br>\n\ |  <input type="hidden" name="id" value="' + id + '" > <br>\n\ | ||||||
|  | @ -543,8 +464,8 @@ Update Visibility<br><select name="status"> <option> Public </option><option>Pri | ||||||
|                 } |                 } | ||||||
|             }); |             }); | ||||||
| 
 | 
 | ||||||
|     }catch(e){ alert(e); } |         } catch (e) { | ||||||
|  |             alert(e); | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| </script> | </script> | ||||||
|      |  | ||||||
| 
 |  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue