0 votes

I have a question about progress bars in a randomized set of questions. How do I increment the progress bar?

For example:

*progress: 0%

*randomize: all
    *group
        *question: I avoid conflict at all costs.
            *answers: options
            *save: Avoid_1
    *group
        *question: I postpone facing conflict.
            *answers: options
            *save: Avoid_2
    *group
        *question: I do everything I can to keep from getting in a conflict.  
            *answers: options
            *save: Avoid_3

 

by (5.8k points)

1 Answer

0 votes
Best answer

Here is a sample program that updates progress within *randomize: https://www.guidedtrack.com/programs/13586/edit

*progress: 0%

>> options = [1, 2, 3]
>> p = 0

-- please specify numberOfRandomizeOptions manually
>> numberOfRandomizeOptions = 3
>> step = 100/numberOfRandomizeOptions

*randomize: all
	*group
		*question: I avoid conflict at all costs.
			*answers: options
			*save: Avoid_1
		>> p = p + step
		*progress: {p}%
	*group
		*question: I postpone facing conflict.
			*answers: options
			*save: Avoid_2
		>> p = p + step
		*progress: {p}%
	*group
		*question: I do everything I can to keep from getting in a conflict.  
			*answers: options
			*save: Avoid_3
		>> p = p + step
		*progress: {p}%

 

by (5.8k points)
selected by
Welcome to Guidedtrack Q&A, where you can ask questions and receive answers from other members of the community.
134 questions
144 answers
55 comments
40 users