Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 50

4.

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-1 Screenshot for Login


4.2.2 School Principal Page

Figure 4-2 Screenshot for School Principal Page


4.2.3 School Principal Page => New Student Registration Form

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-5 Screenshot for Administrator Page


4.2.6 Administrator Page => School Registration Form

Figure 4-6 Screenshot for Administrator Page => School Registration Form
4.2.7 CDD Page

Figure 4-7 Screenshot for CDD Page


4.2.8 Teacher Page

Figure 4-8 Screenshot for Teacher Page


4.2.9 Teacher Page => Submit Student Result Form

Figure 4-9 Screenshot for Teacher Page => Submit Student Result Form
4.2.10 Parent Page

Figure 4-10 Screenshot for Parent Page


4.2.11 Parent Page => View Result

Figure 4-11 Screenshot for Parent Page => View Result


4.2.12 Parent Page => Student Result

Figure 4-12 Screenshot for Parent Page => Student Result


4.2 Code Snippets
1. Administrator => New School Registration
<?php
include "../includes/session.php";
include_once'../includes/dbConnect.php';
?>

<!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>

2. School Principal => Assign Teacher

<?php include "../includes/schoolsession.php";?>


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<?php include "includes/title.php"; ?>
<link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/menu-style.css">
<link rel="stylesheet" href="../css/menu2XX.css">
<link rel="stylesheet" href="../css/select2.min.css">
<script src="../jquery/jquery-3.4.1.min.js"></script>
<script src="../js/select2.min.js"></script>
</head>
<link rel="shortcut icon" href="../images/favicon.ico">
<body>
<div id="container">
<header>
<?php $page = 'AssignTeacher'; include_once'includes/HeaderMenu.php'; ?>
</header>
<main>
<div class="page-content">
<div class="left-section">
<fieldset style="border: 1px solid #156377; border-radius:6px;">
<legend>Teachers Assignment Form </legend> <br>
<?php
include_once'../includes/dbConnect.php';
$schoolid=$_SESSION['User'];
$query3 = "SELECT * from year_table";
$result3=mysqli_query($conn,$query3);
$row3 = mysqli_fetch_array($result3);
$year=$row3['academicyear'];
$query4 = "SELECT * from school where schoolid='$schoolid'";
$result4 = mysqli_query($conn,$query4);
$row4 = mysqli_fetch_array($result4);
$school_level=$row4['level'];
echo ' <b>Acedamic Year: </b>'.$year.' <br> ';
echo '<br>';
echo '<hr style="height:4px">';
?>

<form method="POST" action="AssignTeacher.php" id="frm">


<div id="alert1">
<span class="closebtn"
onclick="this.parentElement.style.display='none';">&#10006;</span> <img
src="../images/icons/error.png"><strong>Failed!</strong> The Teacher is already
assigned for this section.
</div><div id="alert2"> <span class="closebtn"
onclick="this.parentElement.style.display='none';">&#10006;</span>
<img src="../images/icons/success.png"><strong>Success!</strong> The Teacher is assigned
successfully!</div>
<div id="alert3">
<span class="closebtn"
onclick="this.parentElement.style.display='none';">&#10006;</span> <img
src="../images/icons/warnning.png"><strong>Unselected field/s! </strong> Please select
fields.
</div>
<?php
echo ' <input type="text" name="school" value='.$schoolid.' hidden>
<input type="text" name="year" value='.$year.' hidden>';
$query2 = "SELECT teacherid,fName,mName,lName, CONCAT(fName,' ',mName,'
',lName) as fullname from teacher where schoolid='$schoolid' and status='active' ORDER
BY fullname " ;
$result2 = mysqli_query($conn,$query2);
echo '<div class="form-div">
<label >Teacher</label>
<select name="teacher" id="teacher" onchange="SelectFunction()">
<option value="">Select Teacher</option>';
while ($row2 = mysqli_fetch_array($result2))
{

echo '<option value="' . $row2['teacherid']. '">' . $row2['fullname'] . '</option>';


}

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>';
}

$query10 = "SELECT * from school where schoolid='$schoolid'";


$result10=mysqli_query($conn,$query10);
$row10 = mysqli_fetch_array($result10);
$principal=$row10['principal'];
$html .= '<p style="text-align:center">Generated By: <u>'.$principal.'</u></p>';
$html .= '<p style="text-align:center">Date: <u>'.date("D, M
d,Y").'</u><span>. . .</span>Signature: </p>';
// set document information
$pdf->SetAuthor('Group Members');
$pdf->SetCreator('Group Members');
$pdf->SetTitle($extension);
$pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, '', true);
$pdf->Output($extension.'.pdf', 'I');
}

?>

4. Techer => Submit Result

<?php include "../includes/session.php";?>

<!DOCTYPE html>

<html lang="en">

<head>
<meta charset="utf-8">
<?php include "includes/title.php"; ?>

<link rel="stylesheet" href="../css/style.css">

<link rel="stylesheet" href="../css/menu-style.css">

<link rel="stylesheet" href="../css/menu2XX.css">

<link rel="stylesheet" href="../css/aman.css">


</head>
<link rel="shortcut icon" href="../images/favicon.ico">

<body>

<div id="container">

<header>

<?php $page = 'SubmitResult'; include_once'includes/HeaderMenu.php'; ?>

</header>
<!-- header ends -->
<main>
<div class="page-content">

<div class="left-section">

<fieldset style="border: 1px solid #156377; border-radius:6px;">

<legend>Submit Result </legend>

<?php

include_once'../includes/dbConnect.php';

$teacherid=$_SESSION['User'];

$query1 = "SELECT * from teacher where teacherid='$teacherid'";

$result1=mysqli_query($conn,$query1);

$row1 = mysqli_fetch_array($result1);

$schoolid=$row1['schoolid'];

$query2 = "SELECT * from year_table";

$result2=mysqli_query($conn,$query2);

$row2 = mysqli_fetch_array($result2);

$academicyear=$row2['academicyear'];

$semester=$row2['semester'];

?>

<div id="frm">

<form action="SubmitResult.php" method="POST" >

<lablel id="slct">Select Your Assignment:</lablel>

<select name="assignment" onchange="this.form.submit()">


<option value="">-- Assignment --</option>;

<?php
$query3 = "SELECT * from assignment where teacherid='$teacherid' and
academicyear='$academicyear' ";

$result3=mysqli_query($conn,$query3);

while ($row3 = mysqli_fetch_array($result3))

$subjectcode=$row3['subjectcode'];

$query4 = "SELECT * from subject where subjectcode='$subjectcode'";

$result4=mysqli_query($conn,$query4);

$row4 = mysqli_fetch_array($result4);

echo '<option value = "' . $row3['assignmentid']. '">' .$row4['subjecttitle'].' - Grade:


'.$row3['grade'].' - Section: '.$row3['section'].'</option>';

?>

</select>

</form></div>

<?php

if (isset($_POST['assignment']) || isset($_POST['submit'])) {

$assignmentid=$_POST['assignment'];

$query5 = "SELECT * from assignment where assignmentid='$assignmentid' and


academicyear='$academicyear'";

$result5=mysqli_query($conn,$query5);
$row5 = mysqli_fetch_array($result5);
$subjectcode=$row5['subjectcode'];

$schoolid=$row5['schoolid'];

$grade=$row5['grade'];

$section=$row5['section'];

$query6 = "SELECT * from year_table";

$result6=mysqli_query($conn,$query6);

$row6 = mysqli_fetch_array($result6);

$semester=$row6['semester'];

$query7 = "SELECT * from subject where subjectcode='$subjectcode'";

$result7=mysqli_query($conn,$query7);

$row7 = mysqli_fetch_array($result7);

echo ' <b>Acedamic Year: </b>'.$academicyear .' <br>

<b>Semester: </b>'.$semester.' <br>

<b>Subject: </b>'.$row7['subjecttitle'].' <br>

<b>Grade: </b>'.$grade.' <br>

<b>Section: </b>'.$section.' <br> ';

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";

semesterid='$semester_id' ORDER BY fName";


$result8=mysqli_query($conn,$query8);

$exist=mysqli_num_rows($result8);

if($exist>0) {

$i=0;

echo '<table id="tbl">';

echo '<tr ><th>No</th><th>Full


Name</th><th>ID</th><th>Grade</th><th>Section</th><th>Total
Mark</th><th>Status</th><th>Add Result</th></tr>';

while ($row8= mysqli_fetch_array($result8))

$studentid=$row8['studentid'];

$query9 = "SELECT * from result where studentid='$studentid' and semester='$semester'


and subjectcode='$subjectcode'AND academicyear='$academicyear'";
$result9=mysqli_query($conn,$query9);
$row9 = mysqli_fetch_array($result9);
$query10 = "SELECT status from approval where semester='$semester' and
subjectcode='$subjectcode' and grade='$grade' AND section='$section' AND
schoolid='$schoolid' AND academicyear='$academicyear'";
$result10=mysqli_query($conn,$query10);
$row10 = mysqli_fetch_array($result10);

if(isset($row10['status'])) {

$status=$row10["status"];
}

else {

$status="";

if(isset($row9['mark']))

echo '';

else

$row9['mark']=NULL;

$row9['resultid']=NULL;

$i++;

echo ' <tr>

<td> '.$i.'</td>

<td> '.$row8['fullname'].'</td>

<td> '.$studentid.'</td>

<td> '.$grade.'</td>

<td> '.$section.'</td>

<td><input type="text" class="txtinput" value="'.$row9['mark'].'"


style="width:80px;background: ;border: ;" readonly></td>

<td><input type="text" class="txtinput2" value="'.$status.'"


style="width:120px;border:none;background:unset;border:unset;" readonly></td>
<td>
<form action="ResultManagement.php" method="POST">

<input type="text" name="resultid" value="'.$row9['resultid'].'" hidden>

<input type="text" name="studentid" value='.$row8['studentid'].' hidden>

<input type="text" name="schoolid" value='.$schoolid.' hidden>

<input type="text" name="grade" value='.$grade.' hidden>

<input type="text" name="section" value='.$section.' hidden>

<input type="text" name="semester" value="'.$semester.'" hidden>

<input type="text" name="subject" value='.$subjectcode.' hidden>

<input type="text" name="assignment" value='.$assignmentid.' hidden>

<input type="text" name="year" value='.$academicyear.' hidden>

<center><input type="submit" name="submit" class="btninput" value="Add"></center>

</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">

var txt= document.getElementsByClassName("txtinput");

var txt2= document.getElementsByClassName("txtinput2");

var btn1 = document.getElementsByClassName("btninput");

for (var i = 0; i < txt.length; i++)

if (txt[i].value =="" ) {

txt[i].value +="No result";

txt[i].style.color = "red";

txt2[i].value ="Not Determined";

else

txt[i].value +=" /100";

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">

<?php include_once'includes/right-side.php'; ?>

</div>

</div>

</main>

<div class="cleared"> </div>

<?php include_once'../includes/footer.php'; ?>

</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.

5.1 General Testing Strategy


In the testing phase of this document, we have used black box testing method which
conducts testing on the specified functions, if they are fully operational and/or if they have
errors. We have used the following testing techniques to test our system.

5.1.1 System Testing


Requirements testing: this test was conducted to inspect the use case model and identify use
case instances that are likely to cause failures and it is used to find the difference between
the implemented system and the functional requirements.

5.1.2 Usability Testing


Usability testing tries to find faults in the user interface design of the system [1]. We
performed the test by random users to check if there are faults in users are confused by the
user interface design of the system and if the system has accomplished its intended purpose
and to see if the users will accept the system as a new way to report a crime incident

5.2 Test Case


Some selected test cases for the functional requirements are as follows:

Test Scenario name: New Teacher Registration

Description: The functionality of new teacher’s registration is covered in this scenario

Table 5-1 test case for new teacher’s registration

# Test Case Input Expected Result Actual Result P F


Data
1 When empty - An error message An error message
values to text “this field is “this field is c c
fields are entered required” is displayed
required” is
displayed
2 When a non- E.g. $, An error message An error message
alphabet value is %, 2 “please enter “please enter c c
entered to First, characters only” is characters only” is
Second and last displayed displayed
name and
Username
3 When Sub city Error Message Error Message
select option, “Please select sub “Please select sub c c
value is not city” is displayed city” is displayed
selected
4 On wrong email E.g. Error Message Error Message
format ab@gm “Invalid Email “Invalid Email
format” is displayed format” is displayed
5 When gender Error Message Error Message
select option, “Please select “Please select c c
value is not gender” is displayed gender” is displayed
selected
6 When Error Message Error Message
Educational level “Education level “Education level c c
select option, should be selected” is should be selected”
value is not displayed is displayed
selected

Test Scenario name: Login

Description: The functionality of logging in is covered in this scenario

Table 5-2 test case for log in

# Test Case Input Expected Result Actual Result P F


Data
1 When empty - An error message An error message
values to “username and “username and c c
username and password are password are
password fields required” is displayed required” is
are entered displayed

2 When a user E.g. $, An error message An error message


name that doesn’t %, 2 “Invalid username or “Invalid username c c
exist is entered password” is or password” is
displayed displayed
3 User Login Redirects the user to Redirects the user to
his respective page his respective page c c

Test Scenario name: Set registration schedule

Description: The functionality of setting registration schedule is covered in this scenario

Table 5-3 test case for Set registration schedule

# Test Case Input Expected Result Actual Result P F


Data
1 When date select - Error Message Error Message
option, value is “Please select date” is “Please select date” c c
not selected displayed is displayed

2 When month E.g. $, Error Message Error Message


select option, %, 2 “Please select month” “Please select c c
value is not is displayed month” is displayed
selected

Test Scenario name: Register School

Description: The functionality of registering school is covered in this scenario

Table 5-1 test case for new school registration

# Test Case Input Expected Result Actual Result P F


Data
1 When empty - An error message An error message
values to text “this field is “this field is c c
fields are entered required” is displayed required” is
displayed
2 When school An error message An error message
level select “please select level” “please select level” c c
option, value is is displayed is displayed
not selected
3 When school type Error Message Error Message
select option, “Please select school “Please select c c
value is not type” is displayed school type” is
selected displayed
4 When sub city Error Message Error Message
select option, “Please select sub “Please select sub c c
value is not city” is displayed city” is displayed
selected
5 When a non- E.g. $,
An error message An error message
integer value is %, b “please enter numbers “please enter c c
entered to only” is displayed numbers only” is
Woreda displayed
4 On wrong email E.g. Error Message Error Message
format ab@gm “Invalid Email “Invalid Email c c
format” is displayed format” is displayed

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

You might also like