<%@ Language=VBScript %> IEEE Survey <% dim decision dim outReachEventK12, outReachEventUG,useVideo2InClass, useVideo2InOutreach, receiveVideo2 dim reportID, userID dim trackPage dim finish dim OUTRUG,OUTRK12,VIDCLASS,VIDOUTR,VIDRCVD dim goToPage dim errorcount on error resume next 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 'check if the user has fill out this page sqlQuery = "select * from tbl_IEEE_report where REID="&reportID set RSBuffer = conn.Execute(sqlQuery) if RSbuffer.eof = false then if trim(RSBUFFER("REPEOUTREVENTUG")) <> "" then OUTRUG = cint(RSBUFFER("REPEOUTREVENTUG")) end if if trim(RSBUFFER("REPEOUTREVENTK12")) <> "" then OUTRK12= cint(RSBUFFER("REPEOUTREVENTK12")) end if if trim(RSBUFFER("RERCVDVIDEO")) <> "" then VIDRCVD = cbool(RSBUFFER("RERCVDVIDEO")) end if if trim(RSBUFFER("RERCVDVIDEOCLASS")) <> "" then VIDCLASS = cbool(RSBUFFER("RERCVDVIDEOCLASS")) end if if trim(RSBUFFER("RERCVDVIDEOOUTR")) <> "" then VIDOUTR = cbool(RSBUFFER("RERCVDVIDEOOUTR")) end if end if decision= trim(Request.form("decision")) if decision <> "move" and decision <> "exit" then if VIDRCVD= true then vidrcvdYes = "checked" else if VIDRCVD = false then vidrcvdNo = "checked" end if end if if VIDCLASS = true then vidclassYes = "checked" else if VIDCLASS = false then vidclassNo = "checked" end if end if if VIDOUTR = true then vidoutrYes = "checked" else if VIDOUTR = false then vidoutrNo = "checked" end if end if %>
  ELECTRIC POWER ENGINEERING EDUCATIONAL RESOURCES SURVEY
 Power Engineering Education Committee of IEEE Power Engineering Society
 Reporting Period: Fiscal or Academic Year '05-'06
 
 





Page 5: Outreach

Reporting period: Fiscal or academic year 05-06

Have you received the IEEE PES Video #2: "Power Engineering: Careers that make Technology Work"? >Yes >No
Do you use IEEE PES Video #2 in class? >Yes >No
Do you use IEEE PES Video #2 for outreach? >Yes >No
In how many total power engineering-related outreach events per year do one or more of your power faculty participate?  K-12   Undergraduate

You have to press the 'Submit survey' button if you are done filling the survey.

<% else if trim(Request.Form("outReachEventK12")) = "" then outReachEventK12 = 0 else outReachEventK12 = cint(Request.Form("outReachEventK12")) end if if trim(Request.Form("outReachEventUG")) = "" then outReachEventUG = 0 else outReachEventUG = cint(Request.Form("outReachEventUG")) end if if trim(Request.Form("useVideo2InClass")) = "yes" then useVideo2InClass = 1 else useVideo2InClass = 0 end if if trim(Request.Form("useVideo2InOutreach")) = "yes" then useVideo2InOutreach = 1 else useVideo2InOutreach = 0 end if if trim(Request.Form("receiveVideo2"))="yes" then receiveVideo2 = 1 else receiveVideo2 = 0 end if sqlQuery = "update tbl_IEEE_report set RERCVDVIDEO="&receiveVideo2&",RERCVDVIDEOCLASS="&useVideo2InClass sqlQuery = sqlQuery & ", RERCVDVIDEOOUTR="&useVideo2InOutreach&",REPEOUTREVENTUG="&outReachEventUG sqlQuery = sqlQuery & ", REPEOUTREVENTK12="&outReachEventK12&" where REID="&reportID 'Response.Write sqlQuery conn.Execute(sqlQuery) if decision = "move" then 'pass these vars to the processing part session("userID")=cint(userID) session("reportID")=cint(reportID) goToPage = cint(Request.Form("goToPage")) if goToPage=6 then errorcount=0 %>
  ELECTRIC POWER ENGINEERING EDUCATIONAL RESOURCES SURVEY
 Power Engineering Education Committee of IEEE Power Engineering Society
 Reporting Period: Fiscal or Academic Year '05-'06
 
 





<% 'check the whole survey for any error in data '**************************************************************************************** Response.Write "

You need to fill the following data:


" sqlQuery="select * from tbl_IEEE_report where REID="&reportID set RSbuffer = conn.Execute(sqlQuery) if trim(RSbuffer("RECALENDAR")) = "" then Response.Write "'School Calendar' at page 1
" errorcount = errorcount+1 end if if trim(RSbuffer("RECOOP")) = "" then Response.Write "'Coop program' at page 1
" errorcount = errorcount+1 end if if trim(RSbuffer("RERCVDVIDEO")) = "" then Response.Write "'Have you received video #2' at page 5
" errorcount = errorcount+1 end if sqlQuery = "select * from tbl_IEEE_faculty where FAREID="&reportID set RSbuffer = conn.Execute(sqlQuery) do while RSbuffer.eof = false if trim(RSbuffer("FAFNAME")) = "" then Response.Write "'Instructor's first name' at page 2
" errorcount = errorcount+1 end if if trim(RSbuffer("FALNAME")) = "" then Response.Write "'Instructor's last name' at page 2
" errorcount = errorcount+1 end if if trim(RSbuffer("FACNID")) = "" then Response.Write "'Instructor's rank' at page 2
" errorcount = errorcount+1 end if if trim(RSbuffer("FACNID2")) = "" then Response.Write "'Instructor's highest degree' at page 2
" errorcount = errorcount+1 end if if trim(RSbuffer("FAPEREG")) = "" then Response.Write "'Instructor's PE registration' at page 2
" errorcount = errorcount+1 end if if trim(RSbuffer("FACNID3")) = "" then Response.Write "'Instructor's PES grade' at page 2
" errorcount = errorcount+1 end if if trim(Rsbuffer("FAEXPACD")) = "" then Response.Write "'Instructor's academic experience' at page 2
" errorcount = errorcount+1 end if if trim(Rsbuffer("FAEXPIND")) = "" then Response.Write "'Instructor's power industrial experience' at page 2
" errorcount = errorcount+1 end if if trim(RSbuffer("FAEXPOTHERIND")) = "" then Response.Write "'Instructor's other industrial experience' at page 2
" errorcount = errorcount+1 end if if trim(RSbuffer("FAACTPOWERTEACHING")) = "" then Response.Write "'Instructor's power teaching activity' at page 2
" errorcount = errorcount+1 end if if trim(RSbuffer("FAACTPOWERRESEARCH")) = "" then Response.Write "'Instructor's power research activity' at page 2
" errorcount = errorcount+1 end if if trim(RSbuffer("FAACTNOPOWER")) = "" then Response.Write "'Instructor's non-power activity' at page 2
" errorcount = errorcount+1 end if RSbuffer.movenext loop ' sqlQuery= "select * from tbl_IEEE_reportArea where RAREID="&reportID ' set RSbuffer = conn.Execute(sqlQuery) ' if RSbuffer.eof =false then 'if trim(RSbuffer("RAAREA")) = "" then ' Response.Write "'Research areas' at page 3
" ' errorcount = errorcount+1 'end if 'else ' Response.Write "'Research areas' at page 3
" ' errorcount = errorcount+1 'end if sqlQuery="select * from tbl_IEEE_course where COREID="&reportID set RSbuffer = conn.Execute(sqlQuery) do while Rsbuffer.eof = false if RSbuffer("COCR") = 0 then Response.Write "'Course credit hour' at page 4
" errorcount = errorcount+1 end if if Rsbuffer("COHOLECTURE") = 0 and Rsbuffer("COHOLAB") = 0 then Response.Write "'Course lecture hour and lab hour' at page 4
" errorcount = errorcount+1 end if 'if RSbuffer("COENROLLON") = 0 and RSbuffer("COENROLLOFF") = 0 then ' Response.write "'Course on campus enrollment and off campus enrollment' at page 4
" ' errorcount = errorcount+1 'end if RSbuffer.movenext loop 'sqlQuery = "select * from tbl_IEEE_graduate where GRREID="&reportID 'set RSbuffer = conn.Execute(sqlQuery) 'if Rsbuffer.eof = false then 'if RSbuffer("GRMAFTENR") = 0 and _ ' RSbuffer("GRMAPTENR") = 0 and _ ' RSbuffer("GRDOFTENR") = 0 and _ ' RSbuffer("GRDOPTENR") = 0 and _ ' RSbuffer("GRMAFTGRA") = 0 and _ ' RSbuffer("GRMAPTGRA") = 0 and _ ' RSbuffer("GRDOFTGRA") = 0 and _ ' RSbuffer("GRDOPTGRA") = 0 and _ ' RSbuffer("GRMAFTDOM") = 0 and _ ' RSbuffer("GRMAPTDOM") = 0 and _ ' RSbuffer("GRDOFTDOM") = 0 and _ ' RSbuffer("GRDOPTDOM") = 0 and _ ' RSbuffer("GRMAFTSELF") = 0 and _ ' RSbuffer("GRMAPTSELF") = 0 and _ ' RSbuffer("GRDOFTSELF") = 0 and _ ' RSbuffer("GRDOPTSELF") = 0 and _ ' RSbuffer("GRMAFTRA") = 0 and _ ' RSbuffer("GRMAPTRA") = 0 and _ ' RSbuffer("GRDOFTRA") = 0 and _ ' RSbuffer("GRDOPTRA") = 0 and _ ' RSbuffer("GRMAFTTA") = 0 and _ ' RSbuffer("GRMAPTTA") = 0 and _ ' RSbuffer("GRDOFTTA") = 0 and _ ' RSbuffer("GRDOPTTA") = 0 and _ ' RSbuffer("GRMAFTSCSHIP") = 0 and _ ' RSbuffer("GRMAPTSCSHIP") = 0 and _ ' RSbuffer("GRDOFTSCSHIP") = 0 and _ ' RSbuffer("GRDOPTSCSHIP") = 0 and _ ' RSbuffer("GRMAFTINTL") = 0 and _ ' RSbuffer("GRMAPTINTL") = 0 and _ ' RSbuffer("GRDOFTINTL") = 0 and _ ' RSbuffer("GRDOPTINTL") = 0 then ' Response.Write "'Electric power graduate student's data' at page 3
" ' errorcount = errorcount+1 'end if 'else ' Response.Write "'Electric power graduate student's data' at page 3
" ' errorcount = errorcount+1 'end if 'if Rsbuffer.eof = false then 'if RSbuffer("GRMOEQUIPINTERNALENDOW") = 0 and _ ' RSbuffer("GRMOEQUIPINTERNALOTHER") = 0 and _ ' RSbuffer("GRMOEQUIPGOV") = 0 and _ ' RSbuffer("GRMOEQUIPDOMMANU") = 0 and _ ' RSbuffer("GRMOEQUIPDOMUTIL") = 0 and _ ' RSbuffer("GRMOEQUIPDOMOTHERIND") = 0 and _ ' RSbuffer("GRMOEQUIPFOREIGN") = 0 and _ ' RSbuffer("GRMOEQUIPTOTAL") = 0 and _ ' RSbuffer("GRMONONEQINTERNALENDOW") = 0 and _ ' RSbuffer("GRMONONEQINTERNALOTHER") = 0 and _ ' RSbuffer("GRMONONEQGOV") = 0 and _ ' RSbuffer("GRMONONEQDOMMANU") = 0 and _ ' RSbuffer("GRMONONEQDOMUTIL") = 0 and _ ' RSbuffer("GRMONONEQDOMOTHERIND") = 0 and _ ' RSbuffer("GRMONONEQFOREIGN") = 0 and _ ' RSbuffer("GRMONONEQTOTAL") = 0 then ' Response.Write "'Research expenditure data' at page 3
" ' errorcount = errorcount+1 'end if 'else ' Response.Write "'Research expenditure data' at page 3
" ' errorcount = errorcount+1 'end if '*********************************************************finish checking %>

You have to press the 'Submit survey' button if you are done filling the survey.
<% if errorcount = 0 then sqlQuery = "update tbl_IEEE_report set RETRACK = 5,REFINISH=1 where REID="&reportID Response.Write sqlQuery conn.Execute(sqlQuery) Response.Redirect("surveyFinish.asp") end if else if goToPage=5 then Response.Redirect("survey05.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 =4 then Response.Redirect("survey04pre.asp") 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 %>