Graduation Design --- Online Exam System


Preface

Due to the impact of the epidemic, you must have experienced online exams. Today, the seniors will introduce to you a graduation project: an online exam system based on java web.


1. Subject background

With the advancement of science and technology, the way people live and work is changing, not only in people's food, clothing, housing and transportation, but also in the form of examinations that keep pace with the times. The previous exams required a lot of time and energy from the organizer, and needed to screen the exam questions and review the later exam papers. So many steps affected the efficiency of the entire exam. Therefore, a network examination system is proposed to solve some of the above-mentioned problems.

System characteristics analysis

  • Realize no floppy disk, paperless examination.
  • Good security
  • Be able to invigilate effectively.
  • Good versatility and scalability
  • high degree of automation
  • The interface design is reasonable and easy to use
  • The test terminal uses mouse input to answer questions, which speeds up the test takers’ answering speed.

Second, realize the function

functional module

Insert picture description here
Insert picture description here

Function description

(1) Student end:

  • Login module: login function;
  • Network test module: You can take the test and view the test results. After submitting the test papers, the teacher can view the wrong questions;

(2) Super administrator terminal:

  • Login module: realize the administrator login function;
  • User management module: realize the functions of adding, modifying and viewing user information;
  • Role authority management module: realize the function of adding, modifying and viewing roles;
  • Test paper management module: realize the functions of adding, modifying and viewing test paper information;
  • Test question management module: realize the function of adding, modifying and viewing test information;

(3) Test Manager (Teacher):

  • Test paper management module: realize the functions of adding, modifying and viewing test paper information;
  • Test question management module: realize the function of adding, modifying and viewing test information;

running result

Insert picture description here
As above, the login page is mainly to give the user the right to log in to the system by verifying the user account, so that a series of management operations can be performed on the system (the interface is the system homepage), and different options (student/administrator) can be selected by clicking the button Login mode. And there is corresponding verification.

Insert picture description here
Insert picture description here
On this page, you can select the corresponding test paper and answer the questions. During the answering process, the green question number is marked as answered, and there is a countdown to the answer at the top (you can set it through the background). The countdown is 0 or you can click to hand in the paper to realize the function of handing in and judging the paper.

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
As above, the system function management page is mainly used to display all the functions of the project. On this page, you can create new top-level functions, editing functions (sub-functions), fuzzy search queries and other operations.

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
As above, the order page is mainly for querying and editing basic user information and adding new users.

Insert picture description here
As above, the
main functions of the role management interface are the assignment of role permissions, editing roles, adding roles, fuzzy search according to role names, and querying all roles by page.

Insert picture description here
Insert picture description here
Insert picture description here

The above is, the test question management interface. The
test question management page is a pagination (including fuzzy search) for the teacher to view and modify the test questions, and add test questions (to prevent repeated insertion of the same test questions)

Part of the implementation code

Here is the implementation code of the countdown to the paper:

计时器(到时自动交卷)功能,交卷时判断试卷是否有未答题、计算得分等功能都在paper.jsp中用javascript来实现

		// 交卷功能
		判断是否有未答题目
		function unAnswer(){
    
    
			if(unanswer != 0){
    
    
				layer.open({
    
    
				title:'警告', 
				content: "还有"+unanswer+"道题目未做!",
				icon:2,
				end:function(){
    
    
					postAnswer();
				}
				});
			}else{
    
    
				postAnswer();
			}
		}
		
计算得分
		function getScore(){
    
    
			//var spid = n
			$.post({
    
    
		        url: basePath + 'user/studentPaper?cmd=score&userid='+'${userid}'+'&spid='+ now.getTime(),
		        contentType: false,
		        processData: false,
		        success: function(res) {
    
    
		            console.log(res)
		            layer.open({
    
    
						title:'得分', 
						content: res,
						icon:1,
						end:function(){
    
    
							location.href = basePath+'user/studentPaper?cmd=stupaper';
						}
					})
		        },
		        error: function(res) {
    
    
		            console.log('error');
		            
		        }
		    })
			
		}
		
		
倒计时功能
		//小于10的数字前面补0
		function p(n){
    
    
			return n<10?'0'+n:n;
		}
		//获取当前时间
		var now=new Date();
		//获取结束时间
		var endDate=new Date();
		//设置考试时间(单位分钟)
		endDate.setMinutes(now.getMinutes()+20)
		function getTime(){
    
               
			var startDate=new Date();
			var countDown=(endDate.getTime()-startDate.getTime())/1000;
			var h=parseInt(countDown/(60*60)%24);
			var m=parseInt(countDown/60%60);
			var s=parseInt(countDown%60);                
			$('.time').html(p(h)+'时'+p(m)+'分'+p(s)+'秒');
			if(countDown<=0){
    
    
			document.getElementById('time').innerHTML='考试结束';
			layer.open({
    
    
				title:'警告', 
				content: '考试时间到,试卷已经提交!',
				icon:5,
				end:function(){
    
    
					unAnswer();
				}
			})
			}else{
    
    
				setTimeout('getTime()',500);
			}              
		}

Get the complete project

Seek help from senior

Guess you like

Origin blog.csdn.net/HUXINY/article/details/111883280