'Represent a row
NB This needs to be machine-parseable by training.xsl
@param row: the Row'

def represent_row(self, row):

    course = row.get('hrm_course')
    if (not course):
        return current.messages.UNKNOWN_OPT
    name = course.get('name')
    if (not name):
        name = current.messages.UNKNOWN_OPT
    representation = [('%s    --' % name)]
    append = representation.append
    code = course.get('code')
    if code:
        append(('(%s)' % code))
    event = row.hrm_training_event
    try:
        site = row.org_site.name
    except:
        site = None
    instructors = current.deployment_settings.get_hrm_training_instructors()
    instructor = None
    if (instructors in ('internal', 'both')):
        person_id = event.get('person_id')
        if person_id:
            instructor = self.table.person_id.represent(person_id)
    if ((instructor is None) and (instructors in ('external', 'both'))):
        instructor = event.get('instructor')
    if (instructor and site):
        append(('%s    -    {%s}' % (instructor, site)))
    elif instructor:
        append(('%s' % instructor))
    elif site:
        append(('{%s}' % site))
    start_date = event.start_date
    if start_date:
        start_date = S3DateTime.date_represent(start_date, format='%Y-%m-%d')
        append(('[%s]' % start_date))
    return '    '.join(representation)
