===============
No Current Term
===============

If a schooltool operation relies on there being at least one term set up, and
the administator has not gotten around to doing that, we need to fail
gracefully.  That means giving the user an error message rather than crashing.

Let's log in as manager and create a student.

    >>> from schooltool.basicperson.browser.ftests import setup
    >>> manager = Browser('manager', 'schooltool')
    >>> setup.addPerson('Student', 'One', 'student1', 'pwd')

We'll navigate to the student and hit the Intervention Center button.  Since
there is no current schoolyear, we'll redirect to the no current term view.

    >>> manager.getLink('Manage').click()
    >>> manager.getLink('Persons').click()
    >>> manager.getLink('One').click()
    >>> manager.getLink('Intervention Center').click()
    >>> manager.printQuery("id('content-body')//h1/text()")
    The operation you attempted cannot be completed because there are
    currently no terms set up in your SchoolTool instance. Please have
    a user with administration access set up at least one term and try
    the operation again.

We need to make sure that the intervention startup and search_student views
can handle that there is no term in case the user is clever enough to
enter the url even though there are no links to get there.  In both cases,
the views will redirect to the same no current term view.

    >>> manager.open('http://localhost/persons/manager/intervention_tab')
    >>> manager.printQuery("id('content-body')//h1/text()")
    The operation you attempted cannot be completed because there are
    currently no terms set up in your SchoolTool instance. Please have
    a user with administration access set up at least one term and try
    the operation again.

    >>> manager.open('http://localhost/persons/manager/intervention_tab/search_students.html')
    >>> manager.printQuery("id('content-body')//h1/text()")
    The operation you attempted cannot be completed because there are
    currently no terms set up in your SchoolTool instance. Please have
    a user with administration access set up at least one term and try
    the operation again.

