The deadline for refunds is checked here, though it's a little confusing and may be worth explaining in the note—basically, the `mode_for_course` function only retrieves a mode if that mode has not expired.  So, if we look for the verified course mode, and get back `None`, we know that that course mode has expired, which is identical to saying the deadline for refunds has passed.