Getting Grade Data from PowerSchool Pro (#TeachersCoding)

Given that I use standards based grading with most of my classes, the grades I assign to students change quickly. I’m modifying those scores multiple times a day in some cases in my school’s instance of PowerSchool Pro.

What the system currently lacks is an easy way to get that data out. For whatever reason, the only export format is PDF. This makes it difficult to get things into a spreadsheet.

After some hacking around in the console, I was able to put together a script that scrapes a class scoresheet page for the student names and assignment names and stores the result in a variable called exportData. This code is included below, and is also here in a gist. Paste the entire code into the console and run it. Then type in exportData and the scraped data will appear.

screen-shot-2016-11-09-at-8-26-58-am

You can then copy and paste the resulting string (leaving out the quotes) into Excel, OpenOffice, or Google Sheets and the data will appear there, ready to be spreadsheet-ified.

The only place where this doesn’t work perfectly is when there are more students than will fit on the page. As far as I could tell after poking around, the grade data is re-rendered to fit the page as scrolling occurs. I didn’t work that hard to see if the data is stored somewhere else on the page, so someone with a bit more insight might be able to improve upon my work.

Here is the full code:

var nameElements = $('.student-name').toArray();
var assignmentElements = $('var').toArray();
var names = [];
var assignments = [];
var assignmentNumber;

assignmentElements.forEach(function(name,index){

assignments.push(name.innerHTML)

})

names = names.slice(0,0.5*(names.length))

var rows = $( "tr[id*='std']" ).toArray()
rows.forEach(function(row){
var currentName = $(row).find('.student-name')[0].innerHTML;
var gradeElements = $(row).find('var');
gradeElements = gradeElements.slice(1,gradeElements.length).toArray();
grades = [];

gradeElements.forEach(function(grade){
var currGrade = (parseFloat(grade.innerHTML)!=NaN)?parseFloat(grade.innerHTML):'';

grades.push(currGrade)
})
if(grades.length>0){
names.push([currentName,grades])

}

})

assignmentNumber = names[0][1].length;

assignmentString = 'Name \t';

for(var i = 0;i

3 thoughts on “Getting Grade Data from PowerSchool Pro (#TeachersCoding)

  1. This is useful, although it seems that with the new 10.1 update the feature to download the scoresheet as a .csv has returned. What would be REALLY helpful is a way to go the other way. My systems would connect much better if I could use a .csv to upload grades into PTP as we could with PTG.

    hmmm…. (as well as grrr….)

    1. I completely agree – I figured (hoped?) that the PowerSchool folks would be adding this feature at some point since it seems so obvious.

      I also would love to have grades live in a spreadsheet and periodically upload them to update, perhaps once a week. That would help reduce some of the anxiety students develop over grades being updated instantly. Maybe the PS powers that be are listening?

Leave a Reply

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