Courses.php: indent code.
							parent
							
								
									29426f102f
								
							
						
					
					
						commit
						55753cc88f
					
				
							
								
								
									
										65
									
								
								Course.php
								
								
								
								
							
							
						
						
									
										65
									
								
								Course.php
								
								
								
								
							|  | @ -2,7 +2,6 @@ | |||
| include 'NoDirectPhpAcess.php'; | ||||
| ?>
 | ||||
| 
 | ||||
| 
 | ||||
| <?php | ||||
| $page = 'Courses+'; | ||||
| include 'Header.php'; | ||||
|  | @ -10,7 +9,6 @@ $student_id = $_SESSION["user_student_id"]; | |||
| $group_id = $_SESSION["user_group_id"]; | ||||
| $c_date = date("Y-m-d H:i"); | ||||
| 
 | ||||
| 
 | ||||
| if (!empty($_GET["url"])) { | ||||
|     $course_url = $_GET["url"]; | ||||
|     $result = mysqli_query($con, "SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`," | ||||
|  | @ -68,8 +66,6 @@ if (!empty($_GET["url"])) { | |||
| 
 | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <?php | ||||
| 
 | ||||
| if ($_SESSION['user_type'] == "Student") { | ||||
|  | @ -252,9 +248,6 @@ if ($_SESSION['user_type'] == "Student") { | |||
| 
 | ||||
|         </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|         <div id="menu2" class="container tab-pane"><br> | ||||
| 
 | ||||
|             <?php | ||||
|  | @ -274,8 +267,6 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St | |||
|                 . "" | ||||
|                 . "ORDER by Lab_Report_ID DESC"); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|             if (mysqli_num_rows($result) == 0) { | ||||
|                 echo "You missed no lab reports in this course."; | ||||
|             } else { | ||||
|  | @ -291,9 +282,6 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St | |||
|                     $att4 = $row['Attachment_link_4']; | ||||
|                     $id = $row['Lab_Report_ID']; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|                     $full_link = "<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>"; | ||||
| 
 | ||||
|                     if ($att2 != "") { | ||||
|  | @ -317,18 +305,14 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St | |||
| 
 | ||||
|         </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|         <div id="menu3" class="container tab-pane"><br> | ||||
|             <?php | ||||
| 
 | ||||
| 
 | ||||
|             $group_id = $_SESSION['group_id']; | ||||
|             if ($group_id == "") { | ||||
|                 $group_id = -1; | ||||
|             }  // This fixes "Submitted report not shown" http://118.25.96.118/bugzilla/show_bug.cgi?id=176
 | ||||
| 
 | ||||
| 
 | ||||
|             $sql_stmt = "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 Lab_Report_ID in (select Lab_Report_ID from lab_report_submissions" | ||||
|  | @ -336,7 +320,6 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St | |||
| 
 | ||||
|             $resultx  = mysqli_query($con, $sql_stmt); | ||||
| 
 | ||||
| 
 | ||||
|             if (mysqli_num_rows($resultx) == 0) { | ||||
|                 echo "You have no lab report submissions in this course."; | ||||
|             } else { | ||||
|  | @ -374,7 +357,6 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St | |||
|    <br> <span style='font-size:8pt'>Posted : $posted  Deadline :   $deadline  ($marks Marks)      $submittedx  <span class='btn-sm btn-success' style='margin-left:50px;'><i class='fa fa-Edit-circle'></i>  Submitted </span> | ||||
| <br> Submitted files: ";
 | ||||
| 
 | ||||
| 
 | ||||
|                     $Sub_result = 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`, | ||||
| `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  | ||||
|  | @ -415,22 +397,14 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen | |||
|                         } | ||||
|                     } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|                     echo "</span></div></k>"; | ||||
|                 } | ||||
|             } | ||||
|             echo ""; | ||||
|             ?>
 | ||||
| 
 | ||||
| 
 | ||||
|         </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|         <?php | ||||
|         $sqli = mysqli_query($con, "SELECT * from course_groups_table WHERE Course_Group_id=$group_id and Course_id=$course_id"); | ||||
|         while ($row = mysqli_fetch_assoc($sqli)) { | ||||
|  | @ -442,8 +416,6 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen | |||
|         } | ||||
|         ?>
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|         <div id="menu4" class="container tab-pane"><br> | ||||
|             <?php | ||||
|             $resultx  = mysqli_query($con, "SELECT `Submission_ID`, `Submission_Date`, lab_reports_table.`Lab_Report_ID`, `Student_id`, " | ||||
|  | @ -464,9 +436,6 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen | |||
|                 . " 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 or Course_Group_id=$group_id)  and Course_ID=$course_id) ORDER by Submission_ID DESC"); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|             if (mysqli_num_rows($resultx) == 0) { | ||||
|                 echo "You have no marked submissions in this course"; | ||||
|             } else { | ||||
|  | @ -494,12 +463,9 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen | |||
|                         $remarking = "<span  style='color:orange'><i class='fa fa-info-circle'></i> Remarking Request sent </span> <br> Remarking Reason:<i>$remarking_reason </i> <br>"; | ||||
|                     } | ||||
| 
 | ||||
| 
 | ||||
|                     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  <b> ($marks Marks out of $Originalmarks)</b><br><small> Lecturer Feedback : $notes </small>   $remarking   <br> Submission files :";
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|                     $Sub_result = 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`, | ||||
|   `Notes`, `Attachment2`, `Attachment3`, `Attachment4`, `Marks`, lab_report_submissions.Status,  | ||||
|  | @ -539,7 +505,6 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen | |||
|             echo "</div></k>"; | ||||
|             ?>
 | ||||
| 
 | ||||
| 
 | ||||
|         </div> | ||||
| 
 | ||||
|     </div> | ||||
|  | @ -555,13 +520,10 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen | |||
|             $count_groups = $row['Course_Group_id']; | ||||
|         } | ||||
| 
 | ||||
| 
 | ||||
|         echo " <button onclick='CreateGroup()' class='btn btn-primary'> Create Group</button>"; | ||||
| 
 | ||||
|         ?>
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|         <hr> | ||||
|         <?php | ||||
| 
 | ||||
|  | @ -578,7 +540,6 @@ course_groups_table.Course_Group_id=course_group_members_table.Course_Group_id W | |||
|                 $id = $row['Course_Group_id']; | ||||
|                 $status = $row['Status']; | ||||
| 
 | ||||
| 
 | ||||
|                 $extra = " -  <a href='#' class='' onclick='invite($id)'> Invite Others</a></small>"; | ||||
| 
 | ||||
|                 if ($status == "Invited") { | ||||
|  | @ -598,30 +559,21 @@ where course_group_members_table.Course_Group_id=$id"); | |||
|                     $status = $row['Status']; | ||||
|                     $Student_ID = $row['Student_ID']; | ||||
| 
 | ||||
| 
 | ||||
|                     echo "<li><small> $name-$Student_ID ($status)</small></li>"; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         ?>
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     </div> | ||||
| 
 | ||||
|     </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <?php | ||||
| } | ||||
| include 'Footer.php'; | ||||
| ?>
 | ||||
| 
 | ||||
| 
 | ||||
| <script src="./css/jquery-1.11.1.min.js"></script> | ||||
| <script src="./css/jquery-ui.min.js"></script> | ||||
| <link rel="stylesheet" href="./css/jquery-ui.css" /> | ||||
|  | @ -629,10 +581,8 @@ include 'Footer.php'; | |||
| <script> | ||||
|     function CreateGroup() { | ||||
| 
 | ||||
| 
 | ||||
|         try { | ||||
| 
 | ||||
| 
 | ||||
|             $('<form id="frm" method="get" action="Script.php"><input type="hidden" name="creategroup" value="true">\n\ | ||||
|  <input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > Group Name  <input type="text" name="name">\n\ | ||||
| <input type="hidden" name="url" value="<?php echo $url; ?>">  <input type="hidden" name="id" value="<?php echo $course_id; ?>">    </form>').dialog({ | ||||
|  | @ -657,15 +607,10 @@ include 'Footer.php'; | |||
|         } | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     function invite(id) { | ||||
| 
 | ||||
| 
 | ||||
|         try { | ||||
| 
 | ||||
| 
 | ||||
|             $('<form id="frm" method="get" action="Script.php"><input type="hidden" name="groupinvite" value="true">\n\ | ||||
|  <input type="hidden" name="groupid" value="' + id + '" > Enter Student_ID to Invite  <input type="text" name="student_id">\n\ | ||||
| <input type="hidden" name="url" value="<?php echo $url; ?>">  <input type="hidden" name="courseid" value="<?php echo $course_id; ?>">    </form>').dialog({ | ||||
|  | @ -690,18 +635,10 @@ include 'Footer.php'; | |||
|         } | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     function accept(id, val) { | ||||
| 
 | ||||
|         try { | ||||
| 
 | ||||
| 
 | ||||
|             $('<form id="frm" method="get" action="Script.php"><input type="hidden" name="acceptinvite" value="true">\n\ | ||||
|  <input type="hidden" name="groupid" value="' + id + '" > \n\  <input type="hidden" name="action" value="' + val + '" > \n\ | ||||
| \n\ | ||||
|  | @ -728,8 +665,6 @@ include 'Footer.php'; | |||
|         } | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     function remarking(data) { | ||||
| 
 | ||||
|         var details = prompt("Please enter your remarking reasons", ""); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue