|
<%set snv_bul = Server.CreateObject("ADODB.Recordset")
snv_bul.open "SELECT* FROM sinavlar order by idsinav asc",erdc,1,3
%>
|
<% sira=1
sinav=request.form("sinav")
if sinav="" then
sinav=request.QueryString("sinav")
end if
sinif=request.form("sinif")
if sinif="" then
sinif=request.QueryString("sinif")
end if
testno=request.form("testno")
if testno="" then
testno=request.QueryString("testno")
end if
if islem="1" and sinav<>"" and sinif<>"" and testno<>"0" then
set ders_bul = Server.CreateObject("ADODB.Recordset")
ders_bul.open "SELECT* FROM sinavders where sinavkodu="&sinav&" and idsinif="&sinif&" and testno="&testno&" ",erdc,1,3
if ders_bul.eof then
response.write("Bu Sınıf İçin Sınav Ataması Yapılmamış")
end if
if not ders_bul.eof then
set snf_bul2 = Server.CreateObject("ADODB.Recordset")
snf_bul2.open "SELECT* FROM siniflar where idsinif="&sinif&" ",erdc,1,3
%>
<%end if%>
<% if islem=2 then
sinavkodu=request.Form("sinavkodu")
sinifi=request.Form("sinifi")
ogrsayi=request.Form("ogrsayisi")
testno=request.Form("testno")
for ogr=1 to ogrsayi
ogrenci=request.Form("ogrenci"&ogr&"")
set ogr_bul = Server.CreateObject("ADODB.Recordset")
ogr_bul.open "SELECT* FROM ogrenciler where idogrenci="&ogrenci&"",erdc,1,3
if not ogr_bul.eof then
kimlikno=ogr_bul("kimlikno")
numara=ogr_bul("ogrnumara")
sinif=ogr_bul("sinif")
adi=""&ogr_bul("ogradi")&" "&ogr_bul("ogrsoyadi")&""
idsinders=request.Form("sinavders"&ogr&"_"&testno&"")
if idsinders<>"" then
set sinav_bul = Server.CreateObject("ADODB.Recordset")
sinav_bul.open "SELECT* FROM sinavders where idsinders="&idsinders&"",erdc,1,3
testno=sinav_bul("testno")
sinavno=sinav_bul("sinavno")
sorusayi="soru"&sinavno&""
grup=request.form("grup_"&ogr&"_"&sinavno&"_"&testno&"")
girmedi=request.form("girmedi_"&ogr&"_"&sinavno&"_"&testno&"")
if girmedi="" then
girmedi=""
end if
if girmedi="1" then
girmedi="X"
end if
if grup>0 then
set soru_bul = Server.CreateObject("ADODB.Recordset")
soru_bul.open "SELECT* FROM sinifders where idsd="&sinav_bul("idsinifders")&"",erdc,1,3
set puan_bul = Server.CreateObject("ADODB.Recordset")
puan_bul.open "SELECT* FROM optik1 where sinavkodu="&sinavkodu&" and kimlikno='"&kimlikno&"' and testno="&testno&" or sinavkodu="&sinavkodu&" and sinif='"&sinif&"' and ogrno="&numara&" and testno="&testno&"",erdc1,1,3
if puan_bul.eof then
puan_bul.addnew
end if
puan_bul("sinavkodu")=sinavkodu
puan_bul("testno")=testno
puan_bul("kimlikno")=kimlikno
puan_bul("ogrno")=numara
puan_bul("adi")=adi
puan_bul("sinif")=sinif
puan_bul("grup")=grup
puan_bul("girmedi")=girmedi
for sr=1 to soru_bul(""&sorusayi&"")
cevap=request.form("soru_"&ogr&"_"&sinavno&"_"&testno&"_"&sr&"")
if cevap="1" then
cevap="A"
end if
if cevap="2" then
cevap="B"
end if
if cevap="3" then
cevap="C"
end if
if cevap="4" then
cevap="D"
end if
if cevap="5" then
cevap="E"
end if
puan_bul("s"&sr&"")=""&cevap&""
next
puan_bul.update
puan_bul.close
end if
end if
end if
next
response.Redirect("optikgiris2.asp?islem=1&sinav="&sinavkodu&"&sinif="&sinifi&"&testno="&testno&"")
end if
%>
| |
|