Professional Documents
Culture Documents
Chapter Four - Implementation
Chapter Four - Implementation
4.1 INTRODUCTION
The Implementation phase is the phase which puts the design document into code. This
document consists of screenshots and tested input/output results of the implemented system.
4.2 SCREENSHOTS
4.2.1 Login
Figure 4-3 Screenshot for School Principal Page => New Student Registration Form
4.2.4 School Principal Page => Transfer Request Form
Figure 4-4 Screenshot for School Principal Page => Transfer Request Form
4.2.5 Administrator Page
Figure 4-6 Screenshot for Administrator Page => School Registration Form
4.2.7 CDD Page
Figure 4-9 Screenshot for Teacher Page => Submit Student Result Form
4.2.10 Parent Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Addis Ababa Education Bureau </title>
<link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/menu-style.css">
<link rel="stylesheet" href="../css/menu2XX.css">
<script src="js/registerSchoolValidation.js" type="text/javascript"> </script>
<style type="text/css">
span {
color: red;
font-size=24px;
font-wait: bold;
}
</style>
</head>
<link rel="shortcut icon" href="../images/favicon.ico">
<body>
<div id="container">
<header>
<?php $page = 'RegisterSchool'; include_once'includes/HeaderMenu.php'; ?>
</header>
<main>
<div class="page-content">
<div class="registration-form">
<form name="registrationForm" action="../administrator/RegisterSchoolAction.php"
onsubmit="return validate()" method="post">
<fieldset style="border: 1px solid #156377; border-radius:6px;">
<legend>Registration of School </legend>
<p>School Name:<br /> <input type="text" id="names" name="names" size="30"
placeholder="Enter name of the school..." /> <br> <span id="errorMessage1"> </span> </p>
<p>School Level<br>
<select name="level" id="level" required="">
<! including school levels >
<?php include "../includes/schooldivision3.php";?>
</select>
<br> <span id="errorLevel"> </span> </p>
<p>School Type<br>
<select name="type" id="type" required="">
<option value="">Select Type</option>
<option value="government">Government</option>
<option value="private">Private</option>
</select>
</p>
<p>Subcity<br>
<select name="kketema" id="kketema" required="">
<! including subcity division shortcut >
<?php include "../includes/subcitydivision.php";?>
</select>
<br> <span id="errorKketema"> </span> </p>
<p>Woreda: <br /> <input type="number" id="woreda" name="woreda" size="30"
placeholder="Enter woreda..." /> <br> <span id="errorWoreda"> </span> </p>
<p>Phone Number:<br> <input type="text" id="phone" name="phone" placeholder="## ##
## ## ##" size="30" /> <br> <span id="errorPhone"> </span> </p>
<p>Email:<br> <input type="text" id="schoolEmail" name="schoolEmail"
placeholder="name@domain.com" /> <br> <span id="errorEmail"> </span> </p>
<p>P.O.BOX:<br> <input type="number" id="pobox" name="pobox" placeholder="Enter
School P.O.BOX" /> <br> <span id="errorPOBox"> </span> </p>
<p>Principal Name:<br> <input type="text" name="principal" placeholder="Enter director
name" required="" /> <br> <span id="errorprincipal"> </span> </p
<p> <input type="submit" name="submit" value="Register" />
<input type="reset" value="Clear" /> </p>
</fieldset>
</form>
</div>
<div class="right-side">
<?php include_once'includes/right-side.php'; ?>
</div>
</div>
</main>
<div class="cleared"> </div>
<?php include_once'../includes/footer.php'; ?>
</div>
</body>
</html>
echo' </select><br><br>
</div>';
echo '<div class="form-div">
<label >Grade</label>
<select name="grade" id="grade">
<option value="">Select Grade</option>';
include "../includes/schooldivision.php";
?>
<div class="form-div">
<label >Subject</label>
<select id="subject" name="subject">
<option value="">Select Grade first</option>
</select><br><br>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('#grade').on('change', function(){
var gradevalue = $(this).val();
if(gradevalue){
$.ajax({
type:'POST',
url:'Assign.php',
data:'grade_value='+gradevalue,
success:function(html){
$('#subject').html(html);
}
});
}else{
$('#subject').html('<option value="">Select grade first>');
}
});
});
</script>
<div class="form-div" ><label >Section</label>
<select id="section" name="section">
<option value="">Select grade first</option>
</select>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('#grade').on('change', function(){
var gradevalue = $(this).val();
if(gradevalue){
$.ajax({
type:'POST',
url:'Assign2.php',
data:'grade_value='+gradevalue,
success:function(html){
$('#section').html(html);
}
});
}else{
$('#section').html('<option value="">Select Grade first</option>');
}
});
});
</script>
<button name="submit" style="margin-left: 30%;" class="btninput" >Assign</button>
</form>
<?php
if (isset($_POST['submit'])) {
$teacher=$_POST['teacher'];
$grade=$_POST['grade'];
$subject=$_POST['subject'];
$section=$_POST['section'];
$schoolid=$_POST['school'];
if ($teacher=="" || $subject=="") {
echo '<script>document.getElementById("alert3").style.display="block"; </script>';
}
else{
$query5="SELECT * from assignment where schoolid='$schoolid' and
subjectcode='$subject' and section='$section' and academicyear='$year'";
$result5=mysqli_query($conn,$query5);
$row=mysqli_num_rows($result5);
if($row>0) {
echo '<script>document.getElementById("alert1").style.display="block"; </script>';
else{
$query6="insert into assignment
(schoolid,teacherid,subjectcode,grade,section,academicyear)
values('$schoolid','$teacher','$subject','$grade','$section','$year')";
$result6=mysqli_query($conn,$query6)or die("Error:" . mysqli_error($conn));
echo '<script>document.getElementById("alert2").style.display="block"; </script>';
}
?>
<script type="text/javascript">
$('#section').select2({
placeholder: "Select Section",
allowClear: true
});
$('#teacher').select2({
placeholder: "Select Teacher",
allowClear: true
});
function SelectFunction()
{
document.getElementById("alert1").style.display="none";
document.getElementById("alert2").style.display="none";
document.getElementById("alert3").style.display="none";
}
</script>
</fieldset>
</div>
<div class="right-side">
<?php include_once'includes/right-side.php'; ?>
</div>
</div>
</main>
<div class="cleared"> </div>
<?php include_once'../includes/footer.php'; ?>
</div>
</body>
</html>
3. School Principal => Generate Students’ Roster
<?php
include "../includes/session.php";
include_once'../includes/dbConnect.php';
?>
<?php
// if view of student
if ($_POST['option']=='all') {
$schoolid=$_SESSION['User'];
$academicyear=$_POST['year'];
$semester=$_POST['semester'];
$grade=$_POST['grade'];
$section=$_POST['section'];
$query3 = "SELECT * from school where schoolid='$schoolid'";
$result3=mysqli_query($conn,$query3);
$row3 = mysqli_fetch_array($result3);
$level=$row3['level'];
$schoolname=$row3['name'];
define ('K_PATH_IMAGES', dirname( FILE ).'/images/');
define ('K_PATH_CACHE', sys_get_temp_dir().'/');
require_once('library/tcpdf.php');
// create new PDF document
//p is for portrait and L is for Landscape
// Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch].
//'A4' , A3.....are page formats
$pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8', false);
$headerstring=' P.O.Box : 6678 Addis Ababa Ethiopia
Tell : +251947247888
Fax : +251911247457';
// the first one is header logo, the second is logo width, the third is header title, the forth is
header string, both arrays are colors
//define ('K_PATH_IMAGES', dirname( FILE ).'/images/');
$pdf->SetHeaderData('aaeb_logo.jpg',80,'',$headerstring, array(0,10,255), array(0,10,128));
// set header and footer fonts
$pdf->setHeaderFont(Array('helvetica', '', 10));
$pdf->setFooterFont(Array('helvetica', '', 8));
// set default monospaced font
$pdf->SetDefaultMonospacedFont('courier');
// set margins left,top,right
$pdf->SetMargins(15, 35, 15);
//margin from top
$pdf->SetHeaderMargin(10);
// margin from bottom
$pdf->SetFooterMargin(10);
// set auto page breaks margin from bottom
$pdf->SetAutoPageBreak(TRUE, 25);
// set image scale factor(divider of the imaage)
$pdf->setImageScale(1.25);
// set default font subsetting mode
$pdf->setFontSubsetting(true);
$pdf->AddPage();
$html='';
$html .= '
<style>
h1{
color:blue;
}
label{
width: 700px;
display: inline-block;
text-decoration: underline;
}
th{
border: solid 1px
gray; font-weight:bold;
font-size:14px;
background-color:lightgray;
}
table{
border: solid 1px lightgray;
}
td{
border: solid 1px
gray; padding-
left:5px;
}
span{ color:
white;
}
</style>';
$html .= '<h1 style="text-align:center">'.$schoolname.'</h1>';
$extension="Students Roster";
$html .='<h3>'.$extension.'</h3>';
$html .='<p>Academic Year: <b>'.$academicyear.'</b> Semester: <b>'.$semester.' </b>
Grade: <b>'.$grade.'</b> Section: <b>'.$section.'</b></p>';
if ($semester=='Cumulative') {
$semester='Cumulative';
}
if ($semester=='I') {
$query6 = "SELECT student.studentid,student.fName,student.mName,student.lName,
CONCAT(student.fName,' ',student.mName,' ',student.lName) AS fullname,student.gender,
student_report.grade AS grade, student_report.section AS section,
student_report.first_sem_total AS FST, student_report.first_sem_average AS FSA,
student_report.first_sem_rank AS FSR , student_report.first_sem_status AS FSS
FROM student_report
INNER JOIN student ON student_report.studentid=student.studentid
WHERE student_report.schoolid='$schoolid' AND
student_report.academicyear='$academicyear' AND student_report.grade='$grade' AND
student_report.section='$section' AND student_report.first_sem_total IS NOT NULL
ORDER BY fullname";
$result6=mysqli_query($conn,$query6);
$rows=mysqli_num_rows($result6);
$i=0;
$html .= '<table cellspacing="0" cellpadding="1">
<tr><th style="width:30px;">No</th>
<th style="width:180px;">Student Full Name</th>
<th style="width:50px;">ID</th>
<th style="width:60px;">Gender</th>
<th style="width:60px;">Total</th>
<th style="width:60px;">Average</th>
<th style="width:50px;">Rank</th>
<th style="width:80px;">Status</th>
<th style="width:80px;">Number of Students</th></tr>';
$i=1;
while ($row6= mysqli_fetch_array($result6))
{
$fullname=$row6['fullname'];
$studentid=$row6['studentid'];
$gender=$row6['gender'];
$FST=$row6['FST'];
$FSR=$row6['FSR'];
$FSA=$row6['FSA'];
$FSS=$row6['FSS'];
//total students
$sql2="SELECT * FROM student_report WHERE grade='$grade' AND section='$section'
AND academicyear='$academicyear' AND first_sem_total IS NOT NULL ";
$result2=mysqli_query($conn,$sql2);
$totalstudents=mysqli_num_rows($result2);
$html .= '<tr>
<td>'.$i.'</td>
<td> '.$fullname.'</td>
<td> '.$studentid.'</td>
<td> '.$gender.'</td>
<td> '.$FST.'</td>
<td> '.$FSA.'</td>
<td> '.$FSR.'</td>
<td> '.$FSS.'</td>
<td>'.$totalstudents.'</td>
</tr>';
$i++;
}
$html .='</table>';
}
// semester II
if ($semester=='II') {
$query6 = "SELECT student.studentid,student.fName,student.mName,student.lName,
CONCAT(student.fName,' ',student.mName,' ',student.lName) AS fullname,student.gender,
student_report.grade AS grade, student_report.section AS section,
student_report.second_sem_total AS SST, student_report.second_sem_average AS SSA,
student_report.second_sem_rank AS SSR , student_report.second_sem_status AS SSS
FROM student_report
INNER JOIN student ON student_report.studentid=student.studentid
WHERE student_report.schoolid='$schoolid' AND
student_report.academicyear='$academicyear' AND student_report.grade='$grade'
AND student_report.section='$section' AND student_report.second_sem_total IS NOT
NULL ORDER BY fullname";
$result6=mysqli_query($conn,$query6);
$i=0;
$html .= '<table cellspacing="0" cellpadding="1">
<tr><th style="width:30px;">No</th>
<th style="width:180px;">Student Full Name</th>
<th style="width:50px;">ID</th>
<th style="width:60px;">Gender</th>
<th style="width:60px;">Total</th>
<th style="width:60px;">Average</th>
<th style="width:50px;">Rank</th>
<th style="width:80px;">Status</th>
<th style="width:80px;">Number of Students</th></tr>';
$i=1;
while ($row6= mysqli_fetch_array($result6))
{
$fullname=$row6['fullname'];
$studentid=$row6['studentid'];
$gender=$row6['gender'];
$SST=$row6['SST'];
$SSR=$row6['SSR'];
$SSA=$row6['SSA'];
$SSS=$row6['SSS'];
//total students
$sql2="SELECT * FROM student_report WHERE grade='$grade' AND section='$section'
AND academicyear='$academicyear' AND second_sem_total IS NOT NULL ";
$result2=mysqli_query($conn,$sql2);
$totalstudents=mysqli_num_rows($result2);
$html .= ' <tr>
<td>'.$i.'</td>
<td> '.$fullname.'</td>
<td> '.$studentid.'</td>
<td> '.$gender.'</td>
<td> '.$SST.'</td>
<td> '.$SSA.'</td>
<td> '.$SSR.'</td>
<td> '.$SSS.'</td>
<td>'.$totalstudents.'</td>
</tr>';
$i++;
}
$html .='</table>';
}
if ($semester=='Cumulative') {
$query6 = "SELECT student.studentid,student.fName,student.mName,student.lName,
CONCAT(student.fName,' ',student.mName,' ',student.lName) AS fullname,student.gender,
student_report.grade AS grade, student_report.section AS section,
student_report.cumulative_total AS CT, student_report.cumulative_average AS CA,
student_report.cumulative_rank AS CR , student_report.cumulative_status AS CS
FROM student_report
INNER JOIN student ON student_report.studentid=student.studentid
WHERE student_report.schoolid='$schoolid' AND
student_report.academicyear='$academicyear' AND student_report.grade='$grade' AND
student_report.section='$section' AND student_report.cumulative_total IS NOT NULL
ORDER BY fullname";
$result6=mysqli_query($conn,$query6);
$i=0;
$html .= '<table cellspacing="0" cellpadding="1">
<tr><th style="width:30px;">No</th>
<th style="width:180px;">Student Full Name</th>
<th style="width:50px;">ID</th>
<th style="width:60px;">Gender</th>
<th style="width:60px;">Total</th>
<th style="width:60px;">Average</th>
<th style="width:50px;">Rank</th>
<th style="width:80px;">Status</th>
<th style="width:80px;">Number of Students</th></tr>';
$i=1;
while ($row6= mysqli_fetch_array($result6))
{
$fullname=$row6['fullname'];
$studentid=$row6['studentid'];
$gender=$row6['gender'];
$CT=$row6['CT'];
$CR=$row6['CR'];
$CA=$row6['CA'];
$CS=$row6['CS'];
//total students
$sql2="SELECT * FROM student_report WHERE grade='$grade' AND section='$section'
AND academicyear='$academicyear' AND cumulative_total IS NOT NULL ";
$result2=mysqli_query($conn,$sql2);
$totalstudents=mysqli_num_rows($result2);
$html .= ' <tr>
<td>'.$i.'</td>
<td> '.$fullname.'</td>
<td> '.$studentid.'</td>
<td> '.$gender.'</td>
<td> '.$CT.'</td>
<td> '.$CA.'</td>
<td> '.$CR.'</td>
<td> '.$CS.'</td>
<td>'.$totalstudents.'</td>
</tr>';
$i++;
}
$html .='</table>';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<?php include "includes/title.php"; ?>
<body>
<div id="container">
<header>
</header>
<!-- header ends -->
<main>
<div class="page-content">
<div class="left-section">
<?php
include_once'../includes/dbConnect.php';
$teacherid=$_SESSION['User'];
$result1=mysqli_query($conn,$query1);
$row1 = mysqli_fetch_array($result1);
$schoolid=$row1['schoolid'];
$result2=mysqli_query($conn,$query2);
$row2 = mysqli_fetch_array($result2);
$academicyear=$row2['academicyear'];
$semester=$row2['semester'];
?>
<div id="frm">
<?php
$query3 = "SELECT * from assignment where teacherid='$teacherid' and
academicyear='$academicyear' ";
$result3=mysqli_query($conn,$query3);
$subjectcode=$row3['subjectcode'];
$result4=mysqli_query($conn,$query4);
$row4 = mysqli_fetch_array($result4);
?>
</select>
</form></div>
<?php
if (isset($_POST['assignment']) || isset($_POST['submit'])) {
$assignmentid=$_POST['assignment'];
$result5=mysqli_query($conn,$query5);
$row5 = mysqli_fetch_array($result5);
$subjectcode=$row5['subjectcode'];
$schoolid=$row5['schoolid'];
$grade=$row5['grade'];
$section=$row5['section'];
$result6=mysqli_query($conn,$query6);
$row6 = mysqli_fetch_array($result6);
$semester=$row6['semester'];
$result7=mysqli_query($conn,$query7);
$row7 = mysqli_fetch_array($result7);
echo '<hr>';
$query8="SELECT student.fName,student.mName,student.lName,
CONCAT(student.fName,' ',student.mName,' ',student.lName) AS fullname,
registration.studentid AS studentid, registration.grade AS grade, registration.section
AS section
FROM registration
INNER JOIN student ON registration.studentid=student.studentid
WHERE registration.grade='$grade' AND registration.section='$section' AND
registration.semester='$semester' AND registration.schoolid='$schoolid' AND
registration.academicyear='$academicyear' AND student.status='active'
ORDER BY fullname";
$exist=mysqli_num_rows($result8);
if($exist>0) {
$i=0;
$studentid=$row8['studentid'];
if(isset($row10['status'])) {
$status=$row10["status"];
}
else {
$status="";
if(isset($row9['mark']))
echo '';
else
$row9['mark']=NULL;
$row9['resultid']=NULL;
$i++;
<td> '.$i.'</td>
<td> '.$row8['fullname'].'</td>
<td> '.$studentid.'</td>
<td> '.$grade.'</td>
<td> '.$section.'</td>
</form>
</td>
<tr>';
echo "</table>";
else{
echo '<h3> <font color=red>There are no students registered in this semester or accedamic
year</h3>';
}
?>
<script type="text/javascript">
if (txt[i].value =="" ) {
txt[i].style.color = "red";
else
btn1[i].setAttribute("type", "hidden");
btn1[i].onmouseover = function()
this.style.backgroundColor = "#EE2E4F";
btn1[i].onmouseout = function()
{
this.style.backgroundColor = "orange";
}
}
</script>
</fieldset>
</div>
<div class="right-side">
</div>
</div>
</main>
</div></body>
</html>
5. CHAPTER FIVE - TESTING
Testing is the process of analyzing a system or its component to detect the differences
between specified and existing behavior. It is a systematic attempt to find errors in a planned
way in the implemented system [1]. This document finds the differences by evaluating the
system components.
Testing Materials
Facilities required: The system works on any electronic devices that can be
connected to an Internet connection.
Hardware Required: The testing is conducted on a computer that has an
Internet connection.
Software required: The computer should have a web browser that works properly
in order to conduct the testing.
Reference
[1] Object Oriented Systems Analysis and Design Using UML v2, (4th Edition),
John Wiley & Sons, 2012.
[2] Bernd Bruegge and Allen H. Dutoit, Object-Oriented Software Engineering
Using UML, Patterns, and Java, 3rd Edition, Prentice Hall, 2010.
[3] Randy Connolly and Ricardo Hoar, Fundamentals of Web Development,
Pearson Education Inc., 2015.
Martin Fowler, UML Distilled: A Brief Guide to the Standard Object Modeling Language, 3rd
Edition, Addison W