问题:KesionCMS v8.0考试系统使用sql版本的用户,当后台管理员随机组卷时,前台会员无法考试,始终显示正在加载中
解决方法:
打开mnkc/exam/GetRndAjax.asp
并找到以下代码
If DataBaseType=1 Then
Dim Cmd : Set Cmd = Server.CreateObject("ADODB.Command")
Set Cmd.ActiveConnection=conn
Cmd.CommandText="KS_SJRndAjax"
Cmd.CommandType=4
CMD.Prepared = true
Cmd.Parameters.Append cmd.CreateParameter("@tmids",202,1,8000,tmids)
Set RS=Cmd.Execute
Set Cmd=Nothing
Else
sqlstr="select * from ks_sjtk where id in(" & tmids & ") order by id"
rs.open sqlstr,conn,1,1
End If
我们将上面红色的改成以下代码即可
Dim Cmd : Set Cmd = Server.CreateObject("ADODB.Command")
Set Cmd.ActiveConnection=conn
Cmd.CommandText="KS_TSql"
Cmd.CommandType=4
CMD.Prepared = true
Cmd.Parameters.Append cmd.CreateParameter("@SQL",202,1,8000,"select * from ks_sjtk where id in(" & tmids & ") order by id")
Set Rs=Cmd.Execute
Set Cmd=Nothing