def person_heard(request, dshUid, offset, personTable, eventTable, itemTable,
                 noDemographics=False):
    """
    10/04/01.
    called by views.person_heard()
    modeled after person_answered().
    noDemographics=True when called by dvoice side.
    """

    response = views.page_header(
        'messages heard by this person', includeMp3Player=True)

    success,msg = dsh_common_db.person_row(
        personTable, dshUid, noDemographics=noDemographics)
    response += msg
    if not success:
        response += views.mp3_widget_control()
        response += views.page_footer()
        return HttpResponse(response)

    success,msg = dsh_common_db.heard_message_list(
        personTable, eventTable, itemTable, dshUid, offset)
    response += msg
    if not success:
        response += views.mp3_widget_control()
        response += views.page_footer()
        return HttpResponse(response)

    response += views.mp3_widget_control()
    response += views.page_footer()
    return HttpResponse(response)
def person_answered(request, dshUid, offset,
                    personTable, eventTable, itemTable):
    """
    10/03/25:
    called by views.person_answered().
    """

    response = views.page_header(
        'messages answered by this person', includeMp3Player=True)

    success,msg = dsh_common_db.person_row(personTable, dshUid)
    response += msg
    if not success:
        response += views.mp3_widget_control()
        response += views.page_footer()
        return HttpResponse(response)

    success,msg = dsh_common_db.answered_message_list(
        personTable, eventTable, itemTable, dshUid, offset)
    response += msg
    if not success:
        response += views.mp3_widget_control()
        response += views.page_footer()
        return HttpResponse(response)

    response += views.mp3_widget_control()
    response += views.page_footer()
    return HttpResponse(response)