论文无忧网提供:计算机毕业论文范文|计算机毕业设计|计算机毕业论文
栏目导航 ASP JSP .NET VB6.0 JAVA VC VF DELPHI PB 计算机网络 计算机科学与技术 PHP 安卓APP 其他 代写论文

网上报名及在线考试系统(论文+程序)

4.2.2在线考试

考生登陆考试系统时,系统根据登录名和密码判断考生是否为报名后的考生,如果没有报名则提示考生先注册,注册完成后需要管理员审核考生是否符合条件,审核通过后考生才能参加考试。 copyright paper51.com

考生登录后,可以选择相应的试题进行在线考试。考试过程中考生的答案保存在考试过程控制表(prj_process)中。自动生成试卷函数根据考试计划中的设置,从试题库中随机按要求组成试卷并存入考试过程控制表(prj_process)中。

copyright paper51.com

考试结束采取自动交卷和到了规定的时间系统强制交卷的有机结合的方式予以实现。系统根据管理员制定好的答案进行判断,自动给出考生的考试成绩。

http://www.paper51.com

在线考试主要页面有function.asp,考试页面testing.asp,保存答案页面test_saveanswer.asp,考试结束显示结果页面testfinish.asp,成绩查询页面student_markquery.asp .

paper51.com

自动生成试卷的主要代码片段如下:

内容来自www.paper51.com

'生成试卷

内容来自www.paper51.com

function makePaper(intPrjID,intStudentID)

内容来自www.paper51.com

      dimrsPaper,strSqlPaper,rsNew,strSqlNew,intCourseID,intCount,arrTemp,intSSCount,arrSS,intMSCount,arrMS,intBCount,arrB,intCurType,I,J,intPos,blnPass 内容来自论文无忧网 www.paper51.com

      G_CONN.execute"delete from prj_process where prjid=" & intPrjID & "and studentid=" & intStudentID 内容来自www.paper51.com

      setrsPaper = server.createobject("ADODB.Recordset")

copyright paper51.com

      strSqlPaper= "select courseid,ss_count,ms_count,b_count from project whereprjid=" & intPrjID

paper51.com

      rsPaper.openstrSqlPaper,G_CONN,1,1

内容来自论文无忧网 www.paper51.com

      ifnot rsPaper.bof and not rsPaper.eof then

http://www.paper51.com

             intCourseID= rsPaper("courseid") paper51.com

             intSSCount= rsPaper("ss_count") copyright paper51.com

             intMSCount= rsPaper("ms_count")

copyright paper51.com

             intBCount= rsPaper("b_count")

http://www.paper51.com

      else copyright paper51.com

             rsPaper.close

内容来自论文无忧网 www.paper51.com

             setrsPaper = nothing

内容来自www.paper51.com

             makePaper= false 内容来自www.paper51.com

             exitfunction

http://www.paper51.com

      endif http://www.paper51.com

      rsPaper.close

内容来自论文无忧网 www.paper51.com

      forintCurType = 1 to 3 内容来自www.paper51.com

             selectcase intCurType

http://www.paper51.com

             case1

copyright paper51.com

                    intCount= intSSCount

copyright paper51.com

             case2 copyright paper51.com

                    intCount= intMSCount copyright paper51.com

             case3 paper51.com

                    intCount= intBCount 内容来自论文无忧网 www.paper51.com

             endselect

http://www.paper51.com

             ifintCount > 0 then http://www.paper51.com

                    redimarrTemp(intCount) 内容来自论文无忧网 www.paper51.com

                    strSqlPaper= "select id from subject where type=" & intCurType & "and courseid=" & intCourseID

copyright paper51.com

                    rsPaper.openstrSqlPaper,G_CONN,1,1

paper51.com

                    ifrsPaper.recordcount < intCount then     '判断当前题库内试题是否足够 内容来自www.paper51.com

                           rsPaper.close

内容来自www.paper51.com

                           setrsPaper = nothing http://www.paper51.com

                           makePaper= false 内容来自www.paper51.com

                           exitfunction

内容来自论文无忧网 www.paper51.com

                    endif

copyright paper51.com

                    randomizetimer http://www.paper51.com

                    intPos= int(rnd() * rsPaper.recordcount) copyright paper51.com

                    arrTemp(1)= intPos

http://www.paper51.com

                    forI = 2 to intCount 内容来自论文无忧网 www.paper51.com

                           intPos= int(rnd() * rsPaper.recordcount)

copyright paper51.com

                           blnPass= false paper51.com

                           whileblnPass = false

http://www.paper51.com

                                  forJ = 1 to I - 1 copyright paper51.com

                                         ifintPos = arrTemp(J) then http://www.paper51.com

                                                exitfor

内容来自论文无忧网 www.paper51.com

                                         endif http://www.paper51.com

                                  next http://www.paper51.com

                                  if J = Ithen

内容来自论文无忧网 www.paper51.com

                                         blnPass= true

paper51.com

                                  else paper51.com

                                         '使用线性探测解决冲突问题

http://www.paper51.com

                                         intPos= intPos + 1

内容来自论文无忧网 www.paper51.com

                                         ifintPos = rsPaper.recordcount then paper51.com

                                                intPos= 0 内容来自www.paper51.com

                                         endif

http://www.paper51.com

                                  endif 内容来自论文无忧网 www.paper51.com

                           wend paper51.com

                           arrTemp(I)= intPos http://www.paper51.com

                    next paper51.com

                    strSqlNew= "select * from prj_process"

http://www.paper51.com

                    setrsNew = server.createobject("ADODB.Recordset")

http://www.paper51.com

                    rsNew.openstrSqlNew,G_CONN,1,3 copyright paper51.com

                    forI = 1 to intCount copyright paper51.com

                           rsPaper.movearrTemp(I),1

paper51.com

                           rsNew.addnew copyright paper51.com

                           rsNew("prjid")= intPrjID http://www.paper51.com

                           rsNew("subid")= rsPaper("id")

内容来自论文无忧网 www.paper51.com

                           rsNew("studentid")= intStudentID copyright paper51.com

                           rsNew.update paper51.com

                    next copyright paper51.com

                    rsNew.close http://www.paper51.com

                    rsPaper.close

paper51.com

             endif 内容来自论文无忧网 www.paper51.com

      next

http://www.paper51.com

      G_CONN.execute"update prj_student set state=2" paper51.com

      G_CONN.execute"update prj_student set starttime=now()"

http://www.paper51.com

      setrsPaper = nothing

copyright paper51.com

      makePaper= true paper51.com

end function

内容来自www.paper51.com

------分隔线----------------------------
联系方式