Make a student's Course Page look better. The first letter in a button name is uppercase, others are in lowercase.

Bug430-Eden2
Lan Hui 2023-08-03 16:31:16 +08:00
parent dd0fc3a005
commit 954006ff0b
2 changed files with 17 additions and 23 deletions

View File

@ -402,7 +402,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
if($status=='Marked')
{
$rm_data="\Script.php?remarking=yes&id=$Submission_ID&url=$url&status=Remarking";
$remarking="<button onclick='remarking(\"$rm_data\")' class='btn-sm btn-success'> Request Remarking </button>";
$remarking="<button onclick='remarking(\"$rm_data\")' class='btn-sm btn-success'> Request remarking </button>";
}
if($status=='Remarking')
{
@ -412,7 +412,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
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> &nbsp; $remarking <br> Submission files :";
$title <b> ($marks Marks out of $Originalmarks)</b><br><small> Lecturer Feedback : $notes </small> &nbsp; $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`,
@ -462,7 +462,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
</div>
<div class="col-md-3">
<h3>Class Groups</h3>
<h3>My groups</h3>
<?php
$resultx1 = mysqli_query($con,"SELECT `Course_Group_id` FROM `course_groups_table` WHERE Course_id=$course_id");
@ -500,8 +500,8 @@ course_groups_table.Course_Group_id=course_group_members_table.Course_Group_id W
}
# Add "delete group" button and allow only group creator to delete it
$extra4 = "<button onclick='deleteGroup($id)' class='btn btn-danger' style='height: 25px; width: 90px;
line-height: 10px; font-size: 10px'>DELETE GROUP</button>";
$extra4 = "<button onclick='deleteGroup($id)' class='btn btn-danger' style='height: 25px; width: 95px;
line-height: 12px; font-size: 12px'>Delete group</button>";
echo "<div class='btn-default'><small> $name ($status) $extra $extra2 $extra3" .
(($status == "Created")? "$extra4": "")
@ -524,8 +524,8 @@ 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 "<li><small> $name-$Student_ID ($status)</small>".(($status != "Created")?"<button onclick='removeMember($Student_ID, $id)'
class='btn btn-danger' style='height: 25px; width: 80px; line-height: 10px;'>remove</button>":"")."</li>";
echo "<li><small> $name - $Student_ID ($status)</small>&nbsp;".(($status != "Created")?"<button onclick='removeMember($Student_ID, $id)'
class='btn btn-warning' style='height: 25px; width: 80px; line-height: 10px;'>Kick out</button>":"")."</li>";
}else{
echo "<li><small> $name-$Student_ID ($status)</small>";
}
@ -555,18 +555,16 @@ include 'Footer.php';
try
{
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="creategroup" value="true">\n\
<input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > Group Name <input type="text" name="name">\n\
<input type="hidden" name="student_id" value="<?php echo $student_id; ?>" > Group name <input type="text" name="name">\n\
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="id" value="<?php echo $course_id; ?>"> </form>').dialog({
modal: true,
title:'Create Group',
title:'Create a group',
buttons: {
'Create Group': function () {
'Create': function () {
$('#frm').submit();
$(this).dialog('close');
},
'Cancel': function () {
$(this).dialog('close');
}
@ -583,7 +581,7 @@ include 'Footer.php';
try
{
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="groupinvite" value="true">\n\
<input type="hidden" name="groupid" value="'+id+'" > Enter Student_ID to Invite <input type="text" name="student_id">\n\
<input type="hidden" name="groupid" value="'+id+'" > Enter Student ID to invite <input type="text" name="student_id">\n\
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="courseid" value="<?php echo $course_id; ?>"> </form>').dialog({
modal: true,
title:'Invite Students to Group',
@ -652,15 +650,13 @@ include 'Footer.php';
<input type="hidden" name="group_id" value="'+group_id+'">\n\
<input type="hidden" name="url" value="<?php echo $url; ?>"></form>').dialog({
modal: true,
title:'Remove '+student_id+'?',
title:'Kick out '+student_id+'?',
buttons: {
'Confirm': function () {
'Yes': function () {
$('#frm').submit();
$(this).dialog('close');
},
'Cancel': function () {
'No': function () {
$(this).dialog('close');
}
@ -681,13 +677,11 @@ include 'Footer.php';
modal: true,
title:'Delete this group?',
buttons: {
'Confirm': function () {
'Yes': function () {
$('#frm').submit();
$(this).dialog('close');
},
'Cancel': function () {
'No': function () {
$(this).dialog('close');
}

View File

@ -833,7 +833,7 @@ if (!empty($_GET["removemember"])) {
$sql = "Delete from `course_group_members_table` where student_id=$student_id and Course_Group_id=$group_id";
if ($con->query($sql) === TRUE) {
$_SESSION["info_general"] = " Member " . $student_id . " removed from the group";
$_SESSION["info_general"] = " Member " . $student_id . " is gone.";
header("Location: Course.php?url=" . $url);
} else {
echo "Error: " . $sql . "<br>" . $con->error;