'SURVEY / Survey'

@staticmethod
def survey():

    ADMIN = current.session.s3.system_roles.ADMIN
    series_id = False
    get_vars = Storage()
    try:
        series_id = int(current.request.args[0])
    except:
        try:
            (dummy, series_id) = current.request.get_vars['viewing'].split('.')
            series_id = int(series_id)
        except:
            pass
    if series_id:
        get_vars.viewing = ('survey_complete.%s' % series_id)
    return M(c='survey')(M('Assessment    Templates', f='template')(M('Create', m='create')), M('Disaster    Assessments', f='series')(M('Create', m='create')), M('Administration', f='admin', restrict=[ADMIN])(M('Import    Templates', f='question_list', m='import', p='create'), M('Import    Template    Layout', f='formatter', m='import', p='create'), M('Import    Completed    Assessment    Forms', f='complete', m='import', p='create', vars=get_vars, check=series_id)))
