Rev 4119 | Rev 5724 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | !set embraced_randitem=<p> \ |
4674 | bpr | 2 | This field accepts the randomization by nestable curly embraces:\ |
3 | if you put several words (or groups of words), separated by commas,\ |
||
23 | reyssat | 4 | within a pair of embraces, one of the words will be randomly drawn\ |
5 | at the time when the text is presented to students. This will add\ |
||
6 | randomness to your text. <p>\ |
||
7 | For example, if you enter the text <p>\ |
||
4091 | bpr | 8 | <tt>I will go to {Paris, New York, London} \ |
4119 | bpr | 9 | {tomorrow, the next week}</tt>,\ |
23 | reyssat | 10 | <p>the result will be one of the following sentences, at random:\ |
11 | <pre>\ |
||
12 | I will go to Paris tomorrow\ |
||
13 | I will go to New York tomorrow\ |
||
14 | I will go to London tomorrow\ |
||
15 | I will go to Paris the next week\ |
||
16 | I will go to New York the next week\ |
||
17 | I will go to London the next week\ |
||
18 | </pre> |
||
19 | |||
2455 | bpr | 20 | !set name_random=Some examples of random generation of parameter: <ul>\ |
21 | <li>For an integer between 10 and 100 (inclusive):\ |
||
4091 | bpr | 22 | <tt class="wims_code_words">randint(10..100)</tt>\ |
2455 | bpr | 23 | <li>For an integer multiple of 10 between 10 and 1000 (inclusive):\ |
4091 | bpr | 24 | <tt class="wims_code_words">randint(1..100)*10</tt>\ |
2455 | bpr | 25 | <li>For a decimal number between 0 and 2:\ |
4091 | bpr | 26 | <tt class="wims_code_words">random(0..2)</tt>\ |
2455 | bpr | 27 | <li>For a random item within a list:\ |
4091 | bpr | 28 | <tt class="wims_code_words">randitem(a,b,c,10,100,word,a phrase)</tt>\ |
2455 | bpr | 29 | </ul> |
30 | |||
31 | !set name_detail_parm=More details on the computation of parameters. |
||
23 | reyssat | 32 | |
33 |