Fix grades for MaPSAs with missing MPAs
In the current grading logic we first write the test XML file for the individual MPAs, and then read the results back from that XML file for the overall MaPSA grading. However, for the test XML file, we skip all MPAs that are not in the DB. The results for MPAs that are not in the DB, or could not be tested because the are defective or detached, are currently not considered for the overall MaPSA grade.
This MR changes that by creating a dedicated function that collects all the results and grade information that is called both when writing the test XML file and the overall grade XML file. This way, the XML file for the individual MPAs is not changed, and the overall MaPSA grade can take into account also MPAs that are not in the DB and will consider as grade C all MPAs with missing results.