sas-fossdev / saspes

SAS Powerschool Enhancement Suite - A browser extension to improve the experience of using Powerschool at SAS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Semester 2 Grade Parsing

gary-kim opened this issue · comments

The grade parsing for semester two is currently broken and needs to be fixed. When Powerschool was updated at the start of the 2019-2020 school year, the layout of Powerschool changed. To keep the extension working, the parsing for the first semester on the main page was improved but there wasn't time to fix parsing for the second semester. This has to be fixed soon.

The code for it can be found here.
https://github.com/gary-kim/saspes/blob/a623f8ed318d2fad85777f79279ea409c7a4173e/src/js/saspowerschoolff.js#L87-L95

The easiest fix would likely be looking for td a[href^="scores.html"] like the semester 1 code and getting .eq(0) and .eq(1).
Something like $course = $grade_rows.eq(i).find('td a[href^="scores.html"]').eq(0) and let first_grade = $grade_rows.eq(i).find('td a[href^="scores.html"]').eq(1) should do the trick.