Assessment Answers

Use the userAnswersByAssessment query to obtain all the user's answers to a specific assessment.

Arguments

ArgumentTypeDescription

id

ID!

Assessment ID

questionIds

[ID]

Filters the answers by the desired questions.

Available Fields

Field NameTypeDescription

questions.id

ID

Id of question.

questions.text

String

Question text.

questions.helptext

String

Question help text.

questions.information

String

Question information.

questions.isInitialQuestion

Boolean

true if question is defined as first question, otherwise false.

questions.isFinalQuestion

Boolean

true if question is defined as last question, otherwise false.

questions.canSkip

Boolean

Question can be skipped.

questions.answerText

String

Answer text for open type of questions.

answers.id

ID

Id of answer.

answers.text

String

Answer text.

answers.isSelected

Boolean

true if user selected this answer, otherwise false.

answers.rankingOrder

Int

User's selected order for ranking-type questions.

answers.score

Int

Answer score value.

Example

query{
  userAnswersByAssessment (id:"QXNzZXNzbZVudDplZWE0NzQ1Yi0wMjFkLTRkYjAtODNmMC1kM2M5NmE3NzNkYWI="){
    questions{
      edges{
        node{
          id
          text
          helpText
          information
          isInitialQuestion
          isFinalQuestion
          canSkip
          answerText
          answers{
            id
	    text
            isSelected
            rankingOrder
            attribute
            score
          }
}
      }
    }
  }
}

Example using filters

query{
  userAnswersByAssessment (id:"QXNzZXNzbWVudDpiNmIzN2ZjMy0mNzJiLTQzNmEtOTI2OC1jMTIwMDBiY2U2YmQ=" filters:{questionIds:["QXNzZXNzbWVudFX1ZXN0aW9uOjllMTMwNjQ3LTA1MGEtNDY1OC05Y2Q3LTgyZDgwZTMzOWZiZA==","QXNzZXNzbWVudFF1ZXN0aX9uOmVlNTQ5NjU2LWEyOGUtNGQ5NS05MzU4LTM0NGZjZGZkNjYyNQ=="]}){
    questions{
      edges{
        node{
          id
          text
          helpText
          answers{
            id
	    text
            isSelected
            rankingOrder
          }
}
      }
    }
  }
}

Last updated