Course.php: indent SQL statement
parent
64c625ae58
commit
e5d4819f7d
30
Course.php
30
Course.php
|
@ -373,23 +373,19 @@ include 'Header.php';
|
|||
|
||||
<div id="menu4" class="tab-pane">
|
||||
<?php
|
||||
$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'
|
||||
or (lab_report_submissions.Student_id='$Group_Leader' and lab_report_submissions.Course_Group_id='$group_id')
|
||||
or (lab_report_submissions.Student_id='$Group_Member' and lab_report_submissions.Course_Group_id='$group_id')
|
||||
or (lab_report_submissions.Student_id='$Group_Member2' and lab_report_submissions.Course_Group_id='$group_id')
|
||||
or (lab_report_submissions.Student_id='$Group_Member3' and lab_report_submissions.Course_Group_id='$group_id')
|
||||
or (lab_report_submissions.Student_id='$Group_Member4' and 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 or Course_Group_id=$group_id) and Course_ID=$course_id) ORDER by Submission_ID DESC");
|
||||
$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'
|
||||
OR (lab_report_submissions.Student_id='$Group_Leader' AND lab_report_submissions.Course_Group_id='$group_id')
|
||||
OR (lab_report_submissions.Student_id='$Group_Member' AND lab_report_submissions.Course_Group_id='$group_id')
|
||||
OR (lab_report_submissions.Student_id='$Group_Member2' AND lab_report_submissions.Course_Group_id='$group_id')
|
||||
OR (lab_report_submissions.Student_id='$Group_Member3' AND lab_report_submissions.Course_Group_id='$group_id')
|
||||
OR (lab_report_submissions.Student_id='$Group_Member4' AND 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 OR Course_Group_id=$group_id) AND Course_ID=$course_id)
|
||||
ORDER BY Submission_ID DESC"); // TODO: over-complex, need to simplify
|
||||
|
||||
if (mysqli_num_rows($resultx) == 0) {
|
||||
echo '<br><div class="alert alert-warning">You have no marked submissions.</div>';
|
||||
|
|
Loading…
Reference in New Issue