Better indented JavaScript code.
							parent
							
								
									6b8f97dc58
								
							
						
					
					
						commit
						122bd27e80
					
				
							
								
								
									
										71
									
								
								Courses.php
								
								
								
								
							
							
						
						
									
										71
									
								
								Courses.php
								
								
								
								
							|  | @ -26,47 +26,39 @@ if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA") | |||
| 	<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" /> | ||||
| 
 | ||||
| 
 | ||||
| 	<script> | ||||
| 			  | ||||
| 
 | ||||
| 			 function extendDeadline(id) { | ||||
| 			      | ||||
| 			     var dropstudents=$("#dropstudents").html(); | ||||
| 			      | ||||
| 			     try | ||||
| 			     { | ||||
| 				  | ||||
| 
 | ||||
| 				 $('<form id="frm" method="get" action="Script.php">\n\ | ||||
|     <input type="hidden" name="extenddeadline" value="true" >\n\ | ||||
|    <input type="hidden" name="id" value="'+id+'" > \n\ | ||||
| New Date/Time <br><input type="date" name="date" required=""> <input type="time" name="time" required=""> \n\ | ||||
|   \n\ | ||||
| <br><input type="radio" value="1" name="type" required=""> Extend for All<hr>  \n\ | ||||
| <input type="radio" value="2" name="type" required=""> Extend for these Individual Students \n\ | ||||
| 	 '+dropstudents+'   \n\ | ||||
| </form>').dialog({ | ||||
|              modal: true, | ||||
|              title:'Extend Deadline', | ||||
|              buttons: { | ||||
| 		 'Submit': function () { | ||||
|                      $('#frm').submit(); | ||||
| 		      | ||||
|                      $(this).dialog('close'); | ||||
| 		 }, | ||||
| 		 'X': function () { | ||||
| 		      | ||||
| 		     $(this).dialog('close'); | ||||
| 		 function extendDeadline(id) { | ||||
| 		     const dropstudents = $("#dropstudents").html(); | ||||
| 		     try { | ||||
| 			 $(`<form id="frm" method="get" action="Script.php"> | ||||
|                                 <input type="hidden" name="extenddeadline" value="true" > | ||||
|                                 <input type="hidden" name="id" value="${id}" > | ||||
|                                 New date and time<br> | ||||
|                                 <input type="date" name="date" required=""> | ||||
|                                 <input type="time" name="time" required=""> | ||||
|                                 <br> | ||||
|                                 <input type="radio" value="1" name="type" required=""> Extend for all | ||||
|                                 <br> | ||||
|                                 <input type="radio" value="2" name="type" required=""> Extend for one | ||||
|                                 <br> | ||||
|                                 ${dropstudents} | ||||
|                            </form>`).dialog({ | ||||
| 			       modal: true, | ||||
| 			       title:'Extend deadline', | ||||
| 			       buttons: { | ||||
| 				   'Submit': function () { | ||||
| 				       $('#frm').submit(); | ||||
| 				       $(this).dialog('close'); | ||||
| 				   }, | ||||
| 				   'Cancel': function () { | ||||
| 				       $(this).dialog('close'); | ||||
| 				   } | ||||
| 			       } | ||||
| 			   }); | ||||
| 		     } catch(e) { | ||||
| 			 alert(e); | ||||
| 		     } | ||||
| 		 } | ||||
| 		  | ||||
|              } | ||||
| 	 }); | ||||
| 
 | ||||
| 			     }catch(e){ alert(e); } | ||||
| 			 } | ||||
| 			      | ||||
|         </script> | ||||
| 	 | ||||
| 
 | ||||
|  | @ -511,6 +503,7 @@ WHERE  Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'" | |||
| <?php  | ||||
| }  | ||||
| 
 | ||||
| 
 | ||||
| if( $_SESSION['user_type']=="Student") | ||||
| { | ||||
| ?>
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue