




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、ASP.NET课程设计实验题目: 在线考试系统 学 院:计算机科学学院专 业:网络工程班 级:网络01班小 组 成 员: 2014年 6 月 26日目录一、实验名称4二、实验目的4三、实验的运行环境4四、实验整体功能介绍41.考试功能41)主要题型42)组卷方式5人工选题:5随机抽题:5手工输入:53)考试安排5考试安排的流程为:54)评卷工作5对于手工选题组成的卷子:5对于随机抽题组成的卷子:5对于手工输入组成的卷子:65)成绩管理62.后台管理功能61)系统管理62)题型管理63)试卷管理64)考试管理65)账号管理63.表说明6五、程序运行结果7登录界面7系统菜单(考试安排)9系统菜单(
2、考试记录)10系统菜单(考试成绩)11系统菜单(修改密码)12在线考试系统后台管理(在线考试系统介绍)13在线考试系统后台管理(部门管理)14在线考试系统后台管理(人员管理)15题型管理(填空题管理)16题型管理(判断题管理)17题型管理(单选题管理)18题型管理(多选题管理)19题型管理(简答题管理)20试卷管理(手工选题)21试卷管理(随机抽题)22试卷管理(手工输入)23考试管理(考试安排)24考试管理(评卷管理)25考试管理(成绩管理)26账号管理(修改密码)27新用户注册28六、实验源代码(由于源码数量过多所以这里只能列举出部分)28七、实验心得39一、实验名称在线考试系统二、实验目
3、的 将本学期学到的ASP.NET知识结构系统化地组织起来并用其进行动态网页的设计 三、实验的运行环境 操作系统:window 8.1 系统运行环境:visual studio 2010 sql server 2008 .net framework 2.0四、实验整体功能介绍1.考试功能1)主要题型填空题、判断题、单选题、多选题、简答题。2)组卷方式 人工选题:通过选择各种题型的题库组成卷子,最多可以由5种题型组成(填空题、判断题、单选题、多选题、简答题);随机抽题:通过设置各类题型的题库数量,由系统随机抽取试题组成卷子,最多可以由3种题型组成(判断题、单选题、多选题);手工输入:通过手工输入试
4、题内容的文本,可以事先用word把考题设计好,然后粘贴到编辑框中。3)考试安排考试安排的流程为:选择试卷分类-选择试卷-分配分数-选择考试人员-设置考试参数-提交4)评卷工作对于手工选题组成的卷子:判断题、单选题和多选题由系统自动评分,其他由人工评分;对于随机抽题组成的卷子:完全由系统自动评分,也就是考生一提交试卷,成绩立马出来;对于手工输入组成的卷子:由人工评分。5)成绩管理包含成绩查询、成绩统计。2.后台管理功能1)系统管理 系统介绍 部门管理 人员管理2)题型管理填空题 判断题 单选题 多选题 简答题3)试卷管理 手工选题 随机抽题 手工输入4)考试管理考试安排 评卷管理 成绩管理5)账
5、号管理 修改密码 参加考试 退出3.表说明表说明:T_Department:部门表T_Paper:手工输入试卷 (其中的paperType表示试卷所属部门)T_Test:考试安排 (其中的paperType:1:人工选题,2:随机抽题,3:手工输入)T_TestMark:考试成绩T_TestRecorder:考试记录T_User:用户表T_SubjectOfFillBlank:填空题题库T_SubjectOfJudge:判断题题库T_SubjectOfSingleSelection:单选题题库T_SubjectOfMultiSelection:多选题题库T_SubjectOfSimpleAns
6、wer:简答题题库T_PaperByRandomSelection:随机抽题试卷T_PaperByManualSelection:人工选题试卷T_PaperByManualSelection_Subject:人工选题试卷的试题集(其中的subjectType:1:填空题,2:判断题,3:单选题,4:多选题,5:简答题)T_PaperByRandomSelection_Subject:随机抽题试卷的试题集(其中的subjectType:1:填空题,2:判断题,3:单选题,4:多选题,5:简答题)五、程序运行结果登录界面系统菜单(考试安排)系统菜单(考试记录)系统菜单(考试成绩)系统菜单(修改密码
7、)在线考试系统后台管理(在线考试系统介绍)在线考试系统后台管理(部门管理)在线考试系统后台管理(人员管理)题型管理(填空题管理)题型管理(判断题管理)题型管理(单选题管理)题型管理(多选题管理)题型管理(简答题管理)试卷管理(手工选题)试卷管理(随机抽题)试卷管理(手工输入)考试管理(考试安排)考试管理(评卷管理)考试管理(成绩管理)账号管理(修改密码)新用户注册六、实验源代码(由于源码数量过多所以这里只能列举出部分)管理登录:using System;using System.Collections;using System.Configuration;using System.Data;u
8、sing System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Collections.Generic;using Entity;using BLL;public partial class Admin_Marking_MarkPaper2 : System.Web.UI.Page/管理员的MarkP
9、aper2页面 protected void Page_Load(object sender, EventArgs e)/页面加载 RoleCheck.DenyLogin();/拒绝非管理员用户的登陆,拒绝后跳转到登陆页面 if (!IsPostBack) BindPaperInfo(); private int paperID/私有paperID get return Helper.GetUrlParmValue(paperID); /获取paperID private int testID/私有testID get return Helper.GetUrlParmValue(testID)
10、; /获取testID private int recorderID/私有recorderID get return Helper.GetUrlParmValue(recorderID); /获取recorderID private void BindPaperInfo()/人工评卷页面 PaperByManualSelection paper = new BLLPaperByManuaSelection().GetPaper(testID,paperID,recorderID);/得到所需要的页面 if (paper != null) int totalScoresForTester = 0
11、;/计算分数 rptSubjectOfFillBlankList.DataSource= paper.FillBlankList; rptSubjectOfFillBlankList.DataBind(); lblFillBlankListCount.Text= paper.FillBlankList.Count.ToString(); if (paper.FillBlankList.Count 0)/填空题页面框 lblFillBlankScores.Text= paper.FillBlankList0.Scores.ToString(); lblFillBlankTotalScores.T
12、ext= (paper.FillBlankList0.Scores* paper.FillBlankList.Count).ToString(); int totalScoresForTesterOfSubject = 0; foreach (SubjectOfFillBlank subject in paper.FillBlankList)/与参考答案匹配,并计算相应分数 totalScoresForTester += subject.ScoresForTester; totalScoresForTesterOfSubject+= subject.ScoresForTester; lblFi
13、llBlankTotalScoresForTester.Text= totalScoresForTesterOfSubject.ToString(); rptSubjectOfJudgeList.DataSource = paper.JudgeList; rptSubjectOfJudgeList.DataBind(); lblJudgeListCount.Text = paper.JudgeList.Count.ToString(); if (paper.JudgeList.Count 0)/判断题页面框 lblJudgeScores.Text= paper.JudgeList0.Score
14、s.ToString(); lblJudgeTotalScores.Text = (paper.JudgeList0.Scores * paper.JudgeList.Count).ToString(); int totalScoresForTesterOfSubject = 0; foreach (SubjectOfJudge subject in paper.JudgeList)/与参考答案匹配,并计算相应分数 totalScoresForTester += subject.ScoresForTester; totalScoresForTesterOfSubject+= subject.S
15、coresForTester; lblJudgeTotalScoresForTester.Text= totalScoresForTesterOfSubject.ToString(); rptSubjectOfSingleSelectionList.DataSource= paper.SingleSelectionList; rptSubjectOfSingleSelectionList.DataBind(); lblSingleSelectionCount.Text= paper.SingleSelectionList.Count.ToString(); if (paper.SingleSe
16、lectionList.Count 0)/单选题页面框 lblSingleSelectionScores.Text= paper.SingleSelectionList0.Scores.ToString(); lblSingleSelectionTotalScores.Text= (paper.SingleSelectionList0.Scores* paper.SingleSelectionList.Count).ToString(); int totalScoresForTesterOfSubject = 0; foreach (SubjectOfSingleSelection subje
17、ct in paper.SingleSelectionList)/与参考答案匹配,并计算相应分数 totalScoresForTester += subject.ScoresForTester; totalScoresForTesterOfSubject+= subject.ScoresForTester; lblSingleSelectionTotalScoresForTester.Text= totalScoresForTesterOfSubject.ToString(); rptSubjectOfMultiSelectionList.DataSource= paper.MultiSele
18、ctionList; rptSubjectOfMultiSelectionList.DataBind(); lblMultiSelectionCount.Text= paper.MultiSelectionList.Count.ToString(); if (paper.MultiSelectionList.Count 0)/多选题页面框 lblMultiSelectionScores.Text= paper.MultiSelectionList0.Scores.ToString(); lblMultiSelectionTotalScores.Text= (paper.MultiSelecti
19、onList0.Scores* paper.MultiSelectionList.Count).ToString(); int totalScoresForTesterOfSubject = 0; foreach (SubjectOfMultiSelection subject in paper.MultiSelectionList)/与参考答案匹配,并计算相应分数 totalScoresForTester += subject.ScoresForTester; totalScoresForTesterOfSubject+= subject.ScoresForTester; lblMultiS
20、electionTotalScoresForTester.Text= totalScoresForTesterOfSubject.ToString(); rptSubjectOfSimpleAnswerList.DataSource= paper.SimpleAnswerList; rptSubjectOfSimpleAnswerList.DataBind(); lblSimpleAnswerCount.Text= paper.SimpleAnswerList.Count.ToString(); if (paper.SimpleAnswerList.Count 0)/简答题页面框 int to
21、talScores = 0; foreach (SubjectOfSimpleAnswer subject in paper.SimpleAnswerList)/与参考答案匹配,并计算相应分数 totalScores += subject.Scores; lblSimpleAnswerTotalScores.Text= totalScores.ToString(); int totalScoresForTesterOfSubject = 0; foreach (SubjectOfSimpleAnswer subject in paper.SimpleAnswerList) totalScore
22、sForTester += subject.ScoresForTester; totalScoresForTesterOfSubject+= subject.ScoresForTester; lblSimpleAnswerTotalScoresForTester.Text= totalScoresForTesterOfSubject.ToString(); lblTotalScores.Text= (Convert.ToInt32(lblFillBlankTotalScores.Text)/显示各个不同测试题的页面框 + Convert.ToInt32(lblJudgeTotalScores.
23、Text) + Convert.ToInt32(lblSingleSelectionTotalScores.Text) + Convert.ToInt32(lblMultiSelectionTotalScores.Text) +Convert.ToInt32(lblSimpleAnswerTotalScores.Text).ToString(); txtTotalScoresForTester.Text= totalScoresForTester.ToString(); protected void btnSave_Click(object sender, EventArgs e)/提交 Te
24、stMark mark = new TestMark(); mark.TestRecorder.RecorderID = recorderID; mark.TotalScore =Convert.ToUInt16(txtTotalScoresForTester.Text); mark.Marker = SessionClass.GetLoginUser(); mark.MarkedTime = DateTime.Now; mark.Remark = txtRemark.Text; new BLLTestMark().CreateTestMark(mark, list1, list2, list
25、3, list4, list5);/显示每个部分的分数 Response.Redirect(testerList.aspx?testID=+testID);/跳转到测试选项界面 管理员评卷:using System;using System.Collections;using System.Configuration;using System.Data;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebCon
26、trols;using System.Web.UI.WebControls.WebParts;using System.Collections.Generic;using Entity;using BLL;public partial class Admin_Marking_MarkPaper3 : System.Web.UI.Page/管理员的MarkPaper2页面 protected void Page_Load(object sender, EventArgs e)/页面加载 RoleCheck.DenyLogin();/拒绝非管理员用户的登陆,拒绝后跳转到登陆页面 if (!IsPo
27、stBack) BindPaperInfo(); private int paperID/私有paperID get return Helper.GetUrlParmValue(paperID); /获取paperID private int testID/私有testID get return Helper.GetUrlParmValue(testID); /获取testID private int recorderID/私有recorderID get return Helper.GetUrlParmValue(recorderID); /获取recorderID private void
28、 BindPaperInfo()/自动评卷页面 if (paperID 0)/判断题页面框 lblJudgeScores.Text= paper.JudgeList0.Scores.ToString(); lblJudgeTotalScores.Text = (paper.JudgeList0.Scores * paper.JudgeList.Count).ToString(); int totalScoresForTesterOfSubject = 0; foreach (SubjectOfJudge subject in paper.JudgeList)/与参考答案匹配,并计算相应分数 t
29、otalScoresForTester += subject.ScoresForTester; totalScoresForTesterOfSubject+= subject.ScoresForTester; lblJudgeTotalScoresForTester.Text= totalScoresForTesterOfSubject.ToString(); rptSubjectOfSingleSelectionList.DataSource= paper.SingleSelectionList; rptSubjectOfSingleSelectionList.DataBind(); lbl
30、SingleSelectionCount.Text= paper.SingleSelectionList.Count.ToString(); if (paper.SingleSelectionList.Count 0)/单选题页面框 lblSingleSelectionScores.Text= paper.SingleSelectionList0.Scores.ToString(); lblSingleSelectionTotalScores.Text= (paper.SingleSelectionList0.Scores* paper.SingleSelectionList.Count).T
31、oString(); int totalScoresForTesterOfSubject = 0; foreach (SubjectOfSingleSelection subject in paper.SingleSelectionList)/与参考答案匹配,并计算相应分数 totalScoresForTester += subject.ScoresForTester; totalScoresForTesterOfSubject+= subject.ScoresForTester; lblSingleSelectionTotalScoresForTester.Text= totalScores
32、ForTesterOfSubject.ToString(); rptSubjectOfMultiSelectionList.DataSource= paper.MultiSelectionList; rptSubjectOfMultiSelectionList.DataBind(); lblMultiSelectionCount.Text= paper.MultiSelectionList.Count.ToString(); if (paper.MultiSelectionList.Count 0)/多选题页面框 lblMultiSelectionScores.Text= paper.Mult
33、iSelectionList0.Scores.ToString(); lblMultiSelectionTotalScores.Text= (paper.MultiSelectionList0.Scores* paper.MultiSelectionList.Count).ToString(); int totalScoresForTesterOfSubject = 0; foreach (SubjectOfMultiSelection subject in paper.MultiSelectionList)/与参考答案匹配,并计算相应分数 totalScoresForTester += su
34、bject.ScoresForTester; totalScoresForTesterOfSubject+= subject.ScoresForTester; lblMultiSelectionTotalScoresForTester.Text= totalScoresForTesterOfSubject.ToString(); lblTotalScores.Text= (Convert.ToInt32(lblJudgeTotalScores.Text)/显示各个不同测试题的页面框 + Convert.ToInt32(lblSingleSelectionTotalScores.Text) +
35、Convert.ToInt32(lblMultiSelectionTotalScores.Text).ToString(); txtTotalScoresForTester.Text= totalScoresForTester.ToString();/显示总分 using System.Web.UI.HtmlControls;using BLL;using Entity;public partial class Admin_Test_MarkPaper : System.Web.UI.Page protected void Page_Load(object sender, EventArgs
36、e) RoleCheck.DenyLogin();/拒绝非管理员用户的登陆,拒绝后跳转到登陆页面 if (!IsPostBack)/获取一个值,该值指示该页是否正为响应客户端回发而加载,或者它是否首次被加载或访问 if(Request.QueryStringrecorderID!=null)/获取HTTP查询字符串变量集合 hfdRecorderID.Value=Request.QueryStringrecorderID.ToString();/获取或设置隐藏字段的值,获取请求页面的对象,返回System.String的此实例,不执行实际转换 if (Request.QueryStringte
37、stID != null) hfdTestID.Value= Request.QueryStringtestID.ToString();/获取或设置隐藏字段的值,获取请求页面的对象,返回System.String的此实例,不执行实际转换 protected void btnSubmit_Click(object sender, EventArgs e)/提交 TextBoxtxtTesterMark= (TextBox)FormView1.FindControl(txtTesterMark);/输入答案的页面框 TextBoxtxtRemark= (TextBox)FormView1.Find
38、Control(txtRemark);/参考答案的页面框 TestMark testMark = new TestMark();/数据绑定,参看分数 testMark.TotalScore = Convert.ToUInt16(txtTesterMark.Text); testMark.Remark = txtRemark.Text; testMark.Marker = SessionClass.GetLoginUser(); testMark.MarkedTime = DateTime.Now; testMark.TestRecorder.RecorderID =Convert.ToInt3
39、2( hfdRecorderID.Value); new BLLTestMark().CreateTestMark(testMark);/输入评语页面框 Response.Redirect(TesterList.aspx?testID=+hfdTestID.Value);/跳转到测试者列表页面 using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using
40、System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Collections.Generic;using Entity;using BLL;using Tool;public partial class Admin_Test_TesterList : System.Web.UI.Page/管理人员测试列表界面 评卷界面 protected void Page_Load(object sender, EventArgs e)/
41、页面加载 RoleCheck.DenyLogin();/拒绝非管理员用户的登陆,拒绝后跳转到登陆页面 if (!IsPostBack) int pageNum = 1;/页面数 if (Request.QueryStringpageNum != null) pageNum= Convert.ToInt32(Request.QueryStringpageNum); BindTestList(Helper.GetUrlParmValue(testID), pageNum); private const int PAGE_SIZE = 20;/页面大小 private void BindTestLi
42、st(int testID, int pageNum) PageListlist=new BLLTestRecorder().GetTestRecorderListByTestID(testID, pageNum, PAGE_SIZE);/显示该页面的相关内容 Repeater1.DataSource = list.RecorderList; Repeater1.DataBind(); lblPageUrl.Text= StringHelper.MakePageUrl(?testID=+testID+&pageNum=, pageNum, list.PageCount, list.Record
43、erCount); using System;using System.Data;using System.Configuration;using System.Collections;using System.Collections.Generic;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using
44、 Entity;using BLL;using Tool;public partial class Admin_Test_TestRecorderList : System.Web.UI.Page/管理人员测试评价分数列表界面 评卷管理界面 protected void Page_Load(object sender, EventArgs e)/页面加载 RoleCheck.DenyLogin();/拒绝非管理员用户的登陆,拒绝后跳转到登陆页面 if (!IsPostBack) int pageNum = 1;/页面数 if (Request.QueryStringpageNum != nul
45、l) pageNum= Convert.ToInt32(Request.QueryStringpageNum); BindTestList(pageNum); private const int PAGE_SIZE = 20;/页面大小 private void BindTestList(int pageNum) PageList list = new BLLTest().GetTestList(pageNum, PAGE_SIZE);/显示该页面的相关内容 rplTestList.DataSource = list.RecorderList; rplTestList.DataBind(); lblPageUrl.Text = StringHelper.MakePageUrl(?pageNum=, pageNum, list.P
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025标准简单个人购房合同协议书范文
- 2025租赁合同个人包含维修条款
- 2025聘请研发人员合同范本
- 2025房产买卖合同的范本
- 2025劳动合同模板5
- 工程灌溉水管安装合同
- 本溪中考生物试题及答案
- 职业生涯发展中的软技能应用试题及答案
- 电商中物流体系的构建与优化试题及答案
- 真实案例商务英语考试试题及答案
- (二模)2024~2025学年度苏锡常镇四市高三教学情况调研(二)物理试卷(含答案)
- GB/T 19066.1-2003柔性石墨金属波齿复合垫片分类
- 2021年新高考I卷英语试题分析及备考展望2022课件
- 常见的圆柱截切体名师优质课赛课一等奖市公开课获奖课件
- 《蒋公的面子剧本》
- 护生临床沟通能力测评量表
- 《工厂供电》第六版习习题解答(不全)
- 海水分析化学 考试大纲
- 国内常见模具钢牌号对照表
- 解聘证明范本
- 混凝土静力抗压弹性模量试验记录表
评论
0/150
提交评论