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-1.11.1.min.js"></script>
|
||||||
<script src="./css/jquery-ui.min.js"></script>
|
<script src="./css/jquery-ui.min.js"></script>
|
||||||
<link rel="stylesheet" href="./css/jquery-ui.css" />
|
<link rel="stylesheet" href="./css/jquery-ui.css" />
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
function extendDeadline(id) {
|
||||||
|
const dropstudents = $("#dropstudents").html();
|
||||||
function extendDeadline(id) {
|
try {
|
||||||
|
$(`<form id="frm" method="get" action="Script.php">
|
||||||
var dropstudents=$("#dropstudents").html();
|
<input type="hidden" name="extenddeadline" value="true" >
|
||||||
|
<input type="hidden" name="id" value="${id}" >
|
||||||
try
|
New date and time<br>
|
||||||
{
|
<input type="date" name="date" required="">
|
||||||
|
<input type="time" name="time" required="">
|
||||||
|
<br>
|
||||||
$('<form id="frm" method="get" action="Script.php">\n\
|
<input type="radio" value="1" name="type" required=""> Extend for all
|
||||||
<input type="hidden" name="extenddeadline" value="true" >\n\
|
<br>
|
||||||
<input type="hidden" name="id" value="'+id+'" > \n\
|
<input type="radio" value="2" name="type" required=""> Extend for one
|
||||||
New Date/Time <br><input type="date" name="date" required=""> <input type="time" name="time" required=""> \n\
|
<br>
|
||||||
\n\
|
${dropstudents}
|
||||||
<br><input type="radio" value="1" name="type" required=""> Extend for All<hr> \n\
|
</form>`).dialog({
|
||||||
<input type="radio" value="2" name="type" required=""> Extend for these Individual Students \n\
|
modal: true,
|
||||||
'+dropstudents+' \n\
|
title:'Extend deadline',
|
||||||
</form>').dialog({
|
buttons: {
|
||||||
modal: true,
|
'Submit': function () {
|
||||||
title:'Extend Deadline',
|
$('#frm').submit();
|
||||||
buttons: {
|
$(this).dialog('close');
|
||||||
'Submit': function () {
|
},
|
||||||
$('#frm').submit();
|
'Cancel': function () {
|
||||||
|
$(this).dialog('close');
|
||||||
$(this).dialog('close');
|
}
|
||||||
},
|
}
|
||||||
'X': function () {
|
});
|
||||||
|
} catch(e) {
|
||||||
$(this).dialog('close');
|
alert(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}catch(e){ alert(e); }
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
@ -511,6 +503,7 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( $_SESSION['user_type']=="Student")
|
if( $_SESSION['user_type']=="Student")
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue