Wikipedia Education Program/Database Analysis Notes

tl;dr No massive bugs found, some medium ones. The way forward is still to fix the important ones and create a maintenance script that repairs summary data, I think.
 * Deleting institutions is dangerous. Really, it should not be possible to delete an institution without first deleting all the related courses. Related: as previously noted, you can undelete a course without undeleting the institution.
 * When undeleting institutions, the code attempts to restore the courses that were deleted along with the institution, but a bug (, line 124, “Courses” should be “EPCourses”) makes this not work. If we make it impossible to delete an institution that has courses, this won't be a problem, and the actions marked in the spreadsheet as missing for undeleting courses would not be required, either.
 * Under certain circumstances, the  table can include summary fields. This is incorrect, though it's unclear if it causes problems.
 * The  table isn't updated when courses are deleted and undeleted, though it might be. It's unclear whether this causes problems.
 * I've confirmed that the current code produces incorrect data in the  and   fields of the   table. It appears that these fields are not used beyond Special:Students and Special:Student.
 * It's not clear what should happen to date-related fields in the  table when a course's dates are modified. Currently they are left unchanged. Perhaps that's good enough for cases when keeping them consistent would be complicated.
 * There are certainly issues with modifying institution names, course names and course terms. I haven't investigated them yet, though apparently they wouldn't be database consistency issues.
 * The method  is used/overridden in an inconsistent manner. For example: see , and note that course summary fields are actually updated in  . Compare to.
 * I haven't found any bugs that would lead to large-scale, constant errors in the number of courses and students reported for institutions (along the lines of what you get for Red Deer College). The worst offender at this point is undeletion. Maybe those errors were caused by a previous version of the code?

Here's the spreadsheet with the analysis [TODO: add link], for version  of the extension.