在线考试系统课程设计实验报告.docx
《在线考试系统课程设计实验报告.docx》由会员分享,可在线阅读,更多相关《在线考试系统课程设计实验报告.docx(27页珍藏版)》请在冰豆网上搜索。
在线考试系统课程设计实验报告
实验题目:
在线考试系统
学院:
计算机科学学院
专业:
网络工程
班级:
网络01班
小组成员:
2021年6月26日
一、实验名称
在线考试系统
二、实验目的
三、实验的运行环境
操作系统
系统运行环境:
visualstudio2021sqlserver2021
.
四、实验整体功能介绍
1〕主要题型
填空题、判断题、单项选择题、多项选择题、简答题。
2〕组卷方式
人工选题:
通过选择各种题型的题库组成卷子,最多可以由5种题型组成〔填空题、判断题、单项选择题、多项选择题、简答题〕;
随机抽题:
通过设置各类题型的题库数量,由系统随机抽取试题组成卷子,最多可以由3种题型组成〔判断题、单项选择题、多项选择题〕;
手工输入:
通过手工输入试题内容的文本,可以事先用word把考题设计好,然后粘贴到编辑框中。
3〕考试安排
考试安排的流程为:
选择试卷分类->选择试卷->分配分数->选择考试人员->设置考试参数->提交
4〕评卷工作
对于手工选题组成的卷子:
判断题、单项选择题和多项选择题由系统自动评分,其他由人工评分;
对于随机抽题组成的卷子:
完全由系统自动评分,也就是考生一提交试卷,成绩立马出来;
对于手工输入组成的卷子:
由人工评分。
5〕成绩管理
包含成绩查询、成绩统计。
2.后台管理功能
1〕系统管理
系统介绍部门管理人员管理
2〕题型管理
填空题判断题单项选择题多项选择题简答题
3〕试卷管理
手工选题随机抽题手工输入
4〕考试管理
考试安排评卷管理成绩管理
5〕账号管理
修改密码参加考试退出
表说明:
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_SubjectOfSimpleAnswer:
简答题题库
T_PaperByRandomSelection:
随机抽题试卷
T_PaperByManualSelection:
人工选题试卷
T_PaperByManualSelection_Subject:
人工选题试卷的试题集
〔其中的subjectType:
1:
填空题,2:
判断题,3:
单项选择题,4:
多项选择题,5:
简答题〕
T_PaperByRandomSelection_Subject:
随机抽题试卷的试题集
〔其中的subjectType:
1:
填空题,2:
判断题,3:
单项选择题,4:
多项选择题,5:
简答题〕
五、程序运行结果
登录界面
系统菜单〔考试安排〕
系统菜单〔考试记录〕
系统菜单〔考试成绩〕
系统菜单〔修改密码〕
在线考试系统后台管理〔在线考试系统介绍〕
在线考试系统后台管理〔部门管理〕
在线考试系统后台管理〔人员管理〕
题型管理〔填空题管理〕
题型管理〔判断题管理〕
题型管理〔单项选择题管理〕
题型管理〔多项选择题管理〕
题型管理〔简答题管理〕
试卷管理〔手工选题〕
试卷管理〔随机抽题〕
试卷管理〔手工输入〕
考试管理〔考试安排〕
考试管理〔评卷管理〕
考试管理〔成绩管理〕
账号管理〔修改密码〕
新用户注册
六、实验源代码〔由于源码数量过多所以这里只能列举出局部〕
管理登录:
usingSystem;
usingSystem.Collections;
usingSystem.Configuration;
usingSystem.Data;
usingSystem.Web;
usingSystem.Web.Security;
usingSystem.Web.UI;
usingSystem.Web.UI.HtmlControls;
usingSystem.Web.UI.WebControls;
usingSystem.Web.UI.WebControls.WebParts;
usingSystem.Collections.Generic;
usingEntity;
usingBLL;
{
protectedvoidPage_Load(objectsender,EventArgse)//页面加载
{
RoleCheck.DenyLogin();//拒绝非管理员用户的登陆,拒绝后跳转到登陆页面
if(!
IsPostBack)
BindPaperInfo();
}
privateintpaperID//私有paperID
{
get
{returnHelper.GetUrlParmValue("paperID");}//获取paperID
}
privateinttestID//私有testID
{
get
{returnHelper.GetUrlParmValue("testID");}//获取testID
}
privateintrecorderID//私有recorderID
{
get{returnHelper.GetUrlParmValue("recorderID");}//获取recorderID
}
privatevoidBindPaperInfo()//人工评卷页面
{
PaperByManualSelectionpaper=newBLLPaperByManuaSelection().GetPaper(testID,paperID,recorderID);//得到所需要的页面
if(paper!
=null)
{
inttotalScoresForTester=0;//计算分数
rptSu=paper.FillBlankList;
rptSubjectOfFillBlankList.DataBind();
=paper.FillBlankList.Count.ToString();
if(paper.FillBlankList.Count>0)//填空题页面框
{
lblFillBlankScores.Text=paper.FillBlankList[0].Scores.ToString();
=(paper.FillBlankList[0].Scores*paper.FillBlankList.Count).ToString();
inttotalScoresForTesterOfSubject=0;
foreach(SubjectOfFillBlanksubjectinpaper.FillBlankList)//与参考答案匹配,并计算相应分数
{
totalScoresForTester+=subject.ScoresForTester;
totalScoresForTesterOfSubject+=subject.ScoresForTester;
}
lblFil=totalScoresForTesterOfSubject.ToString();
}
rptSubjectOfJudgeList.DataSource=paper.JudgeList;
rptSubjectOfJudgeList.DataBind();
lblJudgeListCount.Text=paper.JudgeList.Count.ToString();
if(paper.JudgeList.Count>0)//判断题页面框
{
=paper.JudgeList[0].Scores.ToString();
lblJudgeTotalScores.Text=(paper.JudgeList[0].Scores*paper.JudgeList.Count).ToString();
inttotalScoresForTesterOfSubject=0;
foreach(SubjectOfJudgesubjectinpaper.JudgeList)//与参考答案匹配,并计算相应分数
{
totalScoresForTester+=subject.ScoresForTester;
totalScoresForTesterOfSubject+=subject.ScoresForTester;
}
lb=totalScoresForTesterOfSubject.ToString();
}
rptSubjectO=paper.SingleSelectionList;
rptSubjectOfSingleSelectionList.DataBind();
=paper.SingleSelectionList.Count.ToString();
if(paper.SingleSelectionList.Count>0)//单项选择题页面框
{
=paper.SingleSelectionList[0].Scores.ToString();
lbl=(paper.SingleSelectionList[0].Scores*paper.SingleSelectionList.Count).ToString();
inttotalScoresForTesterOfSubject=0;
foreach(SubjectOfSingleSelectionsubjectinpaper.SingleSelectionList)//与参考答案匹配,并计算相应分数
{
totalScoresForTester+=subject.ScoresForTester;
totalScoresForTesterOfSubject+=subject.ScoresForTester;
}
lblSingleSel=totalScoresForTesterOfSubject.ToString();
}
rptSubject=paper.MultiSelectionList;
rptSubjectOfMultiSelectionList.DataBind();
=paper.MultiSelectionList.Count.ToString();
if(paper.MultiSelectionList.Count>0)//多项选择题页面框
{
=paper.MultiSelectionList[0].Scores.ToString();
lb=(paper.MultiSelectionList[0].Scores*paper.MultiSelectionList.Count).ToString();
inttotalScoresForTesterOfSubject=0;
foreach(SubjectOfMultiSelectionsubjectinpaper.MultiSelectionList)//与参考答案匹配,并计算相应分数
{
totalScoresForTester+=subject.ScoresForTester;
totalScoresForTesterOfSubject+=subject.ScoresForTester;
}
lblMultiSel=totalScoresForTesterOfSubject.ToString();
}
rptSubjectOfSimpleAnswerList.DataSource=paper.SimpleAnswerList;
rptSubjectOfSimpleAnswerList.DataBind();
=paper.SimpleAnswerList.Count.ToString();
if(paper.SimpleAnswerList.Count>0)//简答题页面框
{
inttotalScores=0;
foreach(SubjectOfSimpleAnswersubjectinpaper.SimpleAnswerList)//与参考答案匹配,并计算相应分数
{
totalScores+=subject.Scores;
}
xt=totalScores.ToString();
inttotalScoresForTesterOfSubject=0;
foreach(SubjectOfSimpleAnswersubjectinpaper.SimpleAnswerList)
{
totalScoresForTester+=subject.ScoresForTester;
totalScoresForTesterOfSubject+=subject.ScoresForTester;
}
lblSimple=totalScoresForTesterOfSubject.ToString();
}
=(Convert.ToInt32(lblFillBlankTotalScores.Text)//显示各个不同测试题的页面框
+Convert.ToInt32(lblJudgeTotalScores.Text)
+Convert.ToInt32(lblSingleSelectionTotalScores.Text)
+Convert.ToInt32(lblMultiSelectionTotalScores.Text)
+Convert.ToInt32(lblSimpleAnswerTotalScores.Text)).ToString();
=totalScoresForTester.ToString();
}
}
protectedvoidbtnSave_Click(objectsender,EventArgse)//提交
{
TestMarkmark=newTestMark();
mark.TestRecorder.RecorderID=recorderID;
mark.TotalScore=Convert.ToUInt16(txtTotalScoresForTester.Text);
mark.Marker=SessionClass.GetLoginUser();
mark.MarkedTime=DateTime.Now;
mark.Remark=txtRemark.Text;
newBLLTestMark().CreateTestMark(mark,list1,list2,list3,list4,list5);//显示每个局部的分数
Response.Redirect("testerList.aspx?
testID="+testID);//跳转到测试选项界面
}
管理员评卷:
usingSystem;
usingSystem.Collections;
usingSystem.Configuration;
usingSystem.Data;
usingSystem.Web;
usingSystem.Web.Security;
usingSystem.Web.UI;
usingSystem.Web.UI.HtmlControls;
usingSystem.Web.UI.WebControls;
usingSystem.Web.UI.WebControls.WebParts;
usingSystem.Collections.Generic;
usingEntity;
usingBLL;
{
protectedvoidPage_Load(objectsender,EventArgse)//页面加载
{
RoleCheck.DenyLogin();//拒绝非管理员用户的登陆,拒绝后跳转到登陆页面
if(!
IsPostBack)
BindPaperInfo();
}
privateintpaperID//私有paperID
{
get{returnHelper.GetUrlParmValue("paperID");}//获取paperID
}
privateinttestID//私有testID
{
get{returnHelper.GetUrlParmValue("testID");}//获取testID
}
privateintrecorderID//私有recorderID
{
get{returnHelper.GetUrlParmValue("recorderID");}//获取recorderID
}
privatevoidBindPaperInfo()//自动评卷页面
{
if(paperID<0)
return;
PaperByRandomSelectionpaper=newBLLPaperByRandomSelection().GetPaper3(testID,recorderID);//得到所需要的页面
if(paper!
=null)
{
inttotalScoresForTester=0;//计算分数
rptSubjectOfJudgeList.DataSource=paper.JudgeList;
rptSubjectOfJudgeList.DataBind();
lblJudgeListCount.Text=paper.JudgeList.Count.ToString();
if(paper.JudgeList.Count>0)//判断题页面框
{
=paper.JudgeList[0].Scores.ToString();
lblJudgeTotalScores.Text=(paper.JudgeList[0].Scores*paper.JudgeList.Count).ToString();
inttotalScoresForTesterOfSubject=0;
foreach(SubjectOfJudgesubjectinpaper.JudgeList)//与参考答案匹配,并计算相应分数
{
totalScoresForTester+=subject.ScoresForTester;
totalScoresForTesterOfSubject+=subject.ScoresForTester;
}
lb=totalScoresForTesterOfSubject.ToString();
}
rptSubjectO=paper.SingleSelectionList;
rptSubjectOfSingleSelectionList.DataBind();
lblSingleS=paper.SingleSelectionList.Count.ToString();
if(paper.SingleSelectionList.Count>0)//单项选择题页面框
{
=paper.SingleSelectionList[0].Scores.ToString();
lblS=(paper.SingleSelectionList[0].Scores*paper.SingleSelectionList.Count).ToString();
inttotalScoresForTesterOfSubject=0;
foreach(SubjectOfSingleSelectionsubjectinpaper.SingleSelectionList)//与参考答案匹配,并计算相应分数
{
totalScoresForTester+=subject.ScoresForTester;
totalScoresForTesterOfSubject+=subject.ScoresForTester;
}
lblSingleSel=totalScoresForTesterOfSubject.ToString();
}
rptSubject=paper.MultiSelectionList;
rptSubjectOfMultiSelectionList.DataBind();
=paper.MultiSelectionList.Count.ToString();
if(paper.MultiSelectionList.Count>0)//多项选择题页面框
{
=paper.MultiSelectionList[0].Scores.ToString();
lb=(paper.MultiSelectionList[0].Scores*paper.MultiSelectionList.Count).ToString();
inttotalScoresForTesterOfSubject=0;
foreach(SubjectOfMultiSelectionsubjectinpaper.MultiSelectionList)//与参考答案匹配,并计算相应分数
{
totalScoresForTester+=subject.ScoresForTester;
totalScoresForTesterOfSubject+=subject.ScoresForTester;
}
lblMultiSel=totalScoresForTesterOfSubject.ToString();
}
=(Convert.ToInt32(lblJudgeTotalScores.Text)//显示各个不同测试题的页面框
+Convert.ToInt32(lblSingleSelectionTotalScores.Text)
+Convert.ToInt32(lblMultiSelectionTotalScores.Text)).ToString