Professional Documents
Culture Documents
Quiz Pro....
Quiz Pro....
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.
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.
Overview of the current problem is such that it overcome from all the problems
related to infrastructure, test evaluation, bias result, data security etc.
SYSTEM ANALYSIS
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:
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.
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.
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.
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:
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.
Operational Feasibility
Technical Feasibility
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.
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.
User
Fields data type
Answerers
Faculty
Question
User Management
Quiz management
system
Database
Quiz module
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') ?>
<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">×</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>
<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>
</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'].' ';
?>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>
<!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') ?>
}
}
})
})
$('.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
Admin
User
LIMITATIONS AND FUTURE SCOPE
7.1 Limitations of the System
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.
Conclusion
REFERENCES
W3school.( https://www.w3schools.com /)