Viewing test scores in a PowerSchool custom page

By default, PowerSchool will show you a list of tests, and then you have to drill down into each test to get to the actual set of scores. There isn’t a way built into PowerSchool to view all the scores and subscores for a particular student.

Previously, I’d created a custom page that fetched a lot of data and then shoved the data into a JavaScript array, manipulated the data there, and then spit the data back onto the page. This is because PowerSchool custom pages won’t let you just manipulate the data as you go. The custom pages try to be “smart” and prematurely close </div> tags.

That was a lot of overhead, though. Fetch too much data, shove it into an array, create a holder variable. Loop through the array and put the processed data into the holder variable. Push the holder variable data back to the page.

I couldn’t find any clear documentation on how to concatenate a string of results back into a subquery in the select clause for Oracle. Through trial and error and through the unclear documentation out there, I finally got the subquery working. This is how you do it:

WHEN st.grade_level!=0
THEN st.grade_level
END gr_level, to_char(st.test_date, ‘MM/DD/YYYY’) test_date,,
(SELECT LISTAGG(‘<div class=”test_cell”><strong>’ || REPLACE(, || ‘_’, ”) || ‘</strong><br />’ || sts.numscore || ‘</div>’) WITHIN GROUP (ORDER BY ts.sortorder)
FROM studenttestscore sts
INNER JOIN testscore ts ON
WHERE AND sts.studentid=st.studentid
) scores
FROM students stu
INNER JOIN studenttest st
ON stu.dcid=st.studentid
WHERE stu.dcid=~(curstudid)
ORDER BY, st.test_date
Here is the full custom page example, which you can tweak to suit your school’s needs.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.