辅助教学系统平台的设计与实现 论文_第1页
辅助教学系统平台的设计与实现 论文_第2页
辅助教学系统平台的设计与实现 论文_第3页
辅助教学系统平台的设计与实现 论文_第4页
辅助教学系统平台的设计与实现 论文_第5页
已阅读5页,还剩37页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、船山学院船山学院 毕业设计毕业设计( (论文论文) ) 论文题目辅助教学系统平台的设计与实现 -习题库模块 指导教师职称 学生姓名学号 专业班级 系 主 任院长 起止时间2012 年 11 月 23 日至 2013 年 5 月 30 日 2013 年 5 月 30 日 目 录 摘要.1 abstract.2 第一章绪论.3 1.1 引言. 3 1.2 选题的背景和意义. 3 1.2.1 选题背景.3 1.2.2 研究意义.4 第二章 相关技术综述. 5 2.1jqueryeasyui 技术的介绍.5 2.2ajax 技术介绍.6 2.3mybatis 技术介绍.6 2.4spring mvc

2、技术介绍.7 2.4.1spring mvc 原理. 7 第三章 辅助教学系统平台的设计. 9 3.1 辅助教学系统平台设计需求分析.9 3.1.1 定义. 9 3.1.2 目标. 9 3.1.3 系统中用户的操作流程图. 10 3.1.4 系统数据库 er 图. 10 3.1.5 功能需求. 11 3.2 辅助教学系统平台设计开发环境.11 3.3 辅助教学系统平台的总体设计.12 3.3.1 系统总体设计. 12 3.3.2 系统详细设计. 13 第四章辅助教学系统平台的实现. 16 4.1 用户模块的实现.16 南华大学船山学院毕业设计(论文) 第 1页 共 39页 4.2 习题模块的设

3、计实现.19 第五章 总结. 23 参考文献. 24 谢 辞. 25 第六章 附录代码. 26 6.1 exercise.java 类代码.26 6.2 exerciseaction.java 类代码.28 6.3 exercise.jsp 类代码.32 6.4 onlineanswer.jsp 类代码.37 南华大学船山学院毕业设计(论文) 第 1页 共 39页 辅助教学系统平台的设计与实现 -习题库模块 摘要摘要:如今信息化已经成为各行各业发展的趋势。在高校内部,以往的教学系统不能 够很好的集成和维护,数据库不统一导致信息分散,各个系统无法进行交互。因此, 高校需要有统一的数字化信息平台来

4、为老师和学生的学习、工作和交流服务。让学 生能在空余时间更好的学习巩固所学的知识,让老师能在空余时间跟学生进行学习 上多方面的交流,以多种途径为学生传道、授业、解惑! 教学辅助平台系统的出现正是解决以上问题的数字化信息平台。本系统分为前 台在线学习子系统,包括在线答题、答疑解惑等模块;已经后台老师录入题目和管 理学生注册信息系统, 包括用户添加、 习题添加等模块!系统有管理员 (老师) 、 学生、 两类角色。本系统的使用,可以使传统课堂教学得到很好的延伸和拓展,给学生的 课后学习和教师的教学工作以及相互之间的交流提供了很好的平台。 关键字:关键字:教学辅助平台系统;习题;在线答疑 南华大学船山

5、学院毕业设计(论文) 第 2页 共 39页 design and implementation of a platform auxiliary teaching system -exercise library module abstract:today, information has become the trend of the development of all walks of life. in universities, the teaching system in the past can not integrate and maintain good , not unifie

6、d in database information scattered, each system can not interact. therefore, colleges and universities need to have digital information platform for teachers and students to learn, work and communication service. let students in their spare time to study better consolidate the knowledge, let the te

7、acher can make earning more exchanges with the students in their spare time, in a variety of ways for students to teaching and working with you! auxiliary teaching platform system is the digital information platform to solve the above problems. this system is divided into front ,online learning syst

8、em, including module online answer, answer doubts; have the backstage teacher input questions and management student registration information system, including adding users, exercises adding module ! system administrator (teachers, students), two kinds of roles. the use of the system, can make the t

9、raditional classroom teaching to obtain the very good extension and expansion, provides a good platform for students after-school learning and teachers teaching and interaction. keywords: teaching auxiliary platform system;exercises online;q try usermapper.adduser(userinfo); jsonobject obj = new jso

10、nobject(); obj.addproperty(code, 1); obj.addproperty(msg, 添加成功!); response.getwriter().write(obj.tostring(); catch (exception e) e.printstacktrace(); 南华大学船山学院毕业设计(论文) 第 17页 共 39页 jsonobject obj = new jsonobject(); obj.addproperty(code, 0); obj.addproperty(msg, 添加失败!); response.getwriter().write(obj.

11、tostring(); 并在添加好的用户里直接从数据库中读取获得列表: publicvoidgetallusers(httpservletrequestrequest,httpservletresponse response) throws ioexception list userinfos =usermapper.getallusers(); request.setattribute(allusers, userinfos); try request.getrequestdispatcher(/admin/users.jsp).forward(request, response); cat

12、ch (servletexception e) e.printstacktrace(); 也用相同于添加的方式,实现了用户列表的删除,实现如图所示: 图 4.2 南华大学船山学院毕业设计(论文) 第 18页 共 39页 图 4.3 南华大学船山学院毕业设计(论文) 第 19页 共 39页 4.24.2 习题模块的设计实现习题模块的设计实现 由于本系统中定义用户和用户的基本操作与定义习题和习题基本操作编写技术基 本相同,这里便不再做多余赘述! 有必要提及的是在学生登陆系统答题时调用数据库随机产生习题列表并计算得 分的一些编写。 在习题活动(exerciseaction)的类中,设计了习题的一些基

13、本操作方法,一 如添加、获取列表、修改、删除等。实现如图 4.3.1、图 4.3.2 本系统在设计过程中为了让学生能在登陆后可以在线答题,还设计了一些对于习 题的其他方法,例如将习题库中的习题随机抽取若干形成一个新的习题列表。学生 可以在新形成的列表中回答题目选项: publicvoidbuildexercise(httpservletrequestrequest,httpservletresponse response) throws ioexception try list exercises =exercisemapper.buildexercise(); request.setattr

14、ibute(buildexercise, exercises); buildanswer2session(exercises,request); request.getrequestdispatcher(/admin/onlineanswer.jsp).forward(request, response); catch (servletexception e) e.printstacktrace(); 并且在形成列表,学生回答完题目后,存储习题的答案: private void buildanswer2session(list exercises,httpservletrequest requ

15、est) mapsessionexercises=new hashmap(); for(int i = 0;iexercises.size();i+) sessionexercises.put(exercises.get(i).getid(), exercises.get(i).getanswer(); request.getsession().setattribute(sessionkey.online_answer, sessionexercises); 南华大学船山学院毕业设计(论文) 第 20页 共 39页 接着获取习题的正确答案,进行匹配计算得分,先判断习题列表的长度是否为 20,设

16、置总分为 100,并设计每题得分为 5 分,答错一个或者没答一个扣 5 分。 public void scoring(httpservletrequest request,httpservletresponse response) throws ioexception string answers = request.getparameter(answers); if(answers=null|.equals(answers.trim()return; maponline_exerise_answer=(map)request.getsession().getattribute(session

17、key.online_answer); string s_answers = answers.split(|); if(s_answers.length!=20)return; int fullscore = 100; string temp = null; int trueanswer = -1; for(int i=0;is_answers.length;i+) temp = s_answersi.split(=); if(temp.length!=2) return; trueanswer= online_exerise_answer.get(integer.parseint(temp0

18、); if(!temp1.equalsignorecase(trueanswer+) fullscore-=5; jsonobject obj = new jsonobject(); obj.addproperty(code, 1); obj.addproperty(msg, 得分:+fullscore); response.getwriter().write(obj.tostring(); 实现的效果如图:4.3.3 南华大学船山学院毕业设计(论文) 第 21页 共 39页 图 4.4 图 4.5 南华大学船山学院毕业设计(论文) 第 22页 共 39页 图 4.6 南华大学船山学院毕业设计

19、(论文) 第 23页 共 39页 第五章第五章 总结总结 本系统实现了老师和学生在线的一种教学模式,虽然是通过简单、传统的出题、 答题,但操作简单而且有效,让老师能在线出题使学生对所学知识进行复习和巩固! 此系统还有好的延展性,有许多诸如在线视频教学以及在线交流还有文档共享等多 种功能可以实现和编写以及改进! 南华大学船山学院毕业设计(论文) 第 24页 共 39页 参考文献参考文献 1林峰,彭加亮,徐岩. 基于 jsp 和 servlet 技术的远程考试系统设计j.科技咨询导报, 2007 2魏东,陈晓江,房鼎益基于 soa 体系结构的软件开发方法研究j 微电子学与计算机 3周颢编. 网络编

20、程语言 jsp 实例教程m.北京:电子工业出版社.2002.6 4杨正洪.中文sql server 2000 关系数据库系统管理和开发指南m.机械工业出社,2001,9. 5耿祥义,张跃平.jsp 实用教程m.北京:清华大学出版社,2008.5 6孙卫琴精通 hibernate:java 对象持久化技术详解m北京:电子工业出版社,2005。 7何玉洁,李宝安数据库系统教程北京:人民邮电出版社 2010.9 8张娜 java web 开发技术教程 北京:清华大学出版社 2011.1 9 bruceeckel.thinkinginjavam.uppersaddleriver,newjersey,u

21、sa: prenticehall,2006 10明日科技 java 从入门到精通(第 3 版)北京:清华大学出版社 2012.9 11(美)埃克尔 著,陈昊鹏 译.java 编程思想(第 4 版) .北京:机械工业出版社 2007.6 12孙一林,彭波 .jsp 数据库编程实例 .北京:清华大学出版社,2002.8 13飞思科技产品研发中心.jsp 应用开发详解北京:电子工业出版社,2003.9 14孙涌.现代软件工程 .北京:希望电子出版社,2003.8 15brown 等. jsp 编程指南(第二版) .北京:电子工业出版社 ,2003 年 3 月 16朱红,司光亚.jsp web 编程指

22、南.电子工业出版社, 2001.9 17赛奎春.jsp 工程应用与项目实践. 机械工业出版社, 2002.8 18孙卫琴、李洪成tomcat 与 java web 开发技术详解 北京:电子工业出版社,2004 19毕建信基于 mvc 设计模式的 web 应用研究与实现 武汉:武汉理工大学,2006 20craigwalls,ryanbreidenbach.springinactionm.manningpublications. 2006 21joshuabloch.effectivejavam.piscataway,n.j:ieeepress,2009 南华大学船山学院毕业设计(论文) 第 2

23、5页 共 39页 谢谢 辞辞 感谢论文完成过程中给我帮助、解决了设计中很多不懂技术的老师、同学,感 谢我的室友对我的理解。在此特地感谢我的导师不辞劳苦地为我修改论文,并教会 我制作优秀论文的方法,在她教导中我学到了许多东西,谢谢我的导师。感谢南华 大学计算机学院为我提供一个这样好的毕业设计题目。最后,感谢互联网、论坛中 热心的网友提供的全面的学习资源和问题解答。 南华大学船山学院毕业设计(论文) 第 26页 共 39页 第六章第六章 附录代码附录代码 6.1 exercise.java 类代码类代码 package com.aweb.entity; /* * 习题类 * authoradmin

24、istrator * */ public class exercise private int id; private string question; private string option_a; private string option_b; private string option_c; private string option_d; private int answer; public int getid() return id; public void setid(int id) this.id = id; public string getquestion() retur

25、n question; public void setquestion(string question) this.question = question; public string getoption_a() return option_a; public void setoption_a(string option_a) this.option_a = option_a; public string getoption_b() return option_b; 南华大学船山学院毕业设计(论文) 第 27页 共 39页 public void setoption_b(string opti

26、on_b) this.option_b = option_b; public string getoption_c() return option_c; public void setoption_c(string option_c) this.option_c = option_c; public string getoption_d() return option_d; public void setoption_d(string option_d) this.option_d = option_d; public int getanswer() return answer; public

27、 void setanswer(int answer) this.answer = answer; public exercise(int id, string question, string option_a, string option_b, string option_c, string option_d, int answer) super(); this.id = id; this.question = question; this.option_a = option_a; this.option_b = option_b; this.option_c = option_c; th

28、is.option_d = option_d; this.answer = answer; public exercise() 南华大学船山学院毕业设计(论文) 第 28页 共 39页 6.2 exerciseaction.java 类代码类代码 package com.aweb.action; import java.io.ioexception; import java.util.arraylist; import java.util.hashmap; import java.util.list; import java.util.map; import javax.servlet.ser

29、vletexception; import javax.servlet.http.httpservletrequest; import javax.servlet.http.httpservletresponse; import org.springframework.beans.factory.annotation.autowired; import org.springframework.stereotype.controller; import org.springframework.web.bind.annotation.requestmapping; import com.aweb.

30、entity.exercise; import com.aweb.entity.userinfo; import com.aweb.mapper.exercisemapper; import com.aweb.mapper.usermapper; import com.aweb.utils.sessionkey; import com.google.gson.jsonobject; /* * 习题库 action */ controller public class exerciseaction autowired exercisemapper exercisemapper; requestm

31、apping(/addexercise.do) public void addexercise(httpservletrequest request,httpservletresponse response) throws ioexception string question = request.getparameter(question); string option_a = request.getparameter(option_a); string option_b = request.getparameter(option_b); string option_c = request.

32、getparameter(option_c); string option_d = request.getparameter(option_d); string answer = request.getparameter(answer); 南华大学船山学院毕业设计(论文) 第 29页 共 39页 if(question = null| .equals(question.trim() | option_a = null| .equals(option_a.trim() | option_b = null| .equals(option_b.trim() | option_c = null| .e

33、quals(option_c.trim() | option_d = null| .equals(option_d.trim() | answer = null| .equals(answer.trim() return; int i_answer = 0; try i_answer = integer.parseint(answer); catch (exception e) exercise exercise = new exercise(0, question, option_a, option_b, option_c, option_d, i_answer); try exercise

34、mapper.addexercise(exercise); jsonobject obj = new jsonobject(); obj.addproperty(code, 1); obj.addproperty(msg, 添加成功!); response.getwriter().write(obj.tostring(); catch (exception e) e.printstacktrace(); jsonobject obj = new jsonobject(); obj.addproperty(code, 0); obj.addproperty(msg, 添加失败!); respon

35、se.getwriter().write(obj.tostring(); requestmapping(/getallexerise.do) public void getallexerise(httpservletrequest request,httpservletresponse response) throws ioexception list exercises =exercisemapper.getallexercise(); request.setattribute(allexerises, exercises); try request.getrequestdispatcher

36、(/admin/exercises.jsp).forward(request, response); catch (servletexception e) e.printstacktrace(); 南华大学船山学院毕业设计(论文) 第 30页 共 39页 requestmapping(/buildexercise.do) public void buildexercise(httpservletrequest request,httpservletresponse response) throws ioexception try list exercises =exercisemapper.b

37、uildexercise(); request.setattribute(buildexercise, exercises); buildanswer2session(exercises,request); request.getrequestdispatcher(/admin/onlineanswer.jsp).forward(request, response); catch (servletexception e) e.printstacktrace(); privatevoidbuildanswer2session(listexercises,httpservletrequest re

38、quest) map sessionexercises = new hashmap(); for(int i = 0;iexercises.size();i+) sessionexercises.put(exercises.get(i).getid(), exercises.get(i).getanswer(); request.getsession().setattribute(sessionkey.online_answer, sessionexercises); requestmapping(/scoring.do) publicvoidscoring(httpservletreques

39、trequest,httpservletresponseresponse) throws ioexception string answers = request.getparameter(answers); if(answers=null|.equals(answers.trim()return; maponline_exerise_answer=(map)request.getsession().getattribute(sessionkey.online_answer); string s_answers = answers.split(|); if(s_answers.length!=

40、20)return; int fullscore = 100; string temp = null; int trueanswer = -1; for(int i=0;is_answers.length;i+) temp = s_answersi.split(=); if(temp.length!=2) return; 南华大学船山学院毕业设计(论文) 第 31页 共 39页 trueanswer = online_exerise_answer.get(integer.parseint(temp0); if(!temp1.equalsignorecase(trueanswer+) fulls

41、core-=5; jsonobject obj = new jsonobject(); obj.addproperty(code, 1); obj.addproperty(msg, 得分:+fullscore); response.getwriter().write(obj.tostring(); requestmapping(/delexercise.do) public void delexercise(httpservletrequest request,httpservletresponse response) throws ioexception string id = reques

42、t.getparameter(id); if(id = null| .equals(id.trim() return; int i_id = 0; try i_id = integer.parseint(id); catch (exception e) try exercisemapper.delexercise(i_id); jsonobject obj = new jsonobject(); obj.addproperty(code, 1); obj.addproperty(msg, 删除成功!); response.getwriter().write(obj.tostring(); ca

43、tch (exception e) e.printstacktrace(); jsonobject obj = new jsonobject(); obj.addproperty(code, 0); obj.addproperty(msg, 删除失败!); response.getwriter().write(obj.tostring(); 南华大学船山学院毕业设计(论文) 第 32页 共 39页 6.3 exercise.jsp 类代码类代码 script type=text/javascript src=/js/jquery-1.8.0.min.js 习题列表 .even backgrou

44、nd-color: #cef; /* pale blue for even rows */ $(function() var contextpath = ; $(tr:even).addclass(even); /奇偶变色,添加样式 $(.del).click(function() if(confirm(确定删除?) var id = $(this).attr(qid); var obj = $(this); $.ajax( type: post, url: contextpath+/delexercise.do, datatype: json, data: id:id, success: f

45、unction(data) if(data.code=1) obj.parent().parent().remove(); else alert(data.msg); , error:function(request,msg,exception) 南华大学船山学院毕业设计(论文) 第 33页 共 39页 alert(错误类型:+msg+n错误信息:+exception.message); ); ); ); % list exercises = (list)request.getattribute(allexerises); % 题目 选项a 选项b 选项c 选项d 答案 操作 修改aclass

46、=del href=javascript:void(0); qid=删除 addexercise.jsp 南华大学船山学院毕业设计(论文) 第 34页 共 39页 script type=text/javascript src=/js/jquery-1.8.0.min.js 添加习题 $(function() var contextpath = ; $(#btn_add).click(function() var question = $(#question).val(); var option_a = $(#option_a).val(); var option_b = $(#option_

47、b).val(); var option_c = $(#option_c).val(); var option_d = $(#option_d).val(); var answer = $(#answer).val(); if($.trim(question)=|$.trim(option_a)=|$.trim(option_b)=|$.trim(option_c) =|$.trim(option_d)=|$.trim(answer)=) alert(请将信息填写完整!); return; $.ajax( type: post, url: contextpath+/addexercise.do, datatype: json, data: question:question,option_a:option_a,option_b:option_b,option_c:option_c,optio n_d:option_d,answer:answer, success: function(data) if(data.code=1) alert(data.msg); clear(); else alert(data.msg); , 南华大学船山学院毕业设计(论文) 第 35页 共 39页 error:functio

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论