简单在线考试系统, 多选题判分问题! 高手救我
多选只有全对才给分'读取当前科目考试信息
subjectname=session("selectsubjectname")
studentname=session("studentname")
studentpassword=session("studentpassword")
singlenumber=session("singlenumber")
singleper=session("singleper")
multinumber=session("multinumber")
multiper=session("multiper")
pdnumber=session("pdnumber")
pdper=session("pdper")
endtime=now()
studentdanwei=session("studentdanwei")
score=0
selectstr1=request.form("hidQuestID1")
selectstr2=request.form("hidQuestID2")
selectstr3=request.form("hidQuestID3")
len1=len(selectstr1)
len2=len(selectstr2)
len3=len(selectstr3)
str1=left(selectstr1,len1-1)
str2=left(selectstr2,len2-1)
str3=left(selectstr3,len3-1)
dim id1,id2,id3
id1=split(str1,",")
id2=split(str2,",")
id3=split(str3,",")'计算多选题得分
for i=1 to multinumber'multinumer为试卷中多选题的数量
result=request.form("no"&id2(i-1))
if not isempty(result) then
sql="select * from question where id="& clng(id2(i-1))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
if result=rs("answer") then
score=score+cint(multiper)
end if
rs.close
set rs=nothing
end if
next
单选和判断都可以得分, 多选0分
[[italic] 本帖最后由 tsrtsr 于 2008-1-11 17:23 编辑 [/italic]]