Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

INTRODUCTION

1.1 Problem Definition

If an organization wants to conduct assessments or quizzes without the need for


infrastructure development, a quiz application provides a platform to quickly administer
assessment tests in a convenient format.

1.2 Overview of the present working system

The current test system faces several critical issues, including inadequate
authentication measures, improper evaluation processes, and a lack of proper storage
and record-keeping. These problems undermine the integrity and reliability of the
testing process.

Here is a more detailed presentation of the issues:

Authentication: The current test system lacks proper authentication measures,


allowing individuals to take exams without verifying their identity. This opens the
possibility of impersonation or unauthorized test-takers, compromising the fairness
and accuracy of the assessment.

Evaluation: The evaluation process in the present system is flawed, lacking proper
mechanisms for ensuring accurate and consistent grading. The absence of
standardized evaluation criteria and rigorous quality control leads to subjective and
unreliable assessments. This can result in unfair outcomes and misrepresentation of
students' abilities.

Storage and Record-Keeping: The current test system fails to maintain adequate
records of exam results, answer scripts, and other relevant documents. The absence of
proper storage and record-keeping procedures makes it difficult to retrieve and
reference past exam records when needed. This compromises transparency,
auditability, and the ability to track student progress over time.

1.3 Drawbacks of the present working system

The current examination system is plagued by security vulnerabilities, which allow


unauthorized individuals to manipulate records and introduce bias into the testing
process. This compromises the integrity, fairness, and reliability of exams.

1.4 Overview of proposed system

Overview of the current problem is such that it overcome from all the problems
related to infrastructure, test evaluation, bias result, data security etc.

1.5 Advantages of the proposed system

1. User-Friendly Interface: The system provides an intuitive and user-friendly


interface for the quiz participants. The combination of HTML, CSS, and
Bootstrap allows for a visually appealing design with a responsive layout that
adapts to different screen sizes and devices. This ensures a seamless and
enjoyable user experience.
2. Dynamic Quiz Generation: With PHP's server-side processing capabilities, the
system can dynamically generate quiz questions from a database or predefined
set. This allows for flexibility in presenting a variety of questions to users,
making the quiz more engaging and challenging.
3. Instant Feedback and Result Calculation: The system can provide immediate
feedback to users upon submitting their quiz answers. PHP can process the
submitted answers, compare them with the correct answers, and calculate the
user's score. The result can be displayed instantly, giving users a sense of
accomplishment and motivation to participate.
4. Customizable and Extensible: The system's modular structure allows for easy
customization and extension. Additional features, such as timed quizzes,
difficulty levels, or multimedia content, can be incorporated into the system
using PHP and HTML. CSS and Bootstrap provide flexibility in styling and
branding the application according to specific requirements.
5. Secure Data Management: XAMPP's inclusion of MySQL ensures secure and
efficient data management. User information, quiz questions, and scores can
be securely stored and retrieved from the database. With proper database
design and security measures, the system can handle user data securely and
reliably.
6. Local Development Environment: XAMPP provides a convenient local
development environment for testing and debugging the application. It
eliminates the need for a live server during the development phase, allowing
developers to iterate quickly and efficiently.
7. Scalability and Portability: The system can be easily scaled to accommodate a
large number of users and quizzes. By leveraging the power of PHP and
MySQL, the application can handle concurrent users and manage a growing
database. Additionally, the system's portability allows for deployment across
different environments and hosting platforms.

1.5 Scope of proposed system

Our system is specifically designed to handle the requirement of conducting exams


without prior planning. It provides a robust solution that enables the successful
administration of exams by securely storing all data into a reliable database.

SYSTEM ANALYSIS

2.1 Identification of Need

The identification of the need for a quiz application arises from several factors
and considerations. Here are some key points highlighting the need for a quiz
application:

1. Efficient Assessment: Traditional assessment methods, such as pen-and-paper tests,


can be time-consuming and labor-intensive for both educators and students. A quiz
application provides an efficient and streamlined approach to assess knowledge and
skills, allowing for quick administration and automated grading.
2. Accessibility and Convenience: In today's digital age, students and learners expect
easy access to educational resources and tools. A quiz application can be accessed
from various devices, including smartphones, tablets, and computers, providing
flexibility and convenience for users to take quizzes anytime, anywhere.

3. Interactive Learning Experience: Quizzes offer an interactive learning experience by


engaging learners through active participation. A quiz application can incorporate
multimedia elements, such as images, videos, and interactive questions, enhancing
the engagement and effectiveness of the learning process.

4. Immediate Feedback: Timely feedback is crucial for effective learning. With a quiz
application, learners receive immediate feedback on their quiz performance,
allowing them to identify areas of strength and areas that require improvement. This
prompt feedback enables learners to adapt their study strategies and enhance their
understanding of the subject matter.

5. Customizability and Adaptability: A quiz application allows educators to create and


customize quizzes based on specific learning objectives, topics, or levels of
difficulty. This adaptability ensures that assessments align with the desired
educational outcomes and cater to the diverse needs of learners.

By addressing these needs, a quiz application provides a modern and effective tool for
educators and learners to assess knowledge, promote active learning, and enhance the
overall educational experience.

2.2 Preliminary Investigation

The preliminary investigation for a quiz application involves gathering


information and conducting an initial analysis to assess the feasibility and potential
benefits of developing and implementing such an application. Here are some key
steps involved in the preliminary investigation:

1. Identify Objectives: Clarify the objectives and goals of the quiz application.
Determine the purpose of the application, whether it is for educational
institutions, corporate training, recruitment assessments, or any other specific
use case.

2. Determine Scope and Functionality: Define the scope and desired


functionality of the quiz application. Identify the types of quizzes to be
supported (multiple-choice, true/false, fill in the blanks, etc.), the ability to
customize questions and quizzes, time-based assessments, result calculation
methods, and any specific features required (such as gamification, progress
tracking, or analytics)

3. Present Findings and Recommendations: Compile the findings of the


preliminary investigation into a report or presentation. Summarize the
objectives, scope, potential benefits, technical feasibility, resource
requirements, and risks associated with the quiz application. Provide
recommendations on whether to proceed with the development and
implementation of the application.

2.3 Feasibility Study

 Economic Feasibility

The economic feasibility of developing a quiz application using PHP, HTML, CSS,
Bootstrap, and database management. for personal development can be evaluated
based on the following considerations:

1. Time Investment: Developing the quiz application yourself will require a


significant investment of time. You need to assess the opportunity cost of
spending your time on development instead of other productive.

2. ActivitiesInfrastructure Costs: Evaluate the infrastructure requirements for


developing and running the quiz application. Determine if any additional
hardware or software is needed and consider the associated costs.

3. Development Skills: Assess your coding skills and expertise in PHP, HTML,
CSS, Bootstrap, and database management. If you already possess the
necessary skills, self-coding can be a cost-effective option. However, if you
are relatively new to programming or lack expertise in specific areas, it may
take longer to develop the system, potentially increasing development costs.

4. Scalability and Customization: Consider the scalability and customization


requirements of the quiz application. If you anticipate significant future
enhancements or scalability needs, self-coding might provide more flexibility
and control over the system's evolution.

 Operational Feasibility

If I talk about the operational feasibility it stand out in examination or


conducting quiz in the environment which were lacking in infrastructure.

 Technical Feasibility

Our quiz application excels in conducting exams or quizzes in environments


lacking infrastructure. It adapts to minimal resources, operates offline, is
lightweight and efficient, offers a user-friendly interface, simplifies data
management, and has minimal technical dependencies. It ensures a seamless
and accessible quiz experience in low-infrastructure settings.

2.4 Project Planning

Project planning is a crucial step in the development of any software application,


including a quiz application. It involves defining project objectives, outlining tasks
and milestones, estimating resources and timelines, and creating a roadmap for
successful project execution. Here are the key steps involved in project planning:
1. Define Project Scope and Objectives:

Clearly define the scope of the quiz application project, including its purpose, target
audience, features, and desired outcomes.
Set specific objectives and success criteria that the project aims to achieve, such as
creating a functional quiz application with a certain number of questions and a user-
friendly interface.
2. Identify Project Requirements:
Conduct a thorough analysis to identify and document the functional and non-
functional requirements of the quiz application.
Determine the necessary features, such as question generation, user authentication,
scoring, and result display.
3. Break Down the Project into Tasks:
Divide the project into smaller tasks or work packages, considering the dependencies
and sequence of activities.
Create a task breakdown structure or a work breakdown structure (WBS) to visualize
the project tasks and their hierarchy.
4. Estimate Resources and Timelines:
Determine the resources required for each task, including human resources
(developers, designers), hardware, software, and any external dependencies.
Estimate the time required to complete each task, considering factors such as
complexity, dependencies, and resource availability.
5. Create a Project Schedule:
Develop a project schedule or timeline that outlines the start and end dates of each
task, along with their dependencies.
Use project management tools like Gantt charts or project management software to
visualize the project schedule and monitor progress.
6. Define Project Deliverables:
Clearly define the deliverables or outputs expected from each project phase or
milestone.
This could include design documents, code repositories, user manuals, or a fully
functional quiz application.

2.5 Software requirement

1. XAMPP (Apache server)


2. Visual Studio (Code Editor)
3. Responsive Design Framework (Bootstrap)
4. Web browser (ex. Chrome, Firefox etc.,)
2.5 Entity Relationship Diagram
SYSTEM DESIGN

3.1 Modularisation details

Project having 3 modules:

1. Registration module
2. Login module
3. Quiz module

1. Registration module

The registration module allows users to create new accounts and register as
participants. It includes a user-friendly form for capturing user information such as
name, email, and password. The module validates the input, creates a new account in
the system, and handles password security.

2. Login module:
 Unified Login Page: The login module provides a single login page for both
users and admins. Users can enter their credentials, such as username and
password, and select their role (user or admin) to access the appropriate
functionalities.
 Role-Based Access: Once logged in, the system identifies the role of the user
(user or admin) and displays the relevant options and functionalities
accordingly.
Admin Privileges:
 CRUD Operations: The admin, upon logging in, has permission to perform
CRUD operations on quizzes. This includes creating new quizzes, updating
existing quizzes, deleting quizzes, and viewing quiz details.
 Quiz Assignment: The admin can assign quizzes to specific users or students.
This allows the admin to control which quizzes are available for users to
attempt.
User/Student Dashboard:
 Pending Quizzes: After logging in, users/students can see a list of pending
quizzes available to them. These are the quizzes assigned by the admin that the
user can attempt.
 Quiz Attempt: Users can select a quiz from the list and attempt it within the
specified time frame. The quiz interface may include multiple-choice
questions, checkboxes, or other question types.
 Result Display: Upon completing the quiz, the system displays the result to the
user, including the score or grade achieved. The result is also stored in the
database for future reference.

3. Quiz module:
 Create Quiz: The admin has the ability to create new quizzes. They can define
the quiz title, duration, and add multiple-choice or other question types with
their respective options and correct answers.
 Update Quiz: The admin can modify existing quizzes by editing the quiz
details, adding or removing questions, or modifying question options.
 Delete Quiz: The admin has permission to delete quizzes from the system.
This allows them to remove quizzes that are no longer relevant or required.
 Assign Quiz to Students: The admin can assign quizzes to specific students or
users. This ensures that only designated users have access to particular
quizzes.
 View Results: The admin can view the list of quiz results. This includes
accessing individual users' scores, reviewing their answers, and evaluating
their performance.
 User Management: The admin has the authority to manage users. This
includes the ability to delete user accounts, which may be necessary if a user is
no longer active or violates the application's terms and conditions.

3.2 Database Design

3.3 Data Dictionary

User
Fields data type

Id (primary key) int


name varchar
password varchar
status tinyint
username varchar
user type Tinyint,1
Date update datetime

Answerers

Fields data type

Id (primary key) int


user_id int
quiz_id int
question_id int
option_id int
is_right tinyint
date_updated datetime

Faculty

Fields data type

Id (primary key) int


user_id int
subject varchar
date_updated datetime

Question

Fields data type

Id (primary key) int


qid int
subject varchar
Order by int
date_updated datetime

Quiz student list


Fields data type

Id (primary key) int


Quiz id int
User id int
date_updated datetime

3.4 Data Flow Diagram

User Management

Test Management Participate Management

Quiz management
system

Academic Management Score Management

3.4 System Flowchart


Details Entry
Login module

Database
Quiz module

Result module Result Entry


3.7 Input Output Screens Designs.

Admin login:
User login
4 CODING: Source Code

Quiz.php

<!DOCTYPE html>
<html lang="en">
<head>
</head>
<?php include('header.php') ?>
<?php include('auth.php') ?>
<?php include('db_connect.php') ?>
<title>Quiz List</title>
</head>
<body>
<?php include('nav_bar.php') ?>

<div class="container-fluid admin">


<div class="col-md-12 alert alert-primary">Quiz List</div>
<button class="btn btn-primary bt-sm" id="new_quiz"><i class="fa
fa-plus"></i> Add New</button>
<br>
<br>
<div class="card">
<div class="card-body">
<table class="table table-bordered" id='table'>

<thead>
<tr>
<th>#</th>
<th>Title</th>
<th>Items</th>
<th>Point per Items</th>
<?php if($_SESSION['login_user_type'] ==1): ?>
<th>Faculty</th>
<?php endif; ?>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$where = '';
if($_SESSION['login_user_type'] == 2){
$where = " where u.id = ".$_SESSION['login_id']." ";
}
$qry = $conn->query("SELECT q.*,u.name as fname from quiz_list q
left join users u on q.user_id = u.id ".$where." order by q.title asc ");
$i = 1;
if($qry->num_rows > 0){
while($row= $qry->fetch_assoc()){
$items = $conn->query("SELECT count(id) as item_count from
questions where qid = '".$row['id']."' ")->fetch_array()['item_count'];
?>
<tr>
<td><?php echo $i++ ?></td>
<td><?php echo $row['title'] ?></td>
<td><?php echo $items ?></td>
<td><?php echo $row['qpoints'] ?></td>
<?php if($_SESSION['login_id'] ==1): ?>
<td><?php echo $row['fname'] ?></td>
<?php endif; ?>
<td>
<center>
<a class="btn btn-sm btn-outline-primary edit_quiz"
href="./quiz_view.php?id=<?php echo $row['id']?>"><i class="fa fa-task"></i>
Manage</a>
<button class="btn btn-sm btn-outline-primary edit_quiz" data-
id="<?php echo $row['id']?>" type="button"><i class="fa fa-edit"></i> Edit</button>
<button class="btn btn-sm btn-outline-danger remove_quiz" data-
id="<?php echo $row['id']?>" type="button"><i class="fa fa-trash"></i>
Delete</button>
</center>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal fade" id="manage_quiz" tabindex="-1" role="dialog" >
<div class="modal-dialog modal-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModallabel">Add New quiz</h4>
<button type="button" class="close" data-dismiss="modal" aria-
label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<form id='quiz-frm'>
<div class ="modal-body">
<div id="msg"></div>
<div class="form-group">
<label>Title</label>
<input type="hidden" name="id" />
<input type="text" name="title" required="required"
class="form-control" />
</div>
<div class="form-group">
<label>Points per question</label>
<input type="nember" name ="qpoints" required=""
class="form-control" />
</div>
<?php if($_SESSION['login_user_type'] == 1): ?>
<div class="form-group">
<label>Faculty</label>
<select name="user_id" required="required" class="form-
control" />
<option value="" selected="" disabled="">Select
Here</option>
<?php
$qry = $conn->query("SELECT * from users where
user_type = 2 order by name asc");
while($row= $qry->fetch_assoc()){
?>
<option value="<?php echo $row['id'] ?>"><?php echo
$row['name'] ?></option>
<?php } ?>
</select>
</div>
<?php else: ?>
<input type="hidden" name="user_id" />
<?php endif; ?>
</div>
<div class="modal-footer">
<button class="btn btn-primary" name="save"><span
class="glyphicon glyphicon-save"></span> Save</button>
</div>
</form>
</div>
</div>
</div>
</body>
<script>
$(document).ready(function(){
$('#table').DataTable();
$('#new_quiz').click(function(){
$('#msg').html('')
$('#manage_quiz .modal-title').html('Add New quiz')
$('#manage_quiz #quiz-frm').get(0).reset()
$('#manage_quiz').modal('show')
})
$('.edit_quiz').click(function(){
var id = $(this).attr('data-id')
$.ajax({
url:'./get_quiz.php?id='+id,
error:err=>console.log(err),
success:function(resp){
if(typeof resp != undefined){
resp = JSON.parse(resp)
$('[name="id"]').val(resp.id)
$('[name="title"]').val(resp.title)
$('[name="qpoints"]').val(resp.qpoints)
$('[name="user_id"] ').val(resp.user_id)
$('#manage_quiz .modal-title').html('Edit Quiz')
$('#manage_quiz').modal('show')

}
}
})

})
$('.remove_quiz').click(function(){
var id = $(this).attr('data-id')
var conf = confirm('Are you sure to delete this data.');
if(conf == true){
$.ajax({
url:'./delete_quiz.php?id='+id,
error:err=>console.log(err),
success:function(resp){
if(resp == true)
location.reload()
}
})
}
})
$('#quiz-frm').submit(function(e){
e.preventDefault();
$('#quiz-frm [name="submit"]').attr('disabled',true)
$('#quiz-frm [name="submit"]').html('Saving...')
$('#msg').html('')

$.ajax({
url:'./save_quiz.php',
method:'POST',
data:$(this).serialize(),
error:err=>{
console.log(err)
alert('An error occured')
$('#quiz-frm [name="submit"]').removeAttr('disabled')
$('#quiz-frm [name="submit"]').html('Save')
},
success:function(resp){
if(typeof resp != undefined){
resp = JSON.parse(resp)
if(resp.status == 1){
alert('Data successfully saved');
location.replace('./quiz_view.php?id='+resp.id)
}else{
$('#msg').html('<div class="alert alert-danger">'+resp.msg+'</div>')

}
}
}
})
})
})
</script>
</html>

Registration
<?php
include("database.php");
session_start();

if(isset($_POST['submit']))
{
$name = $_POST['name'];
$name = stripslashes($name);
$name = addslashes($name);

$email = $_POST['email'];
$email = stripslashes($email);
$email = addslashes($email);

$password = $_POST['password'];
$password = stripslashes($password);
$password = addslashes($password);

$college = $_POST['college'];
$college = stripslashes($college);
$college = addslashes($college);
$str="SELECT email from user WHERE email='$email'";
$result=mysqli_query($con,$str);
if((mysqli_num_rows($result))>0)
{
echo "<center><h3><script>alert('Sorry.. This email is already
registered !!');</script></h3></center>";
header("refresh:0;url=login.php");
}
else
{
$str="insert into user set
name='$name',email='$email',password='$password',college='$college'";
if((mysqli_query($con,$str)))
echo "<center><h3><script>alert('Congrats.. You have successfully registered
!!');</script></h3></center>";
header('location: welcome.php?q=1');
}
}
?>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Register | Online Quiz System</title>
<link rel="stylesheet" href="scripts/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="scripts/ionicons/css/ionicons.min.css">
<link rel="stylesheet" href="css/form.css">
<style type="text/css">
body{
width: 100%;
background: url(image/book.png) ;
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
</style>
</head>

<body>
<section class="login first grey">
<div class="container">
<div class="box-wrapper">
<div class="box box-border">
<div class="box-body">
<center> <h5 style="font-family: Noto Sans;">Register to </h5><h4
style="font-family: Noto Sans;">Online Quiz System</h4></center><br>
<form method="post" action="register.php"
enctype="multipart/form-data">
<div class="form-group">
<label>Enter Your Username:</label>
<input type="text" name="name" class="form-control"
required />
</div>
<div class="form-group">
<label>Enter Your Email Id:</label>
<input type="email" name="email" class="form-control"
required />
</div>
<div class="form-group">
<label>Enter Your Password:</label>
<input type="password" name="password" class="form-
control" required />
</div>
<div class="form-group">
<label>Enter Your College Name:</label>
<input type="text" name="college" class="form-control"
required />
</div>

<div class="form-group text-right">


<button class="btn btn-primary btn-block"
name="submit">Register</button>
</div>
<div class="form-group text-center">
<span class="text-muted">Already have an account! </span>
<a href="login.php">Login </a> Here..
</div>
</form>
</div>
</div>
</div>
</div>
</section>

<script src="js/jquery.js"></script>
<script src="scripts/bootstrap/bootstrap.min.js"></script>
</body>
</html>

Login

<!DOCTYPE html>
<html>
<head>
<?php include('header.php') ?>
<?php
session_start();
if(isset($_SESSION['login_id'])){
header('Location:home.php');
}
?>
<title>Login | Simple Online Quiz System</title>
</head>

<body id='login-body' class="bg-light">

<div class="card col-md-6 offset-md-3 text-center bg-primary mb-4">


<h3 class="he3-responsive text-white">Simple Online Quiz System</h3>
</div>
<div class="card col-md-4 offset-md-4 mt-4">
<div class="card-header-edge text-white">
<strong>Login</strong>
</div>
<div class="card-body">
<form id="login-frm">
<div class="form-group">
<label>Username</label>
<input type="username" name="username" class="form-control">
</div>
<div class="form-group">
<input type="password" name="password" class="form-control">
</div>
<div class="form-group text-right">
<button class="btn btn-primary btn-block"
name="submit">Login</button>
</div>

</form>
</div>
</div>

</body>

<script>
$(document).ready(function(){
$('#login-frm').submit(function(e){
e.preventDefault()
$('#login-frm button').attr('disable',true)
$('#login-frm button').html('Please wait...')

$.ajax({
url:'./login_auth.php',
method:'POST',
data:$(this).serialize(),
error:err=>{
console.log(err)
alert('An error occured');
$('#login-frm button').removeAttr('disable')
$('#login-frm button').html('Login')
},
success:function(resp){
if(resp == 1){
location.replace('home.php')
}else{
alert("Incorrect username or password.")
$('#login-frm button').removeAttr('disable')
$('#login-frm button').html('Login')
}
}
})

})
})
</script>
</html>

Home

<?php
include 'db_connect.php';
include 'auth.php';
?>

<!DOCTYPE html>
<html lang="en">
<head>
<?php include('header.php') ?>
<title>Home | Simple Online Quiz System</title>
</head>
<body>
<?php
include 'nav_bar.php';
?>
<div class="container-fluid admin">
<div class="card col-md-5 offset-2">
<div class="card-body">
<table class="table table-striped">
<thead>
<th>Quiz</th>
<th>Items</th>
<?php if($_SESSION['login_user_type'] == 3): ?>
<th>Status</th>
<?php else: ?>
<th>Had Taken</th>
<?php endif; ?>
</thead>
<tbody>
<?php
$where = '';
if($_SESSION['login_user_type'] == 2){
$where = " where u.id = ".$_SESSION['login_id']." ";
}
if($_SESSION['login_user_type'] == 3){
$where = " where q.id in (SELECT quiz_id from
quiz_student_list where user_id = '".$_SESSION['login_id']."') ";
}
$qry = $conn->query("SELECT q.*,u.name as fname from quiz_list
q left join users u on q.user_id = u.id ".$where." order by q.title asc ");
while($row= $qry->fetch_assoc()){
$items = $conn->query("SELECT count(id) as item_count
from questions where qid = '".$row['id']."' ")->fetch_array()['item_count'];
$swhere ='';
if($_SESSION['login_user_type'] == 3)
$swhere= ' and user_id = '.$_SESSION['login_id'].' ';

$taken = $conn->query("SELECT count(id) as item_count


from answers where quiz_id = '".$row['id']."' ".$swhere )->fetch_array()
['item_count'];
?>
<tr>
<td><?php echo $row['title'] ?></td>
<td class='text-center'><?php echo $items ?></td>
<?php if($_SESSION['login_user_type'] == 3): ?>
<td class='text-center'><?php echo $taken > 1 ? 'Taken' : 'Pending' ?
></td>
<?php else: ?>
<td class='text-center'><?php echo $taken ?></td>
<?php endif; ?>
</tr>
<?php
}

?>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>

Student quiz list

<!DOCTYPE html>
<html lang="en">
<head>
</head>
<?php include('header.php') ?>
<?php include('auth.php') ?>
<?php include('db_connect.php') ?>
<title>My Quiz List</title>
</head>
<body>
<?php include('nav_bar.php') ?>

<div class="container-fluid admin">


<div class="col-md-12 alert alert-primary">My Quiz List</div>
<br>
<div class="card">
<div class="card-body">
<table class="table table-bordered" id='table'>
<colgroup>
<col width="10%">
<col width="30%">
<col width="20%">
<col width="20%">
<col width="20%">
</colgroup>
<thead>
<tr>
<th>#</th>
<th>Quiz</th>
<th>Score</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$qry = $conn->query("SELECT * from quiz_list where id in (SELECT
quiz_id FROM quiz_student_list where user_id ='".$_SESSION['login_id']."' ) order
by title asc ");
$i = 1;
if($qry->num_rows > 0){
while($row= $qry->fetch_assoc()){
$status = $conn->query("SELECT * from history where quiz_id =
'".$row['id']."' and user_id ='".$_SESSION['login_id']."' ");
$hist = $status->fetch_array();
?>
<tr>
<td><?php echo $i++ ?></td>
<td><?php echo $row['title'] ?></td>
<td><?php echo $status->num_rows > 0 ? $hist['score'].'/'.
$hist['total_score'] : 'N/A' ?></td>
<td><?php echo $status->num_rows > 0 ? 'Taken' : 'Pending' ?></td>
<td>
<center>
<?php if($status->num_rows <= 0): ?>
<a class="btn btn-sm btn-outline-primary"
href="./answer_sheet.php?id=<?php echo $row['id']?>"><i class="fa fa-pencil"></i>
Take Quiz</a>
<?php else: ?>
<a class="btn btn-sm btn-outline-primary"
href="./view_answer.php?id=<?php echo $row['id']?>"><i class="fa fa-eye"></i>
View</a>
<?php endif; ?>
</center>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</body>
<script>
$(document).ready(function(){
$('#table').DataTable();
$('#new_faculty').click(function(){
$('#msg').html('')
$('#manage_faculty .modal-title').html('Add New Faculty')
$('#manage_faculty #faculty-frm').get(0).reset()
$('#manage_faculty').modal('show')
})
$('.edit_faculty').click(function(){
var id = $(this).attr('data-id')
$.ajax({
url:'./get_faculty.php?id='+id,
error:err=>console.log(err),
success:function(resp){
if(typeof resp != undefined){
resp = JSON.parse(resp)
$('[name="id"]').val(resp.id)
$('[name="uid"]').val(resp.uid)
$('[name="name"]').val(resp.name)
$('[name="subject"]').val(resp.subject)
$('[name="username"]').val(resp.username)
$('[name="password"]').val(resp.password)
$('#manage_faculty .modal-title').html('Edit Faculty')
$('#manage_faculty').modal('show')

}
}
})

})
$('.remove_faculty').click(function(){
var id = $(this).attr('data-id')
var conf = confirm('Are you sure to delete this data.');
if(conf == true){
$.ajax({
url:'./delete_faculty.php?id='+id,
error:err=>console.log(err),
success:function(resp){
if(resp == true)
location.reload()
}
})
}
})
$('#faculty-frm').submit(function(e){
e.preventDefault();
$('#faculty-frm [name="submit"]').attr('disabled',true)
$('#faculty-frm [name="submit"]').html('Saving...')
$('#msg').html('')

$.ajax({
url:'./save_faculty.php',
method:'POST',
data:$(this).serialize(),
error:err=>{
console.log(err)
alert('An error occured')
$('#faculty-frm [name="submit"]').removeAttr('disabled')
$('#faculty-frm [name="submit"]').html('Save')
},
success:function(resp){
if(typeof resp != undefined){
resp = JSON.parse(resp)
if(resp.status == 1){
alert('Data successfully saved');
location.reload()
}else{
$('#msg').html('<div class="alert alert-danger">'+resp.msg+'</div>')

}
}
}
})
})
})
</script>
</html>
Database connect to php:

<?php
$conn= new mysqli('localhost','root','','quiz_db')or die("Could not connect to
mysql".mysqli_error($con));

?>

SYSTEM TESTING

5.1 Program Testing

Program testing is the process of executing a program with the intent of


finding errors. A good test is one that has a high probability of finding an error.
Program testing cannot show the absence of error.
It can only show if errors are present. It is possible to write the tests before the
program. Test driven development.

5.2 Module Testing


Module testing is a process where you need to test each unit of these modules to
ensure they adhered to the best coding standards. Unless a module passes the
testing phase, it cannot go for the application testing process.
Module testing, aka component testing, help to early detection of error in
application testing

5.3 Integration Testing


Data can be lost across an interface, one module can on another, sub –function
when combined may not produce the desired major function. Global data structure
Can present problem integration testing step.
Then the entire program is test as awhile. Each of the module is integrated and
tested separately and later all module is tested together from some time to ensure
the system as a whole work well without any errors.

5.4 System Testing

System testing, also referred to as system-level tests or system-integration testing


is the process in which a quality assurance (QA) team evaluate how the various
components of an application interact together in the full, integrated system or
applications.

INPUT\OUTPUT SCREENS AND REPORTS


6.1 Sample Input\Output Screens

Admin
User
LIMITATIONS AND FUTURE SCOPE
7.1 Limitations of the System

 Scalability: Depending on the design and architecture of the application, it


may face scalability challenges as the number of users and quizzes increases.
Performance issues could arise if the system is not optimized to handle a large
user base or heavy concurrent quiz attempts.

 User Interface Customization: The level of customization for the user interface
may be limited, especially if the application relies heavily on pre-designed
templates or frameworks. Modifying the interface to meet specific branding or
design requirements may require additional development effort.
 Limited Question Types: The application may have limitations in terms of
question types supported. If the application only supports multiple-choice
questions, it may not cater to more complex question types such as essay-style
questions or interactive exercises.

 Limited Platform Support: The application may be designed to work on


specific platforms or browsers, potentially limiting its accessibility and
compatibility with a wide range of devices or operating systems. Cross-
platform compatibility and responsiveness should be considered for optimal
user experience.

7.2 Future Scope of the System

1. We can beautify it more with different changes in values and


colors.
2. Can add quizzes from internet.
3. Able to make full fledge online quiz platform.

Conclusion

 In conclusion, the quiz application developed using PHP, HTML, CSS,


Bootstrap, and XAMPP provides several advantages, including ease of
development, cross-platform compatibility, and the availability of robust
frameworks and libraries. It allows users to register, login, attempt quizzes,
and view their results.
 The application offers flexibility in creating and managing quizzes, with
CRUD operations and quiz assignment functionality accessible to the admin.
However, the application also has limitations, such as potential scalability
challenges, limited question types, and the need for additional customization
for the user interface.
 It is important to consider these limitations while planning and developing the
application. With proper planning, design, and maintenance, the quiz
application can serve as an effective tool for conducting quizzes and assessing
users' knowledge and understanding.

REFERENCES

 W3school.( https://www.w3schools.com /)

 YouTube (for database connectivity). (https://www.youtube.com/watch?


v=BGTx91t8q50&ab_channel=Telusko)

 Geeks for geeks (for concept). https://www.geeksforgeeks.org/php-tutorial/


 Stack overflow (errors). https://stackoverflow.com/

You might also like