DESIGN & DEVELOPMENT OF ONLINE EXAMINATION SYSTEM · DESIGN & DEVELOPMENT OF ONLINE EXAMINATION...
Transcript of DESIGN & DEVELOPMENT OF ONLINE EXAMINATION SYSTEM · DESIGN & DEVELOPMENT OF ONLINE EXAMINATION...
DESIGN & DEVELOPMENT OF ONLINE EXAMINATION SYSTEM
: IN PERSPECTIVE OF ACM LIVE SELECTION
A project report submitted to the Department of Computer Science and Engineering
of the World University of Bangladesh in partial fulfillment of the requirements for
award of the Degree of B.Sc. in Computer Science and Engineering.
Prepared by
Iqbal Hossain [REG NO: WUB 03/12/26/649]
Supervised by Afzal Hossain
Lecturer Department of Computer Science & Engineering
World University of Bangladesh Dhaka, Bangladesh
Department of Computer Science and Engineering World University of Bangladesh
DECLARATION We hereby declare that this project work entitled “Design and Development of Online
Examination System: In Perspective of ACM Live Selection” presented in project report
has not been submitted to any other university or institution for the award of any degree
previously.
We hereby ensure that the work we have presented here did not breach any existing
copyright rule.
We further undertake to indemnify the University against any loss or damage arising from
breach of the forgoing obligation.
Sincerely yours Iqbal Hossain REG NO: WUB 03/12/26/649
WORLD UNIVERSITY OF BANGLADESH
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
CERTIFICATE
This is to certify that the project paper on “Design and Development of Online
Examination System : In Perspective of ACM Live Selection” is a confide record of
project work done by Mst: Monera Akter & Iqbal Hossain for partial fulfillment of
requirements of the degree of B.Sc. in computer Science and Engineering form World
University of Bangladesh.
The project report has been carried out under my guidance and is a record of the benefice
work carried out successfully by the student. ____________ Afzal Hossain Lecturer Department of Computer Science and Engineering World University of Bangladesh (WUB) House # 3/A, Road # 4 Dhanmondi, Dhaka 1205, Bangladesh.
ACKNOWLEDGEMENT We are extremely grateful and remain indebted to Almighty Allah who has guided in all
ventures to complete my project successfully. We are thankful to the grace and the help
received from him.
The completion of this project involves contribution and assistance from many individuals. It
is our pleasures to thank the honorable Vice Chancellor of WUB, Professor Dr. Abdul
Mannan Chowdhury, to whom I owe a lot for giving me an opportunity to complete my
project.
The project would not be a success without the constant and valuable guidance of Afzal
Hossain, my external guide for this project, who rendered all sorts of help when required. We
are thankful for his constant constructive criticism and valuable suggestions, which benefited
us a lot while researching this project on “Design and Development of Online Examination
System :In Perspective of ACM Live Selection”. He had been a constant source of
inspiration and motivation for our hard work. His dedication, collaboration and interaction
were key factor in the success of my project. Through this column, it would be our utmost
pleasure to express our warm thanks to him for his encouragement, co-operation and consent,
without that might not be able to accomplish this project.
We are greatly indebted to all teachers and staffs of the Department of Computer Science and
Engineering and other Department of the World University of Bangladesh for their kind
assistance in accomplishment of the project paper.
We are grateful to our parents, who are indeed, very close to our heart. No one can find the
right word to give thanks one’s parents. We will always be indebted for the love and care that
our parents have showered on us, and have done every possible effort to reach us at this
stage. We are very lucky to get such caring and loving parents. We feel the same way for our
parents who have been a source of inspiration for us.
ABSTRACT
Online live examination system is a software solution, which allows a particular institute to
arrange, conduct and manage examinations via an online environment. This can be done
through the Internet, Intranet and/or Local Area Network environment. To bring the live
monitoring feature was the key challenge to accumulate into the system.
To develop the system several articles and journals of different researchers and university
was read. To gain the more appropriate knowledge several existing application around the
world was viewed. We did not find in our review such distinct feature where system can
simultaneously serves the purpose of exam process and result progress.
To design and develop it was intend to follow the software development life cycle (SDLC)
which is a conceptual model used in project management that describes the stages involved
in an information system development project. The MVC software architecture pattern was
follow to gain the user interface and activity flow thus it would be maintained international
standards and become a robust system. The MVC pattern also helps to maintain the code for
further modification.
To develop the system HTML, PHP and JavaScript is used to achieve the project. MySQL
Server is used as database management system. Apache web server is used to host the
application. The system can run both Windows and Unix environment.
Online live examination system is the way of improving examination activities fast and
efficient. This software is interactive and user friendly has all the command controls that
would allow student successfully accomplish the exams have been implemented using the
simplest graphic styles. The live monitoring features enable this application a distinct
attribute from other existing application.
TABLE OF CONTENT
CHAPTER 1: INTRODUCTION .......................................................................................... 1
1.1 INTRODUCTION ................................................................................................................. 1 1.2 OBJECTIVE ........................................................................................................................ 1 1.3 JUSTIFICATION OF STUDY ................................................................................................. 2 1.4 SCOPES OF STUDY ............................................................................................................. 2
CHAPTER 2: LITERATURE REVIEW ............................................................................. 3
2.1 REVIEW OF RELEVANT LITERATURE ................................................................................ 3
CHAPTER 3: METHODOLOGY ........................................................................................ 7
3.1 MODEL ............................................................................................................................. 7 3.2 JUSTIFICATION OF METHODOLOGY ................................................................................... 8 3.3 DESCRIPTION OF METHODOLOGY ..................................................................................... 8
CHAPTER 4: ANALYSIS, DESIGN AND DEVELOPMENT .......................................... 9
4.1 REQUIREMENT GATHERING .............................................................................................. 9 4.2 ANALYSIS OF REQUIREMENT .......................................................................................... 10 4.3 ER DIAGRAM ................................................................................................................. 12 4.4 DATA FLOW DIAGRAM ................................................................................................... 13 4.5 USE CASE DIAGRAMS AND DESCRIPTION ....................................................................... 14
CHAPTER 5: PROJECT DESCRIPTION ........................................................................ 24
5.1 INTERFACES .................................................................................................................... 24 5.2 RESULT AND TESTING .................................................................................................... 30
CHAPTER 6: CONCLUSION ............................................................................................ 32
6.1 FUTURE WORKS ............................................................................................................. 32 6.2 RECOMMENDATION AND FINDINGS ................................................................................ 33 6.3 LIMITATION .................................................................................................................... 33
REFERENCES ...................................................................................................................... 34
APPENDIX ............................................................................................................................ 35
FIGURES
Figure 1: Waterfall Model ........................................................................................................ 7
Figure 2: ER Diagram ............................................................................................................. 12
Figure 3: Database Design ...................................................................................................... 13
Figure 4: Data Flow Diagram ................................................................................................. 13
Figure 5: Use Case Diagram ................................................................................................... 15
Figure 6: Log In Page ............................................................................................................. 24
Figure 7: Sign Up Page ........................................................................................................... 24
Figure 8: Controller Home Page ............................................................................................. 25
Figure 9: Question Management Page .................................................................................... 26
Figure 10: Question Creation Page ......................................................................................... 27
Figure 11: Exam Management Page ....................................................................................... 27
Figure 12: User Management Page ......................................................................................... 28
Figure 13: Participant Home Page .......................................................................................... 29
Figure 14: Exam Answer Page ............................................................................................... 29
Figure 15: Testing Results ...................................................................................................... 31
Page|1
CHAPTER 1: INTRODUCTION 1.1 Introduction
Examination is one of the best method of evaluating the knowledge and ability of an
individual. In the age of present information technology, online based examination has been
highly interested and suitable in both educational and pedagogical aspects. It can be used in
place of manual or paper method which was characterized by massive flaws like examination
leakages, impersonations and invigilators of examinations.
In this project students can participate into examination from remote location and get their
results instantly after finishing the exam. To participate into the exam they should have
proper access through internet or local area network. They can even use their tablet, smart
phone to participate into the examination using this system. At the same time teachers or
controller can create questions and can conduct exam without going exam hall and as well as
can monitor exam progress in live mode. This system is an attempt to remove the existing
flaws of manual system to conducting exams.
1.2 Objective
• To develop online base live exam system thus the examination process could be
monitored in live mode and participant can attend in the exam remotely
Page|2
1.3 Justification of Study Although there are several online based exam system running around the world but for ACM
contestant selection in the country is not shown yet. Moreover its live monitoring
functionality gives it a distinction attribute from other existing system. So we have wide
scope to work on this system.
1.4 Scopes of study
• Online live exam system is designed for any kind of educational institutes
• Teachers could view the exam status as soon as they give answer of each question
• Teachers and students can access the system from remote location
• No restriction of examiner present in exam room
Page|3
CHAPTER 2: LITERATURE REVIEW 2.1 Review of Relevant Literature There are several researches and projects focused on developing better ways to manage e-
exam systems and e-learning system. Some of these researches focused on various sections
of the system and these includes Schramm (2008) looked at e-learning web based system that
could simply offers and grades mathematical questions with infinite continued existence.
Therefore it needs the capability for in and output of mathematical formulas, the dynamic
generation of plots and the generation of random expressions and numbers. The idea of the
generic software is to present an empty templates to the teacher who would like to develop
his required e-exam for the needful topic (mathematics, language, science, etc) and desired
set of exam kinds (multiple choices, matching between words, fill in blanks, etc).
Web-based Examination System is an effective solution for mass education evaluation
(Zhenming et al, 2003). They developed a novel online examination system based on a
Browser/Server framework which carries out the examination and auto-grading for objective
questions and operating questions, such as programming, operating Microsoft Windows,
editing Microsoft Word , Excel and PowerPoint, etc. It has been successfully applied to the
distance evaluation of basic operating skills of computer science, such as the course of
computer skills in Universities and the nationwide examination for the high school graduates
in Zhejiang Province, China. Another paper (He, 2006) presents a web-based educational
assessment system by applying Bloom’s taxonomy to evaluate student learning outcomes and
teacher instructional practices in real time. The system performance is rather encouraging
with experimentation in science and mathematics courses of two local high schools.
Page|4
Another paper proposed web based online examination system (Rashad et al, 2010). The
system carries out the examination and auto-grading for students exams. The system
facilitates conducting exams, collection of answers, auto marking the submissions and
production of reports for the test. It supports many kinds of questions. It was used via
Internet and is therefore suitable for both local and remote examination. The system could
help lecturers, instructors, teachers and others who are willing to create new exams or edit
existing ones as well as students participating in the exams. The system was built using.
various open source technologies AJAX, PHP, HTML and MYSQL database are used in this
system. An auto-grading module was generalized to enable different exam and question
types. The system was tested in the Mansoura university quality assurance center. The test
proved the validity of using this kind of web based systems for evaluates students in the
institutions with high rate of students.
An online website for tutoring and e-examination of economic course aimed to present a
novel software tool can be used for online examination and tutorial application of the
syllabus of economic course (EL Emary and Al Sondos, 2006). Also, among the main
interests of the paper is to produce a software through it we make sure that students have
studied all the concepts of economics. So, the proposed software is structured from two
major modules: The first one was an online website to review and make self-test for all the
material of economic course.
The second part is an online examination using a large database with bank of questions
through it the level of students can be evaluated immediately and some statistical evaluations
can be obtained. The developed software offers the following features: 1) Instructors could
add any further questions to maximize the size of the bank of questions. 2) Different
Page|5
examinations for each student with randomly selected questions from the bank of questions
can be done. 3) Different reports for the instructors, students, classes etc. can be obtained. 4)
Several students can take their exams simultaneously without any problem inside and outside
their campus. The proposed software has been designed to work base on the client server
architecture. Electronic exam is a difficult part of e-learning security (Huszti and Petho,
2008). The paper describes a cryptographic scheme that possesses security requirements,
such that authenticity, anonymity, secrecy, robustness, correctness without the existence of a
Trusted Third Party. The proposed protocol also provides students a receipt, a proof of a
successful submission, and it is based on existence of anonymous return channels. Another
research work proposed a theoretical approach that incorporates available fingerprint
biometrics authentication technologies in conjunction with e-learning environments to curb
unethical conduct during e-learning exam taking (Levy and Ramim, 2007). The proposed
approach suggests practical solution that can incorporate a random fingerprint biometrics
user authentication during exam taking in e-learning courses. Doing so is hypo the sized to
curb exam cheating in e-learning environments.
Ayo et al (2007) proposed a model for e-Examination in Nigeria where all applicants are
subjected to online entrance examination as a way of curbing the irregularities as proposed
by the Joint Admissions Matriculation Board (JAMB), the body saddled with the
responsibility of conducting entrance examinations into all the Nigerian universities. This
model was designed and tested in Covenant University, one of the private universities in
Nigeria. Their findings revealed that the system has the potentials to eliminate some of the
problems that are associated with the traditional methods of examination such as
impersonation and other forms of examination malpractices. Based on the development of e-
Page|6
learning in the only Open University in Nigeria (Ipaye, 2009), discusses the process of
establishing e-learning environment. Another paper seeks to solve a part of that problem by
designing and developing a web application where tests in multiple choice formats will be
taken online and graded immediately (Akinsanmi et al, 2010). The web application relies
solely on Microsoft developed technologies. It runs on the Microsoft.net framework, uses the
ASP.NET web server, C# as the intermediate language, ADO.NET to interact with the
relational database and Microsoft SQL server as the relational database.
A successful journey of online learning and exam system that is community driven
and based on open source platform is Moodle. Moodle is highly flexible open source
learning platform. With comprehensive, customizable and secure learning
management features, it can be used to create a private website for dynamic online
courses. The acronym of Moodle is “modular object-oriented dynamic learning
environment” is also known as a learning management system, or virtual learning
environment. The platform can be used for e-learning projects in University,
Corporate training, School and other sectors.
Page|7
CHAPTER 3: METHODOLOGY
3.1 Model
Following steps are followed to achieve the goal of the project.
Figure 1: Waterfall Model The waterfall Model illustrates the software development process in a linear sequential flow.
Waterfall approach was first SDLC Model to be used widely in Software Engineering to
ensure success of the project. In "The Waterfall" approach, the whole process of software
development is divided into separate phases. The project steps are described below.
Page|8
3.2 Justification of Methodology
• Simple and easy to understand to use.
• Easy to manage. Each phase has specific deliverables and a review process.
• Works well for smaller projects where requirements are very well understood.
• Well understood milestones.
• Easy to arrange tasks.
3.3 Description of Methodology
Requirements: All possible requirements of the system were developed are captured in this
phase and documented in a requirement specification doc.
Design: The requirement specifications from first phase were studied in this phase and
system design is prepared. System Design helps in specifying hardware and system
requirements and also helps in defining overall system architecture.
Implementation: With inputs from system design, the system was first developed in small
programs called units, which were integrated in the next phase.
Integration and Testing: All the units developed in the implementation phase were
integrated into a system after testing of each unit. Post integration the entire system is tested
for any faults and failures.
Maintenance: As this the university project so it was not possible to get feedback from
client side to evaluate the result from client aspects.
Page|9
CHAPTER 4: ANALYSIS, DESIGN AND DEVELOPMENT
4.1 Requirement Gathering To gather the requirements we had several discussions with supervisor and teachers. We have
prepared a questionnaire to know their requirements.
1. Who are the participator entities of this system?
2. What are the registration policies?
3. What are the roles of controller?
4. What are the roles of students?
5. What is the pattern of question and answer?
6. Does the system publish the exam in live mode?
7. Does user registration is automatic or manually operated by the teacher?
8. Is there any time limitation factor? If yes what is that?
Page|10
4.2 Analysis of Requirement The following answers were collected after a short survey to collect requirements 1. Who are the participator entities of this system?
Ans. Teacher as Controller and Student as Participant
2. What are the registration policies?
Ans. Student can register from online. Controller can add another controller
3. What are the roles of controller?
Ans. Controller can administer User, Question, Exam and have full privilege of all
access.
4. What are the roles of students?
Ans. Student can participate in the exam and can view own result
5. What is the pattern of question and answer?
o Multiple choice o Single input þ Both
6. Does the system publish the exam in live mode?
þ Yes o No
7. Does user registration is automatic or manually operated by the teacher?
þ Automatic o Manual
8. Is there any time limitation factor? If yes what is that?
þ Yes o No
Time limitation factors: • Every question will have different time limit
• If the question is not answered in specific time period, the question will be locked and can’t be given the answer
• If the question is answered before specific time period this time will equally divided into other questions
• If the answered question can’t be reviewed
Page|11
Features and Functionalities
1. Participant’s registration
2. User access through authentication
3. User view/create/edit
4. Question bank view/create/edit
5. Exam event view/create/delete
6. Participation into exam from remote location
7. View live exam process Tools and Languages 1. HTML: It has been used because of it is the most popular pre-processed language which
is mostly used in web application. It is easy to understand and human readable.
2. PHP: It is a most popular scripting language to build web application now a day. It runs
only in server side. 5.4 version has been used to build the project
3. JavaScript: As the system is interactive features like live monitoring so it was required
to use JavaScript. JavaScript run on client browser to input, output and validate user
actions.
4. MySQL: It is the most popular open source database management system. To store all
the data we have used this DBMS
Page|12
4.3 ER Diagram
Figure 2: ER Diagram
Page|13
Figure 3: Database Design 4.4 Data Flow Diagram
Figure 4: Data Flow Diagram
Page|14
Student: Act as participant role
University Teacher: Act as exam controller
LAN: Local Area Network act as media for accessing the server
Internet: Act as media for accessing the server from remote location like outside of
university premised
Web Server: Act as a system processor and hosting the application to the user. In this
project Apache web server was used
DB: Act as data storage location 4.5 Use Case Diagrams and Description The following use cases describe the sequences of interaction between user and system. It
describes system functionalities from the perspective of Student and Teacher
List of use case are:
1. Sign Up: Participant registration into the system. Using this module participant can
register into the system from remote location.
2. Login: Using this module all the user can authenticate to the system. To authenticate
to the system every user have to valid User ID and Password
3. Create User: Using this module controller can create and edit user.
4. Create Question: Using this module controller can create and edit question.
Controller can set proper settings using this module.
5. Create Exam: Using this module controller can create and delete exam and manage
the exam settings. Participant can attend in the exam using this module also.
6. Answer Question: Using this module participant can attend the exam and finish the
exam to prepare the final result
Page|15
Figure 5: Use Case Diagram
Student
Teacher
Register FillOnlineForm
AnswerQuestion
FinishExam
ViewExamResult
Login Authentication
CreateExamEvents
CreateQuestion
AddQ.
EditQ.
DeleteExamEvent
CreateUserAddUser
EditUser
(include)
(extend)
(include)
(extend)
(extend)
(extend)
(extend)
(extend)
Teacher
Page|16
4.5.1 Sign Up Use Case:
Use case name Sign Up
Primary actor(s) Student
Description Registration into the system
Precondition User have to access the main site using browser and input the data
Post condition The system accept user id, name, phone, email and password
Basic actions
1. All participants wants to participate into the exam
2. User first must have register to the system 3. User enters their user id, name, phone, email and password
4. The system reply success registration 5. The use case ends
Alternative actions 1. If the user does not need to signup
A. User may wish to login B. Leave the site
Page|17
4.5.2 Login Use Case:
Use case name Login
Primary actor(s) Controller and Student
Description Login into the system
Precondition All authorized has user id and password
Post condition The system accept user id and password
Basic actions
6. All authorized user wants to login into the system 7. User first must have user id and password
8. User enters their user id and password 9. The system checks the user id and password
10. The system accepts user id and password 11. The use case ends
Alternative actions
2. If the users have no user id and password A. Users asked to the faculty member to create the id
3. If the entered user id and password are wrong
A. Try with another user id and password B. Go to step 3
Page|18
4.5.3 Add User Use Case:
Use case name Add User
Primary actor(s) Controller
Description Adding user
Precondition User needs to know the id, name, phone, email and password
Post condition User is added
Basic actions
1. Controller wants to add user into the database
2. Controller inputs the user information 3. The user is added
4. The use case ends
Alternative actions
1. If the user already exists
A. Try with different information B. Go to step 2
Page|19
4.5.4 Edit User Use Case:
Use case name Edit User
Primary actor(s) Controller
Description Changing user information
Precondition Controller needs to know the changed id, name, phone, email and password
Post condition User is edited
Basic actions
1. Controller wants to change user information
2. Controller inputs the modified user information 3. The user is updated
4. The use case ends
Alternative actions
1. If the user already exists A. Try with different information
B. Go to step 2
Page|20
4.5.5 Add Question Use Case:
Use case name Add Question
Primary actor(s) Controller
Description Adding question
Precondition User needs to know the question title, possible answers option, mark, time limit of the question
Post condition Question is added to question bank
Basic actions
1. Controller wants to add question into the database
2. Controller inputs the question information 3. The question is added
4. The question case ends
Alternative actions
1. If the question already exists A. Try with different information
B. Go to step 2
Page|21
4.5.6 Edit Question Use Case:
Use case name Edit Question
Primary actor(s) Controller
Description Changing question information
Precondition Controller needs to know the changed id, name, phone, email and password
Post condition Question is edited
Basic actions
1. Controller wants to change question information
2. Controller inputs the modified question information 3. The question is modified
4. The use case ends
Alternative actions
1. If the question already exists
A. Try with different information B. Go to step 2
Page|22
4.5.7 Create Exam Use Case
Use case name Create Exam
Primary actor(s) Controller
Description Create exam from selected question
Precondition User needs to select the questions
Post condition Exam is created
Basic actions
1. Controller wants to create exam information into the database
2. Controller selects the question from question bank 3. Controller input question title
4. The exam is created 5. The exam case ends
Alternative actions
1. If the exam already exists A. Try with different information
B. Go to step 2
Page|23
4.5.8 Exam Participation Use Case:
Use case name Exam Participation
Primary actor(s) Participant or Student
Description Participation into active exam and provide answers
Precondition User needs to login and select the exam
Post condition Exam attempt has been completed
Basic actions
1. User wants to participate into exam
2. User login to the system with proper user id and password 3. User select the exam
4. User provides their answer 5. User push the finish button to finish the exam process
Alternative actions
1. Leave the exam
Page|24
CHAPTER 5: PROJECT DESCRIPTION
5.1 Interfaces
Figure 6: Log In Page This is the index page as well as login page of the application. To use the application features
all user have to pass the authentication using their User Id and password.
Figure 7: Sign Up Page
Page|25
Sign Up page is developed to get registration information of participant who wishes to attend
the examination. Participant has to provide their User Id, Batch No., Full Name, Phone,
Email and Password. After providing User Id, Batch No., Full Name, Phone, Email and
Password information the participant can get access after passing login authentication using
their User Id and password.
Figure 8: Controller Home Page Controller home page is a dashboard of all exam information. From this page controller can
view the registered participant, Exam attended participant and the participant who finished
their exam. Controller can view the list of the exam progress in live mode. Controller can
view the past history clicking “All” radio button. As well as he can search the particular
information from the list providing keywords in search text box.
Addition controller can view the exam progress graphically thus they can understand the
exam progress easily.
Page|26
Figure 9: Question Management Page Question management page is the most important page used by controller. Here controller
can view the entire questions list. Controller can create, edit the question. Controller can
select multiple questions using checkbox manually. Controller can also provide random
number to select questions from question bank. After selecting question controller can enroll
the question for exam clicking “Enrolled Selected Question” button. As well as he can search
the particular information from the list providing keywords in search text box.
Page|27
Figure 10: Question Creation Page
This is the new question creation page. Here controller should provide the content of
question and the possible answers. Controller should select the right answer as well. Also he
should provide the mark of the question and the time limit of that particular question. He
need to set the question answer view mode to the participant using checkbox enabled to
single answer input option.
Figure 11: Exam Management Page
Page|28
In exam management page controller can view the created exam events list. Controller can
Active or Deactivate the exam thus student can attend on particular exam. He can delete the
particular exam event as well.
Figure 12: User Management Page User management page is used to manage all user information. Controller can create and edit
user information. Controller can search the user information providing filter information into
the “Search” text box.
Additionally at the right top of the all page there is a link to log out the session.
Page|29
Figure 13: Participant Home Page In this page participant can view his exam attempt information. He/she can view which exam
they participated and what was their result.
Figure 14: Exam Answer Page This is the page participant can provide their answer by checking the correct answer. If the
participant is confident about the answer, they may click commit button to gain bonus time to
other question. At the same time participant can navigate through the entire questions within
exam time. After finishing the exam they should click on finish button to finish the exam.
Page|30
5.2 Result and Testing Software testing is any activity aimed at evaluating an attribute or capability of a program or
system and determining that it meets its required results. It is a process of executing a
program or application with the intent of finding the software bugs. Software testing methods
are traditionally divided into white-b0x and black-box testing. These two approaches are
used to describe the point of view that a test engineer takes when designing test cases.
1. White-box Testing: White-box testing also known as clear box testing tests internal
structures or workings of a program, as opposed to the functionality exposed to the end-user.
In white-box testing an internal perspective of the system, as well as programming skills, are
used to design test cases. The tester chooses inputs to exercise paths through the code and
determine the appropriate outputs. This is analogous to testing nodes in a circuit, e.g. in-
circuit testing (ICT). While white-box testing can be applied at the unit, integration and
system levels of the software testing process, it is usually done at the unit level. It can test
paths within a unit, paths between units during integration, and between subsystems during a
system–level test. Though this method of test design can uncover many errors or problems, it
might not detect unimplemented parts of the specification or missing requirements.
Black-box Testing: Black-box testing treats the software as a "black box", examining
functionality without any knowledge of internal implementation. Black-box testing methods
include: equivalence partitioning, boundary value analysis, all-pairs testing, state transition
tables, decision table testing, fuzz testing, model-based testing, use case testing, exploratory
testing and specification-based testing. Specification-based testing aims to test the
Page|31
functionality of software according to the applicable requirements. This level of testing
usually requires thorough test cases to be provided to the tester, who then can simply verify
that for a given input, the output value (or behavior), either "is" or "is not" the same as the
expected value specified in the test case.
Test Level Result
Level Error Found Error Solved Unit Testing 10 10 Bottom-up Integration 3 3 Non Functional Testing 4 4 Security Testing 1 1 Portability Testing 1 1
Figure 15: Testing Results
UnitTesting Bottom-upIntegration
NonFunctionalTesting
SecurityTesting
PortabilityTesting
0
2
4
6
8
10
12
ErrorFound
ErrorSolved
Page|32
CHAPTER 6: CONCLUSION
Online live examination system is the way of improving examination activities fast and
efficient. This software is interactive and user friendly has all the command controls that
would allow student successfully accomplish the exams have been implemented using the
simplest graphic styles. All users’ needs to do are to register by fill up the signup form with
their Id, Name, Phone, Email and Password. The students and controller both have to pass
authentication to log into the system. The most beautiful feature is to monitor the exam from
control room and instantly got the total examination picture.
6.1 Future Works
1. Currently no graph or figure insertion facility is available. So it will be added in next
work.
2. No emulator is available when participant answers the question. It will be added in
next work.
3. Mobile interface is not available. So it will be added in next work.
4. More user friendly interface will be added in next version.
Page|33
6.2 Recommendation and Findings Online examination system considering benefits to the society the following issues are
recommended
1. University Education: The online entrance examination would be very useful in this
sector considering the large number of student that applies for university entrance
examination each year and invigilators inability to see the activity of the student.
2. Use in ACM contestant selection.
6.3 Limitation
1. The application depends on web server configuration. So to get better performance
proper server configuration should tune.
2. Database server should configure also to hand better data management.
Page|34
REFERENCES
Akinsanmi O., Agbaji, O.T. Ruth and M.B. Soroyewun (2010), “Development of an E-Assessment Platform for Nigerian Universities”, Research Journal Applied Sciences, Engineering and Technology 2(2): Page 170-175, ISSN: 2040-7467.
Andrea Huszti and Attila Petho (2008), “A Secure Electronic Exam System”, Page 1-7.
Ayo C. K., Akinyemi I.O., Adebiyi A.A.and Ekong U.O. (2007), “The Prospects of E-Examination Implementation In Nigeria”, Department of Computer and Information Sciences, Covenant University, Ota, NIGERIA. Turkish Online Journal of Distance Education-TOJDE October 2007. ISSN 1302-6488 Volume: 8 Number: 4 Article 10, page 125-135.
Babatunde Ipaye (2009), “E-Learning in a Nigerian Open University”, National Open University of Nigeria, page 1-11
Ibrahiem M. M. EL Emary and Jihad. A. A. Abu Al Sondos (2006), “An Online Website for Tutoring and E-Examination of Economic Course”, American Journal of Applied Sciences 3 (2): Page 1715-1718, ISSN 1546-9239.
Lei He (2006), “A novel web-based educational assessment system with Bloom’s Taxonomy”, Current Developments in Technology-Assisted Education. Page 1861-1865.
Magdi Z. Rashad, Mahmoud S. Kandil , Ahmed E. Hassan, and Mahmoud A. Zaher (2010), “An Arabic Web-Based Exam Management System”, International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 01. Page 48-55.
Moodle (web portal), Available on: www.moodle.org, Accessed date: 3rd March 2015
Online exam system (Video file), Available on: https://www.youtube.com/watch?v=mRY9xuVlgNg, Accessed date: 3rd March 2015
Page|35
APPENDIX
Database Script CREATE TABLE `enrolled_question` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `question` mediumint(8) unsigned NOT NULL, `exam` smallint(5) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `question_UNIQUE` (`question`,`exam`), KEY `fk_eq_exam_idx` (`exam`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `exam` ( `id` smallint(5) unsigned NOT NULL, `title` varchar(100) DEFAULT NULL, `total_mark` tinyint(4) DEFAULT NULL, `total_time` smallint(6) DEFAULT NULL, `user` varchar(6) DEFAULT NULL COMMENT 'User refers to controller user', `create_date` date DEFAULT NULL, `active` char(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `fk_exam_user_idx` (`user`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `exam_attempt_detail` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `question` mediumint(8) unsigned NOT NULL, `user_answer` varchar(250) NOT NULL COMMENT 'Multiple choice id will be inserted here', `exam_attempt_master` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `fk_ead_question_idx` (`question`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `exam_attempt_master` ( `id` int(10) unsigned NOT NULL, `user` varchar(6) NOT NULL, `exam` smallint(5) unsigned NOT NULL, `exam_date` date NOT NULL, `obtained_mark` tinyint(3) unsigned DEFAULT '0', `finish_time` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_eam_user_idx` (`user`), KEY `fk_eam_exam_idx` (`exam`)
Page|36
) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `multiple_choice` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(250) NOT NULL, `right_answer` char(1) NOT NULL, `question` mediumint(8) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `fk_mc_question_idx` (`question`) ) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8; CREATE TABLE `question` ( `id` mediumint(8) unsigned NOT NULL, `title` varchar(500) NOT NULL, `mark` tinyint(3) unsigned NOT NULL, `time_limit` smallint(5) unsigned NOT NULL, `single_answer_input` char(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `user` ( `id` varchar(6) NOT NULL, `name` varchar(45) NOT NULL, `password` varchar(100) NOT NULL, `phone` varchar(25) NOT NULL, `email` varchar(45) NOT NULL, `type` char(1) NOT NULL COMMENT 'Exam Controller = c, Participant = p', `batch` varchar(45) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `phone_UNIQUE` (`phone`), UNIQUE KEY `email_UNIQUE` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Page|37
Code Script
exam_paper.php
<div class="col-lg-12" style="margin-top: 2em;"> <h3 style="background-color: #e2e2e2; padding: 5px; margin: 0;"><?php echo $exam[0]->title; ?></h3><br/> <input type="hidden" id="examAttemptId" value="<?php echo $examAttempt['id']; ?>"> <?php $qArray = array(); $qTimeArray = array(); foreach ($questions as $question) { array_push($qArray, $question->id); array_push($qTimeArray, $question->time_limit); } ?> <div class="col-lg-12 answerPaper"> </div> <div class="col-lg-12" style="margin:1em 0 0; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; background-color: #f2f2f2; padding: 10px; text-align: right;"> <button id="finish" class="btn btn-warning pull-left">Finish Exam</button> <button id="commitAnswer" class="btn btn-success"><span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Commit the Answer and Get Bonus Time</button> <button id="previous" class="btn btn-info"><span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> Previous</button> <button id="next" class="btn btn-info">Next <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span></button> </div> </div> <script type='text/javascript'> $(document).ready(function () { var siteUrl = '<?php echo site_url(); ?>'; var qArray =<?php echo json_encode($qArray); ?>; var qTimeArray =<?php echo json_encode($qTimeArray); ?>; var arrayLength = qArray.length; var curQuestion = 0; var interval = null; var commitQArray = new Array(); var bonusTime = 0; loadAnswerPaper(); $("#finish").click(function () {
Page|38
saveUserAnswers(); updateUserResult(); }); function updateUserResult() { var examAttemptId = $("#examAttemptId").val(); $.ajax({ type: "POST", url: siteUrl + "/exam/updateUserResult", data: {'examAttemptId': examAttemptId}, success: function (data) { if (data != 1) { alert("Error update result! Contact with admin!"); } else { window.location.replace(siteUrl); } } }); } $("#commitAnswer").click(function () { saveUserAnswers(); bonusTime = qTimeArray[curQuestion]; commitQArray.push(qArray[curQuestion]); var examAttemptId = $("#examAttemptId").val(); $.ajax({ type: "POST", url: siteUrl + "/exam/updateUserResult", data: {'examAttemptId': examAttemptId}, success: function (data) { if (data != 1) { alert("Error update! Contact with admin immediately!"); } }}); var nextQ = checkNextNotCommittedQuestion(curQuestion); //Not question available for move to forward if (nextQ == false) { nextQ = checkPreviousNotCommittedQuestion(curQuestion); if (nextQ == false) { alert("No Question is available for answer. Great job!!"); updateUserResult(); } else { distributeBonusTime(bonusTime);
clearInterval(interval); curQuestion = nextQ; loadAnswerPaper(); } } else { distributeBonusTime(bonusTime); clearInterval(interval); curQuestion = nextQ; loadAnswerPaper();} }); $("#next").click(function () { saveUserAnswers();
Page|39
var nextQ = checkNextNotCommittedQuestion(curQuestion); if (nextQ == false) { alert("You are already in last question.") } else { curQuestion = nextQ; if (curQuestion <= arrayLength) { clearInterval(interval); loadAnswerPaper(); } else { alert("You are already in last question."); } } }); $("#previous").click(function () { saveUserAnswers(); var prevQ = checkPreviousNotCommittedQuestion(curQuestion); if (prevQ == false) { alert("You are already in first question."); } else { curQuestion = prevQ; if (curQuestion >= 0) { clearInterval(interval); loadAnswerPaper(); } else { alert("You are already in first question.") } } }); function distributeBonusTime(time) { //Find the difference between question array and committed question array var foo = []; var i = 0; jQuery.grep(qArray, function (el) { if (jQuery.inArray(el, commitQArray) == -1) foo.push(el); i++; }); var nonCommitQIndex = null; for (var j = 0; j < foo.length; j++) { if (bonusTime <= 0) { return 0; } //get the index of non committed question array nonCommitQIndex = jQuery.inArray(foo[j], qArray); //increase non committed question time according to index number qTimeArray[nonCommitQIndex]++; //Decrease total bonus time; bonusTime--; } distributeBonusTime(bonusTime);
Page|40
} function checkPreviousNotCommittedQuestion(curQ) { //Check any non commited question is available in previous from current question for (var i = curQ - 1; i >= 0; i--) { var ret = checkCommitQuestion(qArray[i]); //Previous question was not commited if (ret == -1) { return i; } } return false; } function checkNextNotCommittedQuestion(curQ) { //Check any non commited question is available in next from current question for (var i = curQ + 1; i < arrayLength; i++) { var ret = checkCommitQuestion(qArray[i]); //Next question was not commited. if (ret == -1) { return i; } } //No next question is available. return false; } function checkCommitQuestion(question) { //return whether question is committed or not return jQuery.inArray(question, commitQArray); } function saveUserAnswers() { var questionId = $("#questionId").val(); var examAttemptId = $("#examAttemptId").val(); var answers = new Array(); if ($("#answer").length > 0) { answers.push($("#answer").val()); } else { $(":checkbox").each(function () { if (this.checked) { answers.push($(this).val()) } }); } $.ajax({ type: "POST", url: siteUrl + "/exam/updateUserAnswer", data: {'examAttemptId': examAttemptId, 'questionId': questionId, 'answer': answers},
Page|41
success: function (data) { if (data != 1) { alert("Error saving data! Contact with admin!"); } } }); } function loadAnswerPaper() { $.ajax({ type: "POST", url: siteUrl + "/question/answerPaperByQuestionId", data: {'id': qArray[curQuestion], 'sl': curQuestion + 1}, success: function (data) { $(".answerPaper").html(data); } }); interval = setInterval(function () { countDown(curQuestion); }, 1000); } function countDown(qNumber) { if (qTimeArray[qNumber] === 0) { clearInterval(interval); $("#countdown").html("Time Remaining: " + secondsToTimeFormat(qTimeArray[qNumber])); if ($("#answer").length > 0) { $("#answer").attr("disabled", true); } else { $(":checkbox").attr("disabled", true); } } else { qTimeArray[qNumber] = qTimeArray[qNumber] - 1; $("#countdown").html("Time Remaining: " + secondsToTimeFormat(qTimeArray[qNumber])); } } window.onbeforeunload = function () { return "You should not refresh the page now. Please press finish if your exam has finished!"; }}); </script>
answer_paper2.php
<div class="col-lg-12" style="border-bottom: 1px solid #ddd;"> <input type="hidden" id="questionId" value="<?php echo $question[0]->id; ?>"> <div id="message"></div> <div class="col-lg-6"> <h4>Q. No.: <?php echo $sl; ?> </h4>
Page|42
</div> <div class="col-lg-3"> <h4>Mark: <?php echo $question[0]->mark; ?></h4> </div> <div class="col-lg-3" > <h4 style="color: #d9534f;" id="countdown">Time Limit: <?php echo gmdate('H:i:s', $question[0]->time_limit); ?></h4> </div> </div> <div class="col-lg-12" style="padding: 1em;"> <h4 style="margin-bottom: 1em;"><?php echo $question[0]->title; ?></h4> <div> <textarea id="answer" class="form-control" placeholder="Type your answer here"></textarea> </div></div> <script> $(document).ready(function () { var site_url = '<?php echo site_url(); ?>'; var questionId = $("#questionId").val(); var examAttemptId = $("#examAttemptId").val(); function loadUserAnswer() { $.ajax({ type: "POST", url: site_url + "/exam/getUserAnswer", data: {'examAttemptId': examAttemptId, 'questionId': questionId, 'answer': ""}, success: function (data) { var obj = $.parseJSON(data); $.each(obj, function (key, value) { // alert(value); $("#answer").text(value); }); } }); } loadUserAnswer(); }); </script>
answer_paper.php
<div class="col-lg-12" style="border-bottom: 1px solid #ddd;"> <input type="hidden" id="questionId" value="<?php echo $question[0]->id; ?>"> <div id="message"></div> <div class="col-lg-6"> <h4>Q. No.: <?php echo $sl; ?> </h4> </div> <div class="col-lg-3"> <h4>Mark: <?php echo $question[0]->mark; ?></h4> </div> <div class="col-lg-3" >
Page|43
<h4 style="color: #d9534f;" id="countdown">Time Limit: <?php echo gmdate('H:i:s', $question[0]->time_limit); ?></h4> </div></div><div class="col-lg-12" style="padding: 1em;"> <h4 style="margin-bottom: 1em;"><?php echo $question[0]->title; ?></h4> <div> <?php foreach ($answerOptions as $option) { ?> <div style="margin: .5em;"> <input type="checkbox" name="answer_option[]" style="margin-right: .5em;" value="<?php echo $option->title; ?>"> <?php echo $option->title; ?> </div> <?php } ?> </div></div> <script> $(document).ready(function () { var site_url = '<?php echo site_url(); ?>'; var questionId = $("#questionId").val(); var examAttemptId = $("#examAttemptId").val(); function loadUserAnswer() { $.ajax({ type: "POST", url: site_url + "/exam/getUserAnswer", data: {'examAttemptId': examAttemptId, 'questionId': questionId, 'answer': ""}, success: function (data) { var obj = $.parseJSON(data); $.each(obj, function (key, value) { $(":checkbox").each(function () { if ($(this).val() === value) { $(this).attr("checked", true); } }); }); } }); } loadUserAnswer(); }); </script>
student_home.php
<div class="col-lg-12"> <h3>Attempted Exam Result</h3><br/> <div class="col-lg-12"> <?php $i = 1; foreach ($examAttempts as $attempt) { ?>
Page|44
<div class="row" style="margin-bottom: .5em; padding: .5em; background-color: #F6F6F6; border-radius: 6px;"> <div class="col-lg-6"> <?php echo $i++ . ". "; ?><span><?php echo $attempt->title; ?></span> </div> <div class="col-lg-2"> Exam Date: <?php echo $attempt->exam_date; ?> </div> <div class="col-lg-2"> Total Mark: <?php echo $attempt->total_mark; ?> </div> <div class="col-lg-2" style="color: #cd0a0a; text-align: right;"> Result: <?php echo $attempt->obtained_mark; ?> </div> </div> <?php } ?> </div></div>
signup.php
<div class="col-lg-4 col-lg-offset-4" style="margin-top: 2em;"> <h2>Sign Up</h2> <form method="post" action="<?php echo site_url(); ?>/signup_submit"> <span class="text-danger" style="margin-bottom: 1em; display: inline-block;"> <?php if (isset($message) && !empty($message)) { echo $message; } ?> </span> <input class="form-control" type="text" name="id" placeholder="ID/Roll No." required="true"/><br/> <input class="form-control" type="text" name="batch" placeholder="Type Batch No. (if applicable)"/><br/> <input class="form-control" type="text" name="name" placeholder="Full Name" required="true"/><br/> <input class="form-control" type="text" name="phone" placeholder="Phone" required="true"/><br/> <input class="form-control" type="text" name="email" placeholder="Email"/><br/> <input class="form-control" type="password" name="password" placeholder="Password" required="true"/><br/> <input class="btn btn-primary" type="submit" value="Submit" name="signup" /> OR <a href="<?php echo site_url(); ?>/login">Log In</a> <input name="type" type="hidden" value="p"/> </form> </div>
Page|45
message.php
<div class="col-lg-8 col-lg-offset-2" style="font-size: 1.5em; text-align: center; margin-top: 5em;"> <?php echo $this->session->userdata('message'); $this->session->unset_userdata('message'); ?></div>
login.php
<div class="col-lg-4 col-lg-offset-4" style="margin-top: 2em;"> <h2>Log In</h2> <form method="post" action="<?php echo site_url(); ?>/login"> <span class="text-danger" style="margin-bottom: 1em; display: inline-block;"> <?php if (isset($message) && !empty($message)) { echo $message; } ?> </span> <input class="form-control" type="text" name="id" placeholder="User Id" required="true"/><br/> <input class="form-control" type="password" name="password" placeholder="Password" required="true"/><br/> <input class="btn btn-primary" type="submit" value="Submit" name="login" /> OR <a href="<?php echo site_url(); ?>/signup">Sign Up</a> </form> </div>
live_result.php
<div id="chart"> <canvas id="canvas" height="100" width="600"></canvas></div> <table id="examResult" class="hover row-border stripe table-responsive"> <thead> <tr> <th>Id</th> <th>Name</th> <th>Batch</th> <th>Exam Title</th> <th class="right">Result</th> <th class="right">Finish Time</th> </tr> </thead> <tbody> <?php $names = array(); $marks = array(); foreach ($examAttempts as $attempt) { array_push($names, $attempt->user_id);
Page|46
array_push($marks, $attempt->obtained_mark); ?> <tr> <td><?php echo $attempt->user_id; ?></td> <td><?php echo $attempt->user_name; ?></td> <td><?php echo $attempt->user_batch; ?></td> <td><?php echo $attempt->title; ?></td> <td class="right"><?php echo $attempt->obtained_mark; ?></td> <td class="right"><?php if ($attempt->finish_time != NULL) { $finishTime = new DateTime($attempt->finish_time); echo $finishTime->format('h:i:s a'); } else { echo ""; } ?></td> </tr> <?php } ?> </tbody> </table> <script> $(document).ready(function () { $('#examResult').DataTable({ "jQueryUI": true, "paging": false, "ordering": true, "aoColumnDefs": [{"bSortable": false, "aTargets": []}], "info": true, "scrollY": "450px", "scrollCollapse": true }); $('div.dataTables_length').hide(); var names = <?php echo json_encode($names); ?>; var marks = <?php echo json_encode($marks); ?>; var barChartData = { labels: names, datasets: [ { fillColor: "rgba(151,187,205,0.5)", strokeColor: "rgba(151,187,205,0.8)", highlightFill: "rgba(151,187,205,0.75)", highlightStroke: "rgba(151,187,205,1)", data: marks } ] }; var ctx = $("#canvas").get(0).getContext("2d"); var myChart = new Chart(ctx).Bar(barChartData, { responsive: true }); if (names.length > 0) { $("#canvas").show(); } else { $("#canvas").hide(); } }); </script>
home.php
<div class="col-lg-12"> <div class="col-lg-12" style="margin-bottom: 2em; background: #F6F6F6; border-radius: 6px; padding-bottom: 1em;">
Page|47
<div class="col-lg-3"> <h4>Registered Participant</h4> <span id="participant">??? Person</span> </div> <div class="col-lg-3"> <h4>Live Participant</h4> <span id="liveParticipant">??? Person</span> </div> <div class="col-lg-3"> <h4>Finished Participant</h4> <span id="finishedParticipant">??? Person</span> </div> <div class="col-lg-3"> </div> </div> <div class="col-lg-8"> <h4>Exam Progress</h4> </div> <div class="col-lg-4" style="text-align: right;" > <h4> <input id="live" name="progress_type" type="radio" value="live" checked="true"> Live <input id="all" name="progress_type" type="radio" value="all" > All </h4> </div> <div id="liveResult"> </div> </div> <script> $(document).ready(function () { var siteUrl = '<?php echo site_url(); ?>'; setInterval(function () { loadResult(); countParticipant(); countLiveParticipant(); countFinishedParticipant(); }, 5000); function loadResult() { if ($("#live").is(':checked')) { $.ajax({ type: "POST", url: siteUrl + "/home/examResultProgress", success: function (data) { $("#liveResult").html(data); } }); } else { $.ajax({ type: "POST", url: siteUrl + "/home/examResult", success: function (data) { $("#liveResult").html(data); } }); } } function countParticipant() { $.ajax({ type: "POST", url: siteUrl + "/home/getRegisteredParticipant",
Page|48
success: function (data) { $("#participant").html(data + " person"); } }); } function countLiveParticipant() { $.ajax({ type: "POST", url: siteUrl + "/home/getLiveParticipant", success: function (data) { $("#liveParticipant").html(data + " person"); } }); } function countFinishedParticipant() { $.ajax({ type: "POST", url: siteUrl + "/home/getFinishedParticipant", success: function (data) { $("#finishedParticipant").html(data + " person"); } }); } loadResult(); countParticipant(); countLiveParticipant(); countFinishedParticipant(); }); </script>
list.php
<div class="col-lg-12 col-md-12 col-sm-12"> <div class="navbar"> <a class="btn btn-primary" href="<?php echo site_url() ?>/user/new">Create User</a> </div> <!--Show message--> <?php if ($this->session->userdata('message')) { ?> <div class="alert alert-info" role="alert"> <?php echo $this->session->userdata('message'); $this->session->unset_userdata('message'); ?> </div>
Page|49
<?php } ?> <!--Show Table--> <table id="userList" class="hover row-border stripe table-responsive"> <thead> <tr> <th>ID</th> <th>Batch</th> <th>Name</th> <th>Phone</th> <th>Email</th> <th>Type</th> <th class="right">Action</th> </tr> </thead> <tbody> <?php foreach ($users as $user) { ?> <tr> <td><?php echo $user->id; ?></td> <td><?php echo $user->batch; ?></td> <td><?php echo $user->name; ?></td> <td><?php echo $user->phone; ?></td> <td><?php echo $user->email; ?></td> <td><?php echo $user->type; ?></td> <td class="right"> <a class="btn btn-primary btn-xs" href="<?php echo site_url() ?>/user/edit/<?php echo $user->id; ?>">Edit</a> </td> </tr> <?php } ?> </tbody> </table> </div> <script> $(document).ready(function () { $('#userList').DataTable({ "jQueryUI": true, "paging": true, "ordering": true, "aoColumnDefs": [{"bSortable": false, "aTargets": [6]}], "info": true, "scrollY": "500px", "scrollCollapse": true }); $('div.dataTables_length').hide(); }); </script>
Page|50
edit.php
<div class="col-lg-10 col-md-10 col-sm-12 col-lg-offset-1 col-md-offset-1"> <form action="<?php echo site_url(); ?>/user/update" method="post" > <h3 style="border-bottom: 1px solid #999; margin: 0;">Edit User</h3><br/> <?php if (isset($error)) { ?> <div class="alert alert-warning alert-dismissible"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> <?php echo $error; ?> </div> <?php } ?> <table class="table table-borderless"> <tbody> <?php foreach ($users as $user) { ?> <tr> <td>ID <span style="color:red;">*</span></td> <td style="width: 75%;"><input name="id" class="form-control" placeholder="User ID" value="<?php echo $user->id; ?>" readonly/></td> </tr> <tr> <td>ID <span style="color:red;">*</span></td> <td style="width: 75%;"><input name="batch" class="form-control" placeholder="Batch No. (if applicable)" value="<?php echo $user->batch; ?>"/></td> </tr> <tr> <td>Name <span style="color:red;">*</span></td> <td><input name="name" class="form-control" placeholder="Full Name" value="<?php echo $user->name; ?>" required/></td> </tr> <tr> <td style="vertical-align: top;">Phone <span style="color:red;">*</span></td> <td> <input name="phone" class="form-control" style="margin-bottom: 5px;" placeholder="Phone Number" value="<?php echo $user->phone; ?>" required/> </td> </tr> <tr>
Page|51
<td style="vertical-align: top;">Email <span style="color:red;">*</span></td> <td> <input name="email" class="form-control" style="margin-bottom: 5px;" placeholder="Email" value="<?php echo $user->email; ?>" required/> </td> </tr> <tr> <td>Password <span style="color:red;">*</span></td> <td> <input name="password" class="form-control" style="margin-bottom: 5px;" placeholder="Password" value="<?php echo $user->password; ?>" required/> </td> </tr> <tr> <td>User Type <span style="color:red;">*</span></td> <td> <input type="radio" name="type" value="c" required="true" <?php if ($user->type == "c") echo "checked"; ?>> Controller <input type="radio" name="type" value="p" required="true" <?php if ($user->type == "p") echo "checked"; ?>> Participant </td> </tr> <?php } ?> </tbody> </table> <div style="margin:1em 0 0; border-top: 1px solid #999; padding: 5px; text-align: right;"> <input name="submit" class="btn btn-success" type="submit" value="Save"/> <input name="cancel" class="btn btn-default" type="button" value="Cancel" onclick="javascript:window.location = document.referrer; return false;"/> </div> </form></div>
detail.php
<div class="col-lg-10"> <table class="table"> <tr> <td style="vertical-align: top;"><img width="100" src="<?php echo base_url() . "userimage/" . $student[0]->photo; ?>"/></td> <td style="width: 75%; vertical-align:top;"> <h3><?php echo $student[0]->name; ?></h3> <span class="badge">Id: <?php echo $student[0]->student_id; ?></span> <span class="badge">Batch: <?php echo $student[0]->batch; ?></span> <span class="badge">Faculty: <?php echo $student[0]->faculty; ?></span> <span class="badge">Gender: <?php echo $student[0]->gender; ?></span>
Page|52
</td> </tr> <tr> <td>Father's Name</td> <td><?php echo $student[0]->fathers_name; ?></td> </tr> <tr> <td>Guardian Name</td> <td><?php echo $student[0]->guardian_name; ?></td> </tr> <tr> <td>Guardian Phone</td> <td><?php echo $student[0]->guardian_phone; ?></td> </tr> <tr> <td>Present Address</td> <td><?php echo $student[0]->address; ?></td> </tr> <tr> <td>Phone</td> <td><?php echo $student[0]->phone; ?></td> </tr> <tr> <td>Email</td> <td><?php echo $student[0]->email; ?></td> </tr> <tr> <td>Date of Birth</td> <td><?php echo $student[0]->birth_date; ?></td> </tr> <tr> <td>Last Education Info.</td> <td> <span class="badge">Degree: <?php echo $student[0]->degree; ?></span> <span class="badge">Institute: <?php echo $student[0]->last_education_institute; ?></span> <span class="badge">Passing Year: <?php echo $student[0]->last_education_passing_year; ?></span> <span class="badge">Result: <?php echo $student[0]->last_education_result; ?></span> </td> </tr> <tr> <td>Semester</td> <td><?php echo $student[0]->total_semester; ?></td> </tr> <tr> <td>Tuition Fees</td> <td><?php echo $student[0]->total_fees; ?></td> </tr> <tr> <td>Due</td> <td></td> </tr> </table> </div>
new.php
Page|53
<div class="col-lg-12 col-md-12 col-sm-12"> <form action="<?php echo site_url(); ?>/user/save" method="post" enctype="multipart/form-data"> <h3 style="background-color: #e2e2e2; padding: 5px; margin: 0;">New User</h3><br/> <?php if (isset($error)) { ?> <div class="alert alert-warning alert-dismissible"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> <?php echo $error; ?> </div> <?php } ?> <table class="table table-borderless"> <tbody> <tr> <td>ID <span style="color:red;">*</span></td> <td style="width: 75%;"><input name="id" class="form-control" placeholder="User ID" required/></td> </tr> <tr> <td>Name <span style="color:red;">*</span></td> <td><input name="name" class="form-control" placeholder="Full Name" required/></td> </tr> <tr> <td>Phone <span style="color:red;">*</span></td> <td> <input name="phone" class="form-control" placeholder="Phone Number" required/> </td> </tr> <tr> <td>Email <span style="color:red;">*</span></td> <td> <input name="email" class="form-control" placeholder="Email"/> </td> </tr> <tr> <td>Password <span style="color:red;">*</span></td> <td> <input name="password" class="form-control" placeholder="Password" required/> </td> </tr> <tr> <td>User Type <span style="color:red;">*</span></td> <td> <input type="radio" name="type" value="c" required > Controller <input type="radio" name="type" value="Participant" required> Participant </td> </tr> </tbody> </table> <div style="margin:1em 0 0; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; background-color: #f2f2f2; padding: 10px; text-align: right;"> <input name="submit" class="btn btn-success" type="submit" value="Save"/> <input name="cancel" class="btn btn-default" type="button" value="Cancel" onclick="javascript:window.location = document.referrer; return false;"/> </div> </form> </div>