extractGrades function
Implementation
List<GradeRow> extractGrades(BeautifulSoup soup, Student student) {
List<GradeRow> returnedRows = [];
Bs4Element? gradeTable =
soup.find('*', id: 's_m_Content_Content_karakterView_KarakterGV');
List<Bs4Element>? gradeRows = gradeTable?.children[0].children;
// remove headers
gradeRows?.removeAt(0);
for (var gradeRow in gradeRows ?? []) {
var row = extractGradeRow(gradeRow, student);
if (row != null) {
returnedRows.add(row);
}
}
return returnedRows;
}