0% found this document useful (0 votes)
7 views89 pages

Updated Report2 - Merged

The document is a project report for a Quiz Web Application developed by M S Mridul and Aravind K J as part of their BSc in Computer Science. It outlines the design and implementation of a web-based platform that automates quiz management and study material sharing, utilizing technologies like PHP, MySQL, HTML, and CSS. The application aims to enhance the learning experience by providing features such as user authentication, real-time evaluation, and administrative controls, while also addressing the inefficiencies of traditional paper-based quizzes.

Uploaded by

myytchannel199
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views89 pages

Updated Report2 - Merged

The document is a project report for a Quiz Web Application developed by M S Mridul and Aravind K J as part of their BSc in Computer Science. It outlines the design and implementation of a web-based platform that automates quiz management and study material sharing, utilizing technologies like PHP, MySQL, HTML, and CSS. The application aims to enhance the learning experience by providing features such as user authentication, real-time evaluation, and administrative controls, while also addressing the inefficiencies of traditional paper-based quizzes.

Uploaded by

myytchannel199
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PROJECT REPORT

QUIZ WEB APPLICATION


Submitted in partial fulfilment of the requirement for the award of degree of

BSC Computer Science


Done by

M S MRIDUL
(REGNO:230021025529)
&
ARAVIND K J
(REGNO:230021025518)
Under the guidance of

Ms. SANISHA M S

Assistant Professor

CENTRE FOR PROFESSIONAL AND ADVANCED STUDIES


SCHOOL OF TECHNOLOGY AND APPLIED SCIENCES,
EDAPPALLY
AFFILIATED TO MG UNIVERSITY
CENTRE FOR PROFESSIONAL AND ADVANCED STUDIES

SCHOOL OF TECHNOLOGY AND APPLIED SCIENCES,

EDAPPALLY

AFFILIATED TO MG UNIVERSITY

Certificate

Certified that this is a Bonafide record of the project work entitled


QUIZ WEB APPLICATION done by M S MRIDUL & ARAVIND K J
(REG NO: 230021025529,230021025518) in partial fulfilment of the
requirement for the award of the degree of BSc Computer Science of
Mahatma Gandhi University.

Internal Guide Head of Department

Internal Examiner External Examiner


DECLARATION

I hereby declare that the project entitled QUIZ WEB APPLICATION is


submitted in partial fulfilment of the requirements for the award of the degree of
BSc Computer Science and it is a report of the original work done by us during
the period of June 2025 to October 2025 in Mahatma Gandhi University, School
of Technology Applied Sciences, Edappally.

Place:

date:

M S MRIDUL
&
ARAVIND K J
ACKNOWLEDGEMENT

Firstly, I would like to express my gratitude to The Almighty for showering his blessings
upon me in the completion of this venture.
I would like to express my deep sense of gratitude to Mr. Thirumeni K R, Principal, School
of Technology and Applied Sciences, Edappally for providing necessary resources for the
completion of this project.
I am very much grateful to Ms. Swapna M, Head of Department, School of Technology
and Applied Sciences, Edappally who extended her support and gave me courage towards
the development of my project.
My heartfelt gratitude to my project guide Ms. Sanisha M S, Assistant Professor School of
Technology and Applied Sciences for her valuable suggestions and guidance in the
preparation of the project report.
Last but not the least we are very much thankful to my parents, friends and my well wishers,
who had supported me directly or indirectly, during my project.
ABSTRACT

This project presents the design and implementation of a web-based Quiz Application aimed
at automating and simplifying the process of conducting quizzes and sharing study materials.
Built using PHP, MySQL, HTML, and CSS, the system provides functionalities such as user
registration, secure login, quiz participation, review posting, and access to study resources. It
features a dynamic database that stores quiz questions, tracks user responses, and records
performance in real time. The system also includes administrative controls for adding
quizzes, uploading study materials, and monitoring user feedback.
The application is designed with a focus on usability, scalability, and data integrity, offering a
responsive interface and secure access protocols. By replacing traditional paper-based
quizzes with a digital platform, the system improves efficiency, reduces manual work, and
enhances the overall learning experience for both students and administrators. Future
enhancements may include features like result analytics, leaderboard ranking, automated
grading improvements, and notification systems to further enrich functionality.
TABLE OF CONTENT
CHAPTER PAGE
NO.
[Link] 1
1.1 Introduction 2
1.3 Scope and Relevance of The Project 3
1.4 Objectives 3
[Link] ANALYSIS 4
2.1 Introduction 5
2.2 Existing System 5
2.3 Proposed System 6
2.4 Feasibility Study 7
2.4.1 Technical Feasibility 7
2.4.2 Operational Feasibility 7
2.4.3 Economic Feasibility 7
2.5 Software Engineering and Paradigm Applied 8
[Link] DESIGN 10
3.1 Introduction 11
3.2 Database and Design 12
3.2.1 Normalization 12
3.2.2 Data Dictionary 13
3.3 Process Design 16
3.4 Data Flow Diagram 16
3.5 Modular Design 18
3.6 Input Design 18
3.7 Output Design 19
[Link] ENVIORNMENT 21
4.1 Introduction 22
4. 2 Software Requirement Specification 22
4.2.1 Hardware Requirement Specification 23
4.3 Tools and Platforms 23
4.3.1 Front End Tools 23
4.3.2 Back End Tools 25
4.3.3 Operating System 28
5. SYSTEM IMPLEMENTATION 29
5.1 Introduction 30
5.2 Coding 31
5.2.1 Sample Codes 31
5.2.2 Code Validation and Optimization 32
6. SYSTEM TESTING 34
6.1 Introduction 35
6.2 Unit Testing 35
6.3 Integration Testing 36
6.4 System Testing 36
6.5 Test Plan & Test Cases 36
7. SYSTEM MAINTENANCE 38
7.1 Introduction 39
7.2 Maintenance Application 40
8. SYSTEM SECURITY MEASURES 42
8.1 Introduction 43
8.2 Operating System Level Security 43
8.3 Database Level Security 43
8.4 System Level Security 43
9. SYSTEM PLANNING AND SCHEDULING 45
9.1 Introduction 46
9.2 Planning a Software Project 46
9.2.1 Steps Involved in Planning a System 46
10. SYSTEM COST ESTIMATION 47
10.1 Introduction 48
10.2 Functional Point Based Estimation 49
11. FUTURE ENHANCEMENT AND SCOPE FURTHER DEVELOPMENT 50
11.1 Introduction 51
11.2 Merits of the System 51
11.3 Limitations of the System 51
11.4 Future Enhancement of the System 51
12. CONCLUSION 53
13. BIBLIOGRAPHY 55
14. APPENDIX (User Manual with Screenshots and Sample Code) 57
QUIZ WEB APPLICATION BSC Computer Science

[Link]

School of Technology and Applied Sciences pg. 1


QUIZ WEB APPLICATION BSC Computer Science

1.1 INTRODUCTION
Managing quizzes and study materials manually can be a time-consuming and inefficient
process, especially in academic environments where large numbers of students and multiple
subjects are involved. Traditional methods, such as printed question papers or offline study
material distribution, often lack flexibility, real-time updates, and easy access. This project
aims to overcome these challenges by developing a dynamic, web-based Quiz Application
that automates essential academic activities such as conducting quizzes, sharing study
materials, posting reviews, and managing user interactions. Built using PHP, MySQL,
HTML, and CSS, the system provides an intuitive and responsive interface for both
administrators and students, ensuring smooth and effective learning engagement.

The implementation of this system addresses several issues faced in conventional setups. It
eliminates the need for physical quiz distribution, reduces errors in evaluation, and
streamlines the entire process with automated database updates. Students can easily attempt
quizzes, access study materials, and share feedback without relying on manual processes or
waiting for faculty intervention. On the other hand, administrators benefit from simplified
quiz management, with features to create, update, or delete quizzes, upload study resources,
and monitor student reviews. The system also incorporates secure login mechanisms to
ensure authorized access and data protection.

By digitizing quiz management and study resource distribution, this project improves
accessibility, transparency, and learning outcomes. Students can participate from any device
with internet access, reducing physical constraints and improving academic convenience.
The modular design of the system allows future enhancements such as timed quizzes,
automated result generation, performance analytics, and personalized recommendations.
Overall, the Quiz Web Application not only modernizes the way quizzes and study resources
are managed but also empowers both students and administrators with a faster, smarter, and
more reliable academic platform.

1.2 SCOPE AND RELEVANCE OF PROJECT


The scope of this project is to design and develop a web-based quiz application that supports
two main roles: Admin and Student/User. The Admin can post quizzes, upload study
materials, and view user reviews, while Students can attempt quizzes, access study resources,

School of Technology and Applied Sciences pg. 2


QUIZ WEB APPLICATION BSC Computer Science

and share feedback. The system ensures easy accessibility through a web browser, providing
an interactive learning and assessment platform. It covers user authentication, question
management, review handling, and material sharing, making it suitable for academic
institutions and self-learning purposes.

This project is highly relevant in today’s educational and digital learning environment. With
increasing demand for online assessments and e-learning tools, a web-based quiz application
provides flexibility, accessibility, and efficiency. It reduces dependency on traditional paper-
based quizzes and manual evaluation, offering instant results and better engagement for
learners. For administrators, it simplifies quiz management and content distribution. The
project contributes to modern education methods, making learning more interactive and
assessments more transparent.

1.3 OBJECTIVES

The main objective of this project is to develop a user-friendly web application for conducting
quizzes online. The system aims to provide a secure login for both Admins and Students,
ensuring that only authorized users can access their respective functionalities. Admins can
efficiently manage quizzes by adding questions, uploading study materials, and viewing user
feedback, while Students can attempt quizzes, access learning resources, and share their
reviews. The application is designed to provide instant evaluation and results, improving the
learning experience and helping students track their performance. Additionally, it reduces the
manual effort involved in quiz management and assessment, making the process faster and
more accurate. Overall, the project aims to create a scalable platform that can be utilized by
academic institutions and individual learners for interactive and effective learning.

School of Technology and Applied Sciences pg. 3


QUIZ WEB APPLICATION BSC Computer Science

[Link] ANALYSIS

School of Technology and Applied Sciences pg. 4


QUIZ WEB APPLICATION BSC Computer Science

2.1 INTRODUCTION

In today’s digital era, online learning and assessments have become an integral part of
education. Traditional methods of conducting quizzes and evaluating students manually
are often time-consuming and prone to errors. To address these challenges, this project
focuses on developing a web-based quiz application that provides an interactive and
efficient platform for both learners and administrators. The application supports two main
roles: Admin and Student/User. Admins can create and manage quizzes, upload study
materials, and monitor feedback, while students can attempt quizzes, access learning
resources, and provide reviews. By automating quiz management and result evaluation,
the system ensures faster, more accurate, and organized assessment. This project not only
enhances the learning experience but also reduces administrative workload, making it a
relevant tool for modern educational environments.

2.2 EXISTING SYSTEM

• Traditional quizzes in colleges are conducted on paper, making evaluation


time-consuming.
• Manual checking of answer sheets leads to errors and delays in result
publication.
• Students have limited access to past question papers or study materials.
• There is no centralized platform to store quizzes, reviews, or study content.
• Admins or teachers face difficulty in tracking student performance
efficiently.
• Communication between students and teachers regarding quizzes is often
informal or delayed.
• Lack of real-time feedback, which affects student learning and improvement.
• No authentication system, so records and results are prone to mismanagement
or unauthorized access

School of Technology and Applied Sciences pg. 5


QUIZ WEB APPLICATION BSC Computer Science

2.3 PROPOSED SYSTEM

• A web-based quiz application allowing students to attempt quizzes online anytime,


anywhere.
• Admin panel to create, update, and delete quizzes, questions, and study materials.
• User authentication system for secure login of students and admins.
• Real-time quiz evaluation and automatic result generation.
• Centralized database to store quizzes, study materials, and user performance.
• Option for students to review and rate study materials for better resource quality.
• Performance tracking for students, helping admins/teachers identify weak areas.
• Efficient communication between admins and students through notifications or
messages.
• Accessible interface on desktop and mobile devices.
• Reduced errors and faster process compared to traditional paper-based quizzes.

2.4 FEASIBILITY STUDY

The proposed quiz web application is technically feasible as it can be developed using
widely supported and reliable technologies such as HTML, CSS, JavaScript, PHP, and
MySQL. These technologies are easily available, well-documented, and compatible with
most web servers and hosting platforms. The system design is modular, allowing
separate development of admin and student functionalities, which simplifies
implementation and maintenance. Additionally, the required hardware and software
resources are minimal, and the development team possesses the necessary skills to build,
deploy, and manage the application efficiently, ensuring smooth operation and scalability
for future enhancements. The feasibility study is conducted in the following phases:

● Technical feasibility
● Operational feasibility
● Economical feasibility

School of Technology and Applied Sciences pg. 6


QUIZ WEB APPLICATION BSC Computer Science

2.1.1 TECHNICAL FEASIBILITY

The technical feasibility of this Quiz Web Application focuses on whether the required
technologies, tools, and expertise are available to build the system successfully. The project
is developed using standard web technologies such as HTML for structuring content, CSS
for styling, and JavaScript for interactivity, along with PHP for server-side scripting and
MySQL for database management. These technologies are open-source, widely adopted, and
easy to integrate, which makes the system cost-effective and reliable. The chosen stack
efficiently supports core features like user authentication, role-based access (Admin and
Student/User), quiz creation, question management, result storage, study material access, and
review submissions. Since these technologies have strong community support and
continuous updates, troubleshooting, security patches, and future improvements are
manageable. Therefore, the Quiz Web Application is technically feasible.

2.1.2 OPERATIONAL FEASIBILITY

The Quiz Web Application is operationally feasible due to its simplicity, user-friendly design,
and alignment with students’ and faculty’s daily academic activities. Its intuitive interface
ensures that both Admins and Students can quickly navigate and use the system without
requiring technical expertise. Features like quiz attempts, study material access, and review
submissions enhance learning and engagement without disrupting existing routines. The
system can be deployed online with minimal resources, and its modular design allows for
easy maintenance and future upgrades. Overall, it provides a practical, sustainable solution
that users can seamlessly integrate into their academic workflow.

2.1.3 ECONOMIC FEASIBILITY

The Quiz Web Application is economically feasible due to its low development and
deployment costs. It can be built using free or open-source technologies such as Angular,
HTML, CSS, TypeScript, and lightweight databases like Firebase, eliminating the need for
costly software licenses. The system requires minimal hardware resources and can be hosted
on free or low-cost platforms like GitHub Pages or Firebase Hosting for demonstration
purposes. Since the project is intended for academic use, there are no commercial overheads,
and maintenance can be easily managed by the developer. Overall, the cost-benefit ratio is
highly favourable, making the Quiz Web Application a practical and affordable solution for
learning, assessment, and academic evaluation.

School of Technology and Applied Sciences pg. 7


QUIZ WEB APPLICATION BSC Computer Science

2.2 SOFTWARE ENGINEERING PARADIGM APPLIED

Software paradigms refer to the methods and steps, which are taken while designing the
software. There are many methods proposed and are in work today, but we need to see where
in the software engineering these paradigms stand. Programming paradigm is a subset of
Software design paradigm which is further a subset of Software development paradigms.

Software Development Paradigm

This Paradigm is known as software engineering paradigms where all the engineering
concepts pertaining to the development of software are applied. It includes various
researches and requirement gathering which helps the software product to build. It consists
of

• Requirement gathering

• Software design

• Programming
School of Technology and Applied Sciences pg. 8
QUIZ WEB APPLICATION BSC Computer Science

Software Design Paradigm

This paradigm is a part of Software Development and includes:

• Design

• Maintenance

• Programming

Programming Paradigm

This paradigm is related closely to programming aspect of software development. This


includes:

• Coding

• Testing

• Integration

School of Technology and Applied Sciences pg. 9


QUIZ WEB APPLICATION BSC Computer Science

[Link] DESIGN

School of Technology and Applied Sciences pg. 10


QUIZ WEB APPLICATION BSC Computer Science

3.1 INTRODUCTION

System design is the crucial process of shaping the system’s architecture, modules,
interfaces, and data to meet the specified requirements. This phase can be viewed as the
practical application of systems theory to the development of the Quiz Web Application. It
involves defining the structure and components of the online platform, ensuring that it aligns
with the needs and goals of this project. In this process, there is a degree of overlap with the
disciplines of system analysis, system architecture, and systems engineering, all working
together to create a robust and efficient Quiz Web Application.

TYPES OF SYSTEM DESIGN

Logical design

Logical design pertains to an abstract representation of the data flow, inputs and outputs of
the system. It describes the inputs (source), outputs (destinations), databases (data stores),
procedures (data flows) all in a format that meets the user requirements.

Physical design

Physical design relates to the actual input and outputs processes of the system. It focuses on
how data is entered into a system, verified, processed, and displayed as output.

Architectural design

It is also known as high level design that focuses on the design of system architecture. It
describes the structure and behaviour of the system. It defines the structure and relationship
between various modules of system development process.

Detailed Design

It follows Architectural design and focuses on development of each module.

Conceptual Data Modelling

It is representation of organization data which includes all the major entities and
relationship. System analyses develop a conceptual data model for the current system that
supports the scope and requirement for the proposed system.

School of Technology and Applied Sciences pg. 11


QUIZ WEB APPLICATION BSC Computer Science

3.2 DATABASE DESIGN

A database is a collection of interrelated data stored with minimum redundancy to serve


many users quickly and efficiently. The general objective is to make information access easy,
quick, inexpensive and flexible for users. The general theme behind a database is to integrate
all information. Database design is recognized as a standard of management information
system and is available virtually for every computer system. In database design several
specific objectives are considered:

➢ Ease of learning and use


➢ Controlled redundancy
➢ Data independence
➢ More information at low cost
➢ Accuracy and integrity
➢ Recovery from failure
➢ Privacy and security
3.2.1 NORMALIZATION
Designing a database is complete task and the normalization theory is a useful aid in the
design process. The process of normalization is concerned with transformation of conceptual
schema into computer representation form. There will be need for most databases to grow by
adding new attributes and new relations. The data will be used new ways. Tuple will be
added and deleted. Information stored may undergo updating also. New association may also
be added. In such situation the performance of a database is entirely depend upon its design.
A bad database design may lead to certain undesirable things like:
1. Repetition of information
2. Inability to represent certain information.
3. Loss of information
To minimize these anomalies, normalization may be used. If the database is in a normalized
from, the data can be growing without, in most cases, forcing the rewriting application
programs. This is important because of the excessive and growing cost of maintaining an
organization’s application programs and its data from the disrupting effects of database
growth. As the quality of application programs increase, the cost of maintaining database can
also encompass many related activities of an organization there by minimizing the need for
rewriting the applications of programs. Thus, normalization helps one attain a good database
design and there by ensures continued efficiency of database. We can define the procedure as
the successive reduction of a given collection of relations to some more desirable from. This
procedure is reversible.

School of Technology and Applied Sciences pg. 12


QUIZ WEB APPLICATION BSC Computer Science

That is, it is always possible to take the output from the procedure and convert them back
into input. In this process, no information is lost. So, it is also called “no lose
decomposition”.
FIRST NORMAL FORM:
A relation is first normal form (1NF) if and all its attributes are based on single domain. The
objective of normalization a table is to remove its repeating groups and ensure that all entries
of the resulting table have at most single value.
SECOND NORMAL FORM:
A table is said to be second normal form (2NF), when it is in 1NF and every attribute in the
record is functionally dependent upon the whole key, and not just a part of the key.
THIRD NORMAL FORM:
A table is in third normal form (3NF). When it is in 2NF and every non-key attribute is
functionally dependent on just the primary key.

3.2.2 DATA DICTIONARY


Tables :
[Link]
[Link]
[Link]
[Link]
5.review_replies
[Link]

MATERIALS TABLE

School of Technology and Applied Sciences pg. 13


QUIZ WEB APPLICATION BSC Computer Science

QUESTIONS TABLE

QUIZZES TABLE

School of Technology and Applied Sciences pg. 14


QUIZ WEB APPLICATION BSC Computer Science

REVIEWS TABLE

REVIW_REPLIES TABLE

USERS TABLE

School of Technology and Applied Sciences pg. 15


QUIZ WEB APPLICATION BSC Computer Science

3.3 PROCESS DESIGN


A data flow diagram (DFD) is a graphical representation of the "flow" of data through an
information system, modelling its process aspects. A DFD is often used as a preliminary step
to create an overview of the system without going into great detail, which can later be
elaborated. DFDs can also be used for the visualization of data processing (structured
design). A DFD shows what kind of information will be input to and output from the system,
how the data will advance through the system, and where the data will be stired .
It does not show information about process timing or whether processes will operate in
sequence or in parallel, unlike a traditional structured flowchart which focuses on control
flow, or a UML activity workflow diagram, which presents both control and data, flows as a
unified model. Rules for creating DFD
• The name of the entity should be easy and understandable without any extra assistance.
• The processes should be numbered or put in ordered list to be referred easily.
• The DFD should maintain consistency across all the DFD level

3.4 DATAFLOW DIAGRAM

LEVEL-0/ CONTEXT LEVEL

School of Technology and Applied Sciences pg. 16


QUIZ WEB APPLICATION BSC Computer Science

LEVEL-1 ADMIN

LEVEL-1 USER

School of Technology and Applied Sciences pg. 17


QUIZ WEB APPLICATION BSC Computer Science

3.5 MODULAR DESIGN

A software system is always divided into several sub systems that makes it easier for the
development. A software system that is structured into several subsystems makes it easy for
the development and testing. The different subsystems are known as the modules and the
process of dividing an entire system into subsystems is known as modularization or
decomposition. The system under consideration has been divided into several modules taking
in consideration the above-mentioned criteria. Student Result Management System provides
an efficient way for managing the data of users. The main modules involved in the system
are:
ADMIN
• Admin Login – Admin can log in using a username and password provided.
• Manage Quizzes – Admin can create, update, and delete quiz questions.
• Manage Study Materials – Admin can upload, edit, or remove study resources.
• Review Management – Admin can view feedback or reviews submitted by users.

USER
• User Login – Users can log in with their username and password.
• Attempt Quizzes – Users can participate in quizzes provided by the admin.
• Access Study Materials – Users can read or download study materials shared by the
admin.
• Post Reviews/Feedback – Users can submit their reviews or feedback about the
quizzes and study materials.

3.6 INPUT DESIGN


Input design is a part of the overall design. The input methods can be broadly classified.
Internal controls must be established for monitoring the number of inputs and for ensuring
that the data are valid. The basic steps involved in input design are
3.5.1 Review input requirements.
3.5.2 Decide how the input data flow will be implemented.
3.5.3 Decide the source document.
3.5.4 Prototype online input screens.
3.5.5 Design the input

School of Technology and Applied Sciences pg. 18


QUIZ WEB APPLICATION BSC Computer Science

The quality of the system input determines the quality of the system output. Input
specifications describe the way data enter the system for processing. Input design features
can ensure the reliability of the system and produce result

3.7 OUTPUT DESIGN


A quality is one, which meets the requirements of end user and present the information
clearly. In any system results of processing are communicated to the user and to the other
system through outputs. In the outputs design it is determined how the information is to be
displayed for immediate need.
It is the most important and direct source information is to user. Efficient and intelligent
output design improves the system’s relationships with the user and helps in decision
making. The objectives of the output design are to convey the information of all the past
activities, current status and to emphasis important events. The output generally refers to the
results and information that is generated from the system. Outputs from computes are
required primarily to communicate the result of processing to the users.
Output also provides a means of storage by coping the results for later reference in
consolation. There is a chance that some of the end users will not actually operate the input
data or information through workstations but will see the output from the system. Two
phases of the output design are:
• Output Definition
• Output Specification
Output definitions considers the type of outputs contents, its frequency and its volume, the
appropriate outputs media is determined for output. Once the media is chosen, the details
specification of output documents are carried out. The nature of output required from the
proposed system is determined during logical design stage. It takes the outline of the output
from the logical design and produces output as specified during the logical design phase. In a
project, when designing the output, the system must accomplish the following:

➢ Determine the information to present.

➢ Decide whether to display, speak the information and select the output medium

. ➢ Arrange the information in acceptable format.

➢Decide how to distribute output to the intended receipt.


Thus, by following the above specification, a high-quality output can be generated. Outputs
from compute system are required primarily to communicate thee result of processing to
users. Computer output is the most important and direct source of information to the user.

School of Technology and Applied Sciences pg. 19


QUIZ WEB APPLICATION BSC Computer Science

Efficiency, intelligible output should improve the system’s relationship with the user and
help in decision making.

School of Technology and Applied Sciences pg. 20


QUIZ WEB APPLICATION BSC Computer Science

[Link] ENVIORNMENT

School of Technology and Applied Sciences pg. 21


QUIZ WEB APPLICATION BSC Computer Science

4.1 INTRODUCTION
Software engineering environment a software system that provides support for the
development, repair, and enhancement of software, and for the management and control of
these activities. A typical system contains a central database and a set of software tools. The
central database acts as a repository for all information related to a project throughout the
lifetime of that project. The software tools offer support for the various activities, both
technical and managerial, that must be performed on the project.
4.2 SOFTWARE REQUIREMENT SPECIFICATION
The software requirements specification (SRS) is a means of translating the ideas in the
minds of clients into a formal documentation. This document forms the development and
software validation. The basic reason for the difficulty in software requirement specification
comes from the fact that there are three interested parties-the clients, the end users and the
software developer. The requirements document has to be such that the client and the user
can understand easily, and the developers can use it as a basis for software development. Due
to the diverse parties involved in software requirement specification, a communication gap
exists. This gap arises when the client does not understand software or the software
development processor when the developer does not understand the client’s problem and
application area of SRS bridges this communication gap Problem analysis is done to obtain a
clear understanding of the needs of the clients and the users, and what exactly is desired from
the software. Analysis leads to the actual specification. People performing the analysis called
analysts, area also responsible for specifying the requirements.
The software project is initiated by the client’s needs. In the beginning these needs are in the
minds of various people in the client organization. The requirement analyst must identify
their requirements by talking to these people and understanding their needs. These people
and the existing documents about the current mode of operation are the basis source of
information for the analyst. Below are the software that required to make the new system.
Operating system Windows

Web technologies HTML,CSS,PHP,


JavaScript
Database MySQL

Web Browser Google Chrome/Brave

School of Technology and Applied Sciences pg. 22


QUIZ WEB APPLICATION BSC Computer Science

4.2.1 HARDWARE REQUIREMENT SPECIFICATION


The selection of hardware is very important and proper working of an existence software.
When selecting hardware, the size and capacity requirements are also important.
Machine Intel i3 and above

Memory 4GB

Hard Disk 512GB

Monitor 18.5”LED Monitor

Keyboard USB/3

Mouse USB/3

4.3 TOOLS AND PLATFORMS


4.3.1 FRONT END TOOLS
HTML
HTML, or Hyper Text Markup Language, is the core building block of all websites. It
defines the structure and layout of a web page. In other words, HTML is used to organize
and display content such as text, headings, lists, images, videos, links, forms, and more.
When you build an Angular application, HTML is used within each component to describe
what should appear in the browser. Think of HTML as the skeleton of your web page it holds
everything together and provides the framework for content to be styled and made
interactive. Without HTML, web pages would have no structure and users wouldn't be able
to view or interact with any content meaningfully.
PHP
The PHP Hypertext Preprocessor (PHP) is a programming language that allows web
developers to create dynamic content that interacts with databases. PHP is basically used for
developing web-based software applications. PHP started out as a small open-source project
that evolved as more and more people found out how useful it was. Rasmus Lerdorf
unleashed the first version of PHP way back in 1994. PHP is a MUST for students and
working professionals to become a great Software Engineer specially when they are working
in Web Development Domain.

School of Technology and Applied Sciences pg. 23


QUIZ WEB APPLICATION BSC Computer Science

Some of the key advantages of learning PHP are: -


• PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
• PHP is a server-side scripting language that is embedded in HTML. It is used to manage
dynamic content, databases, session tracking, even build entire e-commerce sites.
• It is integrated with a number of popular databases, including MySQL, PostgreSQL,
Oracle, Sybase, Informix, and Microsoft SQL Server.
• PHP is pleasingly zippy in its execution, especially when compiled as an Apache modules
on the Unix side. The MySQL server, once started, executes even very complex queries with
huge result sets in record-setting time.
• PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4
added support for Java and distributed object architectures (COM and CORBA), making n-
tier development a possibility for the first time.
• PHP is forgiving: PHP language tries to be as forgiving as possible.
• PHP Syntax is C-Like.

Applications of PHP:-
PHP performs system functions, i.e. from files on a system it can create, open, read, write,
and close them.
• PHP can handle forms, i.e. gather data from files, save data to a file, through email you can
send data, return data to the user.
• We can add, delete, modify elements within your database through PHP.
• Access cookies variables and set cookies.
• Using PHP, you can restrict users to access some pages of your website.
• It can encrypt data.

JAVASCRIPT
It is a lightweight, interpreted, object-oriented language with first-class functions, and is
bestknown as the scripting language for Web pages, but it's used in many non-browser
environments as well. It is a prototype-based, multi- paradigm scripting language that is
dynamic, and supports object-oriented, imperative, and functional programming styles.
JavaScript runs on the client side of the web, which can be used to design / program how the
web pages behave on the occurrence of an event. JavaScript is an easy to learn and powerful

School of Technology and Applied Sciences pg. 24


QUIZ WEB APPLICATION BSC Computer Science

Scripting language, widely used for controlling web page behaviour. JavaScript can function
as both a procedural and an object oriented language. Objects are created pro-grammatically
in JavaScript, by attaching methods and Properties to otherwise empty objects at run time, as
opposed to the syntactic class definitions common in compiled languages like C++ and Java.
Once an object has been constructed it can be used as a blueprint (or prototype) for creating
similar objects.

CSS
CSS ,or Cascading Style Sheets, is the technology used to design and beautify HTML
content. While HTML builds the structure, CSS adds the visual design-colours, fonts,
spacing, alignment, animations, and responsiveness. With CSS, developers can make web
pages look appealing and professional across different devices, from desktops to
smartphones. In Angular, CSS can be written globally (for the whole app) or scoped
specifically to individual components, which keeps styles clean and organized. CSS plays a
crucial role in the user experience because a well-styled interface makes the application more
enjoyable and easier to use. It's the tool that transforms plain content into a visually engaging
user interface.

4.3.2 BACK END TOOLS

MYSQL
MySQL is an important component of an open-source enterprise stack called WAMP. WAMP
is a web development platform that uses Linux as the operating system, Apache as the
webserver, and MySQL as the relational database management system and PHP as the
object- oriented scripting language. (Sometimes Perl or Python is used instead of PHP.)
Originally conceived by the Swedish company MySQL AB, MySQL was acquired by Sun
Microsystems in 2008 and then by Oracle when it bought Sun in 2010. Developers can use
MySQL under the GNU General Public License (GPL), but enterprises must obtain a
commercial license from Oracle. Today, MySQL is the RDBMS behind many of the top
websites in the world and countless corporate and consumer-facing web-based applications,
including Facebook, Twitter and YouTube.
• MySQL is the database management system, or a database server.
How MySQL works
MySQL is based on a client-server model. The core of MySQL is MySQL server, which
handles all of the database instructions (or commands). MySQL server is available as a

School of Technology and Applied Sciences pg. 25


QUIZ WEB APPLICATION BSC Computer Science

separate program for use in a client-server networked environment and as a library that can
be embedded (or linked) into separate applications.
MySQL operates along with several utility programs which support the administration of
MySQL databases. Commands are sent to MySQL Server via the MySQL client, which is
installed on a computer.
MySQL was originally developed to handle large databases quickly. Although MySQL Is
typically installed on only one machine, it is able to send the database to multiple locations,
as users are able to access it via different MySQL client interfaces. These interfaces send
SQL statements to the server and then display the results.

MYSQL FEATURES
• Relational Database Management System (RDBMS): MySQL is a relational
database management system
• Easy to use MySQL is easy to use. You have to get only the basic knowledge of
SQL. You can build and interact with MySQL with only a few simple SQL
statements.
• It is secure: MySQL consist of a solid data security layer that protects sensitive
data from intruders. Passwords are encrypted in MySQL.
• Client/ Server Architecture: MySQL follows a client /server architecture. There
is a database server (MySQL) and arbitrarily many clients (application programs),
which communicate with the server; that is, they query data, save changes, etc.
• Free to download MySQL is free to use and you can download it from MySQL
official website.
• It is scalable: MySQL can handle almost any amount of data, up to as much as 50
million rows or more. The default file size limit is about 4 GB. However, you can
increase this number to a theoretical limit of 8 TB of data.
• Compatible on many operating systems: MySQL is compatible to run on many
operating systems, like Novell NetWare, Windows* Linux*, many varieties of
UNIX* (such as Sun* Solaris*, AIX, and DEC* UNIX), OS/2, FreeBSD*, and
others. MySQL also provides as facility that the clients can run on the same
computer as the server or on another computer (communication via a local
network or the Internet).

School of Technology and Applied Sciences pg. 26


QUIZ WEB APPLICATION BSC Computer Science

• Allows roll-back: MySQL allows transactions to be rolled back, commit and


crash recovery.
• High Performance: MySQL is faster, more reliable and cheaper because of its
unique storage engine architecture.
• High Flexibility: MySQL supports a large number of embedded applications
which makes MySQL very flexible.
• High Productivity: MySQL uses Triggers, Stored procedures and views which
allows the developer to give a higher productivity.

CORE MYSQL FEATURES

MySQL enables data to be stored and accessed across multiple storage engines,
including Inorb, CSV, and NDB. MySQL is also capable of replicating data and
partitioning tables for better performance and durability. MySQL users aren't required
to learn new commands; they can access their data using standard SQL commands.

Before 2016, the main difference between MySQL and SQL was that the former
could be used on multiple platforms, whereas the latter could only be used on
Windows. Microsoft has since expanded SQL to support Linux, a change which went
into effect in 2017. When MySQL is installed via Linux, its package Management
system requires custom configuration to adjust
security and optimization settings.

MySQL also allows users to choose the most effective storage engine for any given
table, as the program can utilize multiple storage engines for individual tables. One of
MySQL's engines is Inorb. Inorb was designed for high availability. Because of this, it
is not as quick as other engines. SQL uses its own storage system, but it does maintain
multiple safeguards against loss of data. Both systems are able to run in clusters for
high availability.

SQL Server offers a wide variety of data analysis and reporting tools. SQL Server
Reporting Services is the most popular one and is available as a free download. There
are similar analysis tools for MySQL available from third-party software companies,
such as Crystal Reports XI and Actuate BIRT.

PHPMYADMIN

PhpMyAdmin is a (web application) client for MySQL. MySQL is server where your
commands get executed and returns you data, it manages all about data while
PhpMyAdmin is a web Application, with user friendly, easy to use GUI makes it easy
to handle database, which is difficult to use on command line. PhpMyAdmin is the

School of Technology and Applied Sciences pg. 27


QUIZ WEB APPLICATION BSC Computer Science

web application written primarily in PHP. It’s used for managing MySQL data To be
more specific, here is the detailed definition: MySQL is the world’s most popular open
source database. With its’s proven performance, reliability, and ease of use, MySQL
has become the leading database choice for web based applications, used by high
profile web properties including Facebook, Twitter, YouTube, and All five of the top-
five websites. Additionally it is an extremely popular choice as embedded database,
distributed by thousands of ISV’s and OEM’s

PhpMyAdmin is a free and open-source administration tool for MySQL and MariaDB. As a
portable web application written primarily in PHP, it is one of the most popular MySQL
administration tools, especially for web hosting service.

4.3.3 OPERATING SYSTEM


What is windows?
Windows 10 professional integrates the strengths of windows 2008 professional such
as standards-based security, manageability, and reliability, with the best business
features of windows 98 and windows Millennium Edition, such as plug and play,
simplified user interface, and innovative support services. This combination creates
the best desktop operating system for business.
It is more users friendly and a stable operating system equipped with much more
added features. The operating system supports new technologies such as Digital video
disks, multiple monitors etc. along with plug and play and multi display features. It
has a graphical user interface operating environment. Faster computing, easy access to
remote information and control remote computers are some added features. Following
are the common features of Windows 10.
Faster computing, easy access to remote information and control remote computers.
Built-in networking and messaging facility.

• Easier to set up, add or remove.

• Increase system security and control.

• Support advanced networking and communication.

School of Technology and Applied Sciences pg. 28


QUIZ WEB APPLICATION BSC Computer Science

[Link] IMPLEMENTATION

School of Technology and Applied Sciences pg. 29


QUIZ WEB APPLICATION BSC Computer Science

5.1 INTRODUCTION
The implementation is one phase of software development. Implementation is that stage in
the project where theoretical design is turned into working system. Implementation involves
placing the complete and tested software system into actual work environment.
Implementation is concerned with translating design specification with source code. The
primary goal of implementation is to write the source code to its specification that can be
achieved by making the source code clear and straight forward as possible. Implementation
means the process of converting a new or revised system design into operational one. The
implementation is the final stage and it’s an important phase. It involves the individual
programming, system testing, user training and the operational running of developed
proposed system that constitute the application subsystems. One major task of preparing for
implementation is education of users, which should really have been taken place much
earlier in the project when they were being involved in the investigation and design work.
During this implementation phase system actually takes physical shape.
Depending on the size of the organization and its requirements the implementation is divided
into three parts:
• STAGE IMPLEMENTATION
Here system is implemented in stages. The whole system is not implemented at once. Once
the user starts working with system and is familiar with it, then a stage is introduced and
implemented. Also, the system is usually updated, regularly until a final system is sealed.
• DIRECT IMPLEMENTATION
The proposed new system is implemented directly and the user starts working on the new
system. The shortcoming, if any, faced are then rectified later.
• PARALLEL IMPLEMENTATION
Was implemented on approach of prototype model whose functionality was in- creased day
by day, as the client was given full liberty in choosing his needs and gets to the maximum
benefit out of the system developed. Implementation is that process plan where the
theoretical design is put into real test. All theoretical and practical design are now
implemented as a working system. This is the most crucial stage in the life cycle of the
project. The project maybe accepted or rejected based on how it gathers confidence among
the users.
IMPLEMENTATION METHODS
Implementation of software refers to final installation of package in the real environment, to
the satisfaction of the intended users and the successful operation of the system.
Implementation is the stage of the project where the theoretical design is turned into a
working system. Implementation includes all those activities that takes place to convert from
the old system to new one. Proper implementation is essential to provide a reliable system to
meet the organizational requirements.

School of Technology and Applied Sciences pg. 30


QUIZ WEB APPLICATION BSC Computer Science

IMPLEMENTATION PLAN
The Implementation Plan describes how the information system will be deployed, installed
and transitioned into an operational system. The plan contains an overview of the system, a
brief description of the major tasks involved in the implementation, the overall resources
needed to support the implementation effort, and any site-specific implementation
requirements. The implementation of the trained model is modelled as a pipeline that
processes the input text in consecutive steps called components. So, it’s a crucial thing to
grasp the components’ lifecycle and the way they interact with one another. The plan is
developed during the Design Phase and is updated during the Development Phase the final
version is provided in the Integration and Test Phase and is used for guidance during the
Implementation Phase. This interface has been developed so that those involved in the
respective admin can add, amend or delete what is necessary regarding the project in all
cases.

5.2 CODING

Coding is the phase of a software development project where developer’s actually in put
the source code into a computer that will be compiled into the final software program.
Source code is the high-level language like C#, java, python etc. that is typed into an
IDE (Interactive Development Environment) and stored in the text file on the computer.
This text file is compiled into machine code, which are the instructions actually
understood by the computer. For the project, PHP language was used to design the
recommendation algorithm and the IDE that was used was notepad and geany.

5.2.1 SAMPLE CODE


<?php
$pageTitle = "Welcome • QuizApp1";
require __DIR__ . '/includes/[Link]';
require __DIR__ . '/includes/[Link]';
?>
<section class="hero card">
<h1>Welcome to QuizApp1</h1>
<p class="muted">Practice quizzes, read materials, and share feedback. Admins can
manage everything easily.</p>
<div class="actions">
<?php if (!isLoggedIn()): ?>

School of Technology and Applied Sciences pg. 31


QUIZ WEB APPLICATION BSC Computer Science

<a class="btn" href="/quizapp1/[Link]">Login</a>


<a class="btn btn-outline" href="/quizapp1/[Link]">Create Student Account</a>
<?php else: ?>
<?php if (isAdmin()): ?>
<a class="btn" href="/quizapp1/admin/[Link]">Go to Admin Dashboard</a>
<?php else: ?>
<a class="btn" href="/quizapp1/student/[Link]">Go to Student Dashboard</a>
<?php endif; ?>
<?php endif; ?>
</div>
</section>

<section class="grid">
<div class="card">
<h3>Take Quizzes</h3>
<p>Answer MCQs and get instant score.</p>
</div>
<div class="card">
<h3>Study Materials</h3>
<p>Read uploaded PDFs/notes from admin.</p>
</div>
<div class="card">
<h3>Reviews</h3>
<p>Share feedback and view admin replies.</p>
</div>
</section>
<?php require __DIR__ . '/includes/[Link]'; ?>

5.2.2 CODE VALIDATION AND OPTIMIZATION


Validation is the status of the project when the theoretical designs turned into a working
system. It is used to reduce the number of loops in the program. If the number of loops

School of Technology and Applied Sciences pg. 32


QUIZ WEB APPLICATION BSC Computer Science

increases no. of executions also increases. Then there may be a chance for the program to get
stuck. It is verified whether the input data entered gets a corresponding and valid and
trustable result. Meanwhile the recommendation system will take in the input that the user
entered and performs the analyses and the result is passed onto to the result page.
Optimization is the last part of the system development life cycle. Code optimization, as the
name indicates can be explained as the method that is used for the modification of codes in
order to improve the efficiency and quality of the code. As a result of optimization, a
program may become lesser in size, consume lesser memory, execute more rapidly, or
performs fewer operations (input/output). An optimized program should possess exactly the
same outputs and side effects as that of its non-optimized program. However, the benefits are
given more weight in comparison to alteration in program behaviour.
Optimization can also be referred to as a program transformation technique, performed
either by optimizers or programmers. An optimizer is a specialized software or an inbuilt unit
of a compiler which is also called as an optimizing compiler. Modern processors are also
used to optimize the order of execution of code instructions. Code optimization is generally
performed at the end of the developmental stage as it reduces the readability and adds code
in order to increase the performance.

School of Technology and Applied Sciences pg. 33


QUIZ WEB APPLICATION BSC Computer Science

[Link] TESTING

School of Technology and Applied Sciences pg. 34


QUIZ WEB APPLICATION BSC Computer Science

6.1 INTRODUCTION
Software Testing is the process of executing software in a controlled manner, in order to
answer the question - Does the software behave as specified? Software testing is often used
in association with the term’s verification and validation. Validation is the checking or
testing of items, includes software, for conformance and consistency with an associated
specification. Software testing is just one kind of verification, which also uses techniques
such as reviews, analysis, inspections, and walk [Link] is the process of
checking that what has been specified is what the user actually wanted. Validation: Are we
doing the right job?
Verification: Are we doing the job right?
Software testing should not be confused with debugging. Debugging is the process of
analysing and localizing bugs when software does not behave as expected. Although the
identification of some bugs will be obvious from playing with the software, a methodical
approach to software testing is a much more thorough means for identifying bugs. Other
activities which are often associated with software testing are static analysis and dynamic
analysis. Static analysis investigates the source code of software, looking for problems and
gathering metrics without actually executing the code. Dynamic analysis looks at the
behaviour of software while it is executing, to provide information such as execution traces,
timing profiles, and test coverage information.
6.2 UNIT TESTING
In this each module is tested individually before integrating it to the final system. Unit test
focuses verification in the smallest unit of software design in each module. This is also known
as module testing as here each module is tested to check whether it is producing the desired
output and to see if any error occurs. Unit testing is commonly automated, but may still be
performed manually. The objective in unit testing is to isolate a unit and validate its
correctness. A manual approach to unit testing may employ a step by- step instructional
document. However, automation is efficient for achieving this, and enables the many benefits
listed in this article. Conversely, if not planned carefully, a careless manual unit test case may
execute as an integration test case that involves many software components, and thus preclude
the achievement of most if not all of the goals established for unit testing. Unit testing focuses
verification efforts even in the smallest unit of software design in each module. This is known
as “module testing”. The modules of this project are tested separately. This testing is carried
out in the programming style itself. In this testing each module is focused to work satisfactorily
as regard to expected output from the module. There are some validation checks for the fields.
Unit testing gives stress on the modules of the project independently of one another, to find
errors. Different modules are tested against the specifications produced during the design of
the modules. Unit testing is done to test the working of individual modules with test servers.
Program unit is usually small enough that the programmer who developed it can test it in a
great detail. Unit testing focuses first on that the modules to locate errors. These errors are
verified and corrected and so that the unit perfectly fits to the project.

School of Technology and Applied Sciences pg. 35


QUIZ WEB APPLICATION BSC Computer Science

6.3 INTEGRATION TESTING


Integration testing (sometimes called integration and testing, abbreviated I and T) is the phase
in software testing in which individual software modules are combined and tested as a group.
It occurs after unit testing and before validation testing. Integration testing takes as its input
modules that have been unit tested, groups them in larger aggregates, applies tests defined in
an integration test plan to those aggregates, and delivers as its output the integrated system
ready for system testing. The purpose of integration testing is to verify functional,
performance, and reliability requirements placed on major design items.

6.4 SYSTEM TESTING


System testing of software or hardware is testing conducted on a complete, integrated system
to evaluate the system’s compliance with its specified requirements. System testing falls
within the scope of black-box testing, and as such, should require no knowledge of the inner
design of the code or logic. As a rule, system testing takes, as its input, all of the “integrated”
software components that have passed integration testing and also the software system itself
integrated with any applicable hardware system(s). The purpose of integration testing is to
detect any inconsistencies between the software units that are integrated together or between
any of the assemblages and the hardware. System testing is a more limited type of testing; it
seeks to detect defects both within the “inter-assemblages” and also within the system as a
whole. System testing focuses on testing the system as a whole. System Testing is a crucial
step in Quality Management Process. In the Software Development Life Cycle, System Testing
is the first level where the System is tested as a whole. The System is tested to verify whether
it meets the functional and technical requirements. The application/System is tested in an
environment that closely resembles the production environment where the application will
be finally deployed. The perquisites for System Testing are:
• All the components should have been successfully Unit Tested.

6.5 TEST PLAN &TEST CASES


The objective of system testing is to ensure that all individual programs are working
asexpected, that the programs link together to meet the requirements specified and to ensure
that the computer system and the associated clerical and other procedures work together. The
initial phase of system testing is the responsibility of the analyst who determines what
conditions are to be tested, generates test data, produced a schedule of expected results, runs
the tests and compares the computer produced results with the expected results with the
expected results. The analyst may also be involved in procedures testing. When the analyst is
satisfied that the system is working properly, hands it over to the users for testing. The
importance of system testing by the user must be stressed. Ultimately it is the user must verify
the system and give the go ahead. During testing, the system is used experimentally to ensure
that the software does not fail, i.e., that it will run according to its specifications and in the
way, users expect it to. Special test data is input for processing (test plan) and the results are
examined to locate unexpected results. A limited number of users may also be allowed to use
the system so analysts can see whether they try to use it in unexpected ways. It is preferably
to find these surprises before the organization implements the system and depends on it. In

School of Technology and Applied Sciences pg. 36


QUIZ WEB APPLICATION BSC Computer Science

many organizations, testing is performed by person other than those who write the original
programs. Using persons who do not know how certain parts were designed or programmed
ensures more complete and unbiased testing and more reliable software.

School of Technology and Applied Sciences pg. 37


QUIZ WEB APPLICATION BSC Computer Science

[Link] MAINTENANCE

School of Technology and Applied Sciences pg. 38


QUIZ WEB APPLICATION BSC Computer Science

7.1 INTRODUCTION
System maintenance is the act of ensuring that your software continues to perform at its
peak. You can do this by updating your system’s programs, deleting unnecessary files, and
running virus scans. System maintenance includes everything from routine check ups to
upgrading hardware, replacing parts of the operating system, repairing software issues, and
performing various other tasks. It is used for both personal computers and servers.
System maintenance helps to ensure that your software continues to function properly. By
removing unnecessary files, updating the operating system, and running virus scans
regularly, you can keep your system in top shape.
System maintenance is a term used by information technology (IT) specialists to describe
any type of computer repair. It’s not uncommon for data entry and maintenance to take
hours, particularly if the work entails transferring unneeded or outdated information. To
avoid giving more detailed explanations, pros frequently use broad terms instead of specifics.
The administrators of websites that are attacked by hackers, have technical difficulties or are
being updated and repaired frequently display an image expressing regret for the outage and
website downtime. Users will be able to comprehend that the website is unavailable and that
the administrators are aware of it if you use this method.
Many IT professionals prefer to use scheduled maintenance instead of preventative
maintenance because it appears less time-consuming. Maintenance that is scheduled runs
smoothly when you can predict when it will be done. It’s also good for things like emptying
temp files, running defragmentation applications on hard drives, and clearing server caches.
Maintenance means restoring something to its original conditions. Enhancement means
adding, modifying the code to support the changes in the user specification. System
maintenance conforms the system to its original requirements and enhancement adds to
system capability by incorporating new requirements.
Thus, maintenance changes the existing system, enhancement adds features to the existing
system, and development replaces the existing system. It is an important part of system
development that includes the activities which corrects errors in system design and
implementation, updates the documents, and tests the data.
MAINTENANCE TYPES
System maintenance can be classified into four types –
•Corrective Maintenance
•Adaptive Maintenance
•Perfective Maintenance
•Preventive Maintenance

Corrective Maintenance
Corrective Maintenance deals with the repair of faults or defects found in day- today system
functions. A defect can result due to errors in software design, logic and coding. Design
errors occur when changes made to the software are incorrect, incomplete, wrongly

School of Technology and Applied Sciences pg. 39


QUIZ WEB APPLICATION BSC Computer Science

communicated, or the change request is misunderstood. Logical errors result from invalid
tests and conclusions, incorrect implementation of design specifications, faulty logic flow, or
incomplete implementation of design specifications, faulty logic flow, or incomplete test of
data.
All these errors, referred to as residual errors, prevent the software from confirming to its
agreed specifications. Note that the need for corrective maintenance is usually initiated by
big reports drawn by the users.
Adaptive Maintenance
Adaptive Maintenance is the implementation of changes in a part of the system, which has
been affected by a change that occurred in some other part of the system. Adaptive
Maintenance consists of adapting software to changes in the environment such as the
hardware or the operating system. The term environment in this context refers to the
conditions and the influences which act (from outside) on the system. For example, business
rules, work patterns and government policies have a significant impact on the software
system.
Perfective Maintenance
Perfective Maintenance mainly deals with implementing new or changed user requirements.
Perfective Maintenance involves making functional enhancements to the system in addition
to the activities to increase the system’s performance even when the changes have not been
suggested by faults. This includes enhancing both the function and efficiency of the code and
changing the functionalities of the system as per the users’ changing needs. Preventive
Maintenance involves performing activities to prevent the occurrence of errors. It tends to
reduce the software complexity thereby improving program understand ability and increasing
software maintainability. It comprises documentation updating, code optimization and code
restructuring. Documentation updating involves modifying the documents affected by the
changes in order to correspond to the present state of the system. Code optimization involves
modifying the programs for faster execution or efficient use of storage space. Code
restructuring involves transforming the program structure for reducing the complexity in
source code and making it easier to understand.

7.2 MAINTENANCE APPLICATION


Maintenance and Support in IT industry includes many activities and functions. As a
production support employee, you need to perform the following activities in a project
environment. After moving the project from development to production it is under 24/7
surveillance by a team of members in rotational shifts. Team members in the concerned shift
should take care of the requests and responses.
We should be responsible for Application Maintenance and Support Activities
[Link], Clients will give more importance after moving the specific application to
production (i.e., to live). Here the actual problem starts. End users may face various
problems even after the user testing has been successful during the project development
phase.

School of Technology and Applied Sciences pg. 40


QUIZ WEB APPLICATION BSC Computer Science

All these minute Issues sent to the development teams and production support teams in IT to
rectify them. Responsible candidates have to complete the Root Cause Analysis (RCA) and
should rectify the defect in the specified SLA. Below, you can see the general activities or a
role played by a team member on production support environment. Below is the list of
activities carried by the production support team members in 24/7environment.
•Analyze assigned defects from HP Quality Control (QC).
•Complete the Root Cause Analysis (RCA) document and share with the team members.
•Analyze the Root Cause of the Defect and rectify the defect in the given SLA.
•Track daily error report from the logs and analyze the new defects or Errors and share the
report with clients and Off Shore Team members.
•Connect with the clients on daily basis to report the off shore daily activities, especially to
discuss on the production defects.
•Monitor Data Sources and Managed Servers and Web services .
•Send Daily Status report to client, project manager and other team members through an
Email.
•If there is any trouble from external applications, intimate the particular development team
immediately without any time lapse. Since, a single project may in real time environment
will be inter dependent on multiple applications running at different locations in different
companies.
•Alert all project team members in adverse situations using DL
•Keep all Email Id’s and DL’s of each team.

School of Technology and Applied Sciences pg. 41


QUIZ WEB APPLICATION BSC Computer Science

[Link] SECURITY MEASURES

School of Technology and Applied Sciences pg. 42


QUIZ WEB APPLICATION BSC Computer Science

8.1 INTRODUCTION
The security of a computer system is a crucial task. It is a process of ensuring the
confidentiality and integrity of the OS. Security is one of most important as well as the major
task in order to keep all the threats or other malicious tasks or attacks or program away from
the computer’s software system. A system is said to be secure if its resources are used and
accessed as intended under all the circumstances, but no system can guarantee absolute
security from several of various malicious threats and unauthorized access. The objective of
system security is the protection of information and property from theft, corruption and other
types of damage, while allowing the information and property to remain accessible and
productive. System security includes the development and implementation of security
countermeasures. There are a number of different approaches to computer system security,
including the use of a firewall, data encryption, passwords and biometrics.
8.2 OPERATING SYSTEM LEVEL SECURITY
Level Security The process of ensuring OS availability, confidentiality, integrity is known as
operating system security. OS security refers to the processes or measures taken to protect
the operating system from dangers, including viruses, worms, malware, and remote hacker
intrusions. Operating system security comprises all preventive control procedures that
protect any system assets that could be stolen, modified, or deleted if OS security is
breached. Security refers to providing safety for computer system resources like software,
CPU, memory, disks, etc. It can protect against all threats, including viruses and
unauthorized access. It can be enforced by assuring the operating system's integrity,
confidentiality, and availability. If an illegal user runs a computer application, the computer
or data stored may be seriously damaged.
8.3 DATABASE LEVEL SECURITY
Security of databases refers to the array of controls, tools, and procedures designed to ensure
and safeguard confidentiality, integrity, and accessibility. Database security is a complex and
challenging endeavour that involves all aspects of information security technologies and
practices. It’s also naturally at odds with database usability. The more accessible and usable
the database, the more vulnerable it is to security threats; the more invulnerable the database
is to threats, the more difficult it is to access and use. Databases have been largely secured
against hackers through network security measures such as firewalls, and network-based
intrusion detection systems. While network security controls remain valuable in this regard,
securing the database systems themselves, and the programs/functions and data within them,
has arguably become more critical as networks are increasingly opened to wider access, in
particular access from the Internet. Furthermore, system, program, function and data access
controls, along with the associated user identification, authentication and rights management
functions, have always been important to limit and in some cases log the activities of
authorized users and administrators. In other words, these are complementary approaches to
database security, working from both the outside-in and the inside-out as it were.

8.4 SYSTEM LEVEL SECURITY


System-level security is part of a multi-layered security approach in which information
security (IS) is implemented on an IT infrastructure's different components, layers or levels.

School of Technology and Applied Sciences pg. 43


QUIZ WEB APPLICATION BSC Computer Science

System-level security is typically implemented on end-user computer and server nodes. It


ensures that system access is granted only to legitimate and trusted individuals and
applications. The key objective behind system-level security is to keep system secure,
regardless of security policies and processes at other levels. If other layers or levels are
breached, the system must have the ability to protect itself.

School of Technology and Applied Sciences pg. 44


QUIZ WEB APPLICATION BSC Computer Science

[Link] PLANNING AND SCHEDULING

School of Technology and Applied Sciences pg. 45


QUIZ WEB APPLICATION BSC Computer Science

9.1 INTRODUCTION
Project Planning and Scheduling’, though separate, are two sides of the same coin in project
management. Fundamentally, ‘Project planning’ is all about choosing and designing effective
policies and methodologies to attain project objectives. While ‘Project scheduling’ is a
procedure of assigning tasks to get them completed by allocating appropriate resources
within an estimated budget and time- frame. The basis of project planning is the entire
project. Unlikely, project scheduling focuses only on the project-related tasks, the project
start/end dates and project dependencies. Thus, a ‘project plan’ is a comprehensive document
that contains the project aims, scope, costing, risks, and schedule. And a project schedule
includes the estimated dates and sequential project tasks to be executed. Project schedule
simply means a mechanism that is used to communicate and know about that tasks are
needed and has to be done or performed and which organizational resources will be given or
allocated to these tasks and in what time duration or time frame work is needed to be
performed. Effective project scheduling leads to success of project, reduced cost, and
increased customer satisfaction. Scheduling in project management means to list out
activities, deliverables, and milestones within a project that are delivered. It contains more
notes than your average weekly planner notes. The most common and important form of
project schedule is Gantt chart.

9.2 PLANNING A SOFTWARE PROJECT


Project planning is an organized and integrated management process, which focuses on
activities required for successful completion of the project. It prevents obstacles that arise in
the project such as changes in projects or organization’s objectives, non availability of
resources, and so on. Project planning also helps in better utilization of resources and
optimal usage of the allotted time for a project. The other objectives of project planning are
listed below.
•It defines the roles and responsibilities of project management team embers.
•It ensures that the project management team works according to the business objectives.
•It check feasibility of schedule and user requirements.
•It determine project constraints.

9.2.1 STEPS INVOLVED IN PLANNING A SYSTEM


[Link] the key project sponsors and stakeholders, to determine the basis of project
scope, budget, and time-frame for project execution.
[Link] enlisting the stake-holder requirements, prioritizing/setting project objectives.
[Link] the project deliverables required to attain the project objectives.
[Link] the project schedule
[Link] the project risks, if any, and develop suitable mitigation plans.
[Link] and presenting the project plan to stakeholders.

School of Technology and Applied Sciences pg. 46


QUIZ WEB APPLICATION BSC Computer Science

[Link] COST ESTIMATION

School of Technology and Applied Sciences pg. 47


QUIZ WEB APPLICATION BSC Computer Science

10.1 INTRODUCTION
A cost estimate is the approximation of the cost of a program, project, or operation. The cost
estimate is the product of the cost estimating process. The cost estimate has a single total
value and may have identifiable component values. Cost estimation in project management is
the process of forecasting the cost and other resources needed to complete a project within a
defined scope. Cost estimation accounts for each element required for the project and
calculates a total amount that determines a project’s budget.

Four principles of cost estimation


[Link] estimation is used to predict the quantity, cost and price of the resources required by
the scope of a project. A project might be any process that is started to perform work
activities and/or create assets. The accuracy of the estimate depends heavily on the level of
project scope definition: as the design and conditions of the project become better defined, so
do the estimated values. Think of 5 estimate classes of AACE shared above.
[Link] estimation is needed to provide decision-makers with the means to make investment
decisions, choose between alternatives and to set up the budget during the front end of
projects. For this, estimates made by vendors and contractors need to be validated by clients
as well. In later phases of the project, the budget estimate is used as a baseline to assess the
performance of a project. Related to this principle, it is always challenging to collect and
read the huge amount of cost data, which doesn’t help with the decision making. Analysing
and visualizing the cost data opens the doors to making the data useful and meaningful. The
dashboards of a project control software system are the datadriven graphical representations
of a project; dashboards can provide decision makers with a quick overview of a project’s
progress and turn the data into decision points.
[Link] is done by breaking down the total scope of a project in manageable parts, to
which resources can be assigned and cost. There are standardized ways of breaking down a
project, like the Work Breakdown Structure (WBS) and the Cost Breakdown Structure
(CBS), but depending on the needs of the project team and external parties’ multiple
structures are often implemented to align reporting and sharing of cost data.
4.A cost estimate is more than a list of costs. It also includes a detailed Basis of Estimate
(BOE) report that describes the assumptions, inclusions, exclusions, accuracy and other
aspects that are needed to interpret the total project cost. Otherwise, it would be a
meaningless number. The BOE is required to communicate the estimate to the various parties
involved in the decision making but is also handy during closeout when the performance of
the project is compared with other projects. It is the vital part often overlooked, that allows
you to learn from your experience and mistakes. Cost estimation, however, is easier said than
done. An accurate estimation method can be the difference between a successful plan and a
failed one. Keep these 4 principles in mind and you already have a framework to start
making estimates. Make sure to set up the estimate in a structured way to allow for an easy
transition into project cost estimating software, which will help you make more solid and
accurate estimates in the long run.

School of Technology and Applied Sciences pg. 48


QUIZ WEB APPLICATION BSC Computer Science

10.2 FUNCTIONAL POINT BASED ESTIMATION


In 1979, IBM’s Allan J. Albrecht created function point analysis, later enhanced by the
International Function Point Users Group (IFPUG). A Function Point (FP) Analysis
measures the amount of business functionality provided to a user by an information system
(as a product). FPA is used to estimate the amount of a software project’s functionality, its
function size, as well as its testing. The function point is a standard of measurement for
measuring software applications that issued to determine the available size of the software
product.
The Functional Point Analysis (FPA) is a one of the most popularly used software estimation
technique to measure the functional size of the software work i.e. It is a method or set rules
to measure the amount of software functionalities and software size of the software
developed product. It depends on logical view flow of the application i.e. the number of
functionalities delivered to the users. The Functional Point (FP) is the measurement of
functional size of the software.
Objective of FPA
• It assesses how much functionality a user request and receives
• It analysis software development and maintenance independent of the implementation
Technology
• It should be simple enough to reduce the measuring procedure overhead
• It is should be a metric that is used consistently across project and companies

School of Technology and Applied Sciences pg. 49


QUIZ WEB APPLICATION BSC Computer Science

[Link] ENHANCEMENT AND SCOPE OF


FURTHER DEVELOPMENT

School of Technology and Applied Sciences pg. 50


QUIZ WEB APPLICATION BSC Computer Science

11.1 INTRODUCTION
An enhancement is any product change or upgrade that increases software or hardware
capabilities beyond original client specifications. Enhancements allow software and
hardware product performance scalability.
A change or the process of change, brought about, to improve a product or service and to
increase its value, is known as enhancement. A variety of enhancements can be used in
business to increase the efficiency and effectiveness of different processes and
functionalities.
No software, system or application can be considered as a perfect or complete product.
Since the Information Technology is growing vastly, new inventions and features can be
added to the application to provide a better performance. We should continuously work on
our project to develop it further and make it much more perfect in every step. The
developing team should be able to clear any complaints from the client and should be able to
add additional features as per the requirement of the customer.
Product enhancement:
•Increase the processing speed.
•Error repair and handling.
•Coming up with additional features.
11.2 MERITS OF THE SYSTEM
•Ease to Use- Simple interface that can be understand and sue by anyone.
•Improved Efficiency.
•Help You Stay Organized
•Can List Their Tasks and Keep Track to What To Do.
11.3 LIMITATION OF THE SYSTEM
No software system can be deemed entirely flawless; each has inherent constraints shaped by
design choices, technological boundaries, and operational contexts. While the developed
application provides a range of functionalities to its users, certain advanced or intricate
features remain outside its current scope. This is primarily due to logistical challenges and
the complexity involved in implementing highly sophisticated options.
One notable limitation is the inability to generate offline reports related to students, subjects,
and semesters. This shortcoming arises from the system’s reliance on batch mode execution,
which restricts real-time or on-demand report generation. Consequently, users requiring
detailed offline documentation must seek alternative methods or await future system
enhancements.

11.4 FUTURE ENHANCEMENT OF THE SYSTEM


•Integration of Artificial Intelligence (AI): Implementing AI algorithms for predictive
analytics, anomaly detection, and behavioural analysis can enhance security measures by

School of Technology and Applied Sciences pg. 51


QUIZ WEB APPLICATION BSC Computer Science

identifying potential security threats, detecting unusual inmate behaviour patterns, and
predicting incidents before they occur.
•Biometric Authentication and Recognition Systems: Expanding biometric authentication
systems for inmate identification, access control, and visitor management can enhance
security measures while streamlining administrative processes and reducing the risk of
identity fraud or unauthorized access.

School of Technology and Applied Sciences pg. 52


QUIZ WEB APPLICATION BSC Computer Science

[Link]

School of Technology and Applied Sciences pg. 53


QUIZ WEB APPLICATION BSC Computer Science

CONCLUSION
The Quiz Web Application developed in this project successfully addresses the limitations of
traditional paper-based quizzes by introducing a digital, automated solution. Through
features like secure user authentication, dynamic quiz management, and instant result
generation, the system enhances both efficiency and user experience. Built using PHP,
MySQL, HTML, CSS, and JavaScript, it provides a lightweight, scalable platform suitable
for academic institutions seeking to modernize their assessment methods.
By replacing manual quiz processes with a centralized web-based interface, the application
reduces administrative burden, minimizes errors, and improves accessibility for both
students and faculty. Its modular design allows for future enhancements such as timed
quizzes, leaderboard rankings, performance analytics, and personalized feedback. Overall,
this project demonstrates the practical application of web technologies in solving real-world
educational challenges and lays a strong foundation for further innovation in digital learning
solutions.

School of Technology and Applied Sciences pg. 54


QUIZ WEB APPLICATION BSC Computer Science

[Link]

School of Technology and Applied Sciences pg. 55


QUIZ WEB APPLICATION BSC Computer Science

REFERENCES
1. HTML – Elizabeth Robson
2. JavaScript – Elizabeth Robson
3. CSS – David Du Rocher
4. MySQL- Joel Murach

WEBSITES VISITED
[Link]
[Link]
[Link]
[Link]

School of Technology and Applied Sciences pg. 56


QUIZ WEB APPLICATION BSC Computer Science

[Link]
SCREENSCHOTS AND SOURCE CODES

School of Technology and Applied Sciences pg. 57


QUIZ WEB APPLICATION BSC Computer Science

SCREENSCHOTS

WELCOME PAGE:

LOGIN PAGE:

School of Technology and Applied Sciences pg. 58


QUIZ WEB APPLICATION BSC Computer Science

REGISTER PAGE:

HOME PAGE:

School of Technology and Applied Sciences pg. 59


QUIZ WEB APPLICATION BSC Computer Science

QUIZ:

RESULT PAGE:

School of Technology and Applied Sciences pg. 60


QUIZ WEB APPLICATION BSC Computer Science

STUDY MATERIALS:

ADMIN PANEL:

School of Technology and Applied Sciences pg. 61


QUIZ WEB APPLICATION BSC Computer Science

ADMIN ADD/DELETE QUIZ

ADMIN ADD/DELETE QUESTIONS

School of Technology and Applied Sciences pg. 62


QUIZ WEB APPLICATION BSC Computer Science

ADMIN ADD/DELETE MATERIALS

ADMIN REPLY

School of Technology and Applied Sciences pg. 63


QUIZ WEB APPLICATION BSC Computer Science

[Link]
<?php
$pageTitle = "Login";
require __DIR__ . '/includes/[Link]';

$error = "";
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$email = trim($_POST['email'] ?? '');
$pass = $_POST['password'] ?? '';

if ($email === '' || $pass === '') {


$error = "Email and password are required.";
} else {
$stmt = $pdo->prepare("SELECT id,name,email,password,role FROM users WHERE
email = ?");
$stmt->execute([$email]);
$user = $stmt->fetch();
if ($user && password_verify($pass, $user['password'])) {
$_SESSION['user'] = $user;
if ($user['role'] === 'admin') redirect('/quizapp1/admin/[Link]');
redirect('/quizapp1/student/[Link]');
} else {
$error = "Invalid credentials.";
}
}
}

require __DIR__ . '/includes/[Link]';


?>
<div class="card form-card">
<h2>Login</h2>
<?php if ($error): ?><p class="error"><?= htmlspecialchars($error) ?></p><?php endif; ?>

School of Technology and Applied Sciences pg. 64


QUIZ WEB APPLICATION BSC Computer Science

<form method="post">
<label>Email
<input type="email" name="email" required>
</label>
<label>Password
<input type="password" name="password" required>
</label>
<button class="btn" type="submit">Login</button>
</form>
<p class="muted">No account? <a href="/quizapp1/[Link]">Register</a></p>
</div>
<?php require __DIR__ . '/includes/[Link]'; ?>

[Link]

<?php
$pageTitle = "Register";
require __DIR__ . '/includes/[Link]';

$error = ""; $success = "";


if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$name = trim($_POST['name'] ?? '');
$email = trim($_POST['email'] ?? '');
$pass = $_POST['password'] ?? '';

if ($name === '' || $email === '' || $pass === '') {


$error = "All fields are required.";
} else {
// check unique
$chk = $pdo->prepare("SELECT id FROM users WHERE email=?");
$chk->execute([$email]);
if ($chk->fetch()) {

School of Technology and Applied Sciences pg. 65


QUIZ WEB APPLICATION BSC Computer Science

$error = "Email already registered.";


} else {
$hash = password_hash($pass, PASSWORD_BCRYPT);
$ins = $pdo->prepare("INSERT INTO users (name,email,password,role) VALUES
(?,?,?,'student')");
$ins->execute([$name, $email, $hash]);
$success = "Account created. You can now login.";
}
}
}

require __DIR__ . '/includes/[Link]';


?>
<div class="card form-card">
<h2>Create Student Account</h2>
<?php if ($error): ?><p class="error"><?= htmlspecialchars($error) ?></p><?php endif; ?>
<?php if ($success): ?><p class="success"><?= htmlspecialchars($success) ?></p><?php
endif; ?>
<form method="post">
<label>Name
<input type="text" name="name" required>
</label>
<label>Email
<input type="email" name="email" required>
</label>
<label>Password
<input type="password" name="password" required>
</label>
<button class="btn" type="submit">Register</button>
</form>
</div>
<?php require __DIR__ . '/includes/[Link]'; ?>

School of Technology and Applied Sciences pg. 66


QUIZ WEB APPLICATION BSC Computer Science

[Link]

<?php
$pageTitle = "Welcome • QuizApp1";
require __DIR__ . '/includes/[Link]';
require __DIR__ . '/includes/[Link]';
?>
<section class="hero card">
<h1>Welcome to QuizApp1</h1>
<p class="muted">Practice quizzes, read materials, and share feedback. Admins can
manage everything easily.</p>
<div class="actions">
<?php if (!isLoggedIn()): ?>
<a class="btn" href="/quizapp1/[Link]">Login</a>
<a class="btn btn-outline" href="/quizapp1/[Link]">Create Student Account</a>
<?php else: ?>
<?php if (isAdmin()): ?>
<a class="btn" href="/quizapp1/admin/[Link]">Go to Admin Dashboard</a>
<?php else: ?>
<a class="btn" href="/quizapp1/student/[Link]">Go to Student Dashboard</a>
<?php endif; ?>
<?php endif; ?>
</div>
</section>

<section class="grid">
<div class="card">
<h3>Take Quizzes</h3>
<p>Answer MCQs and get instant score.</p>
</div>
<div class="card">

School of Technology and Applied Sciences pg. 67


QUIZ WEB APPLICATION BSC Computer Science

<h3>Study Materials</h3>
<p>Read uploaded PDFs/notes from admin.</p>
</div>
<div class="card">
<h3>Reviews</h3>
<p>Share feedback and view admin replies.</p>
</div>
</section>
<?php require __DIR__ . '/includes/[Link]'; ?>

4. admin
4.1.add_question.php

<?php
$pageTitle = "Add Question";
require __DIR__ . '/../includes/[Link]';
if (!isAdmin()) redirect('/quizapp1/[Link]');

$msg = "";
$selectedQuiz = $_POST['quiz_id'] ?? $_GET['quiz_id'] ?? null;

// ✅ Delete Question
if (isset($_GET['delete_id']) && ctype_digit($_GET['delete_id'])) {
$qid = (int) $_GET['delete_id'];
$stmt = $pdo->prepare("DELETE FROM questions WHERE id = ?");
$stmt->execute([$qid]);
$msg = "Question deleted successfully.";
// keep quiz_id in URL after delete
header("Location: add_question.php?quiz_id=" . urlencode($selectedQuiz));
exit;
}
School of Technology and Applied Sciences pg. 68
QUIZ WEB APPLICATION BSC Computer Science

// ✅ Save Question
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['question_text'])) {
$question = trim($_POST['question_text']);
$a = trim($_POST['option_a']);
$b = trim($_POST['option_b']);
$c = trim($_POST['option_c']);
$d = trim($_POST['option_d']);
$correct = $_POST['correct_option'];

if ($selectedQuiz && $question !== '' && $a !== '' && $b !== '' && $c !== '' && $d !==
'') {
$stmt = $pdo->prepare("INSERT INTO questions
(quiz_id, question_text, option_a, option_b, option_c, option_d, correct_option)
VALUES (?,?,?,?,?,?,?)");
$stmt->execute([$selectedQuiz, $question, $a, $b, $c, $d, $correct]);
$msg = "Question added successfully.";
// reload page to prevent form resubmit
header("Location: add_question.php?quiz_id=" . urlencode($selectedQuiz));
exit;
} else {
$msg = "Please fill all fields.";
}
}

// ✅ Fetch quizzes for dropdown


$quizzes = $pdo->query("SELECT id, title FROM quizzes ORDER BY id DESC")-
>fetchAll(PDO::FETCH_ASSOC);

// ✅ Fetch questions only if quiz selected


$questions = [];
if ($selectedQuiz) {

School of Technology and Applied Sciences pg. 69


QUIZ WEB APPLICATION BSC Computer Science

$stmt = $pdo->prepare("SELECT * FROM questions WHERE quiz_id = ? ORDER BY id


DESC");
$stmt->execute([$selectedQuiz]);
$questions = $stmt->fetchAll(PDO::FETCH_ASSOC);
}

require __DIR__ . '/../includes/[Link]';


?>

<div class="card form-card">


<h2>Add New Question</h2>
<?php if ($msg): ?><p class="success"><?= htmlspecialchars($msg) ?></p><?php endif;
?>

<form method="POST">
<label>Choose Quiz:
<select name="quiz_id" onchange="[Link]()" required>
<option value="">-- Select Quiz --</option>
<?php foreach ($quizzes as $q): ?>
<option value="<?= $q['id'] ?>" <?= ($selectedQuiz==$q['id'])?'selected':'' ?>>
<?= htmlspecialchars($q['title']) ?>
</option>
<?php endforeach; ?>
</select>
</label>

<?php if ($selectedQuiz): ?>


<label>Question:
<input type="text" name="question_text" required>
</label>
<label>Option A: <input type="text" name="option_a" required></label>
<label>Option B: <input type="text" name="option_b" required></label>

School of Technology and Applied Sciences pg. 70


QUIZ WEB APPLICATION BSC Computer Science

<label>Option C: <input type="text" name="option_c" required></label>


<label>Option D: <input type="text" name="option_d" required></label>
<label>Correct Option:
<select name="correct_option" required>
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>
</label>
<button class="btn" type="submit">Save Question</button>
<?php endif; ?>
</form>
</div>

<?php if ($selectedQuiz): ?>


<section class="card">
<h3>Existing Questions</h3>
<table class="table">
<thead>
<tr><th>ID</th><th>Question</th><th>Correct</th><th>Action</th></tr>
</thead>
<tbody>
<?php foreach ($questions as $q): ?>
<tr>
<td><?= $q['id'] ?></td>
<td><?= htmlspecialchars($q['question_text']) ?></td>
<td><?= $q['correct_option'] ?></td>
<td>
<a class="btn danger"
href="add_question.php?quiz_id=<?= $selectedQuiz ?>&delete_id=<?= $q['id'] ?>"
onclick="return confirm('Are you sure you want to delete this question?');">

School of Technology and Applied Sciences pg. 71


QUIZ WEB APPLICATION BSC Computer Science

Delete
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</section>
<?php endif; ?>
<?php require __DIR__ . '/../includes/[Link]'; ?>

4.2 add_quiz.php

<?php
$pageTitle = "Add Quiz";
require __DIR__ . '/../includes/[Link]';
if (!isAdmin()) redirect('/quizapp1/[Link]');

$msg = "";
$err = "";

// ✅ Handle delete
if (isset($_GET['delete']) && ctype_digit($_GET['delete'])) {
$id = (int)$_GET['delete'];

// optional: also delete related questions


$pdo->prepare("DELETE FROM questions WHERE quiz_id=?")->execute([$id]);

$stmt = $pdo->prepare("DELETE FROM quizzes WHERE id=?");


$stmt->execute([$id]);
$msg = "Quiz ID $id deleted successfully.";
}
School of Technology and Applied Sciences pg. 72
QUIZ WEB APPLICATION BSC Computer Science

// ✅ Handle add
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$title = trim($_POST['title']);
if ($title === '') {
$err = "Please enter a quiz title.";
} else {
$stmt = $pdo->prepare("INSERT INTO quizzes (title) VALUES (?)");
$stmt->execute([$title]);
$msg = "Quiz added successfully.";
}
}

// ✅ fetch existing quizzes


$rows = $pdo->query("SELECT id, title, created_at FROM quizzes ORDER BY id DESC")-
>fetchAll(PDO::FETCH_ASSOC);

require __DIR__ . '/../includes/[Link]';


?>
<div class="card form-card">
<h2>Add New Quiz</h2>
<?php if ($err): ?><p class="error"><?= htmlspecialchars($err) ?></p><?php endif; ?>
<?php if ($msg): ?><p class="success"><?= htmlspecialchars($msg) ?></p><?php endif;
?>
<form method="POST">
<label>Quiz Title:
<input type="text" name="title" required>
</label>
<button class="btn" type="submit">Add Quiz</button>
</form>
</div>

School of Technology and Applied Sciences pg. 73


QUIZ WEB APPLICATION BSC Computer Science

<section class="card">
<h3>Existing Quizzes</h3>
<table class="table">
<thead>
<tr><th>ID</th><th>Title</th><th>Created At</th><th>Action</th></tr>
</thead>
<tbody>
<?php foreach ($rows as $r): ?>
<tr>
<td><?= $r['id'] ?></td>
<td><?= htmlspecialchars($r['title']) ?></td>
<td><?= $r['created_at'] ?></td>
<td>
<a href="?delete=<?= $r['id'] ?>" class="btn"
onclick="return confirm('Are you sure you want to delete this quiz? All related
questions will also be deleted.');">
Delete
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</section>
<?php require __DIR__ . '/../includes/[Link]'; ?>

[Link]
<?php
$pageTitle = "Admin Dashboard";
require __DIR__ . '/../includes/[Link]';
if (!isAdmin()) redirect('/quizapp1/[Link]');

School of Technology and Applied Sciences pg. 74


QUIZ WEB APPLICATION BSC Computer Science

// counts
$users = $pdo->query("SELECT COUNT(*) c FROM users WHERE role='student'")-
>fetch()['c'];
$qcnt = $pdo->query("SELECT COUNT(*) c FROM questions")->fetch()['c'];
$mcnt = $pdo->query("SELECT COUNT(*) c FROM materials")->fetch()['c'];
$rcnt = $pdo->query("SELECT COUNT(*) c FROM reviews")->fetch()['c'];
$quizcnt = $pdo->query("SELECT COUNT(*) c FROM quizzes")->fetch()['c']; // ✅ new

require __DIR__ . '/../includes/[Link]';


?>
<h2>Admin Dashboard</h2>
<div class="grid">
<div class="card stat"><h3>Students</h3><p class="big"><?= $users ?></p></div>
<div class="card stat"><h3>Quizzes</h3><p class="big"><?= $quizcnt ?></p></div> <!--
✅ new -->
<div class="card stat"><h3>Questions</h3><p class="big"><?= $qcnt ?></p></div>
<div class="card stat"><h3>Materials</h3><p class="big"><?= $mcnt ?></p></div>
<div class="card stat"><h3>Reviews</h3><p class="big"><?= $rcnt ?></p></div>
</div>

<div class="actions">
<a class="btn" href="/quizapp1/admin/add_quiz.php">Manage Quizzes</a> <!-- ✅ new -
->
<a class="btn" href="/quizapp1/admin/add_question.php">Manage Questions</a>
<a class="btn" href="/quizapp1/admin/[Link]">Manage Materials</a>
<a class="btn" href="/quizapp1/admin/[Link]">Reply to Reviews</a>
</div>
<?php require __DIR__ . '/../includes/[Link]'; ?>

[Link]
[Link]

School of Technology and Applied Sciences pg. 75


QUIZ WEB APPLICATION BSC Computer Science

<?php
$pageTitle = "Student Dashboard";
require __DIR__ . '/../includes/[Link]';
if (!isLoggedIn() || isAdmin()) redirect('/quizapp1/[Link]');

require __DIR__ . '/../includes/[Link]';


?>
<h2>Welcome, <?= htmlspecialchars($_SESSION['user']['name']) ?></h2>
<div class="grid">
<div class="card">
<h3>Start a Quiz</h3>
<p>Answer MCQs and get instant results.</p>
<a class="btn" href="/quizapp1/student/[Link]">Choose Quiz</a>

</div>
<div class="card">
<h3>Study Materials</h3>
<p>Read PDFs and notes uploaded by admin.</p>
<a class="btn" href="/quizapp1/student/[Link]">Open</a>
</div>
<div class="card">
<h3>Reviews</h3>
<p>Share your feedback and see admin replies.</p>
<a class="btn" href="/quizapp1/student/[Link]">Go</a>
</div>
</div>
<?php require __DIR__ . '/../includes/[Link]'; ?>

[Link]

<?php

School of Technology and Applied Sciences pg. 76


QUIZ WEB APPLICATION BSC Computer Science

$pageTitle = "Study Materials";


require __DIR__ . '/../includes/[Link]';
if (!isLoggedIn() || isAdmin()) redirect('/quizapp1/[Link]');

require __DIR__ . '/../includes/[Link]';


?>
<h2>Study Materials</h2>
<section class="card">
<table class="table">
<thead><tr><th>Title</th><th>Open</th></tr></thead>
<tbody>
<?php foreach ($pdo->query("SELECT * FROM materials ORDER BY id DESC") as
$m): ?>
<tr>
<td><?= htmlspecialchars($m['title']) ?></td>
<td><a class="btn btn-small" target="_blank" href="<?=
htmlspecialchars($m['file_path']) ?>">Open</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</section>
<?php require __DIR__ . '/../includes/[Link]'; ?>

[Link]

<?php
$pageTitle = "Quiz";
require __DIR__ . '/../includes/[Link]';
if (!isLoggedIn() || isAdmin()) redirect('/quizapp1/[Link]');

$submitted = false;

School of Technology and Applied Sciences pg. 77


QUIZ WEB APPLICATION BSC Computer Science

$score = 0;
$questions = [];
$wrongAnswers = [];
$timeTaken = null;
$totalQuestions = 0;

// Ensure quiz_id is passed


$quiz_id = isset($_GET['quiz_id']) ? (int) $_GET['quiz_id'] : 0;

// If quiz_id is invalid
if ($quiz_id <= 0) {
die("<p class='error'>Quiz not found.</p>");
}

if ($_SERVER['REQUEST_METHOD'] === 'POST') {


$quiz_id = (int) $_POST['quiz_id'];

$allIds = [];
if (!empty($_POST['qids'])) {
$allIds = array_filter(
array_map('trim', explode(',', $_POST['qids'])),
fn($x) => ctype_digit($x)
);
}

if ($allIds) {
$placeholders = implode(',', array_fill(0, count($allIds), '?'));
$stmt = $pdo->prepare("SELECT * FROM questions WHERE id IN ($placeholders)
AND quiz_id = ?");
$stmt->execute([...array_values($allIds), $quiz_id]);
$rows = $stmt->fetchAll();

School of Technology and Applied Sciences pg. 78


QUIZ WEB APPLICATION BSC Computer Science

$correctMap = [];
foreach ($rows as $r) $correctMap[$r['id']] = $r;

$totalQuestions = count($correctMap);

foreach ($correctMap as $qid => $row) {


$chosen = isset($_POST[$qid]) ? strtoupper($_POST[$qid]) : null;
$correct = strtoupper($row['correct_option']);

if ($chosen && $chosen === $correct) {


$score++;
} else {
$wrongAnswers[] = [
'question' => $row['question_text'],
'your_answer' => $chosen ?: 'NA',
'correct_answer' => $row['correct_option'],
'options' => [
'A' => $row['option_a'],
'B' => $row['option_b'],
'C' => $row['option_c'],
'D' => $row['option_d']
]
];
}
}

if (isset($_POST['start_time'])) {
$timeTaken = time() - intval($_POST['start_time']);
}

$submitted = true;
}

School of Technology and Applied Sciences pg. 79


QUIZ WEB APPLICATION BSC Computer Science

} else {
// Fetch questions for selected quiz
$stmt = $pdo->prepare("SELECT * FROM questions WHERE quiz_id = ? ORDER BY id
ASC");
$stmt->execute([$quiz_id]);
$questions = $stmt->fetchAll();
$start_time = time();
$totalQuestions = count($questions);
$total_time = $totalQuestions * 60;
}

require __DIR__ . '/../includes/[Link]';


?>
<div class="card">
<h2>Quiz</h2>
<?php if ($submitted): ?>
<p class="success">Your Score: <strong><?= $score ?>/<?= $totalQuestions
?></strong></p>

<?php if ($timeTaken): ?>


<p><em>Time Taken: <?= gmdate("i:s", $timeTaken) ?></em></p>
<?php endif; ?>

<?php if ($wrongAnswers): ?>


<h3>Review Wrong Answers</h3>
<ul>
<?php foreach ($wrongAnswers as $wa): ?>
<li>
<strong>Q: <?= htmlspecialchars($wa['question']) ?></strong><br>
❌ Your Answer: <?= $wa['your_answer'] ?>) <?=
htmlspecialchars($wa['options'][$wa['your_answer']] ?? 'Not answered') ?><br>
✅ Correct Answer: <?= $wa['correct_answer'] ?>) <?=
htmlspecialchars($wa['options'][$wa['correct_answer']]) ?>

School of Technology and Applied Sciences pg. 80


QUIZ WEB APPLICATION BSC Computer Science

</li>
<hr>
<?php endforeach; ?>
</ul>
<?php endif; ?>

<a class="btn" href="[Link]">Back to Quizzes</a>


<?php else: ?>
<?php if (!$questions): ?>
<p class="muted">Quiz not found or has no questions yet.</p>
<?php else: ?>
<div id="timer" style="font-weight:bold; margin-bottom:10px; color:red;"></div>
<form method="post" class="quiz-form" id="quizForm">
<input type="hidden" name="quiz_id" value="<?= $quiz_id ?>">
<input type="hidden" name="start_time" value="<?= $start_time ?>">
<input type="hidden" name="qids" value="<?= implode(',', array_column($questions,
'id')) ?>">

<?php foreach ($questions as $i => $q): ?>


<div class="q-block">
<h4>Q<?= $i+1 ?>. <?= htmlspecialchars($q['question_text']) ?></h4>
<div class="options">
<label><input type="radio" name="<?= $q['id'] ?>" value="A"> <?=
htmlspecialchars($q['option_a']) ?></label>
<label><input type="radio" name="<?= $q['id'] ?>" value="B"> <?=
htmlspecialchars($q['option_b']) ?></label>
<label><input type="radio" name="<?= $q['id'] ?>" value="C"> <?=
htmlspecialchars($q['option_c']) ?></label>
<label><input type="radio" name="<?= $q['id'] ?>" value="D"> <?=
htmlspecialchars($q['option_d']) ?></label>
</div>
</div>
<?php endforeach; ?>

School of Technology and Applied Sciences pg. 81


QUIZ WEB APPLICATION BSC Computer Science

<button class="btn" type="submit">Submit</button>


</form>

<script>
let timeLeft = <?= $total_time ?>;
const timerEl = [Link]("timer");
const form = [Link]("quizForm");

function updateTimer() {
let minutes = [Link](timeLeft / 60);
let seconds = timeLeft % 60;
[Link] = `Time Remaining:
${minutes}:${[Link]().padStart(2,'0')}`;
if (timeLeft <= 0) {
clearInterval(timer);
[Link]();
}
timeLeft--;
}
updateTimer();
const timer = setInterval(updateTimer, 1000);
</script>
<?php endif; ?>
<?php endif; ?>
</div>
<?php require __DIR__ . '/../includes/[Link]'; ?>

School of Technology and Applied Sciences pg. 82

You might also like