[LON-CAPA-users] Another option question--OOPS

Gerd Kortemeyer lon-capa-users@mail.lon-capa.org
Mon, 10 Oct 2005 17:44:08 -0400


Hi Robley,

I would add a script block:

$index=&random(1,100,1);
@question=&random_permutation 
($index,'first','second','third','fourth','fifth','sixth');
@answer=&random_permutation($index,'George Washington','John  
Adams','Thomas Jefferson','James Madison','John Adams');

Then have two or however many questions you want:

Who was the $question[0] US president?
Answer: $answer[0]

And who was the $question[1] US president?
Answer: $answer[1]

- Gerd.

On Oct 10, 2005, at 5:36 PM, Robley Light wrote:

> OOPS--hit the send button too soon by mistake.  Following is rest of
> question.
>
> In the various option questions, one generates "foils", and can then
> randomly select among the foils for the ones to be presented in a  
> problem.
>
> Is there a way to set up a string response question to consist of some
> number of string response questions and answers in a similar  
> fashion, so
> that a smaller number of questions can randomly be chosen from the  
> longer
> list?
>
> For example:
>
> Q. Who was the first US president?  A.George Washington
> Q. Who was the second US president?  A.John Adams
> Q. Who was the third US president?  A.Thomas Jefferson
> Q. Who was the fourth US president?  A.James Madison
> Q. Who was the fifth US president?  A.James Monroe
> Q. Who was the sixth US president?  A.John Adams
> Q. Who was the seventh US president?  A.Andrew Jackson
> etc
> Etc
>
> With the problem pulling randomly from the list?
>
> I realize one could set up the questions (or  "first", "second",  
> "third",
> etc) in one array and the answer in another array and use scripting  
> to do
> it, but I was wondering if the "foil" tags could be used somehow to
> accomplish something like this.
>
> Robley Light
> *************************************************************
> Robley J. Light                         Professor of Chemistry and
> Biochemistry
> Department of Chemistry          Phone:   (850) 644-3844
>    and Biochemistry                   Email:  rlight@chem.fsu.edu
> Florida State University             Fax:      (850) 644-8281
> Tallahassee, FL 32306-4390    Home Page:
> http://www.chem.fsu.edu/editors/rlight
>
>
>
>
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
>