From 7f870d8c7a28b903e2cc716061576ff69e927253 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Wed, 2 Aug 2023 15:09:49 +0800 Subject: [PATCH] Make Course.php look better. --- Course.php | 105 ++++++++++------------------------------------------- 1 file changed, 20 insertions(+), 85 deletions(-) diff --git a/Course.php b/Course.php index 20f1986..ab8fb0d 100644 --- a/Course.php +++ b/Course.php @@ -53,6 +53,7 @@ if(!empty($_GET["url"])) } ?> +
- - "; - - }} echo ""; ?> - - +
- - - + - - + - + @@ -502,8 +473,6 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen ?> - -
DELETE GROUP"; echo "
$name ($status) $extra $extra2 $extra3" . @@ -555,7 +524,7 @@ where course_group_members_table.Course_Group_id=$id"); #Show group members + remove button next to each member except the creator of the group if($flag){ - echo "
  • $name-$Student_ID ($status)".(($status != "Created")?"":"")."
  • "; }else{ echo "
  • $name-$Student_ID ($status)"; @@ -563,26 +532,13 @@ where course_group_members_table.Course_Group_id=$id"); } - - - - - - } } ?> - - - -
  • - - - function createGroup() { - - try { - - $('
    \n\ Group Name \n\
    ').dialog({ @@ -613,7 +565,7 @@ include 'Footer.php'; $(this).dialog('close'); }, - 'X': function () { + 'Cancel': function () { $(this).dialog('close'); } @@ -626,14 +578,10 @@ include 'Footer.php'; - function invite(id) { - try { - - $('
    \n\ Enter Student_ID to Invite \n\
    ').dialog({ @@ -645,30 +593,22 @@ include 'Footer.php'; $(this).dialog('close'); }, - 'X': function () { + 'Cancel': function () { $(this).dialog('close'); } } }); - } catch(e){ alert(e); } } - - - - - function accept(id,val) { try { - - $('
    \n\ \n\ \n\ \n\ @@ -682,14 +622,13 @@ include 'Footer.php'; $(this).dialog('close'); }, - 'X': function () { + 'Cancel': function () { $(this).dialog('close'); } } }); - } catch(e){ alert(e); } } @@ -697,18 +636,17 @@ include 'Footer.php'; function remarking(data) { - - var details = prompt("Please enter your remarking reasons",""); + const details = prompt("Please enter your remarking reasons",""); window.location.href = data+"&details="+details; } + + - function remove_member(student_id, group_id) { + function removeMember(student_id, group_id) { try { - - $('\n\ \n\ \n\ @@ -721,23 +659,22 @@ include 'Footer.php'; $(this).dialog('close'); }, - 'X': function () { + 'Cancel': function () { $(this).dialog('close'); } } }); - } catch(e){ alert(e); } } - function delete_group(id) { + + + function deleteGroup(id) { try { - - $('\n\ \n\
    ').dialog({ @@ -749,16 +686,14 @@ include 'Footer.php'; $(this).dialog('close'); }, - 'X': function () { + 'Cancel': function () { $(this).dialog('close'); } } }); - } catch(e){ alert(e); } } -