📄 papermod.asp
字号:
<%PaperItemID=Session("PaperItemArray")%>
<%if Request("ShanChu")<>"" then
for i=1 to Request("CheckBox").Count
if Request("CheckBox")(i)<>"" Then
ItemID=Request("CheckBox")(i)
have=false
for tx=1 to 5
FF=1
do while FF<=50 and PaperItemID(tx,FF)<>-1
if clng(PaperItemID(tx,FF))=clng(ItemID) then
have=true
cur=tx
F=FF
exit do
end if
FF=FF+1
loop
if have=true then
exit for
end if
next
if have=true then
do while F<=50 and PaperItemID(cur,F)<>-1
PaperItemID(cur,F)=PaperItemID(cur,F+1)
F=F+1
loop
end if
end if
next
Session("PaperItemArray")=PaperItemID
Response.Redirect "ShowPaper.asp?time=3"
end if%>
<%
if(Session("TotalTime")<>"" ) then
if Request("Save")<>"" then
Set objConn = Server.CreateObject ("ADODB.Connection")
Set Conn = Server.CreateObject ("ADODB.Connection")
strConnection = "Data Source = ks;"
strConnection = strConnection & "User ID =lili;Password=;"
objConn.Open strConnection
Conn.Open strConnection
set rs = CreateObject("ADODB.Recordset")
set objRS = CreateObject("ADODB.Recordset")
sql="Select * from TestPaper "
rs.Open sql,objConn,2,3
NowTime=Date()
rs.AddNew
rs("SelectCourseID")=Session("course_id")
rs("PaperType")=1
rs("PaperHeader")=Session("Title")
rs("PaperDesc")=Session("Depiction")
rs("StartDate")=Date()
rs("selectvalue")=Session("dxfs")
rs("multivalue")=Session("dufs")
rs("tkvalue")=Session("tkfs")
rs("pdvalue")=Session("pdfs")
rs("fxvalue")=Session("fxfs")
rs("TotalTime")=Session("TotalTime")
rs("TotalMark")=Session("TotalScore")
rs("Author")=Session("csjr")
rs.Update
rs.Close
dim tx_Mark(5)
tx_Mark(1)=CInt(Session("dxfs"))
tx_Mark(2)=CInt(Session("dufs"))
tx_Mark(3)=CInt(Session("tkfs"))
tx_Mark(4)=CInt(Session("pdfs"))
tx_Mark(5)=CInt(Session("fxfs"))
sql="select max(PaperID) as Paperid from TestPaper"
rs.Open sql, objConn,2,3
PaperID=rs("Paperid")
rs.Close
for tx=1 to 5
Update=false
FF=1
ItemNumber=0
do while FF<=50 and PaperItemID(tx,FF)<>-1
if PaperItemID(tx,FF)<>0 then
ItemNumber=ItemNumber+1
end if
FF=FF+1
loop
if ItemNumber<>0 then
Update=true
FF=1
'k记录小题号
k=1
t_mark=0
b_mark=CInt(tx_Mark(tx)/ItemNumber)
do while k<=ItemNumber
if PaperItemID(tx,k)<>0 then
sql="select * from ItemTable where ItemID="&PaperItemID(tx,k)
news="select * from Paper_Item "
rs.Open sql,objConn,2,3
objRS.open news,Conn,2,3
rs("SelectDegree")=rs("SelectDegree")+1
rs("LastExposure")=NowTime
objRS.AddNew
objRS("PaperID")=Paperid
objRS("ItemID")=rs("ItemID")
objRS("Order1")=tx
objRS("Order2")=k
objRS("SelectCourseID")=Session("course_id")
if k=ItemNumber then
objRS("Score")=tx_Mark(tx)-t_mark
else
objRS("Score")=b_mark
t_mark=t_mark+b_mark
end if
objRS("STNR")=rs("STNR")
objRS("STWJ")=rs("STWJ")
objRS("DAAN")=rs("DAAN")
objRS("DAZJ")=rs("DAZJ")
select Case tx
Case 1
objRS("xxA")=rs("xxA")
objRS("xxAwj")=rs("xxAwj")
objRS("xxB")=rs("xxB")
objRS("xxBwj")=rs("xxBwj")
objRS("xxC")=rs("xxC")
objRS("xxCwj")=rs("xxCwj")
objRS("xxD")=rs("xxD")
objRS("xxDwj")=rs("xxDwj")
objRS("xxE")=rs("xxE")
objRS("xxEwj")=rs("xxEwj")
Case 2
objRS("xxA")=rs("xxA")
objRS("xxAwj")=rs("xxAwj")
objRS("xxB")=rs("xxB")
objRS("xxBwj")=rs("xxBwj")
objRS("xxC")=rs("xxC")
objRS("xxCwj")=rs("xxCwj")
objRS("xxD")=rs("xxD")
objRS("xxDwj")=rs("xxDwj")
objRS("xxE")=rs("xxE")
objRS("xxEwj")=rs("xxEwj")
objRS("xxF")=rs("xxF")
objRS("xxFwj")=rs("xxFwj")
end select
rs.Update
objRS.Update
rs.Close
objRS.Close
end if
k=k+1
loop
end if
next
objConn.Close
Conn.Close
PaperItemID=Session("PaperItemArray")
for tx=1 to 5
FF=1
do while FF<=50 and PaperItemID(tx,FF)<>-1
PaperItemID(tx,FF)=-1
FF=FF+1
loop
next
Session("PaperItemArray")=PaperItemID
Session("csjr")=""
Session("Title")=""
Session("Depiction")=""
Session("StartDate")=""
Session("EndDate")=""
Session("PaperType")=""
Session("TotalTime")=""
Session("TotalScore")=""
Response.Write "该试卷已经成功的存储!请点击'返回页面'返回!<br>"
Response.Write "<p align='center'><a href='../teacherroom.asp'>返回</a></p>"
end if
else
Response.Write "该试卷无效或已在库中!请点击'返回页面'返回!<br>"
Response.Write "<p align='center'><a href='../teacherroom.asp'>返回</a></p>"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -