'Respond with some error messaging if the deadline has passed.
Arguments:
course (Course): The course the user is trying to enroll in.
deadline_name (str): One of the deadline constants.
deadline_datetime (datetime): The deadline.
Returns: HttpResponse or None'

def _response_if_deadline_passed(self, course, deadline_name, deadline_datetime):

    if (deadline_name not in [self.VERIFICATION_DEADLINE, self.UPGRADE_DEADLINE]):
        log.error('Invalid    deadline    name    %s.        Skipping    check    for    whether    the    deadline    passed.', deadline_name)
        return None
    deadline_passed = ((deadline_datetime is not None) and (deadline_datetime < datetime.datetime.now(UTC)))
    if deadline_passed:
        context = {'course': course, 'deadline_name': deadline_name, 'deadline': deadline_datetime}
        return render_to_response('verify_student/missed_deadline.html', context)
