Subversion Repositories wimsdev

Rev

Rev 13714 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
13714 obado 1
type=order
2
textarea="instruction data"
3
iEdit="instruction"
4
 
5
:We present several words whose letters have been mixed
6
 
7
<p>The learner must then reformulate the words.</p>
8
<p>Warning: make sure that the words you propose do not have any possible anagrams
9
   or indicate a clue that does not allow any ambiguity.</p>
10
 
11
:%%%%%%%%%%%%%%%%%%       WARNING       %%%%%%%%%%%%%%%%%%%%%
12
 
13
Remove the above header if you destroy the model tags! (The lines starting
14
with a ':'.) Otherwise the exercise might not be taken back by Createxo.
15
 
16
:%%%%%%%% Sample parameters to be redefined %%%%%%%%%%%%%%%%%
17
 
18
:\title{Scrambled letters}
19
:\author{Olivier, Bado}
20
:\email{bado@unice.fr}
21
:\credits{}
22
Credits allow you to specify sources if, for example, the exercise contains images.
23
 
24
:Instructions
25
\text{instruction=Here are several verbs whose letters have been scrambled.
26
<p>It's up to you to unscramble them!</p>}
27
 
28
:List of words to scramble
29
Place one word per line, without any space.
30
Eventually, you can place a hint for each word by separating it with a comma.
31
\text{data=eat, at lunch
32
finish, to an end
33
run
34
put, place
35
}
36
 
37
:Feedback
38
A text that appears once the learner has responded.
39
\text{feedback=}
40
 
41
:Number of words to present
42
Maximum 20
43
\integer{nb_words=2}
44
 
45
:Width of the field to type
46
Sufficient space must be provided for the longest property.
47
\integer{size=20}
48
 
49
:Type of response analysis
50
The types <span class="tt">case</span> and <span class="tt">nocase</span> are especially suitable for language applications.
51
In other cases, prefer<span class="tt">atext</span>.
52
\text{atype=item(1,case (no error tolerance),
53
  nocase (tolerate lowercase / uppercase),
54
  atext (ignore plural / singular and articles))}
55
 
56
:Custom Styles
17175 bpr 57
Here you can use CSS code to customize your exercise.<br>
13714 obado 58
Example: Type <code>.name {color: # 599}</code> to color the words to be found in pastel blue.
59
\text{styles=}
60
 
61
:%%%%%%%%%%%%%% Nothing to change before the statement %%%%%%%%%%%%%%%%
62
 
63
\text{melanges=}
64
\matrix{reponses=}
65
\matrix{indices=}
66
\text{data=wims(nonempty rows \data)}
67
\integer{datacnt=rows(\data)}
68
\integer{nb_words=min(\nb_words,\datacnt)}
69
\integer{nb_words=min(20,\nb_words)}
70
 
71
\text{order=shuffle(\datacnt)}
72
\text{data=row(\order,\data)}
73
 
74
\for{i=1 to \nb_words}{
75
  \text{mot=\data[\i;1]}
76
  \text{indice=\data[\i;2]}
77
  \if{\indice issametext }{
78
    # prevent WIMS from blowing the empty line
79
    \text{indice=##**##}
80
  }
81
  \text{mot=wims(nospace \mot)}
82
  \integer{nbletter=wims(charcnt \mot)}
83
  \text{order=shuffle(\nbletter)}
84
  \text{melange=wims(char \order of \mot)}
85
  \text{melanges=wims(append item \melange to \melanges)}
86
  \matrix{reponses=wims(append line \mot to \reponses)}
87
  \matrix{indices=wims(append line \indice to \indices)}
88
}
89
 
90
# only the first \nb_words are taken into account
91
\text{qlist=wims(makelist reply x for x=1 to \nb_words)}
92
\steps{\qlist}
93
 
94
\css{<style>.big_bullet>li{font-size:1.4em;margin-bottom:.5em}.indice{color:#999}</style>}
95
\text{styles=wims(nospace \styles)}
96
:%%%%%%%%%%%%% Now the statement in html code. %%%%%%%%%%%%%%%%%%%%
97
 
98
\statement{
99
\if{\styles notsametext }{<style>\styles</style>}
100
 
101
<div class="instruction">\instruction</div>
102
<ul class="big_bullet">
103
  \for{k=1 to \nb_words}{
104
    <li class="oef_input">
105
      <label for="reply\k" class="name">\melanges[\k] :</label>
106
      \embed{r \k,\size
107
        autocomplete="off"}
108
      \if{\indices[\k;] notsametext ##**##}{
109
        <span class="indice">(\indices[\k;])</span>
110
      }
111
    </li>
112
  }
113
</ul>
114
}
115
 
116
:%%%%%%%%%%%%% Rien à modifier ci-après. %%%%%%%%%%%%%%%%%5
117
 
118
\answer{Field 1}{\reponses[1;]}{type=\atype}{}
119
\answer{Field 2}{\reponses[2;]}{type=\atype}{}
120
\answer{Field 3}{\reponses[3;]}{type=\atype}{}
121
\answer{Field 4}{\reponses[4;]}{type=\atype}{}
122
\answer{Field 5}{\reponses[5;]}{type=\atype}{}
123
\answer{Field 6}{\reponses[6;]}{type=\atype}{}
124
\answer{Field 7}{\reponses[7;]}{type=\atype}{}
125
\answer{Field 8}{\reponses[8;]}{type=\atype}{}
126
\answer{Field 9}{\reponses[9;]}{type=\atype}{}
127
\answer{Field 10}{\reponses[10;]}{type=\atype}{}
128
 
17175 bpr 129
\feedback{1=1}{\feedback}