Make a student's Course Page look better. The first letter in a button name is uppercase, others are in lowercase.
parent
dd0fc3a005
commit
954006ff0b
38
Course.php
38
Course.php
|
@ -402,7 +402,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
if($status=='Marked')
|
if($status=='Marked')
|
||||||
{
|
{
|
||||||
$rm_data="\Script.php?remarking=yes&id=$Submission_ID&url=$url&status=Remarking";
|
$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')
|
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;'>
|
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> $remarking <br> Submission files :";
|
$title <b> ($marks Marks out of $Originalmarks)</b><br><small> Lecturer Feedback : $notes </small> $remarking <br> Submitted files :";
|
||||||
|
|
||||||
$Sub_result = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_report_submissions.Lab_Report_ID,
|
$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`,
|
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>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<h3>Class Groups</h3>
|
<h3>My groups</h3>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$resultx1 = mysqli_query($con,"SELECT `Course_Group_id` FROM `course_groups_table` WHERE Course_id=$course_id");
|
$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
|
# 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;
|
$extra4 = "<button onclick='deleteGroup($id)' class='btn btn-danger' style='height: 25px; width: 95px;
|
||||||
line-height: 10px; font-size: 10px'>DELETE GROUP</button>";
|
line-height: 12px; font-size: 12px'>Delete group</button>";
|
||||||
|
|
||||||
echo "<div class='btn-default'><small> $name ($status) $extra $extra2 $extra3" .
|
echo "<div class='btn-default'><small> $name ($status) $extra $extra2 $extra3" .
|
||||||
(($status == "Created")? "$extra4": "")
|
(($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
|
#Show group members + remove button next to each member except the creator of the group
|
||||||
if($flag){
|
if($flag){
|
||||||
echo "<li><small> $name-$Student_ID ($status)</small>".(($status != "Created")?"<button onclick='removeMember($Student_ID, $id)'
|
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>";
|
class='btn btn-warning' style='height: 25px; width: 80px; line-height: 10px;'>Kick out</button>":"")."</li>";
|
||||||
}else{
|
}else{
|
||||||
echo "<li><small> $name-$Student_ID ($status)</small>";
|
echo "<li><small> $name-$Student_ID ($status)</small>";
|
||||||
}
|
}
|
||||||
|
@ -555,18 +555,16 @@ include 'Footer.php';
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="creategroup" value="true">\n\
|
$('<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({
|
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="id" value="<?php echo $course_id; ?>"> </form>').dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
title:'Create Group',
|
title:'Create a group',
|
||||||
buttons: {
|
buttons: {
|
||||||
'Create Group': function () {
|
'Create': function () {
|
||||||
$('#frm').submit();
|
$('#frm').submit();
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
},
|
},
|
||||||
'Cancel': function () {
|
'Cancel': function () {
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -583,7 +581,7 @@ include 'Footer.php';
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$('<form id="frm" method="get" action="Script.php"><input type="hidden" name="groupinvite" value="true">\n\
|
$('<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({
|
<input type="hidden" name="url" value="<?php echo $url; ?>"> <input type="hidden" name="courseid" value="<?php echo $course_id; ?>"> </form>').dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
title:'Invite Students to Group',
|
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="group_id" value="'+group_id+'">\n\
|
||||||
<input type="hidden" name="url" value="<?php echo $url; ?>"></form>').dialog({
|
<input type="hidden" name="url" value="<?php echo $url; ?>"></form>').dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
title:'Remove '+student_id+'?',
|
title:'Kick out '+student_id+'?',
|
||||||
buttons: {
|
buttons: {
|
||||||
'Confirm': function () {
|
'Yes': function () {
|
||||||
$('#frm').submit();
|
$('#frm').submit();
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
},
|
},
|
||||||
'Cancel': function () {
|
'No': function () {
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -681,13 +677,11 @@ include 'Footer.php';
|
||||||
modal: true,
|
modal: true,
|
||||||
title:'Delete this group?',
|
title:'Delete this group?',
|
||||||
buttons: {
|
buttons: {
|
||||||
'Confirm': function () {
|
'Yes': function () {
|
||||||
$('#frm').submit();
|
$('#frm').submit();
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
},
|
},
|
||||||
'Cancel': function () {
|
'No': function () {
|
||||||
|
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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";
|
$sql = "Delete from `course_group_members_table` where student_id=$student_id and Course_Group_id=$group_id";
|
||||||
|
|
||||||
if ($con->query($sql) === TRUE) {
|
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);
|
header("Location: Course.php?url=" . $url);
|
||||||
} else {
|
} else {
|
||||||
echo "Error: " . $sql . "<br>" . $con->error;
|
echo "Error: " . $sql . "<br>" . $con->error;
|
||||||
|
|
Loading…
Reference in New Issue