def get(self, request):
        with db_context(db) as context:

            assessments = assessment_actions.list_assessments(context)

            return responses.Ok(
                [to_plain(assessment) for assessment in assessments])
 def get(self, request, assessment_id, topic_id):
     with db_context(db) as context:
         topic = load_topic(context, assessment_id, topic_id)
         return responses.Ok(
             to_plain(topic, relationships={
                 "aspects": {},
             }))
    def get(self, request, assessment_id):
        with db_context(db) as context:

            stakeholder_id = request.query_params.get('stakeholder')
            topics = topic_actions.list_topics(context, assessment_id,
                                               stakeholder_id)

            return responses.Ok([to_plain(topic) for topic in topics])
    def get(self, request, assessment_id):
        with db_context(db) as context:

            stakeholders = stakeholder_actions.list_stakeholders(
                context, assessment_id)

            return responses.Ok(
                [to_plain(stakeholder) for stakeholder in stakeholders])
Esempio n. 5
0
 def get(self, request, assessment_id, form_id):
     with db_context(db) as context:
         form = load_form(context, assessment_id, form_id)
         return responses.Ok(
             to_plain(form,
                      relationships={
                          "questions": {},
                          "sub_forms": {
                              "relationships": {
                                  "sub_questions": {}
                              }
                          }
                      }))
Esempio n. 6
0
    def get(self, request, assessment_id):
        with db_context(db) as context:

            forms = form_actions.list_forms(context, assessment_id)

            return responses.Ok([to_plain(form) for form in forms])
 def get(self, request, assessment_id):
     with db_context(db) as context:
         assessment = load_assessment(context, assessment_id)
         return responses.Ok(to_plain(assessment))