Better indented JavaScript code.
parent
6b8f97dc58
commit
122bd27e80
49
Courses.php
49
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) {
|
function extendDeadline(id) {
|
||||||
|
const dropstudents = $("#dropstudents").html();
|
||||||
var dropstudents=$("#dropstudents").html();
|
try {
|
||||||
|
$(`<form id="frm" method="get" action="Script.php">
|
||||||
try
|
<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="">
|
||||||
$('<form id="frm" method="get" action="Script.php">\n\
|
<input type="time" name="time" required="">
|
||||||
<input type="hidden" name="extenddeadline" value="true" >\n\
|
<br>
|
||||||
<input type="hidden" name="id" value="'+id+'" > \n\
|
<input type="radio" value="1" name="type" required=""> Extend for all
|
||||||
New Date/Time <br><input type="date" name="date" required=""> <input type="time" name="time" required=""> \n\
|
<br>
|
||||||
\n\
|
<input type="radio" value="2" name="type" required=""> Extend for one
|
||||||
<br><input type="radio" value="1" name="type" required=""> Extend for All<hr> \n\
|
<br>
|
||||||
<input type="radio" value="2" name="type" required=""> Extend for these Individual Students \n\
|
${dropstudents}
|
||||||
'+dropstudents+' \n\
|
</form>`).dialog({
|
||||||
</form>').dialog({
|
|
||||||
modal: true,
|
modal: true,
|
||||||
title:'Extend Deadline',
|
title:'Extend deadline',
|
||||||
buttons: {
|
buttons: {
|
||||||
'Submit': function () {
|
'Submit': function () {
|
||||||
$('#frm').submit();
|
$('#frm').submit();
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
},
|
},
|
||||||
'X': function () {
|
'Cancel': function () {
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} catch(e) {
|
||||||
}catch(e){ alert(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