added condition to use owning_school_id of course instead of the current school's schoolId when getting the academic years, refs #565