Quiz with text response (based on variable scores) for multiple sections | Community
Skip to main content
Answered

Quiz with text response (based on variable scores) for multiple sections


Forum|alt.badge.img

Hi, I am trying to create a quiz that asks a series of questions (say 15) with a few subsections within it (say 3). 

What I’d like to be able to do is assign variables for each of the sections, so a score is calculated for each section in the background. 

Following this, I’d like the ending to have a text response based on the score calculated for each of the subsections as well as the entire quiz.

For example:

Respondent 1

  • Score of sub section 1: 6/10
  • Score of sub section 2: 8/10
  • Score of sub section 3: 3/10
  • Total score: 17/30

The ending should look like:

Your responses show that you need to work significantly harder in subsection 3, a little bit harder in subsection 2, and continue to remain as focused on subsection 1.

 

Overall, you’re doing ok but there is room for improvement.

 

Respondent 2

  • Score of sub section 1: 5/10
  • Score of sub section 2: 2/10
  • Score of sub section 3: 9/10
  • Total score: 16/30

The ending should look like:

Your responses show that you need to work significantly harder in subsection 2, a little bit harder in subsection 1, and continue to remain as focused on subsection 3.

 

Overall, you’re doing ok but there is room for improvement.

 

Respondent 3

  • Score of sub section 1: 3/10
  • Score of sub section 2: 3/10
  • Score of sub section 3: 3/10
  • Total score: 9/30

The ending should look like:

Your responses show that you need to work significantly harder in subsection 1, significantly harder in subsection 2, and significantly harder in subsection 3.

 

Overall, you’re doing you need to put in a lot more effort.

 

Etc.

 

Best answer by john.desborough

@sairam natarajan - you need too sets of variables then… one set numeric to act as the subtotals for the scores ie 

  • if q1 = A then add 1 to v_sub_sect1
  • if q2 = B then add 1 to v_sub_sect2

then you would have numeric score variables

your logic rules would then have to evaluate the numeric variable to select the appropriate text variable version and then place it on the page .. 

maybe something like this: 

(static text) You scored @recall v_sub_sect1 in section 1. @recall the text variable related to scoring of v_sub_sect1. Your scored @recall v_sub_sect2 in section 2. @recall text variable related to that score. 

 

des

View original

12 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14858 replies
  • August 8, 2023

@john.desborough am I crazy (probably) or don’t you have an example form that does something like this with variables? 


Forum|alt.badge.img

@Liz, @john.desborough _ I have seen some of the posts where something similar has been attempted but not the same. Just to reiterate, as an output here is what I am looking for:

  • Scoring for each subsection separately (using a variable, perhaps)
  • Based on the score, a custom text (and not the score) to be shown to the user for each subsection
  • Based on the total score, a custome text to be shown to the user.

Forum|alt.badge.img+1
  • Explorer
  • 10 replies
  • August 9, 2023
sairam natarajan wrote:

@Liz@john.desborough _ I have seen some of the posts where something similar has been attempted but not the same. Just to reiterate, as an output here is what I am looking for:

  • Scoring for each subsection separately (using a variable, perhaps)
  • Based on the score, a custom text (and not the score) to be shown to the user for each subsection
  • Based on the total score, a custome text to be shown to the user.

You can try the following method:

1/ Set variables for each subsection and a total variable that is the sum of the 3 subsections. If you have 3 sections, you will have a total of 4 variables, for example: begin_point, mid_point, end_point, total_point.

2/ When you finish each section, add points to each section variable and add points to the total variable. For example, when I complete section 1, I will add points to begin_point and total_point. If I complete section 2, I will add points to mid_point and total_point.

3/ Create a notification statement table corresponding to each section and ending corresponding to total_point.

I don’t know if this method is suitable for you or not.


Forum|alt.badge.img
nam.th wrote:
sairam natarajan wrote:

@Liz@john.desborough _ I have seen some of the posts where something similar has been attempted but not the same. Just to reiterate, as an output here is what I am looking for:

  • Scoring for each subsection separately (using a variable, perhaps)
  • Based on the score, a custom text (and not the score) to be shown to the user for each subsection
  • Based on the total score, a custome text to be shown to the user.

You can try the following method:

1/ Set variables for each subsection and a total variable that is the sum of the 3 subsections. If you have 3 sections, you will have a total of 4 variables, for example: begin_point, mid_point, end_point, total_point.

2/ When you finish each section, add points to each section variable and add points to the total variable. For example, when I complete section 1, I will add points to begin_point and total_point. If I complete section 2, I will add points to mid_point and total_point.

3/ Create a notification statement table corresponding to each section and ending corresponding to total_point.

I don’t know if this method is suitable for you or not.

What is a notification statement table and how do I create it?


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5262 replies
  • August 9, 2023

@sairam natarajan  @Liz  

 

Here’s a simple way to do this - based on this example form (i proxied the scoring framework) : 

variables i created in the sample: 

 

and here’s the logic rules for the example form: 

 

and here is the setup for the statement page… and replicated on the ending page

 

by adding the appropriate text stream to the variables using the logic rules, i can then display them as a series of sentences on the page using the @recall function - same on the ending btw. 

hope that helps.. 

des


Forum|alt.badge.img
john.desborough wrote:

@sairam natarajan  @Liz  

 

Here’s a simple way to do this - based on this example form (i proxied the scoring framework) : 

variables i created in the sample: 

 

and here’s the logic rules for the example form: 

 

and here is the setup for the statement page… and replicated on the ending page

 

by adding the appropriate text stream to the variables using the logic rules, i can then display them as a series of sentences on the page using the @recall function - same on the ending btw. 

hope that helps.. 

des

@john.desborough  - this has surely got me started off and I am very curious if it could get me all the way till the send. 
I’ve set up a test form to try this out: https://r0c0dbng0bt.typeform.com/to/p9xX78ba

It’s got 6 questions, with 2 questions each per subsection. Responses to 1 and 2 get added to variable “subsection1” … and so on. 

I’ve also got some statements - as I suspect this might be the best way to summarise the outcome of the sections.

 

But I’ve got stuck after this …

 

I tried adding this logic after Question 2 - If score “subsection1” score is greater than 2 [and this is where I got stuck] … 

  1. What do I replace with the text I want? Given the variable is a number variable, and
  2. I can’t see the replace option in the drop down like you have.
     

 

Hoping for some magic here!


Forum|alt.badge.img+1
  • Explorer
  • 10 replies
  • August 9, 2023
sairam natarajan wrote:
john.desborough wrote:

@sairam natarajan  @Liz  

 

Here’s a simple way to do this - based on this example form (i proxied the scoring framework) : 

variables i created in the sample: 

 

and here’s the logic rules for the example form: 

 

and here is the setup for the statement page… and replicated on the ending page

 

by adding the appropriate text stream to the variables using the logic rules, i can then display them as a series of sentences on the page using the @recall function - same on the ending btw. 

hope that helps.. 

des

@john.desborough  - this has surely got me started off and I am very curious if it could get me all the way till the send. 
I’ve set up a test form to try this out: https://r0c0dbng0bt.typeform.com/to/p9xX78ba

It’s got 6 questions, with 2 questions each per subsection. Responses to 1 and 2 get added to variable “subsection1” … and so on. 

I’ve also got some statements - as I suspect this might be the best way to summarise the outcome of the sections.

 

But I’ve got stuck after this …

 

I tried adding this logic after Question 2 - If score “subsection1” score is greater than 2 [and this is where I got stuck] … 

  1. What do I replace with the text I want? Given the variable is a number variable, and
  2. I can’t see the replace option in the drop down like you have.
     

 

Hoping for some magic here!

You can do the following: If @section1 > 2 then go to statement A, otherwise go to statement B.

You can create a statement like this:


Hope this helps you.


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5262 replies
  • August 9, 2023

@sairam natarajan - the variables to store the ‘text string’ need to be created as text variables. not number. 

once you create them as text the Replace option will be there. 

 

des


Forum|alt.badge.img
john.desborough wrote:

@sairam natarajan - the variables to store the ‘text string’ need to be created as text variables. not number. 

once you create them as text the Replace option will be there. 

 

des

@john.desborough But, if I create them as text, how do I add scores to the variables? Sorry if I am being a bit dense. For instance, I want the variable to have a variable score based on the responses. Eventually, based on the final score for the variable, I want to produce a statement. :( 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5262 replies
  • Answer
  • August 9, 2023

@sairam natarajan - you need too sets of variables then… one set numeric to act as the subtotals for the scores ie 

  • if q1 = A then add 1 to v_sub_sect1
  • if q2 = B then add 1 to v_sub_sect2

then you would have numeric score variables

your logic rules would then have to evaluate the numeric variable to select the appropriate text variable version and then place it on the page .. 

maybe something like this: 

(static text) You scored @recall v_sub_sect1 in section 1. @recall the text variable related to scoring of v_sub_sect1. Your scored @recall v_sub_sect2 in section 2. @recall text variable related to that score. 

 

des


Forum|alt.badge.img
john.desborough wrote:

@sairam natarajan - you need too sets of variables then… one set numeric to act as the subtotals for the scores ie 

  • if q1 = A then add 1 to v_sub_sect1
  • if q2 = B then add 1 to v_sub_sect2

then you would have numeric score variables

your logic rules would then have to evaluate the numeric variable to select the appropriate text variable version and then place it on the page .. 

maybe something like this: 

(static text) You scored @recall v_sub_sect1 in section 1. @recall the text variable related to scoring of v_sub_sect1. Your scored @recall v_sub_sect2 in section 2. @recall text variable related to that score. 

 

des

@john.desborough - this worked! Wow… I am elated.

Of course, it’s worked on the test form and my actual form is a bit more evolved/complex than this, but at least I know it can be done … and I know how.

Thank you so so much!


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5262 replies
  • August 9, 2023

@sairam natarajan - glad it worked out for you!

 

des


Reply