Subversion Repositories wimsdev

Rev

Rev 17193 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. <b>Click in tiles.</b>
  3. (name : <span class="tt wims_code_words">clicktile</span>)
  4. <br>
  5.  
  6. An applet shows colored tiles. Some lines or (exclusive) one point
  7. can be showed. Some tiles must be colored differently by the student by clicking on them.
  8.  
  9. <p>Command <span class="tt wims_code_words">\embed</span> must be used. Each tile is given by the left-top corner
  10. by something like <span class="tt wims_code_words">integer:integer</span>.
  11. The first line of the command <span class="tt wims_code_words">\embed</span> is the size X x Y  in pixels of the applet.
  12. The second line inside  <span class="tt wims_code_words">[</span> <span class="tt wims_code_words">]</span> contains commands precising the colored tiles
  13. which will be presented (they can not be modified by the student) : for example,
  14. <pre>
  15. \embed{r1, 200 x 200
  16. [xrange -5,5
  17. yrange -5,5
  18. background_color yellow
  19. square blue,1:1,1:2,1:3
  20. square green,2:3,2:4
  21. point red,0:0]}
  22. </pre>
  23. The bounds (<span class="tt wims_code_words">xrange</span> and <span class="tt wims_code_words">yrange</span>) must be integers.
  24. The correct answer is given by lines as
  25. <span class="tt wims_code_words">color,a:b,c:d</span>
  26. The tile points must be of the form <span class="tt wims_code_words">a:b</span>
  27. wherein <span class="tt wims_code_words">a</span> and <span class="tt wims_code_words">b</span> are integers.
  28.  
  29. For the background draw, one of the following lines is possible
  30. <pre>
  31. text black,0:0:A
  32. point red,0:0
  33. segment white,-5:0,5:0
  34. </pre><br>
  35. It is also possible to present an image in the background.
  36. <pre>copy,x,y,url</pre>
  37. If done with flydraw, the url is the result of the function <span class="tt wims_code_words">draw()</span>. It is recommended
  38. to take the same <span class="tt wims_code_words">xrange</span> and <span class="tt wims_code_words">yrange</span>.
  39.  
  40. The variable <span class="tt wims_code_words">reply</span>n is the matrix of selected tiles (one line for each color).
  41. If the line
  42. <pre>
  43. return_all_objects yes
  44. </pre>
  45. is in the second line of the command <span class="tt wims_code_words">\embed</span>, all tiles will be returned in <span class="tt wims_code_words">reply</span>n.
  46. The variable <span class="tt wims_code_words">sc_reply</span>n is equal to 0.5 if all clicked tiles are correct, but not of the asked color
  47.  
  48. <p>An empty variable can be put in the correct reply. The analysis must be done with conditions in this
  49. case.
  50. </p><p>
  51. <b>Example</b> :
  52. <pre>
  53. \statement{
  54.   \embed{r1,200 x 200
  55.   [xrange -5,5
  56.    yrange -5,5
  57.    background_color yellow
  58.    square blue,1:1,1:2,1:3
  59.    square green,2:3,2:4
  60.    segment white,-5:0,5:0
  61.    text black,-4:0:A
  62.    text red,-5:1:B
  63.   ]}
  64. }
  65. \answer{}{blue,1:0,1:-1,1:-2; green,2:-2,2:-3}{type=clicktile}
  66. </pre>
  67. $table_header
  68. $table_hdtr<th></th><th>Explication</th></tr>
  69. $table_tr<td>xrange x1,x2</td><td></td></tr>
  70. $table_tr<td>yrange y1,y2</td><td></td></tr>
  71. $table_tr<td>background_color [color]</td><td></td></tr>
  72. $table_tr<td>square [color],x1:y1,x2:y2,...</td><td></td></tr>
  73. $table_tr<td>segment [color],x1:y1,x2:y2</td><td></td></tr>
  74. $table_tr<td>text [color],x1:y1:text</td><td></td></tr>
  75. $table_tr<td>return_all_objects yes/no</td><td></td></tr>
  76. $table_tr<td>colors</td><td>List of colors</td></tr>
  77. </table>
  78.  
  79. Allowable colors are
  80. <span class="tt">white,red, green, blue, orange, yellow, purple, lightgreen, lightblue, cyan,
  81. brown, salmon, pink</span>.
  82.  
  83.  
  84.