<%@ Language=VBScript %> IEEE Survey <% dim decision dim courseNumber, count dim userID, reportID dim sqlQuery dim RSbuffer dim conn dim CONAME, COREQ, COOTHER,COURL dim COHOLECTURE,COHOLAB, COCR dim COENROLLON,COENROLLOFF dim COVIDEO,COCABLE,COVIDEOST dim COVIDEO2,COCABLE2,COVIDEOST2 dim UE,UR, GE, GR, blank dim goToPage dim coid, coIdDel on error resume next count =0 session.Timeout = 360 'get user id from the session object userID = cint(session("userID")) if userID = empty then userID = cint(Request.Form("userID")) end if 'if still cannot retrieve user id then automatically logged out if userID = "" or userID = 0 then Response.redirect("surveyLogin.asp?loginFail=yes") end if 'get the report id from the session object reportID =cint(session("reportID")) if reportID= empty then reportID= cint(Request.Form("reportID")) end if session("userID")=cint(userID) session("reportID")=cint(reportID) 'make connection set conn = server.CreateObject("ADODB.connection") conn.Open ConnectionString decision = trim(Request.Form("decision")) 'get the course number from database sqlQuery = "select * from tbl_IEEE_report where REID="&reportID set RSbuffer = conn.Execute(sqlQuery) if RSbuffer("RENOPAGE4")<>"" then courseNumber = cint(RSbuffer("RENOPAGE4")) else courseNumber = 1 end if if decision <> "move" and decision <> "exit" and decision <> "delete" then 'get the data for this page, if it has already exist sqlQuery = "select max(COCOID) as maxId, min(COCOID) as minId, count(*) as countCourse from tbl_IEEE_course where COREID="&reportID set RSbuffer = conn.Execute(sqlQuery) if RSbuffer.eof=false then if RSBuffer("maxID") <> "" then maxId = cint(RSbuffer("maxId")) else maxID = 0 end if else maxID=0 end if if RSbuffer.eof=false then if RSbuffer("minId") <> "" then minId = cint(RSbuffer("minId")) else minId = 1 end if else minId=1 end if 'override the course number that was get from survey04pre.asp if the database has more if courseNumber < cint(RSbuffer("countCourse")) then courseNumber = cint(RSbuffer("countCourse")) end if 'Response.Write "co:"&courseNumber&"
" sqlQuery = "select * from tbl_IEEE_course where COREID="&reportID set RSbuffer = conn.Execute(sqlQuery) 'Response.Write "courseNumber = "&courseNumber&" "&(maxid - (minid-1))&" "&maxID&" "&minID&"
" %>

  ELECTRIC POWER ENGINEERING EDUCATIONAL RESOURCES SURVEY
 Power Engineering Education Committee of IEEE Power Engineering Society
 Reporting Period: Fiscal or Academic Year '05-'06
 

 





Page 4: Power Course Offerings

Reporting period: Fiscal or academic year 05-06

Get the printer friendly empty form here.

<% do while courseNumber > 0 coid = 0 CONAME="" COREQ="" COCR=null COHOLECTURE=null COHOLAB=null COENROLLON=null COENROLLOFF=null COVIDEO="" COCABLE="" COVIDEOST="" COOTHER="" COURL="" if RSBuffer.eof = false then coid = cint(RSbuffer("COCOID")) CONAME =trim(RSBuffer("CONAME")) 'course requirement COREQ = trim(RSbuffer("COREQ")) UE ="" UR ="" GE ="" GR ="" if COREQ = "UE" then UE = "selected" else if COREQ ="UR" then UR = "selected" else if COREQ ="GE" then GE = "selected" else if COREQ ="GR" then GR="selected" else blank ="selected" end if end if end if end if if trim(RSbuffer("COCR")) <>"" then COCR = cint(RSbuffer("COCR")) else COCR=null end if if trim(RSbuffer("COHOLECTURE")) <> "" then COHOLECTURE = cint(RSbuffer("COHOLECTURE")) else COHOLECTURE =null end if if trim(RSbuffer("COHOLAB")) <> "" then COHOLAB = cint(RSBUffer("COHOLAB")) else COHOLAB = null end if if RSBUFFER("COENROLLON")="" then COENROLLON = 0 else COENROLLON = cint(RSBUFFER("COENROLLON")) end if if RSBUFFER("COENROLLOFF")="" then COENROLLOFF= 0 else COENROLLOFF = cint(RSBUFFER("COENROLLOFF")) end if if RSbuffer("COVIDEO") = "" then COVIDEO = "" else if cbool(RSbuffer("COVIDEO"))= true then COVIDEO = "checked" else COVIDEO = "" end if end if if RSBUFFER("COCABLE")= "" then COCABLE = "" else if cbool(RSBUFFER("COCABLE")) = true then COCABLE = "checked" else COCABLE = "" end if end if if RSBuffer("COVIDEOST") = "" then COVIDEOST = "" else if cbool(RSBuffer("COVIDEOST")) = true then COVIDEOST = "checked" else COVIDEOST = "" end if end if COOTHER = trim(RSbuffer("COOTHER")) COURL = trim(RSbuffer("COURL")) RSbuffer.movenext end if if COURL = "" then COURL ="http://" end if %> <% courseNumber = courseNumber -1 count = count +1 if courseNumber <= 0 then exit do end if coid = 0 CONAME="" COREQ="" COCR=null COHOLECTURE=null COHOLAB=null COENROLLON=null COENROLLOFF=null COVIDEO="" COCABLE="" COVIDEOST="" COOTHER="" COURL="" if RSBuffer.eof = false then coid = cint(RSbuffer("COCOID")) CONAME =trim(RSBuffer("CONAME")) 'course requirement COREQ = trim(RSbuffer("COREQ")) UE ="" UR ="" GE ="" GR ="" if COREQ = "UE" then UE = "selected" else if COREQ ="UR" then UR = "selected" else if COREQ ="GE" then GE = "selected" else if COREQ ="GR" then GR="selected" else blank ="selected" end if end if end if end if if trim(RSbuffer("COCR")) <>"" then COCR = cint(RSbuffer("COCR")) else COCR=null end if if trim(RSbuffer("COHOLECTURE")) <> "" then COHOLECTURE = cint(RSbuffer("COHOLECTURE")) else COHOLECTURE =null end if if trim(RSbuffer("COHOLAB")) <> "" then COHOLAB = cint(RSBUffer("COHOLAB")) else COHOLAB = null end if if RSBUFFER("COENROLLON")="" then COENROLLON = 0 else COENROLLON = cint(RSBUFFER("COENROLLON")) end if if RSBUFFER("COENROLLOFF")="" then COENROLLOFF= 0 else COENROLLOFF = cint(RSBUFFER("COENROLLOFF")) end if if RSbuffer("COVIDEO") = "" then COVIDEO = "" else if cbool(RSbuffer("COVIDEO"))= true then COVIDEO = "checked" else COVIDEO = "" end if end if if RSBUFFER("COCABLE")= "" then COCABLE = "" else if cbool(RSBUFFER("COCABLE")) = true then COCABLE = "checked" else COCABLE = "" end if end if if RSBuffer("COVIDEOST") = "" then COVIDEOST = "" else if cbool(RSBuffer("COVIDEOST")) = true then COVIDEOST = "checked" else COVIDEOST = "" end if end if COOTHER = trim(RSbuffer("COOTHER")) COURL = trim(RSbuffer("COURL")) RSbuffer.movenext end if if COURL = "" then COURL ="http://" end if %> <% courseNumber = courseNumber -1 count = count+1 loop %>

Course Name

Requirement

Credit Hours

No. of Weekly Contact Hours

Enrollment During Reporting Period - enter 0 if not offered during reporting period.

If course offered in distant-ed mode during reporting period, identify means of delivery

Course URL - Optional

Delete

Lecture

Lab

On-campus Students

Off-campus Students

Video tape

Cable

Video stream

Other, specify

> > > > > name=button<%=coid%>>
> > > > > name=button<%=coid%>>

 

> >

<% else 'pass these vars to the processing part session("userID")=cint(userID) session("reportID")=cint(reportID) if decision="delete" then if trim(Request.Form("coIDDel")) <> "" then coIDDel = cint(Request.Form("coIDDel")) else Response.Redirect("survey04.asp") end if sqlQuery = "delete from tbl_IEEE_course where COCOID="&coIDDel 'Response.Write(sqlQuery) conn.execute(sqlQuery) Response.Redirect("survey04.asp") else reportID = session("reportID") count = cint(Request.Form("count")) minID = cint(Request.Form("minID")) maxID = cint(Request.Form("maxID")) 'coID = minID Response.Write "count = "& count &"
" for i=0 to count coIDvar = "couId"&i courseVar = "course"&i requirementVar = "requirement"&i CrHourVar ="crHour"&i ContHoursLectureVar ="ContHoursLecture"&i ContHoursLabVar="ContHoursLab"&i EnrollOnCampusVar ="EnrollOnCampus"&i EnrollOffCampusVar ="EnrollOffCampus"&i dlvrVideoTapevar = "dlvrVideoTape"&i dlvrCablevar ="dlvrCable"&i dlvrVideoStreamvar ="dlvrVideoStream"&i dlvrOthervar ="dlvrOther"&i URLvar = "URL"&i 'trim(Request.Form(courseVar))="" 'trim(Request.Form(requirementVar))="" if Request.Form(coIDvar) <> 0 then coID = cint(Request.Form(coIDvar)) else coID =maxId+1 'to insert new data not updating old data end if if trim(Request.Form(crHourVar))="" then COCR=0 else COCR=cint(Request.Form(crHourVar)) end if if trim(Request.Form(contHoursLectureVar))="" then COHOLECTURE=0 else COHOLECTURE=cint(Request.Form(contHoursLectureVar)) end if if trim(Request.Form(contHoursLabVar))="" then COHOLAB = 0 else COHOLAB=cint(Request.Form(contHoursLabVar)) end if if trim(Request.Form(EnrollOnCampusVar))="" then COENROLLON = 0 else COENROLLON = cint(Request.Form(EnrollOnCampusVar)) end if if trim(Request.Form(EnrollOffCampusVar))="" then COENROLLOFF = 0 else COENROLLOFF= cint(Request.Form(EnrollOffCampusVar)) end if if trim(request.form(dlvrVideoTapeVar)) <> "" then COVIDEO2 = 1 else COVIDEO2 = 0 end if if trim(Request.Form(dlvrCablevar)) <>"" then COCABLE2 = 1 else COCABLE2 = 0 end if if trim(Request.Form(dlvrVIdeoStreamVar)) <> "" then COVIDEOST2 = 1 else COVIDEOST2 = 0 end if if coID <= maxID then if trim(Request.Form(courseVar)) <> "" then 'if the course name is blank, do not update it sqlQuery = "update tbl_IEEE_course set CONAME='"&trim(Request.Form(courseVar))&"'," sqlQuery = sqlQuery&"COREQ='"&trim(Request.Form(requirementVar))&"',COCR="&COCR sqlQuery = sqlQuery&",COHOLECTURE="&COHOLECTURE&",COHOLAB="&COHOLAB sqlQuery = sqlQuery&",COENROLLON="&COENROLLON&",COENROLLOFF="&COENROLLOFF&",COVIDEO=" sqlQuery = sqlQuery & COVIDEO2 &",COCABLE="&COCABLE2&",COVIDEOST="&COVIDEOST2&",COOTHER='" sqlQuery = sqlQuery& trim(Request.Form(dlvrOtherVar))&"',COURL='"&trim(Request.Form(URLVAR))&"' " sqlQuery = sqlQuery& "where COCOID="&coId Response.Write sqlQuery conn.execute(sqlQuery) end if else if trim(Request.Form(courseVar)) <> "" then sqlQuery = "insert into tbl_IEEE_course(COREID,CONAME,COREQ,COCR,COHOLECTURE,COHOLAB,COENROLLON," sqlQuery = sqlQuery & "COENROLLOFF,COVIDEO,COCABLE,COVIDEOST,COOTHER,COURL) values ("&reportID sqlQuery = sqlQuery &",'"&trim(Request.Form(courseVar))&"','"&trim(Request.Form(requirementVar))&"',"&COCR sqlQuery = sqlQuery &","&COHOLECTURE&","&COHOLAB&","&COENROLLON&","&COENROLLOFF&","&COVIDEO2&"," sqlQuery = sqlQuery & COCABLE2&","&COVIDEOST2&",'"&trim(Request.Form(dlvrOtherVar))&"','" sqlQuery = sqlQuery & trim(Request.Form(URLVAR))&"')" Response.Write sqlQuery conn.execute(sqlQuery) end if end if 'coID = coID+1 next if decision = "move" then goToPage = cint(Request.Form("goToPage")) if goToPage = 5 then sqlQuery = "update tbl_IEEE_report set RETRACK = 5 where REID="&reportID Response.Write sqlQuery conn.Execute(sqlQuery) Response.Redirect("survey05.asp") else if goToPage = 4 then Response.Redirect("survey04.asp") 'to save without exiting else if goToPage =1 then Response.Redirect("survey01.asp") else if goToPage =2 then Response.Redirect("survey02pre.asp") else if goToPage =3 then Response.Redirect("survey03.asp") else if goToPage=7 then Response.Redirect("survey04pre.asp?msg=change") end if end if end if end if end if end if else if decision = "exit" then session("userID") = "" session("reportID") = "" response.redirect("surveyLogin.asp") end if end if end if 'end of if decision = "delete" end if' end of decision <> "continue" and decision <> "exit" then %>