~(decode;~(schoolid);100;ES;200;MS;300HS)
It roughly translates to a DECODE statement in Oracle or a CASE statement in C. The equivilant IF statements would be:
IF schoolid==100Here is my dilemma. We are preparing to open the parent portion of Powerschool at the end of the month. Currently when a parent logs on the parent portal the first time it takes them to a page where they must agree to the terms of service before they are allowed onto the parent portal. After they do this it redirects them to the Grades and Attendance page with the following HTML redirect:
print "ES"
ELSEIF schoolid==200
print "MS"
ELSEIF schoolid==300
print "HS"
<meta equiv="Refresh" content="1;URL=/guardian/home2.html">The elementary school uses standards based report cards and in turn does not use the PowerTeacher Gradebook. There is no information there in the grade portion and I don't want parents of elementary children to even see this page. I decided to use a DECODE statement to redirect the initial page based on which school their child was in. The statement I tried was:
~(decode;~(schoolid);100;<meta equiv="Refresh" content="1;URL=/guardian/schedule.html">;200;<meta equiv="Refresh" content="1;URL=/guardian/home2.html">;300;<meta equiv="Refresh" content="1;URL=/guardian/home2.html">)The problem was it didn't work. Powerschool keeps interpreting the semicolons in the HTML tags as the end of the block. Haven't been able to figure out how to escape the semicolons; I am going to post the problem on the PSUG. If I get an answer I will post it here.
No comments:
Post a Comment