def should_show_thanks_page_to(participant):
if participant is None:<EOL><INDENT>return False<EOL><DEDENT>status = participant.status<EOL>marked_done = participant.end_time is not None<EOL>ready_for_external_submission = (<EOL>status in ("<STR_LIT>", "<STR_LIT>") and marked_done<EOL>)<EOL>assignment_complete = status in ("<STR_LIT>", "<STR_LIT>")<EOL>return assignment_complete or ready_for_external_submission<EOL>
In the context of the /ad route, should the participant be shown
    the thanks.html page instead of ad.html?