Make student's interface look better.
parent
a4a413f700
commit
89395dbb98
117
Course.php
117
Course.php
|
@ -41,8 +41,7 @@ if(!empty($_GET["url"]))
|
||||||
$ta_result = mysqli_query($con, "SELECT Full_Name FROM users_table where User_ID in (select TA from course_ta where Course_ID='$course_id');");
|
$ta_result = mysqli_query($con, "SELECT Full_Name FROM users_table where User_ID in (select TA from course_ta where Course_ID='$course_id');");
|
||||||
if (mysqli_num_rows($ta_result) == 0) {
|
if (mysqli_num_rows($ta_result) == 0) {
|
||||||
echo " <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
|
echo " <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
|
||||||
Courses </a> > ($code) $name > Assignments <br> <span style='font-size:8pt'>Faculty: $faculty Year: $academic Lecturer: $lecturer </span>
|
Courses </a> > ($code) $name > Assignments <br> <span style='font-size:8pt'>Faculty: $faculty Year: $academic Lecturer: $lecturer </span></div> ";
|
||||||
</div> ";
|
|
||||||
} else {
|
} else {
|
||||||
$ta_name = "";
|
$ta_name = "";
|
||||||
while ($row = mysqli_fetch_assoc($ta_result)) {
|
while ($row = mysqli_fetch_assoc($ta_result)) {
|
||||||
|
@ -59,7 +58,14 @@ if(!empty($_GET["url"]))
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<div class="row" style='margin-left:20px;float:left'>
|
<?php
|
||||||
|
if( $_SESSION['user_type'] == "Student")
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-9">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -74,21 +80,6 @@ if(!empty($_GET["url"]))
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
if( $_SESSION['user_type'] == "Student")
|
|
||||||
{
|
|
||||||
|
|
||||||
?>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="row" style="width:95%;margin:auto; text-align:left;">
|
|
||||||
|
|
||||||
<div class="col-md-9">
|
|
||||||
|
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
|
|
||||||
<ul class="nav nav-tabs" id="myTab">
|
<ul class="nav nav-tabs" id="myTab">
|
||||||
|
@ -107,7 +98,8 @@ if( $_SESSION['user_type'] == "Student")
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div id="menu1" class="tab-pane active"><br>
|
|
||||||
|
<div id="menu1" class="tab-pane active">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -187,7 +179,7 @@ if( $_SESSION['user_type'] == "Student")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="menu2" class="tab-pane"><br>
|
<div id="menu2" class="tab-pane">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$group_id=$_SESSION['group_id'];
|
$group_id=$_SESSION['group_id'];
|
||||||
|
@ -233,21 +225,20 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St
|
||||||
if($att4!=""){
|
if($att4!=""){
|
||||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att4'>$att4</a>";
|
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att4'>$att4</a>";
|
||||||
}
|
}
|
||||||
;
|
|
||||||
|
|
||||||
echo "<div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'><span class='btn btn-sm btn-outline-danger' style='margin-left:0px;'>MISSED</span> $title ($marks Marks) <br> <span style='font-size:8pt'> $ins</span>
|
echo "<div class='card' style='word-wrap: break-word;'> <div class='card-body'> <span class='btn btn-sm btn-outline-danger'>MISSED</span> <h5 class='card-title'>$title</h5> <h6 class='card-subtitle'>($marks Marks)</h6> <br/> <p class='card-text'> $ins</p>
|
||||||
<br> <span style='font-size:8pt'>Posted: $posted<br> Deadline: $deadline <br> Attachments : $full_link </span>
|
<br> <p class='card-text'> <small> Posted: $posted Deadline: $deadline <br> Attachments: $full_link </small></p>
|
||||||
</div>";
|
</div></div><br>";
|
||||||
|
|
||||||
}}
|
}
|
||||||
echo "";
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="menu3" class="tab-pane"><br>
|
<div id="menu3" class="tab-pane">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
@ -298,7 +289,7 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St
|
||||||
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att4'>$att4</a>";
|
$full_link= $full_link."| <a href='~\..\Lab_Report_Assignments\\$att4'>$att4</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
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 "<div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
|
||||||
$title ($marks Marks) <i class='fa fa-check-circle'></i> Submitted <br> <span style='font-size:8pt'> $ins</span>
|
$title ($marks Marks) <i class='fa fa-check-circle'></i> Submitted <br> <span style='font-size:8pt'> $ins</span>
|
||||||
<br> <span style='font-size:9pt'>Posted: $posted Deadline: $deadline</span> $submittedx
|
<br> <span style='font-size:9pt'>Posted: $posted Deadline: $deadline</span> $submittedx
|
||||||
<br> <span style='font-size:9pt'>Submitted files: ";
|
<br> <span style='font-size:9pt'>Submitted files: ";
|
||||||
|
@ -346,7 +337,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</span></div></k>";
|
echo "</span></div>";
|
||||||
|
|
||||||
}}
|
}}
|
||||||
echo "";
|
echo "";
|
||||||
|
@ -357,8 +348,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sqli=mysqli_query($con, "SELECT * from course_groups_table WHERE Course_Group_id=$group_id and Course_id=$course_id");
|
$sqli=mysqli_query($con, "SELECT * from course_groups_table WHERE Course_Group_id=$group_id and Course_id=$course_id");
|
||||||
while($row = mysqli_fetch_assoc($sqli))
|
while($row = mysqli_fetch_assoc($sqli)) { $Group_Leader=$row['Group_Leader'];
|
||||||
{ $Group_Leader=$row['Group_Leader'];
|
|
||||||
$Group_Member=$row['Group_Member'];
|
$Group_Member=$row['Group_Member'];
|
||||||
$Group_Member2=$row['Group_Member2'];
|
$Group_Member2=$row['Group_Member2'];
|
||||||
$Group_Member3=$row['Group_Member3'];
|
$Group_Member3=$row['Group_Member3'];
|
||||||
|
@ -367,8 +357,9 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<div id="menu4" class="tab-pane"><br>
|
<div id="menu4" class="tab-pane">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$resultx = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_reports_table.`Lab_Report_ID`, `Student_id`, "
|
$resultx = mysqli_query($con,"SELECT `Submission_ID`, `Submission_Date`, lab_reports_table.`Lab_Report_ID`, `Student_id`, "
|
||||||
. "`Course_Group_id`, `Notes`, lab_report_submissions.`Marks`,
|
. "`Course_Group_id`, `Notes`, lab_report_submissions.`Marks`,
|
||||||
lab_report_submissions.Remarking_Reason,
|
lab_report_submissions.Remarking_Reason,
|
||||||
|
@ -387,11 +378,10 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
. " lab_reports_table.Lab_Report_ID in (select Lab_Report_ID from lab_report_submissions"
|
. " lab_reports_table.Lab_Report_ID in (select Lab_Report_ID from lab_report_submissions"
|
||||||
. " where (Status='Marked' or Status='Remarking') and (Student_id=$student_id or Course_Group_id=$group_id) and Course_ID=$course_id) ORDER by Submission_ID DESC");
|
. " where (Status='Marked' or Status='Remarking') and (Student_id=$student_id or Course_Group_id=$group_id) and Course_ID=$course_id) ORDER by Submission_ID DESC");
|
||||||
|
|
||||||
if(mysqli_num_rows($resultx)==0)
|
if(mysqli_num_rows($resultx)==0) {
|
||||||
{
|
|
||||||
echo '<div class="alert alert-info">You have no marked submissions.</div>';
|
echo '<div class="alert alert-info">You have no marked submissions.</div>';
|
||||||
|
} else {
|
||||||
} else { while($row = mysqli_fetch_assoc($resultx)) {
|
while($row = mysqli_fetch_assoc($resultx)) {
|
||||||
$title=$row['Lab_Title'];
|
$title=$row['Lab_Title'];
|
||||||
$marks=$row['Marks'];
|
$marks=$row['Marks'];
|
||||||
$Originalmarks=$row['Original_marks'];
|
$Originalmarks=$row['Original_marks'];
|
||||||
|
@ -407,15 +397,14 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
$notes=$row['Notes'];
|
$notes=$row['Notes'];
|
||||||
$status= $row['Status'];
|
$status= $row['Status'];
|
||||||
$remarking_reason=$row['Remarking_Reason'];
|
$remarking_reason=$row['Remarking_Reason'];
|
||||||
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 btn-sm btn-light'>Request remarking</button>";
|
$remarking="<button onclick='remarking(\"$rm_data\")' class='btn btn-sm btn-light'>Request remarking</button>";
|
||||||
}
|
}
|
||||||
if($status=='Remarking')
|
|
||||||
{
|
|
||||||
$remarking="<span style='color:orange'><i class='fa fa-info-circle'></i> Remarking request sent </span> <br> Reasons for remarking: <i>$remarking_reason </i> <br>";
|
|
||||||
|
|
||||||
|
if($status=='Remarking') {
|
||||||
|
$remarking="<span style='color:orange'><i class='fa fa-info-circle'></i> Remarking request sent </span> <br> Reasons for remarking: <i>$remarking_reason </i> <br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -430,11 +419,10 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
left JOIN course_group_members_table on course_group_members_table.Course_Group_id=lab_report_submissions.Course_Group_id
|
left JOIN course_group_members_table on course_group_members_table.Course_Group_id=lab_report_submissions.Course_Group_id
|
||||||
where Lab_Report_ID=$id and lab_report_submissions.Student_id='$student_id'");
|
where Lab_Report_ID=$id and lab_report_submissions.Student_id='$student_id'");
|
||||||
|
|
||||||
if(mysqli_num_rows($Sub_result)==0)
|
if(mysqli_num_rows($Sub_result)==0) {
|
||||||
{
|
|
||||||
echo "No Attachments found.";
|
echo "No Attachments found.";
|
||||||
|
} else {
|
||||||
} else { while($row = mysqli_fetch_assoc($Sub_result)) {
|
while($row = mysqli_fetch_assoc($Sub_result)) {
|
||||||
$at1=$row['Attachment1'];
|
$at1=$row['Attachment1'];
|
||||||
$at2=$row['Attachment2'];
|
$at2=$row['Attachment2'];
|
||||||
$at3=$row['Attachment3'];
|
$at3=$row['Attachment3'];
|
||||||
|
@ -458,30 +446,27 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}}
|
echo "</small></div></div>"; // This statement's position must be correct. Otherwise, the "My groups" part won't be placed correctly.
|
||||||
echo "</small></div></div>";
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div> <!-- Closing menu4 -->
|
||||||
|
</div> <!-- Closing tab-content -->
|
||||||
|
</div> <!-- Closing col-9 -->
|
||||||
|
|
||||||
</div>
|
<div class="col-3">
|
||||||
|
|
||||||
</div>
|
<h1 class="display-6">My groups</h1>
|
||||||
|
|
||||||
<br><br><br><br><br><br><br><br><br>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<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");
|
||||||
while($row = mysqli_fetch_assoc($resultx1)) {$count_groups=$row['Course_Group_id'];}
|
while($row = mysqli_fetch_assoc($resultx1)) {$count_groups=$row['Course_Group_id'];}
|
||||||
|
|
||||||
|
|
||||||
echo " <button onclick='createGroup()' class='btn btn-primary'>Create group</button>";
|
echo " <button onclick='createGroup()' class='btn btn-primary'>Create group</button>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$result = mysqli_query($con," SELECT `ID`, course_group_members_table.Course_Group_id, `Student_ID`,
|
$result = mysqli_query($con," SELECT `ID`, course_group_members_table.Course_Group_id, `Student_ID`,
|
||||||
|
@ -492,7 +477,8 @@ course_groups_table.Course_Group_id=course_group_members_table.Course_Group_id W
|
||||||
if(mysqli_num_rows($result)==0)
|
if(mysqli_num_rows($result)==0)
|
||||||
{
|
{
|
||||||
echo "You have no group in this course.";
|
echo "You have no group in this course.";
|
||||||
} else { while($row = mysqli_fetch_assoc($result)) {
|
} else {
|
||||||
|
while($row = mysqli_fetch_assoc($result)) {
|
||||||
$name=$row['Group_Name'];
|
$name=$row['Group_Name'];
|
||||||
$id=$row['Course_Group_id'];
|
$id=$row['Course_Group_id'];
|
||||||
$status=$row['Status'];
|
$status=$row['Status'];
|
||||||
|
@ -510,9 +496,11 @@ 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-sm btn-danger'>Delete group</button>";
|
$extra4 = "<button onclick='deleteGroup($id)' class='btn btn-sm btn-danger'>Delete group</button>";
|
||||||
|
|
||||||
echo "<div class='btn-default'><small> $name ($status) $extra $extra2 $extra3" .
|
echo "<ul class='list-group'>";
|
||||||
|
|
||||||
|
echo "<li class='list-group-item'><b>$name</b> ($status) $extra $extra2 $extra3" .
|
||||||
(($status == "Created")? "$extra4": "")
|
(($status == "Created")? "$extra4": "")
|
||||||
."</small></div>";
|
."</li>";
|
||||||
|
|
||||||
$rs2=mysqli_query($con,"SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID,
|
$rs2=mysqli_query($con,"SELECT `ID`, `Course_Group_id`, course_group_members_table.Student_ID,
|
||||||
course_group_members_table.`Status`,users_table.Full_Name FROM `course_group_members_table`
|
course_group_members_table.`Status`,users_table.Full_Name FROM `course_group_members_table`
|
||||||
|
@ -531,18 +519,17 @@ 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>$name - $Student_ID ($status) ".(($status != "Created")?"<button onclick='removeMember($Student_ID, $id)'
|
echo "<li class='list-group-item'>$name - $Student_ID ($status) ".(($status != "Created")?"<button onclick='removeMember($Student_ID, $id)'
|
||||||
class='btn btn-sm btn-warning'>Kick out</button>":"")."</li>";
|
class='btn btn-sm btn-warning'>Kick out</button>":"")."</li>";
|
||||||
} else{
|
} else{
|
||||||
echo "<li><small> $name - $Student_ID ($status)</small>";
|
echo "<li class='list-group-item'><small> $name - $Student_ID ($status)</small>";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
echo "<ul>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -553,8 +540,6 @@ where course_group_members_table.Course_Group_id=$id");
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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" />
|
||||||
|
|
|
@ -639,7 +639,7 @@ INNER JOIN course_students_table on course_students_table.Course_ID=courses_tabl
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='col-md-2'> <br>
|
<div class='col-md-2'> <br>
|
||||||
<input type='submit' class='btn btn-primary' value='Find'>
|
<button type='submit' class='btn btn-primary'>Find</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -86,7 +86,7 @@ include 'Header.php';
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<h3>Submit assignment</h3>
|
<h1 class="display-6">Submit assignment</h1>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
@ -99,25 +99,21 @@ include 'Header.php';
|
||||||
<input type='hidden' name='student_id' value='<?php echo $student_id; ?>' required=''/>
|
<input type='hidden' name='student_id' value='<?php echo $student_id; ?>' required=''/>
|
||||||
<input type='hidden' name='group_id' value='<?php echo $Group_ID; ?>' required=''/>
|
<input type='hidden' name='group_id' value='<?php echo $Group_ID; ?>' required=''/>
|
||||||
<input type='hidden' name='url' value='<?php echo $url; ?>' required=''/>
|
<input type='hidden' name='url' value='<?php echo $url; ?>' required=''/>
|
||||||
|
<div class='mb-3'>
|
||||||
Title
|
<label class='form-label'>Title</label>
|
||||||
<input type='text' name='title' placeholder='Ttle' class='form-control' required=''>
|
<input type='text' name='title' placeholder='Assignment submission title' class='form-control' required=''>
|
||||||
|
</div>
|
||||||
Attachment 1
|
<div class='mb-3'>
|
||||||
|
<label class='form-label'>Attachment 1</label>
|
||||||
<input type='file' name='attachment1' placeholder='Attachment 1' class='form-control' required=''>
|
<input type='file' name='attachment1' placeholder='Attachment 1' class='form-control' required=''>
|
||||||
|
<label class='form-label'>Attachment 2</label>
|
||||||
Attachment 2
|
|
||||||
<input type='file' name='attachment2' placeholder='Attachment 2' class='form-control'>
|
<input type='file' name='attachment2' placeholder='Attachment 2' class='form-control'>
|
||||||
|
<label class='form-label'>Attachment 3</label>
|
||||||
|
|
||||||
Attachment 3
|
|
||||||
<input type='file' name='attachment3' placeholder='Attachment 3' class='form-control' >
|
<input type='file' name='attachment3' placeholder='Attachment 3' class='form-control' >
|
||||||
|
<label class='form-label'>Attachment 4</label>
|
||||||
Attachment 4
|
|
||||||
<input type='file' name='attachment4' placeholder='Attachment 4' class='form-control' >
|
<input type='file' name='attachment4' placeholder='Attachment 4' class='form-control' >
|
||||||
<br>
|
</div>
|
||||||
|
<button type='submit' class='btn btn-primary'>Submit</button>
|
||||||
<input type='submit' class='btn btn-primary' value='Submit'><br>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue