%
'
Dim Fichs(20), Aux(20), numpods, Camino, CaminoTutorias
Dim nompod,podactual
Dim npiprof,edi,p,naula,aula,modulo,lista
Dim podnew, podtitu, podinicio
function nombra(ape,elnom)
lispal=split(ape & ", " & elnom," ")
nombra=""
for i=0 to Ubound(lispal)
nombra=nombra & Ucase(Left(lispal(i),1)) & Lcase(Mid(lispal(i),2,100)) & " "
next
end function
Function numdia(dia)
eldia=weekday(dia,2)
If eldia=1 Then
numdia="L"
ElseIf eldia=2 Then
numdia="M"
ElseIf eldia=3 Then
numdia="X"
ElseIf eldia=4 Then
numdia="J"
ElseIf eldia=5 Then
numdia="V"
ElseIf eldia=6 Then
numdia="S"
Else
numdia="D"
End If
End Function
'nombreservidor=Request.ServerVariables("server_name")
'if InStr(nombreservidor,"spas") then
Camino="http:/www.uv.es/jmherrer/pod/"
'else
'Camino="c:\Users\pardo\Documents\Departamento\POD\"
' Camino="C:\Documents and Settings\pardo\Mis documentos\Departamento\POD\"
'end if
'CaminoTutorias="Tutorias.mdb"
podactual="1112\POD"
podamedias="" 'Poner al podactual si no se quiere que salgan las tutorias, si no, comillas comillas
numpods=0
Set fso1 = CreateObject("Scripting.FileSystemObject")
Set fdir1 = fso1.GetFolder(Camino)
Set fsubdirs = fdir1.SubFolders
For Each fsub in fsubdirs
Set fso2 = CreateObject("Scripting.FileSystemObject")
Set fdir2 = fso2.GetFolder(Camino & fsub.Name)
Set fdirpod = fdir2.Files
inum=0
For Each fpod in fdirpod
'For i=fdirpod.Count to 1 step -1
' fpod=fdirpod.key(i)
if (Right(fpod.Name,4)=".mdb") and (InStr(fpod.Name,"POD")) then
'Fichs(numpods)=fsub.Name & "\" & Left(fpod.Name,Len(fpod.Name)-4)
Aux(inum)=fsub.Name & "\" & Left(fpod.Name,Len(fpod.Name)-4)
'numpods=numpods+1
inum=inum+1
end if
Next
for i=inum-1 to 0 step -1
Fichs(numpods)=Aux(i)
numpods=numpods+1
Next
Set fso2=nothing
set fdir2=nothing
set fdirpod=nothing
Next
Set fso1=nothing
set fdir1=nothing
set fsubdirs=nothing
'Fichs=Array("0607\POD","0607\POD31oct2006ENVIADO")
'numpods=Ubound(Fichs)+1
nompod=Request("POD")
if len(nompod)<2 then nompod=podactual
if nompod=podamedias then
TutoriasOK=false
else
TutoriasOK=true
end if
CaminoTutorias=Camino & Left(nompod,InStr(nompod,"\")) & "Tutorias.mdb"
admin=Request("ADMIN")
npiprof=Request("NPI")
'edi=Request("EDI")
'p=Request("P")
'naula=Request("NAULA")
aula=Request("AULA")
modulo=Request("MOD")
lista=Request("LISTA")
ff=Request("FECHA")
tt=Request("HORA")
actreq=Request("ACT")
npiprofa=Request("NPIA")
orden=Request("ORDEN")
curso=Request("CURSO")
titulacion=Request("TIT")
compara=Request("COMP")
idgid=Request("GID")
' Tipo de pagina a mostrar
If len(npiprof)>0 then
Pagina="NPI"
'elseIf len(edi)>0 then
elseIf len(aula)>0 then
Pagina="AULA"
elseIf len(modulo)>0 then
Pagina="MOD"
elseIf len(ff)>0 then
Pagina="DONDE"
elseIf len(actreq)>0 then
Pagina="ACT"
elseIf len(curso)>0 then
Pagina="CUR"
elseif len(compara)>0 then
Pagina="COMP"
elseif len(idgid)>0 then
Pagina="GID"
else
Pagina="INICIO"
If len(lista)<2 then
lista="NPI"
end if
end if
' Abrimos la base de datos
Set Conn=Server.CreateObject("ADODB.Connection")
'Conn.Open "PODsis"
'Mediante DNS
'Conn.ConnectionString = "DSN=PODsis" ' Asi pongo que sea solo lectura
'Sin DNS
Conn.ConnectionString = "DBQ=" & Camino & nompod & ".mdb;DRIVER={Microsoft Access Driver (*.mdb)}"
'Conn.ConnectionString = "DBQ=" & Server.MapPath("pod\POD\0910\POD.mdb") & ";DRIVER={Microsoft Access Driver (*.mdb)}"
'Conn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)}; Dbq=c:\Inetpub\wwwroot\pod\POD\0910\POD.mdb; Uid=; Pwd=;"
'"DSN=MS Access Database;UID=admin;PWD=;SystemDB=C:\data\System.mdw;SafeTransactions = 0;FIL=MS Access;DriverID = 25;DBQ=C:\data\train33.mdb"
Conn.Open
'Conn.open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+Server.MapPath("POD\0910\POD.mdb"))
'Conn.open("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\Inetpub\wwwroot\pod\POD\0910\POD.mdb;Persist Security Info=False;")
'Mira si contiene la version y la abre
set adoxConn= CreateObject("ADOX.Catalog")
adoxConn.activeConnection = Conn
set tabla = adoxConn.Tables("Parametros")
podver = false
for each col in tabla.columns
if (lcase(col.name) = lcase("Version")) then
podver = true
end if
if podver then exit for
next
set tabla = nothing
set adoxConn = nothing
if podver then
Set regs=Conn.Execute("SELECT * FROM Parametros")
Version=regs("Version")
regs.close
else
Version=0
end if
if (Version>=111200) then
UnidadCarga="Horas"
UnidAbrev="h"
else
UnidadCarga="Créditos"
UnidAbrev="c"
end if
'Mira si contiene el nuevo formato de titulaciones y el de fecha inicio.
set adoxConn= CreateObject("ADOX.Catalog")
adoxConn.activeConnection = Conn
set tabla = adoxConn.Tables("POD")
podtitu = false
podinicio= false
for each col in tabla.columns
if (lcase(col.name) = lcase("Titulación2")) then
podtitu = true
end if
if (lcase(col.name) = lcase("Inicio")) then
podinicio = true
end if
if podtitu and podinicio then exit for
next
set tabla = nothing
set adoxConn = nothing
if podtitu then
coltit="Titu"
else
coltit="Titulación"
end if
'Mira el formato del horario
Set regs=Conn.Execute("SELECT * FROM PODhorarioweb")
if (regs("NOM")="HORARIO") then
podnew=true
else
podnew=false
end if
regs.close
if podnew then
'regaula="AulaPOD"
regaula="Aula"
else
regaula="AulaExt"
end if
if podnew then
'regsem="SemanaPOD"
regsem="Semana"
else
regsem="SemanaExt"
end if
%>
<%
'''''''''''''''''''''''''''''''''''''''''
'
' CABECERA
'
'''''''''''''''''''''''''''''''''''''''''
if Pagina="NPI" or lista="NPI" then
stynpi="celda1sel"
else
stynpi="celda1"
end if
if Pagina="MOD" or Pagina="CUR" or lista="MOD" then
stymod="celda1sel"
else
stymod="celda1"
end if
if Pagina="AULA" or lista="AULA" then
styaula="celda1sel"
else
styaula="celda1"
end if
if Pagina="GID" or lista="GID" then
stygid="celda1sel"
else
stygid="celda1"
end if
if Pagina="DONDE" then
stydonde="celda1sel"
else
stydonde="celda1"
end if
if Pagina="ACT" then
styact="celda1sel"
else
styact="celda1"
end if
%>
<%
' Ahora se ponen las cosas según sea la pagina
select case Pagina
'----------------------------------------------
'
' LISTADOS
'
'----------------------------------------------
case "INICIO" 'INICIO
%>
Resumen del POD (<%=UnidadCarga%>)
<%
Set regs=Conn.Execute("SELECT Sum(POD.Carga) AS cosa FROM POD HAVING (((POD.Profesor)<>'X0000') AND ((POD.Activo)=True));")
cargaprof=round(regs("cosa"),2)
regs.Close
Set regs=Conn.Execute("SELECT Sum(ProfConsulta.""Capacidad real"") AS cosa FROM ProfConsulta HAVING ((ProfConsulta.NPI)<>'X0000');")
capaprof=round(regs("cosa"),2)
regs.Close
Set regs=Conn.Execute("SELECT * FROM RESUMEN")
if (Left(nompod,4))<809 then
capaprof=round(capaprof-regs("SumaDeTotal Reducciones"),2)
end if
%>
| Profesores | Asignaturas | Diferencia |
| Capacidad |
<%=capaprof%> |
<%=regs("SumaDeCréditos")%> |
<%=round(capaprof-regs("SumaDeCréditos"),2)%> |
| Asignado |
<%=cargaprof%> |
<%=cargaprof%> |
|
| Diferencia |
<%=round(capaprof-cargaprof,2)%> |
<%=round(regs("SumaDeCréditos")-cargaprof,2)%> |
|
<%
regs.Close
select case lista
'----------------------------------------------
' LISTADO MOD (Asignaturas)
'----------------------------------------------
case "MOD"
if true then
%>
Asignaturas sin cuadrar
Titulaciones y cursos
| Titulación |
Cursos |
<%
if podtitu then
Set regs=Conn.Execute("SELECT distinct Titu,Cur FROM PODtitu WHERE ACTIVO=TRUE ORDER BY Titu,Cur;")
else
Set regs=Conn.Execute("SELECT distinct POD.Curso AS Cur, Titulación FROM POD WHERE ACTIVO=TRUE ORDER BY Titulación, Curso;")
end if
Tit=""
While Not regs.EOF
if (regs(coltit)<>Tit) then
if Tit<>"" then Response.Write ""
Tit=regs(coltit)
Response.Write "| " & Tit & " | "
end if
Response.Write "" & regs("Cur") & " "
regs.MoveNext
Wend
regs.Close
end if
%>
|
Asignaturas y cursos
<%
if podtitu then
Set regs=Conn.Execute("SELECT distinct Titu, Cur, Asignatura, Módulo FROM PODtitu WHERE ACTIVO=TRUE ORDER BY Titu,Asignatura")
else
Set regs=Conn.Execute("SELECT distinct POD.Curso AS Cur, Titulación, Asignatura, Módulo FROM POD WHERE ACTIVO=TRUE ORDER BY Titulación,Asignatura;")
end if
Tit=""
Cad=""
While Not regs.EOF
nomasig=regs("Asignatura")
' if nomasig<>Cad then
Cad=nomasig
if Tit<>regs(coltit) Then
if Tit<>"" then Response.Write ""
Tit=regs(coltit)
%>
<%
call listaAsig("CUADRAR","res")
'----------------------------------------------
' LISTADO AULA (Aulas)
'----------------------------------------------
case "AULA"
%>
Listado de Aulas y Laboratorios
<%
'----------------------------------------------
' LISTADO GID (Grupos de Interes Docente)
'----------------------------------------------
case "GID" 'GID
if Version>=101100 then
%>
Listado de Grupos de Interés Docente (GID)
<%
Set regs=Conn.Execute("SELECT Profesores.*, GID.* FROM Profesores right join GID on GID.Responsable=Profesores.NPI ORDER BY NombreGID")
%>
| GID | <%=UnidadCarga%> | Asignados | Profesorado | Prof/Cred | Responsable |
<%
totalCreditos=0
totalCarga=0
totalCapacidad=0
While Not regs.EOF
Set otroregs=Conn.Execute("SELECT Sum(Créditos) as SumaDeCreditos FROM (select distinct Asignatura, Módulo, Grupo, Cuatrimestre, Semana, Créditos from POD WHERE Activo=true and GID=" & regs("Id") & ");")
Creditos=round(otroregs("SumaDeCreditos"),2)
otroregs.Close
Set otroregs=Conn.Execute("SELECT Sum(Carga) as SumaDeCarga FROM POD WHERE Activo=true and POD.GID=" & regs("Id") & ";")
Carga=round(otroregs("SumaDeCarga"),2)
otroregs.Close
Set otroregs=Conn.Execute("SELECT Sum(""Capacidad real"") as SumaDeCapacidad FROM ProfConsulta WHERE ProfConsulta.GIDpref=" & regs("Id") & ";")
if len(otroregs("SumaDeCapacidad"))>1 then
Capacidad=round(otroregs("SumaDeCapacidad"),2)
else
Capacidad=0
end if
otroregs.Close
totalCreditos=totalCreditos+Creditos
totalCarga=totalCarga+Carga
totalCapacidad=totalCapacidad+Capacidad
Cad=nombra(regs("Apellidos"),regs("Nombre"))
if Len(Cad)<4 Then Cad=regs("Alias")
Response.Write "| " & regs("NombreGID") & " | "
Response.Write "" & Creditos & " | " &Carga & " | " & Capacidad & " | " & round(100*Capacidad/Creditos,0) & "% | "
Response.Write "" & Cad & " | "
%>
<%
regs.MoveNext
Wend
regs.Close
%>
<%
Response.Write " | " & totalCreditos & " | " &totalCarga & " | " &totalCapacidad & " | " & round(100*totalCapacidad/totalCreditos,0) & "% | | "
%>
Asignaturas sin GID asignado
<%
Set regs=Conn.Execute("SELECT DISTINCT Módulo, Asignatura, Titulación, Curso FROM POD WHERE (POD.GID Is Null) and Activo and (CredExtern=0 or CredExtern Is Null) ORDER BY Asignatura")
%>
| Asignatura | Titulación |
<%
While Not regs.EOF
'Cad=nombra(regs("Apellidos"),regs("Nombre"))
'if Len(Cad)<4 Then Cad=regs("Alias")
Response.Write "| " & regs("Asignatura") & " | "
'Response.Write "" & regs("Titulación") & " | "
Response.Write "" & regs("Titulación") & " (" & regs("Curso") & "º)"
%>
|
<%
regs.MoveNext
Wend
regs.Close
%>
<%
else
%>
Los GID están disponibles a partir del curso 2010/2011 incluido.
<%
end if
'----------------------------------------------
' LISTADO NPI (Profesores)
'----------------------------------------------
case Else 'NPI
%>
Listado de Profesores
<%
if admin=1 then
Set regs=Conn.Execute("SELECT * FROM ProfConsulta WHERE NPI<>'X0000' ORDER BY Saldo,Alias") ' WHERE NPI=""H1259"" ORDER BY NOM,Grupocat")
%>
| NPI | Área | Profesor | Contrato | Capacidad | Saldo |
<%
else
Set regs=Conn.Execute("SELECT * FROM Profesores WHERE NPI<>'X0000' ORDER BY Alias") ' WHERE NPI=""H1259"" ORDER BY NOM,Grupocat")
%>
| NPI | Área | Profesor | Contrato |
<%
end if
While Not regs.EOF
Cad=nombra(regs("Apellidos"),regs("Nombre"))
if Len(Cad)<4 Then Cad=regs("Alias")
Response.Write "| " & regs("NPI") & " | " & regs("Area") & " | " & Cad & " | " & regs("Categoría") & " | "
if admin=1 then
Response.Write "" & regs("Capacidad real") & " | " & regs("Saldo") & " | "
end if
%>
<%
regs.MoveNext
Wend
regs.Close
%>
<%
end select ' El de Listados
'----------------------------------------------
'
' PROFESORES
'
'----------------------------------------------
case "NPI"
Set regs=Conn.Execute("SELECT * FROM Profesores WHERE NPI='" & npiprof & "'")
if not regs.EOF then
nombreprof=nombra(regs("Apellidos"),regs("Nombre"))
if Len(nombreprof)<4 then nombreprof=regs("Alias")
Response.Write "" & regs("NPI") & " " & nombreprof & "
"
else
Response.Write "Profesor no encontrado
"
end if
regs.Close
%>
Resumen
| Área | Contrato | Tareas | Reducciones | Capacidad |
Total Docencia | Saldo |
<%
Set regs=Conn.Execute("SELECT * FROM Parametros")
valorpfc=regs("ValorPFC")
if Version>=091000 then
valorpfcmas=regs("ValorPFCMas")
if Version>=101100 then
valorpfcleido=regs("ValorPFCleido")
else
valorpfcleido=0
end if
else
valorpfcmas=0
valorpfcleido=0
end if
regs.close
// ProfConsulta no existe en bases de datos anteriores a la ultima de 0607 que es la ultima, asi que esta en todas :-)
Set regs=Conn.Execute("SELECT * FROM ProfConsulta WHERE NPI='" & npiprof & "'")
if IsNull(regs("CredAjustes")) then
credajust=0
else
credajust=regs("CredAjustes")
end if
if IsNull(regs("CredTribunales")) then
credtribu=0
else
credtribu=regs("CredTribunales")
end if
if IsNull(regs("ProyFirmados")) then
proyfirm=0
else
proyfirm=regs("ProyFirmados")
end if
if IsNull(regs("ProyAdicionales")) then
proyadic=0
else
proyadic=regs("ProyAdicionales")
end if
if IsNull(regs("Total Reducciones")) then
totred=0
else
totred=regs("Total Reducciones")
end if
proymaster=0
tribumaster=0
ajustesmaster=0
if (Version>=091000) then
if not IsNull(regs("ProyMaster")) then
proymaster=regs("ProyMaster")
end if
if not IsNull(regs("TribuMaster")) then
tribumaster=regs("TribuMaster")
end if
if not IsNull(regs("AjustesMaster")) then
ajustesmaster=regs("AjustesMaster")
end if
end if
proyfirmC=round(proyfirm*valorpfcleido,2)
proyadicC=round(proyadic*valorpfc,2)
proymasterC=round(proymaster*valorpfcmas,2)
' proycredtot=round(credtribu+credajust+(proyadic+proyfirm)*valorpfc+proymaster*valorpfcmas,2)
proycredtot=round(credtribu+credajust+tribumaster+ajustesmaster+proyadic*valorpfc+proyfirm*valorpfcleido+proymaster*valorpfcmas,2)
if (Left(nompod,4))<809 then
capaprof=round(regs("Capacidad real")-totred,2)
else
capaprof=round(regs("Capacidad real"),2)
end if
totalCarga=round(regs("Total Docencia"),2)
%>
| <%=regs("Area")%> |
<%=regs("Categoría")%> |
<%=regs("Reducciones")%> |
<%=regs("Total Reducciones")%> |
<%=capaprof%> |
<%=round(regs("Total Docencia"),2)%> |
<%=round(regs("Saldo"),2)%> |
Proyectos
| Proy. Grado leídos (<%=valorpfcleido%> <%=UnidAbrev%>/pr) |
Proy. Grado asig. (<%=valorpfc%> <%=UnidAbrev%>/pr) |
Proy. Máster (<%=valorpfcmas%> <%=UnidAbrev%>/pr) |
Tribunal Grado |
Tribunal Máster |
TOTAL Proy. |
| <%=proyfirm%> (<%=proyfirmC%> <%=UnidAbrev%>.) |
<%=proyadic%> (<%=proyadicC%> <%=UnidAbrev%>.) |
<%=proymaster%> (<%=proymasterC%> <%=UnidAbrev%>.) |
<%=credtribu%> <%=UnidAbrev%>. |
<%=tribumaster%> <%=UnidAbrev%>. |
<%=proycredtot%> <%=UnidAbrev%>. |
<%
regs.Close
if Version>=101100 then ' GIDs
%>
Grupos de Interés Docente
<%
Set regs=Conn.Execute("SELECT Profesores.*, GID.* FROM Profesores left join GID on Profesores.GIDpref=GID.Id WHERE Profesores.NPI='" & npiprof & "'")
Response.Write "GID favorito: " & regs("NombreGID") & "
"
regs.Close
%>
| GID | Carga | Participación |
<%
Set regs=Conn.Execute("SELECT Alias,NPI,Sum(POD.Carga) as SumaDeCarga, GIDpref, GID.Id, NombreGID FROM Profesores inner JOIN (GID inner JOIN POD ON GID.Id = POD.GID) ON Profesores.NPI = POD.Profesor WHERE Activo=true and Profesores.NPI='" & npiprof & "' GROUP BY GID.Id, NombreGID, GIDpref, Alias,NPI ORDER BY 3 DESC;")
while Not regs.EOF
Carga=round(regs("SumaDeCarga"),2)
Response.Write "| " & regs("NombreGID") & " | " & Carga & " | " & round(100*Carga/totalCarga,1) & "% |
"
regs.MoveNext
Wend
regs.Close
%>
<%
end if
if not podnew then
%>
Docencia completa según POD
| Módulo |
Asignatura |
Titulación |
Cur. |
Grupo |
Cuat. |
Sem. |
I. |
Horario |
Aula |
<%=UnidadCarga%> |
<%
Set regs=Conn.Execute("SELECT * FROM [POD informe] WHERE NPI='" & npiprof & "' ORDER BY Asignatura,[POD informe].Grupo,Cuatrimestre")
While Not regs.EOF
Response.Write "| " & regs("Módulo") & " | " & chr(13)
Response.Write "" & "" & regs("Asignatura") & "" & " | "
Response.Write "" & regs(coltit) & " | "
Response.Write "" & regs("Curso") & " | "
Response.Write "" & regs("Grupo") & " | "
Response.Write "" & regs("Cuatrimestre") & " | "
Response.Write "" & regs("Semana") & " | "
Response.Write "" & regs("Idioma") & " | "
Response.Write "" & regs("Horario") & " | "
Response.Write "" & regs("Aula") & " | "
Response.Write "" & regs("Carga") & "/" & regs("Créditos") & " | "
regs.MoveNext
%>
<%
Wend
regs.Close
%>
<%
end if
if podnew then
%>
Docencia completa según POD
<%else %>
Docencia sólo de asignaturas con horario disponible
<% end if %>
<%
call listaAsig(Pagina,"")
%>
Tutorías
<%
if TutoriasOK then
Set tutConn=Server.CreateObject("ADODB.Connection")
tutConn.ConnectionString = "DBQ=" & CaminoTutorias & ";DRIVER={Microsoft Access Driver (*.mdb)}"
On error resume next
tutConn.Open
if Err.Number=0 then
On error goto 0
%>
| Cuatrimestre |
Día |
De |
Hasta |
Lugar |
<%
Set regs=tutConn.Execute("SELECT * FROM Tutorias WHERE Profesor='" & npiprof & "' ORDER BY Cuatrimestre")
While Not regs.EOF
if Len(regs("HINI"))>3 and Len(regs("HFIN"))>3 then
Response.Write "| " & regs("Cuatrimestre") & " | " & chr(13)
Response.Write "" & regs("Dia") & " | "
Response.Write "" & Left(regs("HINI"),Len(Regs("HINI"))-3) & " | "
Response.Write "" & Left(regs("HFIN"),Len(Regs("HFIN"))-3) & " | "
Response.Write "" & regs("Lugar") & " | "
end if
regs.MoveNext
%>
<%
Wend
regs.Close
'tutConn.Close
%>
<%
else
On error goto 0
TutoriasOK=false
Response.Write "La base de datos de tutorías no está disponible en estos momentos pues la están modificando.
"
end if
%>
<%
else
%>
Cuando se termine de asignar el POD se pondrán las tutorías. Ahora no tiene mucho sentido.
<%end if %>
Horario
<%
' Clases normales y tutorias
'MeteHorario("NPI")
PonTodoHorario("NPI")
if TutoriasOK then tutConn.Close
'----------------------------------------------
'
' ASIGNATURAS
'
'----------------------------------------------
case "MOD"
Set regs=Conn.Execute("SELECT * FROM [POD informe] WHERE Módulo=" & modulo )
elnomasiga=""
if regs.EOF then
Response.Write "Asignatura no encontrada
"
else
While not regs.EOF
elnomasig=filtra(regs("Asignatura"))
if not (elnomasig=elnomasiga) then
Response.Write "" & regs("Módulo") & " " & elnomasig & "
"
elnomasiga=elnomasig
end if
regs.MoveNext
Wend
end if
regs.Close
%>
Tabla de Horario
<%
' Clases normales
'MeteHorario()
PonTodoHorario("MOD")
%>
Entradas en el POD
<%
call listaAsig(Pagina,"")
%>
Resumen de cargas (Agrupa profesores de un mismo grupo)
<%
call listaAsig(Pagina,"res")
'----------------------------------------------
'
' AULAS
'
'----------------------------------------------
case "AULA"
'Set regs=Conn.Execute("SELECT * FROM PODhorarioweb WHERE Carga>0 AND Edi=" & edi & " AND P='" & p & "' AND Naula=" & naula )
Set regs=Conn.Execute("SELECT * FROM PODhorarioweb WHERE " & regaula & "='" & aula & "'" )
if not regs.EOF then
Response.Write "" & regs(regaula) & "
"
else
'Response.Write "Aula no encontrada
"
Response.Write "Aula no encontrada " & aula & "
"
end if
regs.Close
%>
Tabla de Horario
<%
' Clases normales
'MeteHorario("AULA")
PonTodoHorario("AULA")
%>
Formato texto
<%
call listaAsig(Pagina,"")
'----------------------------------------------
'
' CURSOS
'
'----------------------------------------------
case "CUR"
'Set regs=Conn.Execute("SELECT * FROM PODhorarioweb WHERE Carga>0 AND Edi=" & edi & " AND P='" & p & "' AND Naula=" & naula )
' Set regs=Conn.Execute("SELECT * FROM PODhorarioweb WHERE Curso=" & curso & " AND Titulación='" & titulacion & "'" )
if podtitu then
Set regs=Conn.Execute("SELECT * FROM PODtitu WHERE activo=true and Cur=" & curso & " AND Titu='" & titulacion & "'" )
else
Set regs=Conn.Execute("SELECT * FROM POD WHERE activo=true and Curso=" & curso & " AND Titulación='" & titulacion & "'" )
end if
if not regs.EOF then
Response.Write "" & titulacion & ": Curso " & curso & ".
"
else
Response.Write "Curso y/o titulación no encontrados.
"
end if
regs.Close
if Left(nompod,4)>"0809" then
%>
Ver como en la agenda
<%
end if
%>
Tabla de Horario
<%
' Clases normales
'MeteHorario("CUR")
PonTodoHorario("CUR")
%>
Formato texto
<%
call listaAsig(Pagina,"")
'----------------------------------------------
'
' GID
'
'----------------------------------------------
case "GID"
if Version>=101100 then
Set regs=Conn.Execute("SELECT Profesores.*, GID.* FROM Profesores right join GID on Profesores.NPI=GID.Responsable WHERE Id=" & idgid)
if not regs.EOF then
Response.Write "" & regs("NombreGID") & "
"
Cad=nombra(regs("Apellidos"),regs("Nombre"))
if Len(Cad)<4 Then Cad=regs("Alias")
Response.Write ""
regs.Close
Set regs=Conn.Execute("SELECT Sum(Créditos) as SumaDeCreditos FROM (select distinct Asignatura, Módulo, Grupo, Cuatrimestre, Semana, Créditos from POD WHERE Activo=true and GID=" & idgid & ");")
Creditos=round(regs("SumaDeCreditos"),2)
regs.Close
Set regs=Conn.Execute("SELECT Sum(Carga) as SumaDeCarga FROM POD WHERE Activo=true and POD.GID=" & idgid & ";")
Carga=round(regs("SumaDeCarga"),2)
regs.Close
Set regs=Conn.Execute("SELECT Sum(""Capacidad real"") as SumaDeCapacidad FROM ProfConsulta WHERE ProfConsulta.GIDpref=" & idgid & ";")
if len(regs("SumaDeCapacidad"))>1 then
Capacidad=round(regs("SumaDeCapacidad"),2)
else
Capacidad=0
end if
regs.Close
%>
<%
Response.Write "| " & UnidadCarga & " | " & Creditos & " |
"
Response.Write "| Asignado | " & Carga & " |
"
Response.Write "| Profesorado | " & Capacidad & " |
"
Response.Write "| Prof/Cred | " & round(100*Capacidad/Creditos,0) & "% |
"
%>
<%
else
Response.Write "GID no encontrado
"
regs.Close
end if
%>
Profesores interesados en este GID
| Profesor | Carga | Participación |
<%
Set regs=Conn.Execute("SELECT Alias,NPI,Sum(POD.Carga) as SumaDeCarga, GIDpref FROM Profesores inner JOIN (GID inner JOIN POD ON GID.Id = POD.GID) ON Profesores.NPI = POD.Profesor WHERE Activo=true and GID.Id=" & idgid & " and GIDpref=" & idgid & " GROUP BY GIDpref, Alias,NPI ORDER BY 3 DESC;")
totalCarga=0
While Not regs.EOF
totalCarga=totalCarga+round(regs("SumaDeCarga"),2)
Response.Write "| " & regs("Alias") & " | "
Response.Write "" & round(regs("SumaDeCarga"),2) & " | "
Response.Write "" & round(100*regs("SumaDeCarga")/Creditos,1) & "% | "
regs.MoveNext
%>
<%
Wend
regs.Close
%>
| TOTAL | <%=totalCarga%> | |
Profesores interesados en otro GID
| Profesor | Carga | Participación |
<%
Set regs=Conn.Execute("SELECT Alias,NPI,Sum(POD.Carga) as SumaDeCarga, GIDpref FROM Profesores inner JOIN (GID inner JOIN POD ON GID.Id = POD.GID) ON Profesores.NPI = POD.Profesor WHERE Activo=true and GID.Id=" & idgid & " and GIDpref<>" & idgid & " GROUP BY GIDpref, Alias,NPI ORDER BY 3 DESC;")
totalCarga=0
While Not regs.EOF
totalCarga=totalCarga+round(regs("SumaDeCarga"),2)
Response.Write "| " & regs("Alias") & " | "
Response.Write "" & round(regs("SumaDeCarga"),2) & " | "
Response.Write "" & round(100*regs("SumaDeCarga")/Creditos,1) & "% | "
regs.MoveNext
%>
<%
Wend
regs.Close
%>
| TOTAL | <%=totalCarga%> | |
Asignaturas (Resumen resumido)
| Asignatura | Titulación | Créditos | Participación |
<%
'Set regs=Conn.Execute("SELECT Módulo,Asignatura,Sum(POD.Carga) as SumaDeCarga FROM Profesores inner JOIN (GID inner JOIN POD ON GID.Id = POD.GID) ON Profesores.NPI = POD.Profesor WHERE Activo=true and GID.Id=" & idgid & " GROUP BY Alias,NPI ORDER BY 3 DESC;")
Set regs=Conn.Execute("SELECT Titulación, Curso, Módulo, Asignatura, Sum(Créditos) as SumaDeCreditos FROM (select distinct Titulación, Curso, Asignatura, Módulo, Grupo, Cuatrimestre, Semana, Créditos from POD WHERE Activo=true and GID=" & idgid & ") GROUP BY Titulación, Curso, Módulo, Asignatura ORDER BY Titulación, Curso, Asignatura;")
While Not regs.EOF
Response.Write "| " & regs("Asignatura") & " | "
Response.Write "" & regs("Titulación") & " (" & regs("Curso") & "º)"
Response.Write " | " & round(regs("SumaDeCreditos"),2) & " | "
Response.Write "" & round(100*regs("SumaDeCreditos")/Creditos,1) & "% | "
regs.MoveNext
%>
<%
Wend
regs.Close
%>
Asignaturas (Resumen de cargas)
<%
call listaAsig("GID","res")
%>
Asignaturas (POD)
<%
call listaAsig("GID","")
else
Response.Write "Los GID se pusieron a partir del curso 2010/2011 inluido.
"
end if
'----------------------------------------------
'
' DONDE
'
'----------------------------------------------
case "DONDE"
Dim mhini(10),mhfin(10),meldia(10)
if Len(tt)<2 then
tactual=Time()
else
tactual=CDate(tt)
end if
if Len(ff)<2 then
factual=date()
else
if (ff="Ahora") then
factual=date()
else
factual=CDate(ff)
end if
end if
%>
Actividad docente del departamento en este instante
Se puede pedir cualquier fecha y hora añadiendo ?FECHA=dd/mm/aaa&HORA=hh:mm como argumentos de la página. El campo Fecha admite el valor especial Ahora: (Ej. FECHA=Ahora).
| Fecha pedida: | <%=factual%> <%=tactual%> |
| Fecha actual: | <%=now%> |
| Profesor |
Módulo |
Asignatura |
Titulación |
Grupo |
Cuat. |
Sem. |
Horario |
Lugar |
<%=UnidadCarga%> |
<%
ordenar="Alias"
if Month(factual)>1 and month(factual)<8 Then
Cuat=2
else
Cuat=1
End if
if podnew then
Set regs=Conn.Execute("SELECT * FROM PODhorarioweb WHERE (Cuatrimestre='0' OR Cuatrimestre='" & Cuat & "') ORDER BY " & ordenar) ' aun lo tengo que hacer... no es tan facil ahora....
else
Set regs=Conn.Execute("SELECT * FROM PODhorarioweb WHERE (Cuatrimestre='0' OR Cuatrimestre='" & Cuat & "') AND HINICdate('" & tactual & "') AND D='" & numdia(factual) & "' ORDER BY " & ordenar)
end if
While Not regs.EOF
if podnew then
pertenece=false
mh=0
md=0
cadhorarioini=regs("Horario")
cadhorario=""
while Len(cadhorarioini)>0
if (Left(cadhorarioini,1)<>" ") then cadhorario=cadhorario & Left(cadhorarioini,1) ' quito espacios
cadhorarioini=Right(cadhorarioini,Len(cadhorarioini)-1)
wend
'Response.write(regs("Asignatura") & cadhorario & "
")
while (Len(cadhorario)>5) and not pertenece
while esdia(Left(cadhorario,1))
'meldia(md)=dianum(Left(cadhorario,1))
meldia(md)=Left(cadhorario,1)
md=md+1
cadhorario=Right(cadhorario,Len(cadhorario)-1)
wend
'Response.write(cadhorario & "
")
chini=Left(cadhorario,instr(cadhorario,"-")-1)
'Response.write(chini & "
")
hini=CDate(chini)
cadhorario=Right(cadhorario,Len(cadhorario)-Len(chini)-1)
chfin=Left(cadhorario,instr(cadhorario,":")+2)
'Response.write(chfin & "
")
hfin=CDate(chfin)
cadhorario=Right(cadhorario,Len(cadhorario)-Len(chfin))
while mh=CDate(tactual) then pertenece=true
'mhini(mh)=hini
'mhfin(mh)=hfin
mh=mh+1
wend
wend
'numhoras=md
else
pertenece=true
end if
if pertenece then
Response.Write ""
Response.Write "| " & regs("Alias") & " | "
Response.Write "" & regs("Módulo") & " | " & chr(13)
Response.Write "" & regs("Asignatura") & " | "
Response.Write "" & regs("Titulación") & " | "
Response.Write "" & regs("Grupo") & " | "
Response.Write "" & regs("Cuatrimestre") & " | "
Response.Write "" & regs(regsem) & " | "
Response.Write "" & regs("Horario") & " | "
'Response.Write "" & regs("D") & " | "
'Response.Write "" & regs("HINI") & " | "
'Response.Write "" & regs("HFIN") & " | "
'Response.Write "" & regs("Aula") & " | "
Response.Write "" & regs(regaula) & " | "
Response.Write "" & regs("Carga") & "/" & regs("Créditos") & " | "
end if
regs.MoveNext
%>
<%
Wend
regs.Close
%>
<%
'----------------------------------------------
'
' ACTIVIDADES
'
'----------------------------------------------
case "ACT"
if actreq="-2" then
Set regs=Conn.Execute("SELECT * FROM ActividadConsulta WHERE Profesor='" & npiprofa & "' ORDER BY NombreActiv")
if not regs.EOF then
nombreprof=nombra(regs("Apellidos"),regs("Nombre"))
if Len(nombreprof)<4 then nombreprof=regs("Alias")
Response.Write "" & regs("Profesor") & " " & nombreprof & "
"
else
Response.Write "Profesor sin actividad registrada
"
end if
elseif actreq>0 then
Set regs=Conn.Execute("SELECT * FROM ActividadConsulta WHERE ActividadId=" & actreq & " ORDER BY Apellidos")
Response.Write "" & regs("NombreActiv") & "
"
else
%>
Consulta de Actividades de Gestión
<%
end if
%>
Listado de profesores
Listado de actividades de gestión
<%
If (actreq=0) then ' Listado de profesores
if len(orden)<1 then orden=0
if (orden=0) then orden=11 'default
miorden=orden mod 10
if miorden=1 then ordencad1="Categoría"
if miorden=2 then ordencad1="Alias"
if miorden=3 then ordencad1="Coeficiente"
ordendir=""
if orden>9 then ordendir="DESC"
neworden=0
if orden<10 then neworden=10
%>
<%
elseif (actreq="-2") then ' Profesor concreto
%>
Actividades de gestión
| Actividad | Coeficiente |
<%
tcoef=0
While Not regs.EOF
coef=regs("actcoef")
tcoef=tcoef+coef
activ=regs("NombreActiv")
Response.Write "| " & activ & " | " & coef & " | "
%>
<%
regs.MoveNext
Wend
regs.Close
%>
<%
Response.Write "| TOTAL | " & tcoef & " | "
%>
<%
elseif (actreq="-1") then 'Listado de actividades
%>
Actividades de gestión
| Actividad | Coeficiente |
<%
Set regs=Conn.Execute("SELECT * FROM Actividades ORDER BY Actividad")
While Not regs.EOF
coef=regs("Coeficiente")
activ=regs("Actividad")
Response.Write "| " & activ & " | " & coef & " | "
%>
<%
regs.MoveNext
Wend
regs.Close
%>
<%
else ' Actividad concreta (actreq>0)
%>
Participantes
| Profesor | Coeficiente | |
<%
While Not regs.EOF
nombreprof=nombra(regs("Apellidos"),regs("Nombre"))
if Len(nombreprof)<4 then nombreprof=regs("Alias")
coef=regs("profcoef")
Response.Write "| " & nombreprof & " | " & coef & " | "
Response.Write "" & Replace(String(2*coef,"A"),"A"," ") & " | "
%>
<%
regs.MoveNext
Wend
regs.Close
%>
<%
End if
'----------------------------------------------
'
' COMPARA
'
'----------------------------------------------
case "COMP"
' Lo quité para no liar
end select ' General de Página
Conn.Close
%>