Make Courses.php look better

Bug430-Eden2
Lan Hui 2023-07-31 17:15:35 +08:00
parent 346fb348c7
commit 197437f6a1
1 changed files with 458 additions and 572 deletions

View File

@ -13,7 +13,7 @@ $user_d = $_SESSION['user_id'];
if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA")
{
?>
?>
@ -70,7 +70,7 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
</script>
<?php
<?php
if(!empty($_GET["course"]))
{
$course_url = mysqli_real_escape_string($con, $_GET["course"]);
@ -179,7 +179,7 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
<input type='file' name='attachment4' placeholder='Attachment 4' class='form-control' >
<br>
<?php
<?php
if ($Type == "Individual") {
echo "Submission Type <input type='radio' name='type' value='Individual' checked /> Individual <input type='radio' name='type' value='Group' /> Group";
} else {
@ -191,7 +191,7 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
<hr>
<input type='submit' class='btn btn-primary' value='Post Lab Assignment'><br>
</form><br><br><br><br>
<?php
<?php
}}else{
// ------------------------------Posting New Lab Assignment------------------------------------
@ -206,7 +206,7 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
<h3> Post new Lab Assignment </a></h3>
<form method='post' enctype='multipart/form-data' action='Script.php'>
<?php
<?php
$_SESSION['url']=$url;
?>
<input type='hidden' name='frm_uploadlab' value='true' required=''/>
@ -244,7 +244,7 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
<hr>
<input type='submit' class='btn btn-primary' value='Post Lab Assignment'><br>
</form><br><br><br><br>
<?php
<?php
}
}
@ -370,7 +370,7 @@ WHERE Course_ID=$course_id");
<div class="col-md-8">
<?php
<?php
$user_name=$_SESSION['user_fullname'];
echo " <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
@ -431,7 +431,7 @@ where course_ta.Course_ID=$id");
<?php
<?php
$lecturer_id= $_SESSION['user_id'];
$result = mysqli_query($con,"SELECT course_students_table.ID,users_table.Full_Name, courses_table.Course_ID, `Course_Name`, `Academic_Year`, `Faculty`, `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` FROM `courses_table`
INNER JOIN course_students_table on course_students_table.Course_ID=courses_table.Course_ID
@ -456,18 +456,12 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
&nbsp;&nbsp;<a href='~\..\Script.php?AcceptStudent=y&id=$id&rs=no' class='btn-sm btn-danger' onclick=return confirm(\"are you sure to join this course?\")' > Decline </a>
</div>";
}
}
?>
<?php
<?php
if( $_SESSION['user_type']=="TA")
{
echo "<center>Only Lecturers can Post new Lab report Assignments</center>";
@ -507,7 +501,7 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
</form>
<?php } ?>
<?php } ?>
</div>
@ -515,19 +509,17 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
<!-- END LECTURER -->
<?php
}
}
if( $_SESSION['user_type']=="Student")
{
?>
?>
<!--STUDENT CODE-->
<div class="row" style="width:80%;margin:auto; text-align:left;">
<div class="col-md-6">
<br> Course Portal > Students <br>
<?php
<?php
error_reporting(0);
if (isset($_SESSION['info_Courses_student'])) {
@ -541,15 +533,10 @@ if( $_SESSION['user_type']=="Student")
</div>
<div class="row" style="width:80%;margin:auto; text-align:left;">
<div class="col-md-6">
<?php
<?php
error_reporting(0);
$student_id= $_SESSION['user_student_id'];
// current academic year - i.e 2021 - 2022 , so we will show in search result:
@ -651,32 +638,6 @@ INNER JOIN course_students_table on course_students_table.Course_ID=courses_tabl
}
}
echo "</div><div class='col-md-6'>
<form method='get' action='Courses.php'>
@ -708,83 +669,8 @@ List courses by faculty
</div>
</form>
</div></div>";
}
}
?>
<style>
</style>
?>