
01/07/2003, 07:48
|
| | Fecha de Ingreso: enero-2002 Ubicación: Graná
Mensajes: 646
Antigüedad: 23 años, 3 meses Puntos: 0 | |
Sale otra página, dentro del sitio que estoy haciendo, pero que no está enlazada. Que va, eso es lo raro, que no hay ninguna redirección. El código es:
<%
falta=0
i=0
aux=request.form("preguntas")
do while (i<=aux-1) AND (falta<>1)
pregunta="p"&i
if (strcomp (request.form(pregunta),"")=0) then
falta=1
end if
i=i+1
loop
if falta=0 AND (strcomp (aux, "")<>0) then
dim respuestas(70), fallos(70)
Ruta= server.MapPath("../soluciones.txt")
set objFSO=Server.CreateObject ("scripting.filesystemobject")
set objAbreArchivo= objFSO.OpenTextFile (Ruta, 1)
preguntas=request.form ("preguntas")
modulo="m"&request.form ("modulo")
unidad="u"&request.form ("unidad")
cual=modulo&unidad
do while (strcomp (linea, cual)<>0)
linea=objAbreArchivo.Readline
loop
linea=objAbreArchivo.ReadLine
soluciones=Split (linea, ",", -1, 1)
for i=0 to preguntas-1
pregunta="p"&i
respuestas(i)=request.form (pregunta)
next
aciertos=0
j=0
for i=0 to preguntas-1
if (soluciones(i)=respuestas(i)) then
aciertos=aciertos+1
else
fallos(j)=i+1
j=j+1
end if
next
fallos(j)=-1
estadistica=FormatNumber (((aciertos*100)/preguntas), 2, -1, 0, 0)
response.write "<table width=50% border=0 cellspacing=2 cellpadding=2> " & _
"<tr> " & _
" <td class=recuadro_text width=39% >Porcentaje de aciertos</td>" & _
" <td width=61% class=fondo_text>"&estadistica&"%</td>" & _
"</tr>" & _
"<tr> " & _
" <td class=recuadro_text width=39% >Respuestas incorrectas</td>" & _
" <td width=61% class=fondo_text>"
'imprimo los fallos
j=0
do while fallos(j+2)<>-1
response.write fallos(j)&","
j=j+1
loop
response.write fallos(j)&" y "&fallos(j+1)
response.write "</td>" & _
"</tr> " & _
"</table>"
else
response.write ("<p><span class=enlaces_cabecera_over>No has rellenado todos los campos</span>")
end if
%>
Gracias y un saludo |