0% found this document useful (0 votes)
13 views

Batch11 ITA MindScapeRumble

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

Batch11 ITA MindScapeRumble

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

A MINI PROJECT REPORT

ON
MINDSCAPE RUMBLE
Submitted in the partial fulfilment of the requirements for the award of
BACHELOR OF TECHNOLOGY
IN
INFORMATION TECHNOLOGY
SUBMITTED BY
Krishna Chaitanya Reddy J Ajay Kumar Gaddam Charan
21BK1A1250 21BK1A1247 21BK1A1238

Under the esteemed guidance of


Mr. Senthil Murgan (Assistant Professor)

DESIGNATION

DEPARTMENT OF CSE&IT

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING AND


INFORMATION TECHNOLOGY

St. Peter’s Engineering College (UGC Autonomous)


Approved by AICTE, New Delhi, Accredited by NBA and NAAC with ‘A’ Grade,
Affiliated to JNTU, Hyderabad, Telangana
1
2024-2025

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING AND INFORMATION TECHNOLOGY

CERTIFICATE

This is to certify that the Mini Project entitled “Interactive Quiz Application
for Enhanced Learning and Assessment” has been carried out by Krishna
chaitanya reddy (21BK1A1250), J Ajay Kumar(21BK5A1247), Gaddam
Charan (21BK1A1238) in partial fulfillment of the requirements for the
award of the degree of Bachelor of Technology in Information Technology.
This work is a record of bonafide effort performed by them under my
supervision during the academic year 2024–2025.

INTERNAL GUIDE HEAD OF THE


DEPARTMENT

Mr.Senthil Murgan Dr.Amjan shaik

Department of CSE&IT Department of CSE&IT


St. Peter’s Engineering College, St. Peters Engineering College,
Hyderabad Hyderabad

PROJECT COORDINATOR EXTERNAL EXAMINER


Department of CSE&IT

2
St. Peters Engineering College,
Hyderabad

ABSTRACT

The Online Quiz Application is designed as a comprehensive and interactive


platform that aims to enhance the educational experience by providing engaging
and flexible learning opportunities. With the increasing shift towards online
education and interactive content, this application addresses the need for a
streamlined, user-friendly quiz-taking experience across various subjects. It offers
a range of features designed to engage users, provide real-time feedback, and
track their performance, ensuring that learning is both effective and enjoyable.
The application supports multiple-choice quizzes, allowing users to test their
knowledge on various topics. Key features include User Authentication, where
users create accounts to access personalized quiz content; Quiz Management for
administrators to create, update, and manage quizzes; and Quiz Taking, where
users receive instant feedback as they answer questions, enhancing the learning
experience. A Scoring and Progress Tracking system calculates scores at the end
of each quiz, tracking user progress over time and enabling review of past
attempts. Additionally, an optional Leaderboard feature encourages healthy
competition by displaying top performers, motivating users to engage more
actively.
Developed using React Js, the application offers a smooth, intuitive interface,
ensuring easy navigation and interaction with quiz content. By integrating
gamification elements such as points, badges, and leaderboards, the platform
motivates continuous learning, while customizable quizzes provide flexibility in
quiz themes, formats, and difficulty levels. Real-time feedback and performance
analytics provide users with detailed insights, highlighting their strengths and
areas for improvement.
This project overcomes the limitations of existing quiz platforms, which often
lack interactive features, detailed feedback, and accessibility for self-paced
learning. The proposed solution creates an engaging environment where users can
learn, track their progress, and receive valuable insights, making it a versatile tool
for educational institutions, trainers, and individuals seeking a structured and
effective way to test and improve their knowledge.

3
TABLE OF
CONTENT

S.NO TITLE PAGE .NO


1 INTRODUCTION 4
2 EXISTING SYSTEM 5
3 PROPOSED SYSTEM 6
4 PROBLEM STATMENT 8
REQUIREMENT
5 9
ENGINEERING
6 LITERATURE SURVEY 10-11
7 TECHNOLOGY 11-12
8 UML DIAGRAMS 13-16
USE CASE DIAGRAM 13
CLASS DIAGRAM 14
ACTIVITY DIAGRAM 15
SEQUENCE DIAGRAM 16
9 DEPLOYEMENT
17
DIAGRAM
10 DATA FLOW DIAGRAM 18
11 SOFTWARE TESTING 20-22
12 SYSTEM
23-25
IMPLEMENTATION
13 CODE 26-82
14 OUTPUT 83-86
BENEFITS AND
15 87-88
LIMITATIONS
4
16 FUTURE ENHANCEM 89-90
17 CONCLUSION 91

Introduction

In today’s digital age, the demand for interactive and flexible learning tools is
higher than ever. Traditional education methods are increasingly supplemented or
replaced by online learning platforms that allow users to study at their own pace
and convenience. Among these platforms, quiz applications play a significant role
in assessing knowledge, reinforcing learning, and enhancing student engagement.
However, many existing quiz applications fall short in terms of user engagement,
interactivity, and accessibility, often providing only basic, static quizzes with
limited feedback options.

The Online Quiz Application is designed to bridge these gaps by offering a


comprehensive and user-friendly platform that caters to diverse learning needs. It
enables users to participate in multiple-choice quizzes on various subjects, receive
instant feedback, and track their progress over time. The application’s features are
built with the aim of enhancing the learning experience through gamification,
such as leaderboards, badges, and points systems, to keep users motivated and
engaged.

In addition, the platform offers a flexible and accessible environment that


supports both classroom-based and self-paced learning modes, ensuring
compatibility with various devices, including smartphones, tablets, and desktops.
By leveraging modern technologies like React Js for the user interface, the
application provides a smooth and intuitive user experience, making it easier for
users to access and interact with content seamlessly.

Ultimately, the Online Quiz Application seeks to transform the way quizzes are
used as educational tools, promoting an engaging, interactive, and efficient
learning experience for users of all ages and educational backgrounds.

5
Existing System

The existing online quiz platforms and systems are commonly used for
educational purposes, but they often have several limitations:
1. Limited Interactivity:
o Many current systems lack engaging features like gamification,
leaderboards, badges, or levels, which are essential for maintaining
user interest and motivation.
2. Basic Feedback Mechanism:
o Existing platforms typically provide only basic feedback, such as
marking answers as correct or incorrect, without offering detailed
explanations or personalized insights to help users understand their
mistakes.
3. Accessibility Issues:
o These platforms are often designed primarily for classroom settings,
with limited support for self-paced learning. Furthermore, some
systems are not optimized for use across multiple devices like
smartphones, tablets, and desktops, which restricts accessibility and
flexibility.
4. Limited Quiz Customization:
o The ability to create and customize quizzes is often restricted, with
predefined templates and limited options for integrating multimedia
elements like images, videos, and audio.
5. Lack of Progress Tracking:
o Progress tracking in many existing systems is basic, typically
showing only overall quiz scores without providing users with
detailed insights into their performance over time.
6. Minimal Gamification Elements:
o Few existing platforms utilize gamification strategies beyond basic
score tracking, which limits their ability to engage and motivate
users through interactive challenges and rewards.

6
Proposed System

The proposed Online Quiz Application aims to overcome the limitations of


existing systems by providing a more comprehensive, flexible, and engaging
platform:
1. Enhanced Interactivity:
o The application integrates gamification elements such as points,
badges, leaderboards, and time-bound challenges, making the
learning experience engaging and motivating for users.
2. Detailed Feedback and Performance Insights:
o Users receive instant feedback with explanations for correct and
incorrect answers. The system also provides personalized insights
and recommendations, helping users understand their performance
and identify areas for improvement.
3. Accessibility and Flexibility:
o The platform supports both classroom-based and self-paced learning
modes, ensuring that users can access the platform on various
devices, including smartphones, tablets, and desktops. This
flexibility allows users to learn anytime, anywhere.
4. Comprehensive Quiz Customization:
o The proposed system allows administrators to create and manage
quizzes with diverse question types and multimedia elements
(images, videos, audio). This flexibility enables the design of
engaging and interactive assessments tailored to specific learning
objectives.
5. Advanced Progress Tracking:
o The application includes a robust progress tracking system that
monitors user performance over time, allowing them to review their
past attempts, track their progress, and visualize improvement.

7
PROBLEM STATEMENT

Traditional quiz platforms often fail to provide an engaging and effective learning
experience. These platforms typically lack interactive and gamified features
necessary to sustain user interest and motivation. Additionally, users receive only
basic performance feedback, without detailed insights or explanations, which
limits their ability to identify areas for improvement and enhance their learning
outcomes. Furthermore, many of these platforms are primarily designed for
classroom settings and do not support self-paced learning or accessibility on
multiple devices, such as mobile phones and tablets. This results in a need for a
comprehensive, flexible, and interactive online quiz application that delivers an
engaging user experience, detailed performance feedback, and supports diverse
learning environments and device compatibility

8
REQUIREMENT
ENGINEERING

2.1 Hardware Requirements

• Processor – i5 and above (64-bit OS).

• Memory – 4GB RAM (Higher specs are recommended for high performance)

• Input devices – Keyboard, Mouse

2.2 Software
Requirements

• Windows/Mac
• Python3
• Vscode
• Nodejs
• Django Framework

9
LITERATURE SURVEY

The development of online quiz applications has gained significant attention


over recent
years due to the growing demand for digital learning tools that can enhance
user
engagement and learning efficiency. This literature survey explores various
existing
systems, their strengths, limitations, and the advancements in the field of
online quizzes.

Traditional Quiz Applications:

 Traditional quiz platforms like Kahoot, Quizizz, and Google Forms have
set the standard for digital assessments in both classroom and remote
learning environments. However, they often lack features beyond basic
question-and-answer formats. They provide limited feedback mechanisms,
usually displaying whether answers are correct or incorrect without detailed
explanations or personalized recommendations.

 The lack of gamification beyond simple scoring and ranking systems


results in a short-lived engagement for users. While platforms like Kahoot
offer leaderboards, they do not incorporate other motivational elements
such as badges, levels, or rewards that could enhance long-term user
interest and retention .

Feedback and Performance Analytics:

 Studies indicate that immediate and detailed feedback is essential for


effective learning. Systems like Moodle and Blackboard offer quiz
modules that include some form of feedback, but these are often limited to
static text or simple explanations . Research by Hattie and Timperley
(2007) suggests that personalized feedback that addresses specific user
mistakes and provides guidance for improvement is far more effective in
enhancing learning outcomes

 The proposed application, therefore, incorporates an advanced feedback


system that not only provides immediate responses but also includes
detailed explanations for correct and incorrect answers. Furthermore, it
offers personalized insights and recommendations based on user
performance, which aligns with educational best practices.

10
Accessibility and Mobile Compatibility:

 With the increasing reliance on mobile devices for learning, the need for
mobile-compatible quiz platforms is paramount. According to studies,
mobile learning apps increase accessibility but often come with a trade-off
in functionality . Some platforms are either too simplified for mobile use or
fail to provide a user-friendly interface that accommodates different screen
sizes and user needs.

 The proposed system ensures compatibility across multiple devices,


including desktops, tablets, and smartphones. By leveraging technologies
like React Js, the application provides a responsive and intuitive user
interface that supports both mobile and desktop users, enhancing the
flexibility and accessibility of the platform.

TECHNOLOGY:

ABOUT PYTHON
Python is strong and quick, plays well with others, is easy to use and simple to
learn, and is open source. It is an inside and out important programming
language utilized in Dialog stream. It is utilized as a base for the most
unmistakable Abased programming considering its flexibility, straight
forwardness, and longstanding standing. Python is a translator, significant level,
broadly useful programming language. Python is a structured, organized,
unmodified editing language with flexible semantics. Its undeniable level of
clear information frameworks, combined with flexible design and flexible
constraints, make it very attractive in Quick Application Development, as well
as being used as a pre-programmed or sticky language to connect existing
components together. The straightforward, easy-to-read Python script
emphasizes clarity and later reduces system support costs. Python supports
modules and masses, which enable system partitioning and code reuse. Often,
application engineers fall on Python's heels because of the extended efficiency
it offers. With no compaction step, the alter test-troubleshoot cycle is incredibly
fast. Resolving Python programs is easy: a distraction or bad information will
not cause a separation failure. All consideration, when the arbitrator finds an
error, raises the exemption. Whenever a program does not receive a release, the
translator prints a follow-up stack. The source level debugger allows for near-
world objects checking, inconsistent pronunciation tests, setting intersections,
simultaneous entry of code, and so on. The debugger is written in Python itself,
11
confirming Python's thinking power. Then again, usually the quickest way to
investigate a program is to add a few print announcements to the source: a
quick-change problem-solving cycle makes this process surprisingly easy.

APPLICATIONS OF PYTHON
One critical benefit of learning Python is that a universally useful language can
be applied in a huge assortment of undertakings. The following are only
probably the most well-known fields where Python has tracked down its
utilization:
⦁ Data science
⦁ Scientific and mathematical computing
⦁ Web development
⦁ Computer graphics
⦁ Basic game development
⦁ Mapping and geography
(GISsoftware)

DJANGO FRAMEWORK:

Django is a high-level, open-source web framework for building dynamic web


applications using Python, designed to streamline the development process and
promote clean, maintainable code. Following the Model-View-Controller
(MVC) architectural pattern—referred to as Model-View-Template (MVT) in
Django—it provides a clear separation of concerns, facilitating rapid
development with minimal boilerplate code. One of its standout features is the
automatically generated admin interface that simplifies data management.
Additionally, Django emphasizes security with built-in protections against
common vulnerabilities like SQL injection and cross-site scripting. Its Object-
Relational Mapping (ORM) layer allows developers to interact with databases
using Python objects rather than raw SQL, enhancing usability. With extensive
URL routing capabilities, support for multiple databases, and comprehensive
documentation, Django is versatile and suitable for various applications,
including content management systems, e-commerce platforms, and social
media sites. Overall, Django’s robust features and active community make it a

12
powerful tool for developers aiming to create high-quality web applications
efficiently
UML DIAGRAMS

13
CLASS DIAGRAM

14
15
16
17
CONTEXT DIAGRAM

18
19
Software Testing

Software testing is a critical phase in the development of the Online Quiz


Application, ensuring that the application functions as expected, meets user
requirements, and maintains high standards of quality and reliability. Testing is
conducted to identify and fix bugs, verify that all features work correctly, and
ensure the overall performance, security, and usability of the application. Both
automated and manual testing approaches are applied, covering different aspects
such as user interface testing, performance testing, and security testing.

5.2 Explanation for SDLC & STLC

 Software Development Life Cycle (SDLC):


o SDLC is a systematic process used for software development,
guiding the project from initial planning through to deployment and
maintenance. It consists of several phases, including planning,
analysis, design, implementation, testing, deployment, and
maintenance. For the Online Quiz Application, SDLC ensures that
the development follows a structured approach, delivering a reliable
and scalable solution.
 Software Testing Life Cycle (STLC):
o STLC is a subset of SDLC focused specifically on testing activities.
It involves a series of steps including requirement analysis, test
planning, test case design, test environment setup, test execution, and
test closure. For the quiz application, STLC ensures that testing is
thorough and organized, covering all functionalities and identifying
any defects or vulnerabilities.
o

5.3 Phases of Software Development


The development of the Online Quiz Application follows the SDLC phases:
1. Requirement Analysis: Gathering and analyzing requirements to
understand the necessary features, such as user authentication, quiz
management, and performance tracking.
2. Design: Creating the architecture of the application, including database
schema, user interface layout, and API structure.

20
3. Implementation (Coding): Developing the application using Django
(Python) and React (JavaScript) to implement the back-end and front-end
components.
4. Testing: Executing various tests (e.g., unit testing, integration testing) to
verify functionality, performance, and security.
5. Deployment: Launching the application to the production environment for
user access.
6. Maintenance: Ongoing monitoring and updates based on user feedback
and system performance.

5.4 SDLC Models


For the Online Quiz Application, the most suitable SDLC models are:
1. Waterfall Model: A linear approach suitable for smaller projects with
clearly defined requirements and minimal changes expected during
development.
2. Agile Model: An iterative approach, ideal for the quiz application, where
requirements may evolve, allowing for flexibility and rapid adjustments
based on user feedback and testing results.

5.5 STLC Models


The STLC for the quiz application follows a structured sequence:
1. Requirement Analysis: Understanding what needs to be tested based on
the application requirements.
2. Test Planning: Preparing a testing strategy that outlines the testing
objectives, resources needed, and timelines.
3. Test Case Development: Creating detailed test cases covering different
scenarios, including user login, quiz management, and performance
tracking.
4. Test Environment Setup: Configuring the environment to simulate real-
world usage and ensure that testing conditions are realistic.
5. Test Execution: Running the test cases to identify bugs and ensure the
application behaves as expected.
6. Test Closure: Documenting test results, resolving issues, and finalizing
testing activities.

21
5.6 Types of Testing
The quiz application undergoes several types of testing:
1. Unit Testing: Testing individual components such as login functionality or
quiz submission logic.
2. Integration Testing: Ensuring that different components (e.g., database,
API, front-end) work together seamlessly.
3. System Testing: Testing the entire application to verify that it meets the
specified requirements.
4. Performance Testing: Evaluating the application's responsiveness and
load-handling capabilities.
5. Security Testing: Identifying potential security vulnerabilities, such as
protecting user data and preventing unauthorized access.
6. User Acceptance Testing (UAT): Ensuring the application meets the
users' needs and functions correctly in real-world conditions.

5.7 Levels of Testing in the Project


The testing for the Online Quiz Application is organized into different levels:
1. Unit Testing: Conducted during the implementation phase to validate
individual modules like quiz management, scoring, and progress tracking.
2. Integration Testing: Ensures that modules work together correctly, such
as the interaction between the database and the front-end interface.
3. System Testing: A comprehensive test of the entire system to check that
all features are integrated and functioning properly.
4. Acceptance Testing: Performed with actual users or stakeholders to
confirm the application’s usability and performance in a real-world setting.

22
System Implementation

The system implementation phase of the Online Quiz Application involves


transforming the design into a fully functional system by developing and
integrating the various components and features. This phase ensures that all
aspects of the application work together seamlessly, providing a smooth user
experience. The implementation process includes setting up the front-end and
back-end, integrating the database, testing the system, and deploying the
application. Below is a detailed breakdown of the system implementation steps:

1. Setting Up the Development Environment:


o The first step involves configuring the development environment,
which includes setting up tools and frameworks such as Django for
the back-end and React for the front-end. Required dependencies and
libraries (e.g., Bootstrap for CSS styling, Axios for API calls) are
installed to ensure smooth development.

2. Front-End Implementation:
o The front-end of the application is developed using HTML, CSS, and
JavaScript, with React providing a dynamic and interactive user
interface. Components such as login forms, quiz pages, scoreboards,
and dashboards are created to facilitate user interaction.
o CSS and frameworks like Bootstrap are used to style the interface,
ensuring a responsive design that works across various devices and
screen sizes. JavaScript and React components handle the dynamic
parts of the application, such as updating quiz questions, showing
feedback, and displaying real-time scores.

3. Back-End Implementation:
o The back-end is developed using Django, a Python-based web
framework. Django manages server-side logic, handles user
authentication, processes quiz data, and manages database
interactions.
o Models are created to represent data structures like users, quizzes,
questions, and scores. Django’s built-in functionality for user
23
authentication and session management is used to implement secure
login and registration features.

4. Database Integration:
o A relational database, such as SQLite or PostgreSQL, is integrated to
store user information, quiz data, and scores. Django’s Object-
Relational Mapping (ORM) system is used to create, read, update,
and delete data efficiently.
o Database tables are designed to support different data entities such as
users, quizzes, quiz attempts, questions, and user performance
statistics. Migrations are performed to ensure database schema
consistency throughout development.

5. API Development:
o RESTful APIs are developed using Django REST Framework to
enable communication between the front-end and back-end. These
APIs handle user requests like fetching quiz data, submitting
answers, retrieving scores, and updating user profiles.
o The APIs ensure secure and efficient data exchange, and they are
tested for performance and reliability to handle multiple user
requests simultaneously.

6. Testing:
o Unit and integration tests are written to validate the functionality of
individual components and ensure that the application works as
expected. Front-end testing focuses on verifying user interactions,
while back-end testing validates API responses and database
operations.
o User acceptance testing (UAT) is conducted to verify the
application’s functionality and usability, ensuring that it meets user
requirements and provides a satisfactory experience.

7. Deployment:
o Once development and testing are completed, the application is
deployed to a server or cloud platform (e.g., Heroku, AWS, or

24
DigitalOcean). Deployment configurations are set up to manage web
server settings, database connections, and static file handling.
o Continuous Integration/Continuous Deployment (CI/CD) tools may
be used to automate deployment processes, ensuring that updates and
bug fixes are quickly and efficiently pushed to the live environment.\

8. Maintenance and Updates:


o Post-deployment, the system undergoes monitoring and maintenance
to ensure stability and performance. Bugs and issues reported by
users are tracked, and updates are rolled out to enhance features or
fix problems.
o Feedback from users and analytics is used to plan future
improvements, such as adding new quiz features, implementing the
leaderboard system, or enhancing the feedback mechanism.

By following these steps, the system is implemented effectively, ensuring a high-


quality, reliable, and scalable Online Quiz Application that meets the needs of
users and administrators alike.

25
Code:

from django import forms


from django.contrib.auth.models import User
from . import models
from quiz import models as QMODEL

class StudentUserForm(forms.ModelForm):
class Meta:
model=User
fields=['first_name','last_name','username','password']
widgets = {
'password': forms.PasswordInput()
}

class StudentForm(forms.ModelForm):
class Meta:
model=models.Student
fields=['address','mobile','profile_pic']

from django.db import models


from django.contrib.auth.models import User

class Student(models.Model):
user=models.OneToOneField(User,on_delete=models.CASCADE)
profile_pic=
models.ImageField(upload_to='profile_pic/Student/',null=True,blank=True)
address = models.CharField(max_length=40)
mobile = models.CharField(max_length=20,null=False)

@property
def get_name(self):
return self.user.first_name+" "+self.user.last_name
@property
def get_instance(self):
return self
def __str__(self):
return self.user.first_name
from django.shortcuts import render,redirect,reverse
from . import forms,models
26
from django.db.models import Sum
from django.contrib.auth.models import Group
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required,user_passes_test
from django.conf import settings
from datetime import date, timedelta
from quiz import models as QMODEL
from teacher import models as TMODEL

#for showing signup/login button for student


def studentclick_view(request):
if request.user.is_authenticated:
return HttpResponseRedirect('afterlogin')
return render(request,'student/studentclick.html')

def student_signup_view(request):
userForm=forms.StudentUserForm()
studentForm=forms.StudentForm()
mydict={'userForm':userForm,'studentForm':studentForm}
if request.method=='POST':
userForm=forms.StudentUserForm(request.POST)
studentForm=forms.StudentForm(request.POST,request.FILES)
if userForm.is_valid() and studentForm.is_valid():
user=userForm.save()
user.set_password(user.password)
user.save()
student=studentForm.save(commit=False)
student.user=user
student.save()
my_student_group = Group.objects.get_or_create(name='STUDENT')
my_student_group[0].user_set.add(user)
return HttpResponseRedirect('studentlogin')
return render(request,'student/studentsignup.html',context=mydict)

def is_student(user):
return user.groups.filter(name='STUDENT').exists()

@login_required(login_url='studentlogin')
@user_passes_test(is_student)
def student_dashboard_view(request):
dict={

'total_course':QMODEL.Course.objects.all().count(),
27
'total_question':QMODEL.Question.objects.all().count(),
}
return render(request,'student/student_dashboard.html',context=dict)

@login_required(login_url='studentlogin')
@user_passes_test(is_student)
def student_exam_view(request):
courses=QMODEL.Course.objects.all()
return render(request,'student/student_exam.html',{'courses':courses})

@login_required(login_url='studentlogin')
@user_passes_test(is_student)
def take_exam_view(request,pk):
course=QMODEL.Course.objects.get(id=pk)
total_questions=QMODEL.Question.objects.all().filter(course=course).count()
questions=QMODEL.Question.objects.all().filter(course=course)
total_marks=0
for q in questions:
total_marks=total_marks + q.marks

return render(request,'student/take_exam.html',
{'course':course,'total_questions':total_questions,'total_marks':total_marks})

@login_required(login_url='studentlogin')
@user_passes_test(is_student)
def start_exam_view(request,pk):
course=QMODEL.Course.objects.get(id=pk)
questions=QMODEL.Question.objects.all().filter(course=course)
if request.method=='POST':
pass
response= render(request,'student/start_exam.html',
{'course':course,'questions':questions})
response.set_cookie('course_id',course.id)
return response

@login_required(login_url='studentlogin')
@user_passes_test(is_student)
def calculate_marks_view(request):
if request.COOKIES.get('course_id') is not None:
course_id = request.COOKIES.get('course_id')
course=QMODEL.Course.objects.get(id=course_id)

total_marks=0
28
questions=QMODEL.Question.objects.all().filter(course=course)
for i in range(len(questions)):

selected_ans = request.COOKIES.get(str(i+1))
actual_answer = questions[i].answer
if selected_ans == actual_answer:
total_marks = total_marks + questions[i].marks
student = models.Student.objects.get(user_id=request.user.id)
result = QMODEL.Result()
result.marks=total_marks
result.exam=course
result.student=student
result.save()

return HttpResponseRedirect('view-result')

@login_required(login_url='studentlogin')
@user_passes_test(is_student)
def view_result_view(request):
courses=QMODEL.Course.objects.all()
return render(request,'student/view_result.html',{'courses':courses})

@login_required(login_url='studentlogin')
@user_passes_test(is_student)
def check_marks_view(request,pk):
course=QMODEL.Course.objects.get(id=pk)
student = models.Student.objects.get(user_id=request.user.id)
results=
QMODEL.Result.objects.all().filter(exam=course).filter(student=student)
return render(request,'student/check_marks.html',{'results':results})

@login_required(login_url='studentlogin')
@user_passes_test(is_student)
def student_marks_view(request):
courses=QMODEL.Course.objects.all()
return render(request,'student/student_marks.html',{'courses':courses})

from django.db import models


from django.contrib.auth.models import User
29
class Teacher(models.Model):
user=models.OneToOneField(User,on_delete=models.CASCADE)
profile_pic=
models.ImageField(upload_to='profile_pic/Teacher/',null=True,blank=True)
address = models.CharField(max_length=40)
mobile = models.CharField(max_length=20,null=False)
status= models.BooleanField(default=False)
salary=models.PositiveIntegerField(null=True)
@property
def get_name(self):
return self.user.first_name+" "+self.user.last_name
@property
def get_instance(self):
return self
def __str__(self):
return self.user.first_name

from django.urls import path


from teacher import views
from django.contrib.auth.views import LoginView

urlpatterns = [
path('teacherclick', views.teacherclick_view),
path('teacherlogin',
LoginView.as_view(template_name='teacher/teacherlogin.html'),name='teacherlo
gin'),
path('teachersignup', views.teacher_signup_view,name='teachersignup'),
path('teacher-dashboard', views.teacher_dashboard_view,name='teacher-
dashboard'),
path('teacher-exam', views.teacher_exam_view,name='teacher-exam'),
path('teacher-add-exam', views.teacher_add_exam_view,name='teacher-add-
exam'),
path('teacher-view-exam', views.teacher_view_exam_view,name='teacher-view-
exam'),

30
path('delete-exam/<int:pk>', views.delete_exam_view,name='delete-exam'),

path('teacher-question', views.teacher_question_view,name='teacher-question'),
path('teacher-add-question', views.teacher_add_question_view,name='teacher-
add-question'),
path('teacher-view-question', views.teacher_view_question_view,name='teacher-
view-question'),
path('see-question/<int:pk>', views.see_question_view,name='see-question'),
path('remove-question/<int:pk>', views.remove_question_view,name='remove-
question'),
]

from django.shortcuts import render,redirect,reverse


from . import forms,models
from django.db.models import Sum
from django.contrib.auth.models import Group
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required,user_passes_test
from django.conf import settings
from datetime import date, timedelta
from quiz import models as QMODEL
from student import models as SMODEL
from quiz import forms as QFORM

#for showing signup/login button for teacher


def teacherclick_view(request):
if request.user.is_authenticated:
return HttpResponseRedirect('afterlogin')
return render(request,'teacher/teacherclick.html')

def teacher_signup_view(request):
31
userForm=forms.TeacherUserForm()
teacherForm=forms.TeacherForm()
mydict={'userForm':userForm,'teacherForm':teacherForm}
if request.method=='POST':
userForm=forms.TeacherUserForm(request.POST)
teacherForm=forms.TeacherForm(request.POST,request.FILES)
if userForm.is_valid() and teacherForm.is_valid():
user=userForm.save()
user.set_password(user.password)
user.save( teacher=teacherForm.save(commit=False)
teacher.user=user
teacher.save()
my_teacher_group = Group.objects.get_or_create(name='TEACHER')
my_teacher_group[0].user_set.add(user)
return HttpResponseRedirect('teacherlogin')
return render(request,'teacher/teachersignup.html',context=mydict)

def is_teacher(user):
return user.groups.filter(name='TEACHER').exists()

@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_dashboard_view(request):
dict={

'total_course':QMODEL.Course.objects.all().count(),
'total_question':QMODEL.Question.objects.all().count(),
'total_student':SMODEL.Student.objects.all().count()
}
32
return render(request,'teacher/teacher_dashboard.html',context=dict)

@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_exam_view(request):
return render(request,'teacher/teacher_exam.html')

@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_add_exam_view(request):
courseForm=QFORM.CourseForm()
if request.method=='POST':
courseForm=QFORM.CourseForm(request.POST)
if courseForm.is_valid():
courseForm.save()
else:
print("form is invalid")
return HttpResponseRedirect('/teacher/teacher-view-exam')
return render(request,'teacher/teacher_add_exam.html',
{'courseForm':courseForm})

@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_view_exam_view(request):
courses = QMODEL.Course.objects.all()
return render(request,'teacher/teacher_view_exam.html',{'courses':courses})

@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def delete_exam_view(request,pk):
33
course=QMODEL.Course.objects.get(id=pk)
course.delete()
return HttpResponseRedirect('/teacher/teacher-view-exam')

@login_required(login_url='adminlogin')
def teacher_question_view(request):
return render(request,'teacher/teacher_question.html')

@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_add_question_view(request):
questionForm=QFORM.QuestionForm()
if request.method=='POST':
questionForm=QFORM.QuestionForm(request.POST)
if questionForm.is_valid():
question=questionForm.save(commit=False)
course=QMODEL.Course.objects.get(id=request.POST.get('courseID'))
question.course=course
question.save()
else:
print("form is invalid")
return HttpResponseRedirect('/teacher/teacher-view-question')
return render(request,'teacher/teacher_add_question.html',
{'questionForm':questionForm})

@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def teacher_view_question_view(request):
courses= QMODEL.Course.objects.all()
return render(request,'teacher/teacher_view_question.html',{'courses':courses})
34
@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def see_question_view(request,pk):
questions=QMODEL.Question.objects.all().filter(course_id=pk)
return render(request,'teacher/see_question.html',{'questions':questions})

@login_required(login_url='teacherlogin')
@user_passes_test(is_teacher)
def remove_question_view(request,pk):
question=QMODEL.Question.objects.get(id=pk)
question.delete()
return HttpResponseRedirect('/teacher/teacher-view-question')

35
{% extends 'quiz/adminbase.html' %}
{% load widget_tweaks %}
{% block content %}

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-
to-fit=no">

<meta name="viewport" content="width=device-width, initial-scale=1">


<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link
href="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
rel="stylesheet">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-
awesome.min.css" rel="stylesheet">
<style type="text/css">
a:link {
text-decoration: none;
}

.order-card {
color: rgb(255, 255, 255);
}

.bg-c-blue {

36
background: #04868f;
}

.bg-c-green {
background:#4C51BF;
}

.bg-c-yellow {
background: #F56565;
}

.bg-c-pink {
background: #663a30;
}

.card {

-webkit-box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);


box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);
border: 1px solid black;
margin-bottom: 30px;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}

.card .card-block {
padding: 25px;
}

37
.order-card i {
font-size: 26px;
}

.f-left {
float: left;
}

.f-right {
float: right;
}
header {
left: 0px;
right: 0px;
}
</style>
</head>
<br><br>

<div class="container">
<div class="row">
<div class="col-md-4 col-xl-3">
<div class="card bg-c-blue order-card">
<div class="card-block">
<h6 class="m-b-20"> <a href="admin-view-student" style="text-
decoration: none;color:white;">Total Students</a> </h6>
<h2 class="text-right"><i class="fas fa-user-graduate
f-left"></i><span>{{total_student}}</span></h2>

38
</div>
</div>
</div>

<div class="col-md-4 col-xl-3">


<div class="card bg-c-green order-card">
<div class="card-block">
<h6 class="m-b-20"><a href="admin-view-teacher" style="text-
decoration: none;color:white;">Total Teacher</a> </h6>
<h2 class="text-right"><i class="fas fa-chalkboard-teacher
f-left"></i><span>{{total_teacher}}</span></h2>

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

<div class="col-md-4 col-xl-3">


<div class="card bg-c-yellow order-card">
<div class="card-block">
<h6 class="m-b-20"><a href="admin-view-course" style="text-
decoration: none;color:white;">Total Courses</a></h6>
<h2 class="text-right"><i class="fas fa-book
f-left"></i><span>{{total_course}}</span></h2>

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

<div class="col-md-4 col-xl-3">


<div class="card bg-c-pink order-card">
<div class="card-block">
39
<h6 class="m-b-20"><a href="admin-view-question" style="text-
decoration: none;color:white;">Total Questions</a></h6>
<h2 class="text-right"><i class="fas fa-question-circle
f-left"></i><span>{{total_question}}</span></h2>

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

</div>
</div>

<br><br><br><br><br><br><br><br><br><br>

<script
src="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></
script>

{% endblock content %}
{% extends 'quiz/adminbase.html' %}
{% load widget_tweaks %}
{% block content %}

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-
to-fit=no">

<meta name="viewport" content="width=device-width, initial-scale=1">

40
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link
href="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
rel="stylesheet">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-
awesome.min.css" rel="stylesheet">
<style type="text/css">
a:link {
text-decoration: none;
}

.order-card {
color: rgb(255, 255, 255);
}

.bg-c-blue {
background: #04868f;
}

.bg-c-green {
background:#4C51BF;
}

.bg-c-yellow {
background: #F56565;
}

.bg-c-pink {
41
background: #663a30;
}

.card {

-webkit-box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);


box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);
border: 1px solid black;
margin-bottom: 30px;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}

.card .card-block {
padding: 25px;
}

.order-card i {
font-size: 26px;
}

.f-left {
float: left;
}

.f-right {
float: right;
}

42
header {
left: 0px;
right: 0px;
}
</style>
</head>
<br><br>

<div class="container">
<div class="row">
<div class="col-md-4 col-xl-6">
<div class="card bg-c-blue order-card">
<div class="card-block">
<h6 class="m-b-20"> <a href="admin-add-question" style="text-
decoration: none;color:white;">Add Question</a> </h6>
<h2 class="text-right"><i class="fas fa-plus f-left"></i></h2>

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

<div class="col-md-4 col-xl-6">


<div class="card bg-c-green order-card">
<div class="card-block">
<h6 class="m-b-20"><a href="admin-view-question" style="text-
decoration: none;color:white;">View Questions</a> </h6>
<h2 class="text-right"><i class="fas fa-eye f-left"></i></h2>

</div>
</div>
43
</div>

</div>
</div>

<br><br><br><br><br><br><br><br><br><br>

<script
src="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></
script>

{% endblock content %}

{% extends 'quiz/adminbase.html' %}
{% load widget_tweaks %}
{% block content %}

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-
to-fit=no">

<meta name="viewport" content="width=device-width, initial-scale=1">


<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link
href="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
rel="stylesheet">

44
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-
awesome.min.css" rel="stylesheet">
<style type="text/css">
a:link {
text-decoration: none;
}

.order-card {
color: rgb(255, 255, 255);
}

.bg-c-blue {
background: #04868f;
}

.bg-c-green {
background:#4C51BF;
}

.bg-c-yellow {
background: #F56565;
}

.bg-c-pink {
background: #663a30;
}

45
.card {

-webkit-box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);


box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);
border: 1px solid black;
margin-bottom: 30px;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}

.card .card-block {
padding: 25px;
}

.order-card i {
font-size: 26px;
}

.f-left {
float: left;
}

.f-right {
float: right;
}
header {
left: 0px;
right: 0px;
}

46
</style>
</head>
<br><br>

<div class="container">
<div class="row">
<div class="col-md-4 col-xl-6">
<div class="card bg-c-blue order-card">
<div class="card-block">
<h6 class="m-b-20"> <a href="admin-view-student" style="text-
decoration: none;color:white;">Total Student</a> </h6>
<h2 class="text-right"><i class="fas fa-user-graduate
f-left"></i><span>{{total_student}}</span></h2>

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

<div class="col-md-4 col-xl-6">


<div class="card bg-c-green order-card">
<div class="card-block">
<h6 class="m-b-20"><a href="admin-view-student-marks" style="text-
decoration: none;color:white;">Student Marks</a> </h6>
<h2 class="text-right"><i class="fas fa-sort-numeric-up
f-left"></i><span>:)</span></h2>

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

47
</div>
</div>

<br><br><br><br><br><br><br><br><br><br>

<script
src="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></
script>

{% endblock content %}

{% extends 'quiz/adminbase.html' %}
{% block content %}
{%load static%}

<head>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></
script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>

<style media="screen">
a:link {
text-decoration: none;
}

h6 {
text-align: center;
48
}

.row {
margin: 100px;
}
</style>
</head>
<br><br>
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h6 class="panel-title">Select Course To View Questions</h6>
</div>
<table class="table table-hover" id="dev-table">
<thead>
<tr>

<th>Course Name</th>
<th>Total Question</th>
<th>Total Marks</th>
<th>View Question</th>
</tr>
</thead>
{% for c in courses %}
<tr>

<td> {{c.course_name}}</td>
<td>{{c.question_number}}</td>
<td>{{c.total_marks}}</td>

49
<td><a class="btn btn-primary btn-xs" href="{% url 'view-question' c.id
%}"><span class="glyphicon glyphicon-eye-open"></span></a></td>

</tr>
{% endfor %}
</table>
</div>
</div>

<br><br><br><br><br><br>
{% endblock content %}
<!DOCTYPE html>
{% load static %}
<html lang="en" dir="ltr">

<style>
.jumbotron{
margin-bottom: 0px;
}
</style>
<body>
{% include "quiz/navbar.html" %}
<br>
<section id="section-jumbotron" class="jumbotron jumbotron-fluid d-flex justify-
content-center align-items-center">
<div class="container text-center">
<h1 class="display-1 text-info">Let's Quiz</h1>
<p class="display-4 d-none d-sm-block">Test your skills and become a
master.</p>
<p class="lead">We organize quizzes on various topics.</p>

50
<p class="lead">Sign up if you haven't already and get access to millions of
quizzes on the topic of your interest.</p>
<p><strong> Start Your Journey Here:</strong></p>
<a href="/student/studentsignup" class="btn btn-lg btn-info" style="padding-
right: 35px;"><i class="fa fa-user-plus" aria-hidden="true"></i> Sign Up</a>

<br><br><br>
</div>
</section>
{% include "quiz/footer.html" %}

</body>

</html>

{%load static%}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
{% include "quiz/navbar.html" %}
<br><br><br><br><br>
<img src="{% static "image/logout_img.png" %}" style="width:800px;
height:100px; padding-left:400px;">

51
<br><br><br><br><br>
<br><br><br><br><br>
<br><br>
{% include "quiz/footer.html" %}

</body>
</html>

{% extends 'quiz/adminbase.html' %}
{% load widget_tweaks %}
{% block content %}
<head>
<style media="screen">
input[type=text], select,input[type=number] ,input[type=password], textarea{
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}

input[type=submit] {
width: 100%;
background-color: #4CAF50;
color: white;
padding: 14px 20px;

52
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}

input[type=submit]:hover {
background-color: #45a049;
}

</style>

</head>

<br><br>
<h3 style="text-align:center;">UPDATE STUDENT</h3>
<div>
<form method="post" autocomplete="off" enctype="multipart/form-data"
style="margin-left:200px;margin-right:200px;">
{% csrf_token %}
<label for="first_name">First Name</label>
{% render_field userForm.first_name class="form-control"
placeholder="First Name" %}
<label for="last_name">Last Name</label>
{% render_field userForm.last_name class="form-control"
placeholder="Last Name" %}
<label for="mobile">Mobile</label>
{% render_field studentForm.mobile class="form-control"
placeholder="Mobile" %}
<label for="address">Address</label>

53
{% render_field studentForm.address class="form-control"
placeholder="Address" %}

<label for="username">Username</label>
{% render_field userForm.username class="form-control"
placeholder="Username" %}
<label for="password">Password</label>
{% render_field userForm.password class="form-control"
placeholder="Password" %} <br><br>
<label for="profile_pic">Profile Picture</label>
{% render_field studentForm.profile_pic class="form-control"
placeholder="Profile Picture" %}
<br><br>
<input type="submit" value="Update">
</form>
</div>

<br><br><br><br><br><br><br><br>
{% endblock content %}

{% extends 'student/studentbase.html' %}
{% block content %}
{%load static%}

<head>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></
script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>

54
</head>

<div class="jumbotron my-4">

<form class="form" autocomplete="off" onsubmit="return saveAns()"


action="/student/calculate-marks" method="POST">
{% csrf_token %}
<h1 style="text-align: center;">{{course.course_name}}</h1>
{% for q in questions%}
<h3 class="text-info">{{ forloop.counter }}. {{q.question}}</h3><h4
style="text-align: right;">[Marks {{q.marks}}]</h4>

<input type="hidden" name="csrfmiddlewaretoken"


value="C24rUotmdHawVQJL3KrqiWxvti8UffOFYUc8TRbZtLt36AVLdP3jbkz
UVe3beRAa">

<div class="form-check mx-4">


<input class="form-check-input" type="radio"
name="{{ forloop.counter }}" id="{{q.option1}}" value="Option1">
<label class="form-check-label" for="option1">
{{q.option1}}
</label>
</div>

<div class="form-check mx-4">


<input class="form-check-input" type="radio"
name="{{ forloop.counter }}" id="{{q.option2}}" value="Option2">
<label class="form-check-label" for="option2">
{{q.option2}}

55
</label>
</div>

<div class="form-check mx-4">


<input class="form-check-input" type="radio"
name="{{ forloop.counter }}" id="{{q.option3}}" value="Option3">
<label class="form-check-label" for="option3">
{{q.option3}}
</label>
</div>

<div class="form-check mx-4">


<input class="form-check-input" type="radio"
name="{{ forloop.counter }}" id="{{q.option4}}" value="Option4">
<label class="form-check-label" for="option4">
{{q.option4}}
</label>
</div>

{% endfor %}
<input class="btn btn-info btn-lg" type="submit" value="Submit">
</form>
</div>

<script>
function saveAns(){

var ele = document.getElementsByTagName('input');


56
for(i = 0; i < ele.length; i++) {
if(ele[i].type="radio") {
if(ele[i].checked){
setCookie(ele[i].name,ele[i].value,3)
}
}
}

function setCookie(cname, cvalue, exdays) {


var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}

</script>

<br><br><br><br><br><br>
{% endblock content %}
{% extends 'student/studentbase.html' %}
{% load widget_tweaks %}
{% block content %}

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-
to-fit=no">

57
<meta name="viewport" content="width=device-width, initial-scale=1">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link
href="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
rel="stylesheet">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-
awesome.min.css" rel="stylesheet">
<style type="text/css">
a:link {
text-decoration: none;
}

.order-card {
color: rgb(255, 255, 255);
}

.bg-c-blue {
background: #04868f;
}

.bg-c-green {
background:#4C51BF;
}

.bg-c-yellow {
background: #F56565;
}

58
.bg-c-pink {
background: #663a30;
}

.card {

-webkit-box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);


box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);
border: 1px solid black;
margin-bottom: 30px;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}

.card .card-block {
padding: 25px;
}

.order-card i {
font-size: 26px;
}

.f-left {
float: left;
}

.f-right {
float: right;

59
}
header {
left: 0px;
right: 0px;
}
</style>
</head>
<br><br>

<div class="container">
<div class="row">

<div class="col-md-4 col-xl-6">


<div class="card bg-c-yellow order-card">
<div class="card-block">
<h6 class="m-b-20">Total Exams Available</h6>
<h2 class="text-right"><i class="fas fa-book
f-left"></i><span>{{total_course}}</span></h2>

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

<div class="col-md-4 col-xl-6">


<div class="card bg-c-pink order-card">
<div class="card-block">
<h6 class="m-b-20">Total Questions</h6>
<h2 class="text-right"><i class="fas fa-question-circle
f-left"></i><span>{{total_question}}</span></h2>
60
</div>
</div>
</div>
</div>
</div>

<br><br><br><br><br><br><br><br><br><br>

<script
src="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></
script>

{% endblock content %}

{% extends 'student/studentbase.html' %}
{% block content %}
{%load static%}

<head>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></
script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>

<style media="screen">
a:link {
text-decoration: none;
}
61
h6 {
text-align: center;
}

.row {
margin: 100px;
}
</style>
</head>
<br><br>
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h6 class="panel-title">Courses</h6>
</div>
<table class="table table-hover" id="dev-table">
<thead>
<tr>

<th>Exam Name</th>

<th>Take Exam</th>
</tr>
</thead>
{% for t in courses %}
<tr>

<td> {{t.course_name}}</td>

62
<td><a class="btn btn-danger btn-xs" href="{% url 'take-exam' t.id
%}"><span class="glyphicon glyphicon-circle-arrow-right"></span></a></td>
</tr>
{% endfor %}
</table>
</div>
</div>

<br><br><br><br><br><br>
{% endblock content %}
{% extends 'student/studentbase.html' %}
{% block content %}
{%load static%}

<head>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></
script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>

<style media="screen">
a:link {
text-decoration: none;
}

h6 {
text-align: center;
}

63
.row {
margin: 100px;
}
</style>
</head>
<br><br>
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h6 class="panel-title">View Marks</h6>
</div>
<table class="table table-hover" id="dev-table">
<thead>
<tr>

<th>Exam Name</th>

<th>View Marks</th>
</tr>
</thead>
{% for t in courses %}
<tr>

<td> {{t.course_name}}</td>

<td><a class="btn btn-danger btn-xs" href="{% url 'check-marks' t.id


%}"><span class="glyphicon glyphicon-eye-open"></span></a></td>
</tr>
{% endfor %}
64
</table>
</div>
</div>

<br><br><br><br><br><br>
{% endblock content %}
<!DOCTYPE html>
{% load static %}
<html lang="en" dir="ltr">

<head>
<meta charset="utf-8">

<style media="screen">
a:link {
text-decoration: none;
}

body {
margin: 0;
padding: 0;
font-family: "Gill Sans", sans-serif;;
}

header {
position: fixed;
background: #22242A;
padding: 20px;

65
width: 100%;
z-index: 1;
}

.left_area h3 {
color: #fff;
margin: 0px;
text-transform: uppercase;
font-size: 22px;
font-weight: 900;
}

.left_area span {
color: #19B3D3;
}

.logout_btn {
padding: 5px;
background: #19B3D3;
text-decoration: none;
float: right;
margin-top: -30px;
margin-right: 40px;
border-radius: 2px;
font-size: 15px;
font-weight: 600;
color: #fff;
transition: 0.5s;

66
}

.logout_btn:hover {
background: #0B87A6;
}

.sidebar {
background: #2f323a;
margin-top: 70px;
padding-top: 30px;
position: fixed;
left: 0;
width: 250px;
height: 100%;
transition: 0.5s;
transition-property: left;
}

.sidebar .profile_image {
width: 100px;
height: 100px;
border-radius: 100px;
margin-bottom: 10px;
}

.sidebar h4 {
color: #ccc;
margin-top: 0;

67
}

.sidebar a {
color: #fff;
display: block;
width: 100%;
line-height: 60px;
text-decoration: none;
padding-left: 40px;
box-sizing: border-box;
transition: 0.5s;

.sidebar a:hover {
background: #19B3D3;
}

.sidebar i {
padding-right: 10px;
}

label #sidebar_btn {
z-index: 1;
color: #fff;
position: fixed;
cursor: pointer;
left: 300px;
font-size: 20px;

68
margin: 5px 0;
transition: 0.5s;
transition-property: color;
}

label #sidebar_btn:hover {
color: #19B3D3;
}

#check:checked~.sidebar {
left: -190px;
}

#check:checked~.sidebar a span {
display: none;
}

#check:checked~.sidebar a {
font-size: 20px;
margin-left: 170px;
width: 80px;
}

.content {
margin-left: 250px;
background: url(background.png) no-repeat;
background-position: center;
background-size: cover;
height: 100vh;

69
transition: 0.5s;
}

#check:checked~.content {
margin-left: 60px;
}

#check {
display: none;
}
</style>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-


awesome/5.12.1/css/all.min.css">

</head>

<body>

<input type="checkbox" id="check">


<!--header area start-->
<header>
<label for="check">
<i style="left: 200px;margin-top: 17px;"class="fas fa-bars"
id="sidebar_btn"></i>
</label>
<div class="left_area">
<h3>Online Quiz</h3>
</div>
<div class="right_area">
70
<a href="/logout" class="logout_btn">Logout</a>
</div>
</header>
<!--header area end-->
<!--sidebar start-->
<div class="sidebar">
<center>

<img src="{% static "image/student.png" %}" class="profile_image" alt="">


<h4>{{request.user.first_name}}</h4>
<h6 style="color: rgb(255, 255, 255);">( Student )</h6>

</center>

<a href="/student/student-dashboard"><i class="fas


fa-tachometer-alt"></i><span>Dashboard</span></a>
<a href="/student/student-exam"><i class="fas
fa-book"></i><span>Exam</span></a>
<a href="/student/student-marks"><i class="fas
fa-sort-numeric-up"></i><span>Marks</span></a>
</div>
<!--sidebar end-->

<!--content start-->
<div class="content">
<br><br><br><br><br>
{% block content %}

{% endblock content %}

71
<br><br><br>
{% include "quiz/footer.html" %}
</div>
<!--content end-->
</body>

</html>

<!DOCTYPE html>
{% load static %}
<html lang="en" dir="ltr">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-
to-fit=no">

<style media="screen">
.jumbotron {
margin-top: 0px;
margin-bottom: 0px;
}

.jumbotron h1 {
text-align: center;
}

</style>

</head>
72
<body>

{% include "quiz/navbar.html" %}
<br><br>
<div class="jumbotron" style="margin-bottom:0px;">
<h1 class="display-4">Hello, Student</h1>
<p class="lead">Welcome to Online Quiz</p>
<hr class="my-4">
<p>You can access various features after Login.</p>
<p class="lead">
<a class="btn btn-primary btn-lg" href="studentsignup" role="button">Create
Your Account</a>
<a class="btn btn-primary btn-lg" href="studentlogin"
role="button">Login</a>
</p>
<br><br><br><br><br><br>
</div>

{% include "quiz/footer.html" %}
</body>

</html>

{% extends 'teacher/teacherbase.html' %}
{% block content %}
{%load static%}

<head>

73
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></
script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>

<style media="screen">
a:link {
text-decoration: none;
}

h6 {
text-align: center;
}

.row {
margin: 100px;
}
</style>
</head>
<br><br>
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h6 class="panel-title">Questions</h6>
</div>
<table class="table table-hover" id="dev-table">
<thead>
<tr>

74
<th>Question</th>

<th>Marks</th>
<th>Delete Question</th>
</tr>
</thead>
{% for c in questions %}
<tr>

<td> {{c.question}}</td>

<td>{{c.marks}}</td>
<td><a class="btn btn-primary btn-xs" href="{% url 'remove-question' c.id
%}"><span class="glyphicon glyphicon-trash"></span></a></td>

</tr>
{% endfor %}
</table>
</div>
</div>

<br><br><br><br><br><br>
{% endblock content %}
{% extends 'teacher/teacherbase.html' %}
{% load widget_tweaks %}
{% block content %}
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
75
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></
script>
<style>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></
script>
a:link {
text-decoration: none;
}

</style>
</head>
<h2 style="text-align:center; color:blue;">ADD COURSE</h2>
<form method="POST" autocomplete="off" style="margin:100px;margin-top:
0px;">
{%csrf_token%}
<div class="form-group">
<label for="course_name">Exam Name</label>
{% render_field courseForm.course_name class="form-control"
placeholder="Java" %}

<label for="question_number">Total Question</label>


{% render_field courseForm.question_number class="form-control"
placeholder="10" %}

76
<label for="total_marks">Total Marks</label>
{% render_field courseForm.total_marks class="form-control"
placeholder="50" %}
</div>

<button type="submit" class="btn btn-primary">ADD</button>


</form>
<br><br><br>
{% endblock content %}

{% extends 'teacher/teacherbase.html' %}
{% load widget_tweaks %}
{% block content %}

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-
to-fit=no">

<meta name="viewport" content="width=device-width, initial-scale=1">


<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link
href="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
rel="stylesheet">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-
awesome.min.css" rel="stylesheet">
<style type="text/css">
a:link {
77
text-decoration: none;
}

.order-card {
color: rgb(255, 255, 255);
}

.bg-c-blue {
background: #04868f;
}

.bg-c-green {
background:#4C51BF;
}

.bg-c-yellow {
background: #F56565;
}

.bg-c-pink {
background: #663a30;
}

.card {

-webkit-box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);


box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);
border: 1px solid black;

78
margin-bottom: 30px;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}

.card .card-block {
padding: 25px;
}

.order-card i {
font-size: 26px;
}

.f-left {
float: left;
}

.f-right {
float: right;
}
header {
left: 0px;
right: 0px;
}
</style>
</head>
<br><br>

<div class="container">

79
<div class="row">
<div class="col-md-4 col-xl-6">
<div class="card bg-c-blue order-card">
<div class="card-block">
<h6 class="m-b-20"> <a href="teacher-add-exam" style="text-decoration:
none;color:white;">Add Exam</a> </h6>
<h2 class="text-right"><i class="fas fa-plus f-left"></i></h2>

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

<div class="col-md-4 col-xl-6">


<div class="card bg-c-green order-card">
<div class="card-block">
<h6 class="m-b-20"><a href="teacher-view-exam" style="text-
decoration: none;color:white;">View Exams</a> </h6>
<h2 class="text-right"><i class="fas fa-eye f-left"></i></h2>

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

</div>
</div>

<br><br><br><br><br><br><br><br><br><br>
80
<script
src="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></
script>

{% endblock content %}

{% extends 'teacher/teacherbase.html' %}
{% block content %}
{%load static%}

<head>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></
script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>

<style media="screen">
a:link {
text-decoration: none;
}

h6 {
text-align: center;
}

.row {
margin: 100px;
}
</style>
81
</head>
<br><br>
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h6 class="panel-title">Select Course To View Questions</h6>
</div>
<table class="table table-hover" id="dev-table">x`
<thead>
<tr>

<th>Course Name</th>
<th>Total Question</th>
<th>Total Marks</th>
<th>View Question</th>
</tr>
</thead>
{% for c in courses %}
<tr>

<td> {{c.course_name}}</td>
<td>{{c.question_number}}</td>
<td>{{c.total_marks}}</td>
<td><a class="btn btn-primary btn-xs" href="{% url 'see-question' c.id
%}"><span class="glyphicon glyphicon-eye-open"></span></a></td>

</tr>
{% endfor %}
</table>
</div>
82
</div>

<br><br><br><br><br><br>
{% endblock content %}

OUTPUTS:

83
84
85
86
BENEFITS AND LIMITATIONS

Benefits
1. Engaging Learning Experience:
o Interactive elements like quizzes, gamification features, and instant
feedback make learning more engaging and enjoyable for users,
increasing motivation and participation.
2. Flexibility and Accessibility:
o Users can access the quiz platform anytime and from any device,
whether a smartphone, tablet, or computer, enabling self-paced and
flexible learning suited to different schedules.
3. Instant Feedback and Performance Tracking:
o Users receive immediate feedback on their answers, helping them
identify strengths and areas for improvement in real-time. Progress
tracking and analytics offer insights into performance trends.
4. Customizable Content:
o Administrators and educators can create and modify quizzes,
tailoring the content to match specific learning goals, difficulty
levels, and subjects, enhancing the relevance and effectiveness of the
quizzes.
5. Comprehensive Learning Assessment:
o The platform supports various question types (e.g., multiple-choice,
true/false) and multimedia integration, allowing for diverse and
comprehensive assessments that test users' knowledge thoroughly.
6. Enhanced User Engagement through Gamification:
o Features like leaderboards, points, badges, and rewards encourage
friendly competition and maintain user interest, promoting
continuous learning and improvement.
7. Scalability and Easy Management:
o With a robust admin interface, the system allows for efficient
management of quizzes and users, making it scalable for individual
learners, classrooms, or large organizations.

Limitations
1. Dependency on Internet Connectivity:
87
o Users need a stable internet connection to access the application
effectively. Those with unreliable connectivity may face disruptions,
limiting the platform's accessibility.
2. Limited Depth in Feedback for Complex Topics:
o While the platform provides immediate feedback for objective
questions, it may not offer detailed explanations for more complex or
subjective topics that require deeper analysis.
3. Initial Learning Curve for Administrators:
o Administrators or educators unfamiliar with the platform or
technology may require training to effectively manage quizzes and
utilize the system’s features to their full extent.
4. Security and Privacy Concerns:
o As with any online platform, protecting user data and quiz content
from unauthorized access or breaches is critical. Ensuring robust
security measures is essential but can be challenging.
5. Customization Constraints:
o Although the platform may offer customization options, there may
still be limitations in designing highly specialized quizzes or
integrating unique educational tools without further development.
6. Lack of Support for Advanced Analytics:
o While the platform provides basic performance tracking, users or
educators looking for more advanced analytics or personalized
learning pathways may find it insufficient without further
enhancement.
7. Accessibility and Compatibility Issues:
o Despite efforts to make the application compatible with various
devices, differences in screen sizes, browser compatibility, or
accessibility features (e.g., screen readers) might not fully
accommodate all user needs.
These benefits and limitations provide a balanced view of the quiz application’s
capabilities and areas for potential improvement.

88
Future Enhancements

The Online Quiz Application has a strong foundation, and there are several
potential enhancements to improve its functionality, user engagement, and
scalability further. Here are some possible future enhancements:
1. Implementation of a Leaderboard System:
o Adding a dynamic leaderboard feature to display the top performers
based on quiz scores and activity levels will encourage users to
participate more frequently and strive for higher scores. The
leaderboard could be customized to show rankings on a daily,
weekly, or monthly basis.
2. Detailed Feedback Mechanism:
o Implementing a comprehensive feedback system where users receive
explanations for correct and incorrect answers. Personalized
recommendations could also be provided based on the user’s
performance, allowing them to focus on improving specific areas.
3. AI-Powered Adaptive Quizzing:
o Incorporating an AI-driven engine that adapts quiz difficulty based
on the user's progress and performance. This system would provide
easier questions if the user struggles or more challenging ones if they
consistently perform well, ensuring a tailored and engaging learning
experience.
4. Mobile Application Development:
o Developing a dedicated mobile app version for both Android and
iOS platforms. This would provide users with a more seamless and
optimized experience on mobile devices, allowing them to access
quizzes, track scores, and view progress on the go.
5. Multi-Language Support:
o Expanding the application’s reach by offering quizzes in multiple
languages, making it accessible to a broader audience. Language
preferences can be set by users, and quizzes can be tailored to
regional or cultural differences.
6. Integration with Learning Management Systems (LMS):

89
o Integrating the application with popular LMS platforms (e.g.,
Moodle, Canvas) to enable educational institutions to manage
quizzes, track student progress, and incorporate quizzes as part of
their curriculum.
7. Gamification Elements:
o Introducing additional gamification features like badges,
achievements, levels, and challenges. These elements can motivate
users to engage more frequently with the application and progress
through various stages, enhancing the overall user experience.
8. Quiz Creation by Users:
o Allowing users to create their own quizzes and share them with
others. This feature would enable educators, trainers, and users to
build custom quizzes, fostering community engagement and making
the platform more interactive.
9. Enhanced Analytics and Reporting:
o Developing an advanced analytics dashboard that provides detailed
insights into user performance, trends, and progress. This would
benefit educators and trainers by helping them identify areas where
users need more support and improvement.
10.Integration of Multimedia Questions:
o Supporting various multimedia formats like videos, audio clips, and
images within quiz questions. This will make quizzes more engaging
and interactive, appealing to different learning styles and enhancing
knowledge retention.
11.Offline Mode Capability:
o Developing an offline mode where users can download quizzes and
take them without an internet connection. This feature would
enhance accessibility, especially in regions with limited connectivity,
and sync results when the user is back online.
These future enhancements aim to increase the platform’s interactivity,
scalability, and usability, providing a more comprehensive and personalized
learning experience for users.

90
CONCLUSION

The Online Quiz Application offers a dynamic and interactive platform


designed to enhance learning experiences through engaging quizzes, instant
feedback, and personalized progress tracking. By addressing the limitations
of existing quiz solutions, it provides a flexible and accessible environment
that accommodates various learning styles and devices, promoting self-
paced and classroom-based learning. The platform's gamification features
and customization options further motivate users, fostering continuous
engagement and knowledge retention. However, like any digital tool, it
faces challenges such as dependency on internet connectivity and security
concerns, which require attention to ensure reliability and data protection.
Overall, the application is a valuable educational tool that supports
effective knowledge assessment and learning improvement, adaptable for
students, educators, and organizations alike.

91

You might also like