Make pages look better. List courses in descending order creation.
							parent
							
								
									954006ff0b
								
							
						
					
					
						commit
						6be0908210
					
				|  | @ -77,14 +77,14 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") { | |||
| 		    ?>
 | ||||
| 		    <form method="post" action="Script.php" id="create_account_form"> | ||||
| 			<input type="hidden" name="frm_createlecturrer" value="true" required="" /> | ||||
| 			Full Name | ||||
| 			Full name | ||||
| 			<input type="text" name="fullname" placeholder="Full Name" class="form-control" required=""> | ||||
| 			Email | ||||
| 			<input type="text" name="email" placeholder="Email / Student Number" class="form-control" required=""> | ||||
| 
 | ||||
| 			Passport Number / ID (Used as Initial Password) | ||||
| 			Passport number/ID (used as the initial password) | ||||
| 			<input type="text" class="form-control" name="passport" placeholder="Passport No./ID" required=""> | ||||
| 			<br> User Type : | ||||
| 			<br> User type: | ||||
| 
 | ||||
| 			<?php  | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										10
									
								
								Course.php
								
								
								
								
							
							
						
						
									
										10
									
								
								Course.php
								
								
								
								
							|  | @ -36,8 +36,8 @@ if(!empty($_GET["url"])) | |||
|             $ta_result = mysqli_query($con, "SELECT Full_Name FROM users_table where User_ID in (select TA from course_ta where Course_ID='$course_id');"); | ||||
|             if (mysqli_num_rows($ta_result) == 0) { | ||||
|                 echo    "  <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
 | ||||
|   Courses > $name ($code) > Lab Reports <br> <span style='font-size:8pt'>Faculty: $faculty  | Year: $academic | Lecturer: $lecturer  </span> | ||||
|        </a></div> ";                
 | ||||
|   Courses </a> > ($code) $name > Assignments <br> <span style='font-size:8pt'>Faculty: $faculty   Year: $academic   Lecturer: $lecturer  </span> | ||||
|        </div> ";
 | ||||
|             } else { | ||||
|                 $ta_name = ""; | ||||
|                 while ($row = mysqli_fetch_assoc($ta_result)) { | ||||
|  | @ -138,7 +138,7 @@ if( $_SESSION['user_type'] == "Student") | |||
| 		     | ||||
| 		    if(mysqli_num_rows($result1)==0) | ||||
| 		    { | ||||
| 			echo "No active assignments for this course so far."; | ||||
| 			echo "No active assignments for this course now."; | ||||
| 		    } else { | ||||
| 			 | ||||
| 			while($row = mysqli_fetch_assoc($result1)) { | ||||
|  | @ -406,13 +406,13 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen | |||
| 			} | ||||
| 			if($status=='Remarking') | ||||
| 			{ | ||||
| 			    $remarking="<span  style='color:orange'><i class='fa fa-info-circle'></i> Remarking Request sent </span> <br> Remarking Reason:<i>$remarking_reason </i> <br>"; | ||||
| 			    $remarking="<span  style='color:orange'><i class='fa fa-info-circle'></i> Remarking request sent </span> <br> Reasons for remarking: <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> Submitted files :";
 | ||||
|   $title  <b> ($marks marks out of $Originalmarks)</b><br><small> Lecturer feedback: $notes </small>   $remarking   <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`, | ||||
|  |  | |||
							
								
								
									
										41
									
								
								Courses.php
								
								
								
								
							
							
						
						
									
										41
									
								
								Courses.php
								
								
								
								
							|  | @ -85,7 +85,7 @@ if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA") | |||
|                    | ||||
|                         <div class='alert> <a href='~\..\Courses.php?course=$url'>   <div class='panel'> | ||||
|   ($code) - $name  | ||||
|    <br> <span style='font-size:8pt'>Faculty: $faculty | Year: $academic | Lecturer: $lecturer </span> | ||||
|    <br> <span style='font-size:8pt'>Faculty:$faculty   Year: $academic   Lecturer: $lecturer </span> | ||||
| </div></a> | ||||
|                         <hr></div></div> <div class='row' style='width:80%;margin:auto; text-align:left;'> | ||||
| 		";
 | ||||
|  | @ -366,7 +366,7 @@ WHERE Course_ID=$course_id"); | |||
| 	     | ||||
|              | ||||
| 	    $result = mysqli_query($con,"SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`, " | ||||
| 				      . "`Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members`   , users_table.Full_Name  FROM `courses_table` INNER JOIN users_table ON users_table.User_ID=courses_table.Lecturer_User_ID where courses_table.Lecturer_User_ID=$user_d"); | ||||
| 				      . "`Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members`   , users_table.Full_Name  FROM `courses_table` INNER JOIN users_table ON users_table.User_ID=courses_table.Lecturer_User_ID where courses_table.Lecturer_User_ID=$user_d ORDER BY Academic_Year DESC, URL ASC"); | ||||
| 	     | ||||
| 	    if($_SESSION['user_type']=="TA") | ||||
| 	    { | ||||
|  | @ -412,7 +412,7 @@ where course_ta.Course_ID=$id"); | |||
| 	</div> | ||||
| 	<div class="col-md-4"> | ||||
| 	    <br> | ||||
| 	    <b> Course Joining Requests </b> | ||||
| 	    <b> Course joining requests </b> | ||||
| 	     | ||||
| 
 | ||||
| 
 | ||||
|  | @ -426,7 +426,7 @@ WHERE  Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'" | |||
| 	    if(mysqli_num_rows($result)==0) | ||||
| 	    { | ||||
| 		 | ||||
| 		echo "<br>  <i class='fa fa-info-circle'></i>No course-joining request so far for all your courses<hr>"; | ||||
| 		echo "<br>  <i class='fa fa-info-circle'></i>No course-joining request so far for your courses<hr>"; | ||||
| 	    } else { while($row = mysqli_fetch_assoc($result)) { | ||||
| 		$id=$row['ID'];	 | ||||
|         	 | ||||
|  | @ -453,7 +453,7 @@ WHERE  Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'" | |||
| 	    } | ||||
| 	    if( $_SESSION['user_type']=="Lecturer"){ ?>
 | ||||
| 		 | ||||
| 		<b>Create new Course Portal </b> | ||||
| 		<b>Create a new course</b> | ||||
| 		 | ||||
| 		<form method="post" action="Script.php"> | ||||
| 		    <input type="hidden" name="frm_createCourse" value="true" required=""/> | ||||
|  | @ -482,7 +482,7 @@ WHERE  Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'" | |||
| 		    <input type="radio" name="verify" value="0" checked=""> No | ||||
| 
 | ||||
| 		    <br> | ||||
| 		    <input type="submit" class="btn btn-primary" value="Create Portal"><br> | ||||
| 		    <input type="submit" class="btn btn-primary" value="Create"><br> | ||||
| 		     | ||||
| 		</form> | ||||
| 		 | ||||
|  | @ -537,7 +537,7 @@ if( $_SESSION['user_type']=="Student") | |||
| 		// the user has not entered something under "Find course by Code"
 | ||||
| 		if($faculty=="") | ||||
| 		{ | ||||
| 		    echo "<h4> Search Results for Course Code $search</h4><hr>"; | ||||
| 		    echo "<h4> Search results for course code: $search </h4><hr>"; | ||||
| 		    $result = mysqli_query($con,"SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`," | ||||
| 					      . " `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members`  " | ||||
| 					      . " , users_table.Full_Name  FROM `courses_table` INNER JOIN users_table" | ||||
|  | @ -546,7 +546,7 @@ if( $_SESSION['user_type']=="Student") | |||
| 		// the user has entered something under "Find course by Code"
 | ||||
| 		else | ||||
| 		{ | ||||
| 		    echo "<h3> Find Courses under faculty $faculty</h3>"; | ||||
| 		    echo "<h3> Find courses under faculty: $faculty</h3>"; | ||||
| 		    $result = mysqli_query($con,"SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`,
 | ||||
|        `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members`  | ||||
|          , users_table.Full_Name  FROM `courses_table` INNER JOIN users_table | ||||
|  | @ -556,7 +556,7 @@ if( $_SESSION['user_type']=="Student") | |||
| 
 | ||||
| 		if(mysqli_num_rows($result)==0) | ||||
| 		{ | ||||
| 		    echo "No results found ... <hr>"; | ||||
| 		    echo "No results. <hr>"; | ||||
| 
 | ||||
| 		} else { | ||||
| 		     | ||||
|  | @ -569,7 +569,6 @@ if( $_SESSION['user_type']=="Student") | |||
| 			$url=$row['URL']; | ||||
| 			$id=$row['Course_ID']; | ||||
| 			$v=$row['Verify_New_Members']; | ||||
| 			$msg2="Join Course"; | ||||
| 			if($v>0) | ||||
| 			{ | ||||
| 			    $msg="<i class='fa fa-exclamation-circle'></i> Lecturer verification required"; | ||||
|  | @ -577,25 +576,25 @@ if( $_SESSION['user_type']=="Student") | |||
| 			} | ||||
| 			 | ||||
| 			echo "<div class='btn btn-default' style='word-wrap:break-word'>
 | ||||
|   [$code] $name <br>($url) <br>  <a href='~\..\Script.php?JoinCourse=y&id=$id&std=$student_id&joining=$v' class='btn-sm btn-success' onclick=return confirm(\"Are you sure to join this course?\")' > $msg2 </a>
 | ||||
|    <br> <span style='font-size:10pt'>Faculty: $faculty | Year: $academic | Lecturer: $lecturer </span><br>$msg</div> | ||||
|   ($code) $name <br>($url) <br>  <a href='~\..\Script.php?JoinCourse=y&id=$id&std=$student_id&joining=$v' class='btn-sm btn-success' onclick=return confirm(\"Are you sure to join this course?\")' >Join</a>
 | ||||
|    <br> <span style='font-size:10pt'>Faculty: $faculty   Year: $academic   Lecturer: $lecturer </span><br>$msg</div> | ||||
|                         ";
 | ||||
| 		    } | ||||
| 		} | ||||
| 	    } | ||||
| 	    // Otherwise, list the student's joined courses (already done), in reverse chronological order
 | ||||
| 	    echo "<h4> My Courses </h4>"; | ||||
| 	    echo "<h4> My courses </h4>"; | ||||
| 	    $result = mysqli_query($con,"SELECT users_table.Full_Name, course_students_table.Status, 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 users_table | ||||
|           ON users_table.User_ID=courses_table.Lecturer_User_ID | ||||
| 
 | ||||
| INNER JOIN course_students_table on course_students_table.Course_ID=courses_table.Course_ID | ||||
| 
 | ||||
|                   where course_students_table.Student_ID=$student_id order by Academic_Year desc");
 | ||||
|                   where course_students_table.Student_ID=$student_id ORDER BY Academic_Year DESC, URL ASC");
 | ||||
| 	     | ||||
| 	    if(mysqli_num_rows($result)==0) | ||||
| 	    { | ||||
| 		echo "<i class='fa fa-exclamation-circle'></i> You are not Enrolled in any Course"; | ||||
| 		echo "<i class='fa fa-exclamation-circle'></i> You are not enrolled in any Course"; | ||||
| 	    } else { | ||||
| 		while($row = mysqli_fetch_assoc($result)) { | ||||
| 		    $name=$row['Course_Name']; | ||||
|  | @ -610,15 +609,15 @@ INNER JOIN course_students_table on course_students_table.Course_ID=courses_tabl | |||
| 		    if($Status=="Joined") | ||||
| 		    { | ||||
| 			echo "<a href='~\..\Course.php?url=$url'>   <div class='btn btn-default' style='word-wrap:break-word'>
 | ||||
|   ($code) - $name <br>($url)           <i class='fa fa-check-circle'></i> $Status        <a href='~\..\Course.php?url=$url' class='btn-sm btn-primary'> Open</a> | ||||
|    <br> <span style='font-size:8pt'>Faculty : $faculty  Year :   $academic  Lecturer  :$lecturer </span></div></a> | ||||
|   ($code) - $name <br>($url)           <i class='fa fa-check-circle'></i> $Status         | ||||
|    <br> <span style='font-size:8pt'>Faculty: $faculty   Year: $academic    Lecturer: $lecturer </span></div></a> | ||||
|                         ";  
 | ||||
| 		    } | ||||
| 		    else | ||||
| 		    { | ||||
| 			echo "<div class='btn btn-default'>
 | ||||
|   ($code) - $name  <i class='btn-sm btn-danger'> $Status</i> | ||||
|    <br> <span style='font-size:8pt'>Faculty : $faculty  Year :   $academic  Lecturer  :$lecturer </span></div> | ||||
|    <br> <span style='font-size:8pt'>Faculty: $faculty   Year: $academic   Lecturer: $lecturer </span></div> | ||||
|                         "; 
 | ||||
| 		    } | ||||
| 		} | ||||
|  | @ -628,9 +627,9 @@ INNER JOIN course_students_table on course_students_table.Course_ID=courses_tabl | |||
|      | ||||
|         <form method='get' action='Courses.php'> | ||||
|             <div class='row'>  | ||||
|             <div class='col-md-10'>  | ||||
|             <div class='row'><div class='col-md-5'> Find course by course code | ||||
|             <input  type='text' class='form-control' name='search' maxlength='11' placeholder='Enter Course Code'> | ||||
|             <div class='col-md-12'> | ||||
|             <div class='row'><div class='col-md-5'> Find new course by course code | ||||
|             <input  type='text' class='form-control' name='search' maxlength='11' placeholder='Enter course code'> | ||||
|             </div><div class='col-md-5'> | ||||
| List courses by faculty | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue