Example #1
0
def surveys_admin():
    surveys = dqsurveys.surveys()
    workflows = dqsurveys.workflowsAll()
    publishedstatuses=dqsurveys.publishedStatus()
    admin = usermanagement.check_perms('admin')
    loggedinuser = current_user

    return render_template("surveys/surveys_admin.html", 
                           **locals())
Example #2
0
def organisation_survey(organisation_code=None):
    organisation = dqorganisations.organisations(organisation_code)
    # make sure survey exists
    dqsurveys.getOrCreateSurvey({'organisation_id':organisation.id})

    survey = dqsurveys.getSurvey(organisation_code)
    surveydata = dqsurveys.getSurveyDataAllWorkflows(organisation_code)
    workflows = dqsurveys.workflowsAll()
    pct_complete = completion_percentage(survey)
    users = dqusers.surveyPermissions(organisation_code)
    admin = usermanagement.check_perms('admin')
    loggedinuser = current_user
    checksurveyOK = dqsurveys.checkSurveyData(organisation_code)

    return render_template("surveys/survey.html", 
                           **locals())