Project Report - Asim
Project Report - Asim
PROJECT REPORT
ON
Tech Thinker
Submitted to
Rashtrasant Tukadoji Maharaj Nagpur University, Nagpur
In partial fulfillment of the requirement of
Bachelor of Vocation (Software Development)
Submitted By
Under guidance of
Dr. S.R.Sharma
CERTIFICATE
University, Nagpur during the academic year 2023-24. This work has not
been submitted to any other institution or University for the award of any
PLACE: Co-Ordinator
DATE: Bachelor of vocational
Dept. of Software Development,
J. M. Patel College, Bhandara.
DECLARATION
To,
The Principal,
J. M. Patel College ,
Bhandara - 441904.
Respected Sir,
I, the undersigned, hereby, declare that this project report
entitled “Tech Thinker” submitted and developed by us, is our original
work.
The system presented herein is our own work done
independently and has not been copied or duplicated from any source.
We understand that such copying is liable to be punished in any
way the University Authorities deem fit.
Thanking you,
Place: -
Date: -
Asim Zeeshan Ahmad
INDEX
5 Conclusion 65-68
Limitations of proposed system
Future Modification
6 Bibliography 69-70
CHAPTER -1
BRIEF REVIEW OF THE PROJECT
1
1.1 INTRODUCTION
With Tech Thinker, learning is not just informative; it's engaging, rewarding, and
tailored to your individual learning style. Join our vibrant community of tech enthusiasts,
and embark on a journey of discovery and mastery. Whether you're aiming to ace your next
interview, build your dream project, or simply expand your knowledge horizons, Tech
Thinker is your ultimate companion on the path to programming excellence.
Get ready to unlock your full potential and become a true Tech Thinker today!"
2
Interactive Learning Experience: The platform offers an interactive learning
experience through its engaging quiz format. Users not only answer questions but also
receive instant feedback on their responses, reinforcing learning outcomes and facilitating
a deeper understanding of programming concepts.
Progress Tracking and Analytics: Tech Thinker provides robust progress tracking
and analytics features, allowing users to monitor their performance over time. Detailed
analytics offer insights into strengths, weaknesses, and areas for improvement, enabling
users to tailor their learning journey accordingly.
3
Continuous Updates and Additions: The Tech Thinker team is dedicated to
continuously updating and expanding the platform's content library with new quizzes,
topics, and features. Users can expect fresh and relevant content regularly to keep pace
with the ever-evolving landscape of programming languages.
Overall, Tech Thinker is more than just a quiz platform; it's a comprehensive
learning ecosystem designed to empower users with the knowledge, skills, and confidence
to succeed in their programming endeavors. Whether users are aspiring developers,
seasoned professionals, or lifelong learners, Tech Thinker is their ultimate destination for
mastering computer programming languages.
4
1.2 Present System in use
5
5. Question Types:
Support multiple question types relevant to programming languages,
such as multiple choice, code completion, code tracing, and code
debugging.
Ensure flexibility in handling different programming language syntax
and semantics.
7. Real-time Feedback:
Provide immediate feedback to users after completing each question
or the entire quiz, including correct answers, explanations, and hints.
Display real-time progress indicators to motivate users and enhance
engagement.
9. Security:
Implement robust security measures to protect user data, prevent
cheating, and ensure the integrity of quizzes.
Utilize techniques such as encryption, authentication tokens, and
secure communication protocols.
6
10. Accessibility:
Ensure accessibility compliance to cater to users with disabilities,
adhering to accessibility standards such as WCAG (Web Content
Accessibility Guidelines).
11. Integration:
Integrate with external APIs or libraries to fetch programming
language-specific content, such as code snippets, documentation, or
tutorials.
Consider integration with version control systems (e.g., GitHub) for
fetching real-world code examples or projects
Content Creation:
Quiz Authoring: The person creating the quiz (instructor, administrator) would prepare the
questions and answers manually. This could involve writing them down on paper, creating
a document on a computer, or using a spreadsheet.
Answer Key: A separate answer key would be created, containing the correct answers for
each question.
Delivery and Participation:
7
Distributing the Quiz: The quiz content (questions and answer choices) would be printed
out or distributed electronically (e.g., email) to the participants.
Taking the Quiz: Participants would answer the questions manually, marking their
selections on the printed copy or filling them in electronically (e.g., filling a form).
Answer Collection: Once participants finish the quiz, they would need to submit their
answer sheets (physical or electronic) back to the administrator.
Manual Grading: The administrator would then manually grade each quiz, comparing the
participant's answers to the answer key. This could be a time-consuming process, especially
for large numbers of participants.
Result Reporting: Scores would be calculated and recorded manually. Results might be
communicated to participants individually (e.g., email, paper report) or posted on a
physical board.
Limitations of a Manual System:
Security Concerns: Maintaining the security and confidentiality of answer keys and
participant results can be challenging.
Overall, while a manual system can be a simple solution for small-scale quizzes, it becomes
cumbersome and inefficient for larger-scale assessments. This is why online quiz platforms
with automated features have become the preferred method for managing quizzes in today's
digital world.
8
1.3 Flaws in present system
While the present system outlined for the "Tech Thinker" project provides a solid
foundation for a quiz-based program focused on computer programming languages, there
may still be some potential flaws or areas for improvement. Here are a few possible flaws
in the present system:
Limited Question Variety: The system may lack diversity in question types or may not
cover all aspects of programming languages comprehensively. This could lead to a lack of
engagement or fail to fully assess users' understanding.
Scalability Issues: As the user base grows or the number of quizzes increases, the system
may face scalability challenges in handling concurrent users, managing large datasets, or
maintaining performance levels.
Security Vulnerabilities: Despite implementing security measures, the system could still
be vulnerable to security breaches, such as SQL injection attacks, cross-site scripting
(XSS), or unauthorized access to sensitive user data.
Accessibility Constraints: The system's accessibility features may not fully meet the needs
of users with disabilities, potentially excluding a portion of the audience from accessing
and benefiting from the platform.
User Experience (UX) Challenges: Certain aspects of the user interface or navigation flow
may not be intuitive or may lead to confusion for users, impacting their overall experience
and satisfaction with the platform.
Cheating Prevention: The system may lack robust mechanisms for preventing cheating,
such as detecting plagiarism in code submissions or monitoring suspicious user behavior
during quizzes.
Feedback Mechanisms: While the system provides feedback on quiz performance, it may
lack personalized feedback tailored to individual users' strengths and weaknesses, limiting
opportunities for targeted learning and improvement.
9
Integration Challenges: Integrating with external APIs or libraries for programming
language-specific content may introduce complexities or dependencies that hinder system
stability or performance.
Maintenance Burden: Regular updates and maintenance may require significant time and
resources, especially as new programming languages emerge, existing languages evolve,
or user feedback necessitates feature enhancements or bug fixes.
Addressing these flaws requires ongoing evaluation, iteration, and improvement of the
present system to ensure it remains effective, secure, and user-friendly for all stakeholders
involved. Regular user feedback, usability testing, and adherence to best practices in
software development and cybersecurity can help mitigate these flaws and enhance the
overall quality of the "Tech Thinker" platform.
10
1.4 Proposed System
How does Proposed system will work?
User Roles:
Content Creation:
Web Interface: Authors would use a web interface to create quizzes. This might
involve filling in forms, uploading question banks, or using a rich text editor to
format questions and answers.
Question Types: The system might support various question types like multiple
choice, true/false, fill-in-the-blank, matching, or even open-ended essay questions.
Answer Management: The system would securely store questions, answer choices,
and answer keys within a database.
Online Platform: Users would access quizzes through a web browser on any device
with an internet connection.
Taking the Quiz: The website would present the quiz questions to the user. They
would answer the questions directly on the website interface.
Features: The system might offer features like time limits, question randomization,
immediate feedback after submission, or progress tracking.
Automatic Grading: The system would automatically grade quizzes based on pre-
defined answer keys.
Instant Results: Users could see their scores and potentially review their answers
and explanations for correct options immediately upon completion.
11
Detailed Reports: The system might generate reports for authors, providing insights
into individual and overall quiz performance.
Additional Features:
User Accounts: Users might need to create accounts to track their progress, earn
badges, or participate in leaderboards.
Security: The system would implement security measures to protect user data, quiz
content, and prevent cheating.
Analytics: Authors might be able to analyze quiz results to identify areas where
users struggle or revise the content for future iterations.
Efficiency: Saves time and effort for both authors (creating and grading) and users
(taking quizzes and receiving results).
Scalability: The system can handle large numbers of participants and quizzes
efficiently.
Data & Insights: Provides valuable data for authors to improve quizzes and track
user performance.
Overall, a proposed quiz website system offers a more streamlined, user-friendly, and data-
driven approach to online assessments compared to a manual system.
12
1.5 Merits of Proposed System
The proposed system for Tech Thinker, a quiz-based platform focusing on computer
programming languages, offers several merits that enhance its functionality, usability, and
efficiency. Here are the merits outlined based on your list:
Simplifies Work: The system streamlines the process of accessing and completing
quizzes, reducing complexity and making it easier for users to engage with the
content.
Saves Time and Money: By providing a convenient and cost-effective learning
solution, the system helps users save time and money compared to traditional
learning methods or expensive training programs.
More Accuracy: The system ensures the accuracy of quiz results and feedback,
providing users with reliable assessments of their knowledge and skills in
programming languages.
Maintains Large Amount of Data: The system is capable of managing a large
database of quizzes, user profiles, and quiz results efficiently, allowing for
scalability and accommodating a growing user base.
Access Privileges Given: The system implements access control mechanisms to
assign appropriate access privileges to users, ensuring that only authorized
individuals can view, create, or modify content as needed.
More Security Levels Added for Critical Info: The system prioritizes data
security by implementing multiple security levels and protocols to protect critical
information, such as user data and quiz content, from unauthorized access or
breaches.
User-Friendly Interface: The system features a user-friendly interface designed
for ease of navigation and intuitive use, enhancing the overall user experience and
making it accessible to users of all skill levels.
Validations: The system includes validation mechanisms to ensure that user inputs
are accurate and consistent, minimizing errors and ensuring the integrity of quiz
data.
List of Error Messages and Instructions: The system provides clear error
messages and instructions to guide users in resolving issues or errors encountered
during quiz completion, improving user satisfaction and reducing frustration.
Multi-User Support: The system supports multiple users simultaneously, allowing
for collaborative learning experiences and accommodating diverse user interactions
without performance degradation.
Data Cannot be Duplicated: The system prevents duplication of quiz data or user
records, maintaining data integrity and eliminating redundancies that could lead to
confusion or errors.
13
Output Can be Seen on Monitor as well as Printout: The system offers flexibility
in accessing quiz results by providing options to view them on the monitor or
generate printable versions for offline reference or documentation purposes.
Overall, these merits highlight the effectiveness and efficiency of the proposed system for
Tech Thinker, ensuring a seamless and rewarding learning experience for users interested
in mastering computer programming languages.
14
CHAPTER -2
DETAILED SYSTEM DESIGN
15
2.1 Data Flow Diagram
User Not
Registration Show Error Page
Successful
Login Page
Home Page
Select a
Quiz
Yes
Score card
Logout
16
2.2 Data Dictionary
Subquizs
Questions
17
Sr. no Data Data Element Data Type
Element Description
Subanswers
18
Sr. no Data Data Element Data Type
Element Description
1 Id Store id Int (11)
2 question_ Store Int (11)
id Question id
3 answer Store id Varchar (255)
4 Subquiz_i Store Int (11)
d Subquiz id
5 User_id Store User id Int (11)
Users
19
Sr. no Data Data Element Data Type
Element Description
1 Id Store id (int11)
2 Name Store user name Varchar (255)
3 email Store user email Varchar (255)
4 phone Store user phone no Bigint (11)
5 Password Store user password Varchar (255)
6 result Store result Int (11)
7 Subquiz_id Store Subquiz id Int (11)
20
CHAPTER -3
SOFTWARE / HARDWARE DETAILS
21
3.1 Project Overview:
The "Tech Thinker" project is an innovative online platform designed to revolutionize the
way individuals learn and master computer programming languages. With a focus on
interactivity, accessibility, and effectiveness, Tech Thinker offers a comprehensive suite
of quizzes covering a wide range of programming languages, including but not limited to
C, C++, Java, HTML, CSS, Python, JavaScript, PHP, and SQL.
At its core, Tech Thinker aims to simplify the learning process by providing users with a
user-friendly and intuitive interface to engage with quizzes tailored to their skill levels and
learning objectives. Whether users are beginners seeking to grasp the fundamentals or
seasoned developers looking to enhance their expertise, Tech Thinker offers a diverse array
of quizzes designed to challenge and inspire.
1. Frontend Tools:
Vs code:
Languages
22
HTML-Hype Text Markup Language:
Imagine building blocks – that's what HTML elements are. Each element represents a
specific part of your web page's content, like headings, paragraphs, images, lists, tables,
forms, and more. They provide meaning and context to the information you present.
formatting and Styling with HTML (and CSS)
While HTML defines the structure, it offers limited styling capabilities for visual design.
Here comes Cascading Style Sheets (CSS), a separate language that works alongside
HTML. CSS allows you to control the appearance of your web page elements, such as
fonts, colors, backgrounds, layouts, and more. HTML provides a foundation, and CSS adds
the polish.
CSS, or Cascading Style Sheets, is the language that goes hand-in-hand with HTML to
create visually appealing and interactive web pages. It controls the presentation of your
website's content, allowing you to style elements like text, buttons, images, and more.
Here's a breakdown of how CSS works:
23
CSS uses selectors to identify the specific HTML elements you want to apply styles to.
These selectors can target elements by their tag name (e.g., h1 for headings, p for
paragraphs), class (a custom attribute you assign to elements for group styling), or ID (a
unique identifier for a single element).
Once you've selected the elements, you define the styles you want to apply using
declarations. A declaration consists of a property (e.g., color, font-size, background-color)
and a value (the specific style you want to set for that property). Property and value pairs
are separated by a colon (:), and each declaration ends with a semicolon (;).
Bootstrap
Bootstrap is a free and open-source front-end framework that simplifies the development
of responsive websites. It provides pre-designed components and styles that you can easily
integrate into your HTML and CSS code. Here's a closer look at what Bootstrap offers
Grid System: Bootstrap offers a flexible grid system that helps you create responsive
layouts that adapt to different screen sizes (desktop, tablet, mobile). You can define the
number of columns, gutters, and responsive breakpoints using CSS classes.
Pre-built Components: Bootstrap comes with a rich set of pre-built components that you
can readily use in your web pages. These include buttons, navigation bars, forms, modals,
dropdowns, progress bars, alerts, and more. They are styled consistently and provide
interactivity without writing extensive CSS code from scratch.
JavaScript (Optional): Bootstrap also includes optional JavaScript plugins that enhance the
functionality of its components. These plugins add interactivity like dropdowns, modals,
tooltips, and more.
Customization: While Bootstrap provides pre-built styles, it allows for customization. You
can override default styles using your own CSS or leverage Bootstrap's customization
variables (Sass or Less).
Benefits of Using Bootstrap:
Faster Development: By utilizing pre-built components and styles, Bootstrap allows you
to develop web pages faster compared to writing all the HTML and CSS from scratch.
Responsiveness: Bootstrap ensures your website looks good and functions well across
various devices, from large desktops to small smartphones.
Consistency: Bootstrap promotes consistent styling throughout your website, making it
visually appealing and professional-looking.
24
Community and Resources: Bootstrap has a large and active community with extensive
documentation, tutorials, and examples available online. This makes it easier to learn and
troubleshoot any issues.
JavaScript
JavaScript (JS), often abbreviated as JS, is a versatile programming language that plays a
critical role in modern web development. It's designed to add interactivity, dynamism, and
animations to web pages, making them more engaging and user-friendly. Here's a
breakdown of what JavaScript offers:
Client-Side Scripting: JavaScript primarily executes on the client-side, meaning the code
runs directly in the user's web browser, as opposed to server-side scripting languages like
PHP or Python that run on the web server. This enables real-time manipulation of the web
page content without refreshing the entire page.
High-Level and Interpreted: JavaScript is a high-level language, meaning it's closer to
human language and requires less complex syntax compared to lower-level languages. It's
also interpreted, meaning the code is translated into machine code line by line during
runtime, rather than being compiled into a standalone executable file beforehand.
Object-Oriented and Functional: JavaScript supports both object-oriented and functional
programming paradigms. Object-oriented programming allows you to structure your code
using objects that encapsulate data and behavior. Functional programming focuses on pure
functions that produce predictable results without modifying external state.
Key Features:
25
Interactive Elements: Creating clickable buttons, dropdowns, menus, accordions, and other
interactive components that enhance user experience.
Form Validation: Validating user input in forms to ensure correct data submission and
preventing errors.
Dynamic Content Manipulation: Updating elements on the page without reloading the
entire page (e.g., displaying real-time updates, search results, or personalized content).
AJAX Requests: Fetching data from servers asynchronously, enabling features like live
search, auto-complete, and dynamic content updates.
Animations and Effects: Adding animations and visual effects to web pages to make them
more engaging and interactive
2. Backend tools:
Cake Php:
CakePHP is a free and open-source web framework written in PHP. It follows the Model-
View-Controller (MVC) architectural pattern and aims to simplify the development
process for web applications. Here's a closer look at what CakePHP offers:
Core Features:
26
Community and Ecosystem: CakePHP has a supportive community and a rich ecosystem
of plugins and extensions that extend its functionality. You can find extensions for
authentication, authorization, payments, social features, and more.
Benefits of Using CakePHP:
Beginners: The framework's structure and conventions provide a solid foundation to learn
web development best practices.
Experienced Developers: CakePHP can boost productivity by automating repetitive tasks
and providing pre-built functionalities.
Teams: The clear separation of concerns promotes better collaboration and code readability
within development teams.
.
3. Database
MySQL
For the Tech Thinker project, MySQL is chosen as the database management system
(DBMS) for storing and managing various data related to quizzes, user profiles, quiz
results, and other platform-related information. MySQL is a popular open-source relational
database that offers several advantages suitable for this project:
Reliability: MySQL is known for its reliability and stability, making it a dependable choice
for storing critical data. It ensures data integrity and consistency, essential for managing
quizzes and user information accurately.
Performance: MySQL is optimized for performance, allowing for efficient retrieval and
manipulation of data even with large datasets. This is crucial for a platform like Tech
Thinker, which may experience a high volume of quiz submissions and user interactions.
27
Scalability: MySQL can scale to accommodate the growth of the platform, supporting
increased data storage and user activity over time. It offers scalability options such as
sharding, replication, and clustering, ensuring the system can handle future demands.
Ease of Use: MySQL is user-friendly and easy to set up, configure, and maintain. It
provides a wide range of tools and utilities for database administration, making it accessible
to developers and administrators with varying levels of expertise.
Compatibility: MySQL is compatible with various programming languages, frameworks,
and platforms commonly used in web development. It integrates seamlessly with
technologies like PHP, Python, Java, and Node.js, facilitating smooth interaction between
the database and the application layer.
Security: MySQL offers robust security features to protect sensitive data from unauthorized
access, SQL injection attacks, and other security threats. It supports authentication
mechanisms, access control lists (ACLs), encryption, and auditing capabilities to enhance
data security.
Community Support: MySQL has a large and active community of developers, users, and
contributors who provide support, documentation, and resources. This community-driven
ecosystem ensures ongoing development, updates, and improvements to the MySQL
database.
Overall, MySQL is an excellent choice for the Tech Thinker project, providing a reliable,
high-performance, scalable, and secure database solution to support the platform's data
management needs effectively. With MySQL as the backend database, Tech Thinker can
ensure the integrity, efficiency, and scalability of its database operations, contributing to a
seamless and responsive user experience for learners on the platform.
XAMPP
XAMPP, which stands for Cross-Platform, Apache, MySQL, PHP, and Perl, is a free
platform that allows developers to test their code locally on their own computers. This
platform provides the experience of having your own mini web server at home, compatible
with both Windows (WAMP) and Linux (LAMP) environments. Footnote1 It is a safe space
to experiment and perfect code before it goes live.
XAMPP is a web server solution stack that helps developers create local environments. It
allows them to test and troubleshoot their code before they deploy it to a main server.
What’s the difference between XAMPP and WAMP? XAMPP supports multiple
platforms, but WAMP is only available for Windows. Footnote9 As for the differences
between XAMPP and MAMP, both are tools to help set up local web environments.
However, MAMP is primarily designed for macOS. It also offers a paid version with
additional features like a built-in email server.
28
3.3. Project Activities
There are several Agile methodologies that can be used to implement the Agile model,
such as Scrum, Kanban, XP, and Lean. These methodologies provide frameworks and
practices for implementing the Agile values and principles in a structured and organized
manner.
Overall, the Agile model is widely used in software development due to its flexibility,
customer-centric approach, and ability to deliver value quickly and efficiently.
29
1. Planning: The planning stage involves defining the scope of the project, identifying
the features to be delivered in each iteration, and estimating the time and effort required to
complete each feature. This is typically done collaboratively with the development team,
product owner, and other stakeholders.
2. Design: In the design phase, the development team creates wireframes, mockups,
and other design documents that illustrate the layout, structure, and functionality of the
website. The goal is to ensure that the design meets the user requirements and is consistent
with the overall vision for the website.
3. Development: The development phase involves writing the code for the website
features identified in the planning phase. The development team uses an iterative and
incremental approach, building and testing features in small increments, and collaborating
closely with the product owner and other stakeholders.
30
4. Testing: In the testing phase, the development team performs unit tests, integration
tests, and acceptance tests to ensure that the features work as expected and meet the
acceptance criteria. Automated testing tools and manual testing techniques are used to
validate the website's functionality and performance.
5. Release: Once a feature or set of features is completed and tested, the development
team deploys it to the production environment for users to access.
6. Review and Feedback: Throughout the development process, the development team
regularly reviews the progress of the project and seeks feedback from stakeholders. They
use this feedback to refine their work and make adjustments to the project plan, as needed.
31
Software specification
Operating System: -
For a quiz website, the choice of operating system (OS) primarily depends on the server-
side requirements rather than the client-side (end-user) experience. Here are the
considerations for selecting an operating system for hosting a quiz website:
Web Server Compatibility: Ensure that the chosen OS supports popular web servers
like Apache, Nginx, or Microsoft Internet Information Services (IIS). These servers
are commonly used to host websites and serve web content, including quiz pages
and assets.
Cost and Licensing: Evaluate the cost and licensing implications of the chosen OS,
especially for commercial operating systems like Windows Server. Open-source
operating systems like Linux distributions (e.g., Ubuntu Server, CentOS, Debian)
offer cost-effective alternatives with robust features and community support.
32
Compatibility with Hosting Providers: If hosting the quiz website on a third-party
hosting provider, ensure that the chosen OS is supported by the hosting provider's
infrastructure and platform offerings. Check for compatibility with cloud hosting
services like Amazon Web Services (AWS), Google Cloud Platform (GCP),
Microsoft Azure, or specialized web hosting providers.
Compiler: - vscode
For a quiz website, you typically wouldn't need a compiler in the traditional sense, as a
compiler is software that translates source code written in a programming language into
machine code or executable code. However, you may need certain tools or technologies to
build and deploy the website. Here are some relevant technologies you might consider:
Frontend Technologies: For the frontend of your quiz website, you'll need HTML,
CSS, and JavaScript to create the user interface and handle client-side interactions.
33
Additionally, you may use frontend frameworks/libraries like React, Vue.js, or
Angular for building interactive UI components.
Version Control System: Using a version control system like Git can help you
manage and track changes to your website's source code. It allows multiple
developers to collaborate on the project, rollback changes if needed, and maintain
a history of code revisions.
Web Server: You'll need a web server software to host your quiz website and serve
web pages to users. Common web servers include Apache, Nginx, or Microsoft
Internet Information Services (IIS). These servers handle HTTP requests, manage
server-side scripts, and serve static files to clients.
Deployment Tools: Consider using deployment tools like Docker, Heroku, or AWS
Elastic Beanstalk to streamline the deployment process of your quiz website. These
tools automate tasks such as building, packaging, and deploying your application
to production servers or cloud platforms.
Overall, while you won't need a compiler for a quiz website, you'll need a combination of
server-side scripting languages, databases, web frameworks, frontend technologies,
version control systems, web servers, and deployment tools to develop, deploy, and
maintain your website effectively. Choose the technologies that best suit your project
requirements, development skills, and infrastructure preferences.
34
CHAPTER -4
SYSTEM DESIGN
35
4.1 Program listing
1.FRONT PAGE
Header Part:
<body>
<div class="st container-fluid ">
<nav class="navbar navbar-expand-lg ">
<div class="container-fluid">
<a class="navbar-brand " href="#">
<?php echo $this->Html->image('logo1.jpg',[array('style'=>'width="110px"')]);?>
</a>
</div>
<div class="modal-body">
<?= $this->Form->create(null, ['url' => ['controller' => 'Users', 'action' => 'login']]) ?>
36
<form>
<div class="mb-3">
<?= $this->Form->label('email', 'EMAIL ID:', ['class' => 'col-form-label']) ?>
<?= $this->Form->email('email', ['class' => 'form-control', 'placeholder' => 'ENTER EMAIL ID'])
?>
</div>
<div class="mb-3">
<?= $this->Form->label('password', 'PASSWORD:', ['class' => 'col-form-label']) ?>
<?= $this->Form->password('password', ['class' => 'form-control', 'placeholder' => 'ENTER
PASSWORD']) ?>
</div>
</form>
</div>
<div class="modal-footer">
<?= $this->Html->link(
$this->Form->button('LOG IN', ['class' => 'b1']),
['controller' => 'Users', 'action' => 'login'],
['escape' => false]
) ?>
</div>
<?= $this->Form->end() ?>
</div>
</div>
</div>
<div class="modal fade1" id="exampleModal1" tabindex="-1" aria-
labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel" >Regester Now</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<?= $this->Form->create() ?>
<div class="form-floating">
<?= $this->Form->control('name', ['class' => 'form-control mb-3', 'label' => ['text' => 'Your
Name']]) ?>
</div>
<div class="form-floating">
37
<?= $this->Form->control('email', ['class' => 'form-control mb-3', 'label' => ['text' => 'Enter your
E-mail']]) ?>
</div>
<div class="form-floating">
<?= $this->Form->control('contact_number', ['type' => 'tel', 'maxlength' => 10, 'class' => 'form-
control mb-3', 'label' => ['text' => 'Contact Number']]) ?>
</div>
<div class="form-floating">
<?= $this->Form->control('password', ['type' => 'password', 'class' => 'form-control mb-3', 'label'
=> ['text' => 'Conform Your Password']]) ?>
</div>
<div class="form-floating">
<?= $this->Form->control('confirm_password', ['type' => 'password', 'class' => 'form-control mb-
3', 'label' => ['text' => 'Conform Your Password']]) ?>
</div>
<div class="form-check">
<?= $this->Form->control('accept_terms', ['type' => 'checkbox', 'class' => 'form-check-input',
'label' => ['text' => 'I accept the <a href="">Terms of Service</a>,<a href=""> Privacy Notice </a>
and <a href="" > Cookie Policy</a>.']]) ?>
</div>
38
Body Part:
<body>
<div class="container-fluid text-white" id="c1" style=" background-image: linear-
gradient(#754ffe,#d7cdfc,#3506e0);">
<h1 style="text-align: center; font-family: serif;"> Tech Thinker </h1>
<h4 style="text-align: center;font-family:Georgia, 'Times New Roman', Times, serif;">
"Interactive Quiz Experience"</h4>
<div class="row justify-content-center mt-5">
<div class="card me-4 p-4 card1" style="width: 20rem; box-shadow: 1px 1px 10px rgba(1, 1, 1,
1.5);">
<div class=" d-flex justify-content-center" >
<img src="../webroot/img/homecard1.png" class="imghome d-flex justify-content-center">
</div>
<div class="card-body " style="text-align: center;">
<h5 class="card-title ">Complete the Test</h5>
<p class="card-text" >Be yourself and answer honestly to find out your personality type.</p>
</div>
<div class="go-corner" href="#">
<div class="go-arrow">
→
</div>
</div>
</div>
<div class="card me-4 p-4 card1" style="width: 20rem; box-shadow: 1px 1px 10px rgba(1, 1, 1,
1.5);">
<div class=" d-flex justify-content-center" >
<img src="../webroot/img/homecard2.png" class="imghome ">
</div>
<div class="card-body" style="text-align: center;">
<h5 class="card-title">View Detailed Results</h5>
<p class="card-text">Learn how your personality type influences many areas of your life.</p>
</div>
<div class="go-corner" href="#">
<div class="go-arrow">
→
</div>
</div>
</div>
<div class="card me-4 p-4 card1" style="width: 20rem; box-shadow: 1px 1px 10px rgba(1, 1, 1,
1.5);">
<div class=" d-flex justify-content-center" >
<img src="../webroot/img/homecard3.jpg" class="imghome" >
</div>
39
<div class="card-body" style="text-align: center;">
<h5 class="card-title">Unlock Your Potential</h5>
<p class="card-text">Grow into the person you want to be with your optional Premium Suite.</p>
</div>
<div class="go-corner" href="#">
<div class="go-arrow">
→
</div>
</div>
</div>
<div class="wave-container "></div>
</div>
</div>
<div class="alfa mt-1 text-center">
<button type="button" style="background-color: #fed64f; font-size: 20px;" class=" b1 w-50 pb-5
pt-3 shadow-lg rounded-pill border-warning"
data-bs-toggle="modal" data-bs-target="#exampleModal" data-bs-whatever="@mdo"><b>Start
Quiz</b></button>
</div>
40
<li > Explore Topics: Choose from a variety of tech categories that pique your interest.</li>
<li > Test Your Knowledge: Take our quizzes to challenge your tech know-how and learn
something new along the way. </li>
</ul>
</div>
<div class=" col-md-6 overflow-auto 5rem">
<div class="w-auto p-4 pt-4">
<h2 class="pt-4 "> What Sets Us Apart?</h2>
<ul>
<li> Diverse Topics: From coding and software development to the latest gadgets and innovations,
Tech Thinker covers a wide range of tech-related topics. </li>
<li > Interactive Quizzes: Our quizzes are not just tests; they are interactive experiences that make
learning enjoyable and rewarding. </li>
<li > Stay Updated: In the dynamic world of technology, staying updated is key. Tech Thinker
ensures you're always in the loop with the latest tech trends.</li>
</ul>
<h2 class="pt-4 "> Join the Tech Thinker Community </h2>
<ul style="list-style-type:none;">
<li > Connect with fellow tech enthusiasts, share your insights, and stay informed through our
vibrant community. Tech Thinker is not just a quiz platform; it's a hub for tech lovers. </li>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
41
1s0x3a2b3f528f4d2749%3A0x711a70051026b7f2!2sJ.%20M.%20Patel%20College%20-
Department%20of%20Management%20Science!5e0!3m2!1sen!2sin!4v1705259044225!5m2!1se
n!2sin" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-
downgrade"></iframe>
</div>
<div class="col-md-6 " > <img src="../webroot/img/imgbox.png" class="img-fluid" >
</div>
</div>
</div>
</body>
Footer Part:
<body>
<div class="container-fluid py-5 mb-5" id="d1" style=" box-shadow: 0 25px 30px rgba(0, 0, 0, .5);
text-align: center; ">
<div class="row gx-7">
<div class="col-sm-4 ps-5"><h3>Tech Thinker</h3>
<p class="mt-3">Tech Thinker is not just a quiz; it's an exploration into the fascinating world of
technology.</p></div>
<div class="col-sm-4"><h3>Contact Us</h3>
<div><i class="bi bi-geo-alt-fill" style="font-size: 20px;"> : J.M. Patel College</i></div>
<div><i class="bi bi-telephone-fill" style="font-size: 20px;"> : +91-7796749914</i></div>
<div><i class="bi bi-envelope-fill" style="font-size: 20px;"> :
[email protected]</i></div>
</div>
<div class="col-sm-4"><h3>My Channels</h3>
<input type="email" name="email" placeholder="Inter your email" class="aa" style="border-
radius: 20px;"><br>
<button type="button" class="but3" style="border-radius: 20px; width: 150px; border-color:
#f1db25;
background-color: #f1db25; color:white; padding: 10px 30px; margin-top:
20px;">SUBSCRIBE</button><br>
<i class="btn bi bi-facebook" style="font-size: 25px; color: blue;"></i>
<i class="btn bi bi-youtube" style="font-size: 25px; color: red;"></i>
<i class="btn bi bi-instagram" style="font-size:25px; color: rgb(231, 40, 72);"></i>
</div>
</div>
</div>
</body>
42
Code for Quiz Category Page:
<body>
<div class="container">
<div class="hero">
<h2 class="d-flex justify-content-center shadow-lg p-4"> Select Your Quiz </h2>
<div class="row mt-5 d-flex justify-content-center">
<?php foreach ($subquizs as $subquiz){ ?>
<div class="flip-card-front btn card me-5 mb-5 topic w-25 h-25">
<a href="../Questions/instruction/<?php echo $subquiz->id ?>">
<img src="../webroot/img/<?= h($subquiz->image) ?>" class="card-img-fluid cd">
</a>
</div>
<?php
}
?>
</div>
</div>
</div>
</body>
<div class="container-fluid">
<div class="container mt-5 p-5" style="box-shadow: 0 25px 30px rgba(0, 0, 0, .3); width: 850px;
">
<h3 style="text-align: center; margin-bottom: 20px;">Tech Thinker Quiz</h3>
<p style="font-size:20px; font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman',
serif;">
This online test section contains the next 25 best multiple-choice type questions answers
(MCQs) on Computer Fundamentals .This online Quiz / Practice Test issuitable for variousexam
Format conducted by various educational organization.These questions have beenfrom previous
years question papers of various competitive exams.
<h3 style="text-align: center; margin-top: 30px;">Test Instructions</h3>
<div class="container p-4" style="background-color: #754ffe; border-radius: 10px; color: white;">
<div class="row">
<div class="col 4">
<h5>Question type</h5>
</div>
<div class="col 8">
Questions remain the same unless test is updated
</div>
</div>
<div class="row">
43
<div class="col 4">
<h5>Total Number of Questions</h5>
</div>
<div class="col 8">
20
</div>
</div>
<div class="row">
<div class="col 4">
<h5>Points</h5>
</div>
<div class="col 8">
1 Point for each Question
</div>
</div>
</div>
<div class="B1 d-flex justify-content-center">
<a href="Qpage.html"><button type="button" class="btn btn-outline-purple mt-5 px-5"
style="border: 1px solid #754ffe;">Start</button></a>
</div>
</div>
</div>
<?php
// Assuming $results is an instance of Cake\ORM\ResultSet
$questions = $results;
$total = count($questions);
?>
<style>
.timer-container {
text-align: center;
}
.timer {
font-size: 2rem;
margin-bottom: 20px;
}
</style>
<div class="container-fluid">
<div class="container-fluid" style="text-align: center;">
<h2 class="d-flex justify-content-center shadow-lg p-4">Quiz</h2>
</div>
<div class="row p-5">
44
<div class="timer d-flex justify-content-center" id="timer">00:10:00</div>
<div class="col-lg-8 pb-5 ">
<div class="bita card shadow p-3 mb-5 bg-transparent rounded" style="height: auto;background:
rgba(255, 255, 255, 0.2);">
<div class="card-body">
<?= $this->Form->create(null, ['url' => ['controller' => 'Subanswers', 'action' => 'saveanswers'], 'id'
=> 'quizForm', 'type' => 'post']); ?>
<div id="questionContainer">
<?php for ($i = 0; $i < $total; $i++): ?>
<div class="question" style="display: <?= $i === 0 ? 'block' : 'none'; ?>" data-index="<?= $i ?>">
45
<?php endif; ?>
</div>
</div>
<?php endfor; ?>
</div>
<?= $this->Form->end(); ?>
</div>
</div>
</div>
<div class="col-lg-3 border ms-5 shadow">
<div class="row mt-5">
<?php for ($i = 0; $i < $total; $i++): ?>
<div class="col-lg-3 mb-3">
<a href="#" class="btn border w-50 question-link" data-question-index="<?= $i ?>"><?= $i + 1;
?></a>
</div>
<?php endfor; ?>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function ()
{
const questions = document.querySelectorAll('.question');
const questionLinks = document.querySelectorAll('.question-link');
const answerRadios = document.querySelectorAll('.answer-radio');
const submitButton = document.querySelector('.submit');
const previousButton = document.querySelector('.previous');
const nextButton = document.querySelector('.next');
const timerDisplay = document.getElementById('timer');
// Added timer display element
let currentQuestionIndex = 0;
function showQuestion(index) {
questions.forEach((question, i) =>
{
question.style.display = i === index ? 'block' : 'none';
});
}
function updateButtonColor(index) {
questionLinks.forEach((link, i) => {
if (i === index) {
link.classList.add('btn-success');
46
link.classList.remove('btn-outline-success');
} else
{
link.classList.remove('btn-success');
link.classList.add('btn-outline-success');
}
});
}
function updateButtonVisibility() {
previousButton.style.display = currentQuestionIndex === 0 ? 'none' : 'inline-block';
nextButton.style.display = currentQuestionIndex === questions.length - 1 ? 'none' : 'inline-block';
submitButton.style.display = currentQuestionIndex === questions.length - 1 ? 'inline-block' :
'none';
}
// Initial display
showQuestion(currentQuestionIndex);
updateButtonColor(currentQuestionIndex);
updateButtonVisibility();
// Previous button click event
document.addEventListener('click', function (event) {
if (event.target.classList.contains('previous')) {
if (currentQuestionIndex > 0) {
currentQuestionIndex--;
showQuestion(currentQuestionIndex);
updateButtonColor(currentQuestionIndex);
updateButtonVisibility();
console.log('Previous button clicked');
}
}
});
// Next button click event
document.addEventListener('click', function (event) {
if (event.target.classList.contains('next')) {
if (currentQuestionIndex < questions.length - 1) {
currentQuestionIndex++;
showQuestion(currentQuestionIndex);
updateButtonColor(currentQuestionIndex);
updateButtonVisibility();
console.log('Next button clicked');
}
}
});
// Question link click event
questionLinks.forEach((link, index) => {
47
link.addEventListener('click', function (e) {
e.preventDefault();
currentQuestionIndex = index;
showQuestion(currentQuestionIndex);
updateButtonColor(currentQuestionIndex);
updateButtonVisibility();
});
});
// Submit button click event
submitButton.addEventListener('click', function () {
// Add your logic here to submit the form via AJAX or regular form submission
document.getElementById('quizForm').submit();
});
// Handle radio button changes
answerRadios.forEach((radio) => {
radio.addEventListener('change', function () {
const selectedOption = document.querySelector('input[name="answer' + currentQuestionIndex +
'"]:checked');
const selectionMessage = document.querySelector('.selection-message');
if (selectedOption) {
selectionMessage.textContent = 'Answer selected!';
} else {
selectionMessage.textContent = 'Please select an answer.';
}
});
});
// Timer functionality
let timerInterval;
let seconds = 0;
let minutes = 10; // Set initial minutes
let hours = 0;
function startTimer() {
clearInterval(timerInterval);
timerInterval = setInterval(updateTimer, 1000);
}
function stopTimer() {
clearInterval(timerInterval);
}
function resetTimer() {
clearInterval(timerInterval);
seconds = 0;
minutes = 10; // Reset to initial minutes
hours = 0;
updateDisplay();
48
}
function updateTimer() {
if (seconds === 0 && minutes === 0 && hours === 0) {
clearInterval(timerInterval);
// You can add actions here when the timer reaches zero
document.getElementById('quizForm').submit(); // Automatically submit the form
return;
}
if (seconds === 0) {
if (minutes > 0) {
seconds = 59;
minutes--;
} else if (hours > 0) {
seconds = 59;
minutes = 59;
hours--;
}
} else {
seconds--;
}
updateDisplay();
}
function updateDisplay() {
const formattedTime =
`${padNumber(hours)}:${padNumber(minutes)}:${padNumber(seconds)}`;
timerDisplay.innerText = formattedTime; // Update timer display element
}
function padNumber(num) {
return num.toString().padStart(2, '0');
}
49
Code for Result Page:
<h1>Your Score</h1>
<h4>Correct Answers: <?= $correctAnswers ?></h4>
<h4>Total Questions: <?= $totalQuestions ?></h4>
<a href="MainH.html">
<div class="B1 mt-5"> <button type="button" class="btn btn-outline-primary px-
5">Finish</button></div></a>
</div>
50
2.CONTROLLERS
<?php
declare(strict_types=1);
namespace App\Controller;
use cake\Event\EventInterface;
class UsersController extends AppController
{
public function beforeFilter(EventInterface $event)
{
$this->viewBuilder()-> setLayout('home');
parent::beforeFilter($event);
$this->Authentication->addUnauthenticatedActions(['login','add']);
}
return $this->redirect($redirect);
}
if ($this->request->is('post') && !$result->isValid()) {
$this->Flash->error(__('Invalid username or password'));
}
}
public function logout()
{
$result = $this->Authentication->getResult();
if ($result && $result->isValid()) {
$this->Authentication->logout();
return $this->redirect(['controller' => 'pages', 'action' => 'landing']);
}
51
}
public function index()
{
$users = $this->paginate($this->Users);
$this->set(compact('users'));
}
public function view($id = null)
{
$user = $this->Users->get($id, [
'contain' => [],
]);
$this->set(compact('user'));
}
public function register()
{
$this->add();
}
public function add()
{
$user = $this->Users->newEmptyEntity();
if ($this->request->is('post')) {
$user = $this->Users->patchEntity($user, $this->request->getData());
if ($this->Users->save($user)) {
$this->Flash->success(__('The user has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The user could not be saved. Please, try again.'));
}
$this->set(compact('user'));
}
public function edit($id = null)
{
$user = $this->Users->get($id, [
'contain' => [],
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$user = $this->Users->patchEntity($user, $this->request->getData());
if ($this->Users->save($user)) {
$this->Flash->success(__('The user has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The user could not be saved. Please, try again.'));
}
52
$this->set(compact('user'));
}
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$user = $this->Users->get($id);
if ($this->Users->delete($user)) {
$this->Flash->success(__('The user has been deleted.'));
} else {
$this->Flash->error(__('The user could not be deleted. Please, try again.'));
}
return $this->redirect(['action' => 'index']);
}
}
<?php
declare(strict_types=1);
namespace App\Controller;
use cake\Event\EventInterface;
class SubquizsController extends AppController
{
public function beforeFilter(EventInterface$event)
{
$this->viewBuilder()-> setLayout('home');
}
public function index()
{
$subquizs = $this->paginate($this->Subquizs);
$this->set(compact('subquizs'));
}
public function quizcategorypage()
{
$subquizs = $this->paginate($this->Subquizs);
$this->set(compact('subquizs'));
}
public function Mhome()
{
$subquizs = $this->paginate($this->Subquizs);
53
$this->set(compact('subquizs'));
}
public function view($id = null)
{
$subquiz = $this->Subquizs->get($id, [
'contain' => [],
]);
$this->set(compact('subquiz'));
}
public function add()
{
$subquiz = $this->Subquizs->newEmptyEntity();
if ($this->request->is('post')) {
$subquiz = $this->Subquizs->patchEntity($subquiz, $this->request->getData());
if ($this->Subquizs->save($subquiz)) {
$this->Flash->success(__('The subquiz has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The subquiz could not be saved. Please, try again.'));
}
$this->set(compact('subquiz'));
}
public function edit($id = null)
{
$subquiz = $this->Subquizs->get($id, ['contain' => [],]);
if ($this->request->is(['patch', 'post', 'put'])) {
$subquiz = $this->Subquizs->patchEntity($subquiz, $this->request->getData());
if ($this->Subquizs->save($subquiz)) {
$this->Flash->success(__('The subquiz has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The subquiz could not be saved. Please, try again.'));
}
$this->set(compact('subquiz'));
}
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$subquiz = $this->Subquizs->get($id);
if ($this->Subquizs->delete($subquiz)) {
$this->Flash->success(__('The subquiz has been deleted.'));
} else {
$this->Flash->error(__('The subquiz could not be deleted. Please, try again.'));
54
}
return $this->redirect(['action' => 'index']);
}
<?php
declare(strict_types=1);
namespace App\Controller;
use cake\Event\EventInterface;
class QuestionsController extends AppController
{
public function beforeFilter(EventInterface$event)
{
$this->viewBuilder()-> setLayout('home');
}
public function instruction($id = null)
{
$this->set('id',$id);
}
public function questfile($id = null)
{
$query = $this->Questions->find()
->where(['subquiz_id' => $id]);
$results = $query->toArray(); // Convert ResultSet to array
$this->set('results', $results);
}
public function nextquest($id = null )
{
$this->loadModel('Questions');
$questions = $this->Questions->find('all');
$this->set(compact('questions'));
}
public function index()
{
$questions = $this->paginate($this->Questions);
$this->set(compact('questions'));
}
public function view($id = null)
{
$question = $this->Questions->get($id, [
'contain' => [],
55
]);
$this->set(compact('question'));
}
public function add()
{
$question = $this->Questions->newEmptyEntity();
if ($this->request->is('post')) {
$question = $this->Questions->patchEntity($question, $this->request->getData());
if ($this->Questions->save($question)) {
$this->Flash->success(__('The question has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The question could not be saved. Please, try again.'));
}
$this->set(compact('question'));
}
public function edit($id = null)
{
$question = $this->Questions->get($id, [
'contain' => [],
]);
if ($this->request->is(['patch', 'post', 'put'])) {
$question = $this->Questions->patchEntity($question, $this->request->getData());
if ($this->Questions->save($question)) {
$this->Flash->success(__('The question has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The question could not be saved. Please, try again.'));
}
$this->set(compact('question'));
}
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$question = $this->Questions->get($id);
if ($this->Questions->delete($question)) {
$this->Flash->success(__('The question has been deleted.'));
} else {
$this->Flash->error(__('The question could not be deleted. Please, try again.'));
}
return $this->redirect(['action' => 'index']);
}
}
Code for Subanswers Controller:
56
<?php
declare(strict_types=1);
namespace App\Controller;
class SubanswersController extends AppController
{
public function calcans($subquizId) {
$this->loadModel('Questions');
$this->loadModel('Subanswers');
$questions = $this->Questions->find('all', [
'conditions' => ['Questions.subquiz_id' => $subquizId],
])->toArray();
$subanswers = $this->Subanswers->find('all', [
'conditions' => [
'Subanswers.subquiz_id' => $subquizId,
'Subanswers.user_id' => 1, // Replace with actual user ID retrieval method
],
]);
$correctAnswers = 0;
$totalQuestions = count($questions);
foreach ($questions as $question) {
foreach ($subanswers as $subanswer) {
if ($question->id === $subanswer->question_id && $question->answer === $subanswer-
>answer) {
$correctAnswers++;
break; // Stop checking subanswers for this question after a match
}
}
}
$score = ($correctAnswers / $totalQuestions) * 100;
$this->set(compact('correctAnswers', 'totalQuestions', 'score'));
}
public function saveanswers()
{
if ($this->request->is('post')) {
$questionIds = $this->request->getData('question_id');
$subquizIds = $this->request->getData('subquiz_id');
$userIds = $this->request->getData('user_id');
$answers = $this->request->getData('answer');
foreach ($questionIds as $index => $questionId) {
$subanswer = $this->Subanswers->newEmptyEntity();
$subanswerData = [
'question_id' => $questionId,
'answer' => $answers[$index],
57
'subquiz_id' => $subquizIds[$index],
'user_id' => $userIds[$index],
];
$subanswer = $this->Subanswers->patchEntity($subanswer, $subanswerData);
}
return $this->redirect(['controller' => 'Subanswers', 'action' => 'calcans',$subquizIds[0]]);
}
}
public function index()
{
$this->paginate = [
'contain' => ['Questions', 'Users'],
];
$subanswers = $this->paginate($this->Subanswers);
$this->set(compact('subanswers'));
}
public function view($id = null)
{
$subanswer = $this->Subanswers->get($id, [
'contain' => ['Questions', 'Users'],
]);
$this->set(compact('subanswer'));
}
public function add()
{
$subanswer = $this->Subanswers->newEmptyEntity();
if ($this->request->is('post')) {
$subanswer = $this->Subanswers->patchEntity($subanswer, $this->request->getData());
if ($this->Subanswers->save($subanswer)) {
$this->Flash->success(__('The subanswer has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The subanswer could not be saved. Please, try again.'));
}
$questions = $this->Subanswers->Questions->find('list', ['limit' => 200])->all();
$users = $this->Subanswers->Users->find('list', ['limit' => 200])->all();
$this->set(compact('subanswer', 'questions', 'users'));
}
public function edit($id = null)
{
$subanswer = $this->Subanswers->get($id, [
'contain' => [],
]);
if ($this->request->is(['patch', 'post', 'put'])) {
58
$subanswer = $this->Subanswers->patchEntity($subanswer, $this->request->getData());
if ($this->Subanswers->save($subanswer)) {
$this->Flash->success(__('The subanswer has been saved.'));
return $this->redirect(['action' => 'index']);
}
$this->Flash->error(__('The subanswer could not be saved. Please, try again.'));
}
$questions = $this->Subanswers->Questions->find('list', ['limit' => 200])->all();
$users = $this->Subanswers->Users->find('list', ['limit' => 200])->all();
$this->set(compact('subanswer', 'questions', 'users'));
}
public function delete($id = null)
{
$this->request->allowMethod(['post', 'delete']);
$subanswer = $this->Subanswers->get($id);
if ($this->Subanswers->delete($subanswer)) {
$this->Flash->success(__('The subanswer has been deleted.'));
} else {
$this->Flash->error(__('The subanswer could not be deleted. Please, try again.'));
}
return $this->redirect(['action' => 'index']);
}
}
59
I/O Screens
Home Page:
60
61
Register & Log In page:
62
Category Page:
Quiz:
63
Result Page:
64
CHAPTER -5
CONCLUSION
65
5.1Limitations of proposed system
While the proposed system for the "Tech Thinker" project offers numerous benefits, it's
essential to acknowledge its potential limitations to ensure realistic expectations and
effective management. Here are some limitations to consider:
Scalability Challenges: As the user base grows and more quizzes are added, the
system may face scalability challenges. Increased traffic and concurrent user
interactions could lead to performance issues such as slower response times or
server overload. Ensuring scalability requires careful planning and resource
allocation.
Content Quality Control: Maintaining the quality, accuracy, and relevance of quiz
questions can be challenging. Relying on user-generated content or external sources
may introduce inconsistencies or inaccuracies. Implementing effective content
moderation and quality control measures is crucial to ensure the credibility and
educational value of the quizzes.
Security Risks: Despite implementing security measures, the system may still be
vulnerable to security breaches, such as SQL injection attacks, cross-site scripting
(XSS), or unauthorized access to user data. Continuous monitoring, regular security
updates, and adherence to best practices are necessary to mitigate security risks
effectively.
66
Dependence on Third-party Services: Utilizing third-party services or APIs for
certain functionalities introduces dependencies and potential risks. Service
disruptions, changes in APIs, or discontinuation of services by third-party providers
could impact the functionality and availability of the quiz website.
Future modifications to the "Tech Thinker" quiz website may be necessary to adapt to
evolving user needs, technological advancements, and industry trends. Here are some
considerations for future modifications:
67
Social Features: Add social features like discussion forums, user-generated content
sharing, or collaborative quizzes to facilitate interaction and knowledge sharing
among users. This fosters a sense of community and encourages collaborative
learning.
AI-Powered Features: Explore the use of artificial intelligence (AI) and machine
learning algorithms to automate quiz generation, analyze user performance data,
and provide personalized recommendations. AI-powered features can enhance the
adaptive learning experience and improve the accuracy of feedback provided to
users.
By prioritizing these future modifications, the "Tech Thinker" quiz website can evolve into
a dynamic and adaptive learning platform that meets the needs of users and stays relevant
in a rapidly changing educational landscape.
68
CHAPTER -6
BIBLIOGRAPHY
69
Sr. No. Website
1) https://book.cakephp.org/4/en/index.html
2) https://www.w3schools.com/html/
3) https://www.w3schools.com/css/default.asp
4) https://stackoverflow.com/
5) https://getbootstrap.com/docs/5.0/getting-started/introduction/
6) https://icons.getbootstrap.com/
70