# Getting GeoGera to ask questions in a random order

M.E shared this problem 5 years ago
Solved

How is it possible to get GeoGebra 5 to view questions in a random order as in a quiz ?

I have tried to use the random integer function like this:

n = RandomInteger[1,10]

NB. I'm not sure the function name is correct as I use the danish translated function instead, but I hope you get the point.

And then write each of them as an criteria to show the questions.

And they are also being used when it comes to evaluating the questions.

But when clicking in the clickboxes by which the answers are to be given, the questions changes from one click to the next.

I guess there is a circular reference... But I can't see how I can get GeoGebra to ask questions in a randomly order and evaluate the answers in anoher way.

So I would very much appreciate a solution to this problem.

1

Make a set of questions "Questions" as a set of n texts (with or without random geerated random or questions).

Define a rest of answers according to the questions in same order.

Define a random k between 1 and n to select the question as Questions(k). The according answer is Solutions(k).

Now it makes no difference to control just one question or a set of questions since question and solution are controlled by the number k.

In the same way you could work with checkboxes but if you want to work in a very specified way, please add a file with what you want to do.

chris

1

An interesting alternative way to make it.

I have worked it out by my method several times. But I often ran into the same problem; that when I click on a evaluation-button, the exercise changes.

I think the reason for this is that the computer doesn't react as I thought it would. I thought that when I click on the evaluation button that I have made, the computer only does what there stands in the click code for that particular button and nothing more. But instead it seems that it does this and what there stands in the code of the other objects which is refered to in the code of the evaluation button. But I'm not totally sure if this is the reason. For me it just seem that way, as this could explain why the random variables is being updated when I click on an evaluation button with only click code and no random variable definitions. And because it seems to be that when I exclude these references from the code of the evaluation button, the problem gets solved.

In case this assumption is wrong, I would very much appreciate to get the right explanation so I better can understand how it works and thereby better prevent these problems from happening in the future which often takes a quite a lot of time to solve.

1

It's hard to think along when one cannot see what's going around in a unknown file

but probably it deals with the file you included in your next post...

chris

1