图4-3 学生对教师教学效果评议
在这个界面中,学生需要选择评议教师(该学生的所有任课教师已经给出),然后就自动显示了该教师所教课程,学生选择信息后,可以进行打分和发表对本门课程的意见和建议,最后单击“发表”即可。
实现以上功能的核心代码如下:
<%sub save()
if CommentedID<>"" then
if instr(CommentedID,"|")>0 then
arrCommentedID=split(CommentedID,"|")
for i=0 to ubound(arrCommentedID)
if Clng(arrCommentedID(i))=kc_id then
Commented=True
exit for
end if
next
else
if Clng(CommentedID)=kc_id then
Commented=True
end if
end if
end if
if Commented=True then
FoundErr=True
errmsg=errmsg &+"<br>"+ "<li>你已经对该教师发表过评议了!请勿连续对同一个教师发表评议。</li>"
end if
if founderr then
call diserror()
response.End
end if
sql="select * from xspyjl where xs_id="&Session("xsid")&" and kc_id="&kc_id&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if rs.eof and rs.bof then
rs.addnew
rs("teacher_id")=teach_id