Subversion Repositories wimsdev

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
 
2
!set field=!item 2 of $special_parm
3
 
4
!if $field=$empty
5
 !exit
6
!endif
7
 
8
!set embraced_randitem=<p> \
9
This field accepts the randomization by nestable curly embraces.\
10
<p>\
11
If you put several words (or groups of words), separated by commas,\
12
within a pair of embraces, one of the words will be randomly drawn\
13
at the time when the text is presented to students. This will add\
14
randomness to your text. <p>\
15
For example, if you enter the text <p>\
16
<font color=blue><tt>I will go to {Paris, New York, London} \
17
{tomorrow, the next week}</tt></font>,\
18
<p>the result will be one of the following sentences, at random:\
19
<pre>\
20
I will go to Paris tomorrow\
21
I will go to New York tomorrow\
22
I will go to London tomorrow\
23
I will go to Paris the next week\
24
I will go to New York the next week\
25
I will go to London the next week\
26
</pre>
27
 
28
!if $(special_parm[3])!=$empty
29
 !readproc model/cut.proc model/src/$(special_parm[3]).oef
30
 !set title$field=$model_title
31
!else
32
 !readproc model/cut.proc
33
 !set title1=$model_title
34
!endif
35
 
36
<center><h2>$(title$field)</h2></center>
37
 
38
!if $field=1
39
 <center><b>$desc</b></center> <p>
40
!endif
41
 
42
$(help$field)
43
 
44
!if $(name$field) iswordof $model_random
45
 <p>
46
 Some examples of random generation of parameter: <ul>
47
 <li>For an integer between 10 and 100 (inclusive):
48
         <tt>randint(10..100)</tt>
49
 <li>For an integer multiple of 10 between 10 and 1000 (inclusive):
50
        <tt>randint(1..100)*10</tt>
51
 <li>For a decimal number between 0 and 2:
52
        <tt>random(0..2)</tt>
53
 <li>For a random item within a list:
54
        <tt>randitem(a,b,c,10,100,word,a phrase)</tt>
55
 </ul> <p>
56
!endif
57
 
58
!if $(name$field) iswordof $model_computed $model_random
59
 <p>
60
 !href cmd=help&special_parm=parameters Click here
61
 for more details on the computation of parameters.
62
!endif
63