Professional Documents
Culture Documents
EXAMINATION SYSTEM
: IN PERSPECTIVE OF ACM LIVE SELECTION
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
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
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
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
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
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 | 1
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
• 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
Page | 2
CHAPTER 2: LITERATURE REVIEW
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).
(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
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 | 3
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
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
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 | 4
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
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
Ayo et al (2007) proposed a model for e-Examination in Nigeria where all applicants are
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
Page | 5
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
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
management features, it can be used to create a private website for dynamic online
Page | 6
CHAPTER 3: METHODOLOGY
3.1 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 | 7
3.2 Justification of Methodology
• Easy to manage. Each phase has specific deliverables and a review process.
• Works well for smaller projects where requirements are very well understood.
Requirements: All possible requirements of the system were developed are captured in this
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
Implementation: With inputs from system design, the system was first developed in small
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
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 | 8
CHAPTER 4: ANALYSIS, DESIGN AND DEVELOPMENT
To gather the requirements we had several discussions with supervisor and teachers. We have
Page | 9
4.2 Analysis of Requirement
The following answers were collected after a short survey to collect requirements
Page | 10
Features and Functionalities
1. Participant’s registration
3. User view/create/edit
1. HTML: It has been used because of it is the most popular pre-processed language which
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
Page | 11
4.3 ER Diagram
Figure 2: ER Diagram
Page | 12
Figure 3: Database Design
Page | 13
Student: Act as participant role
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
The following use cases describe the sequences of interaction between user and system. It
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 | 14
Register Fill Online
(include)
Form
Answer
Question (extend)
Finish Exam
View Exam
Result
Student
Add Q.
Create (extend)
Question
(extend)
Edit Q.
Create Exam
Events (extend) Delete
Teacher Exam Event
(extend)
Edit User
Page | 15
4.5.1 Sign Up Use Case:
Alternative actions
1. If the user does not need to signup
A. User may wish to login
B. Leave the site
Page | 16
4.5.2 Login Use Case:
Basic actions
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 | 17
4.5.3 Add User Use Case:
Basic actions
Alternative actions
Page | 18
4.5.4 Edit User Use Case:
Basic actions
Alternative actions
1. If the user already exists
A. Try with different information
B. Go to step 2
Page | 19
4.5.5 Add Question Use Case:
Basic actions
Alternative actions
Page | 20
4.5.6 Edit Question Use Case:
Basic actions
Alternative actions
Page | 21
4.5.7 Create Exam Use Case
Basic actions
Alternative actions
Page | 22
4.5.8 Exam Participation Use Case:
Basic actions
Alternative actions
Page | 23
CHAPTER 5: PROJECT DESCRIPTION
5.1 Interfaces
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.
Page | 24
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
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
Addition controller can view the exam progress graphically thus they can understand the
Page | 25
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 | 26
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
Page | 27
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
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
Additionally at the right top of the all page there is a link to log out the session.
Page | 28
Figure 13: Participant Home Page
In this page participant can view his exam attempt information. He/she can view which exam
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 | 29
5.2 Result and Testing
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
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
Black-box Testing: Black-box testing treats the software as a "black box", examining
include: equivalence partitioning, boundary value analysis, all-pairs testing, state transition
tables, decision table testing, fuzz testing, model-based testing, use case testing, exploratory
Page | 30
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
12
10
6
Error Found
4
Error Solved
2
0
Unit Testing Bottom-up Non Security Portability
Integration Functional Testing Testing
Testing
Page | 31
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
Page | 32
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.
6.3 Limitation
Page | 33
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.
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.
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
Page | 34
APPENDIX
Database Script
Page | 35
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Page | 36
Code Script
exam_paper.php
$("#finish").click(function () {
Page | 37
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]);
$("#next").click(function () {
saveUserAnswers();
Page | 38
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++;
});
Page | 39
}
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 | 40
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
Page | 41
</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;">
answer_paper.php
Page | 42
<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 | 43
<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
Page | 44
message.php
login.php
live_result.php
Page | 45
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
});
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 | 46
<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 | 47
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
<!--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 | 48
<?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 | 49
edit.php
Page | 50
<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>
<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 | 51
</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 | 52
<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>
Page | 53