Test for adding goals for a person
==================================

Log in as manager:

    >>> manager = browsers.manager
    >>> manager.ui.login('manager', 'schooltool')

Add a section:

    >>> manager.ui.schoolyear.add('2014', '2014-01-01', '2014-12-31')
    >>> manager.ui.term.add('2014', '2014', '2014-01-01', '2014-12-31')
    >>> manager.ui.course.add('2014', 'Math')
    >>> manager.ui.section.add('2014', '2014', 'Math')

Add a some people:

    >>> manager.ui.person.add('Jeffrey', 'Elkner', 'jeffrey', 'schooltool')
    >>> manager.ui.person.add('Tom', 'Hoffman', 'tom', 'schooltool')
    >>> manager.ui.person.add('Camila', 'Cerna', 'camila', 'schooltool')

Make Tom the advisor for Camila:

    >>> manager.ui.person.advisors.add('camila', ['tom'])

Populate the section:

    >>> manager.ui.section.instructors.add('2014', '2014', 'Math (1)',
    ...                                    ['jeffrey'])
    >>> manager.ui.section.students.add('2014', '2014', 'Math (1)',
    ...                                 ['camila'])

Log in as the teacher of the section:

    >>> teacher = browsers.teacher
    >>> teacher.ui.login('jeffrey', 'schooltool')

And add a goal for the student:

    >>> teacher.query.link('Intervention').click()
    >>> teacher.query.link('Students').click()
    >>> teacher.query.link('Camila').click()
    >>> teacher.query.css('a[title="Add Goal"]').click()
    >>> concerns = ()
    >>> teacher.query.id('form-widgets-presenting_concerns').ui.set_value(
    ...     'Camila often seems withdrawn and depressed at and after recess.')
    >>> teacher.query.id('form-widgets-goal').ui.set_value(
    ...     'We would like to see Camila fully and successfully engaged in '
    ...     'recess in a way that fulfills his social and emotional needs')
    >>> teacher.query.id('form-widgets-strengths').ui.set_value(
    ...     'Persistence. Determination')
    >>> teacher.query.id('form-widgets-indicators').ui.set_value(
    ...     'Lying on the ground alone. Slumped shoulders. Sighing.')
    >>> teacher.query.id('form-widgets-intervention').ui.set_value(
    ...     'Explore some creative, non-competitive activities during '
    ...     'recess that give all students a chance to succeed '
    ...     'collaboratively')
    >>> teacher.query.id('form-widgets-timeline').ui.set_value(
    ...     '2014-06-01')
    >>> teacher.query.id('form-buttons-add').click()

Check the goal:

    >>> teacher.query.link('We would like to see Camila fully and...').click()
    >>> print teacher.query.tag('h3').text
    We would like to see Camila fully and successfully engaged in recess in a way that fulfills his social and emotional needs
    >>> for tr in teacher.query_all.tag('tr'):
    ...     tds = tr.query_all.tag('td')
    ...     print '%s: %s' % (tds[0].text, tds[1].text)
    Persons responsible: Tom Hoffman
    Presenting concerns: Camila often seems withdrawn and depressed at and after recess.
    Strengths: Persistence. Determination
    Indicators: Lying on the ground alone. Slumped shoulders. Sighing.
    Intervention: Explore some creative, non-competitive activities during recess that give all students a chance to succeed collaboratively
    Target date: .../.../...
    Goal met: No
    Follow up notes:
