This lookup_student_id logic is copied from BearfactsProxy -- can you factor out that duplication?