Subversion Repositories wimsdev

Rev

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

  1.  
  2.  <b>Click on an image.</b>
  3.  (name: <span class="tt wims_code_words">coord</span>)
  4.  <br>
  5.  This reply type allows the user to click on an image, and can analyze the
  6.  position of the click according to various zoning criteria.
  7.  <p>
  8.  The correct reply must be given in the form of a matrix (row separator:
  9.  semi-colon `;'). The first row is the image URL. The image must be for the moment
  10. in format gif.
  11. The second row is the position of the criteria for the click coordinates
  12. to be considered as correct. And starting from the eventual third row, each one
  13. can contain some criteria (wrong positions).
  14. All the point coordinates must be in pixels.
  15. </p><p>
  16. The user reply is considered as being correct when the conditions in the second
  17. row are met. Otherwise, if criteria for wrong positions exist (third row and
  18. up), the reply is wrong if one of the wrong conditions are met; or ambiguous if
  19. no condition is met (in the latter case the user will be asked to retry).
  20. If there is no wrong position, any answer not meeting the second row will be
  21. judged as wrong.
  22. </p><p>
  23. The number of the first row met by the user reply minus one will be kept
  24. in a variable <span class="tt wims_code_variable">\result</span><em>n</em>
  25. where <em>n</em> is the number
  26. of the input field, which can be used in a \feedback.
  27. </p><p>
  28. Several conditions can be combined in a same row, using connectors
  29. `&' (intersection), `|' (union), `^' (complement), as well as parentheses.
  30.  </p><p>
  31.  It is recommended that this input field be embedded in the statement. It
  32.  cannot coexist with other input fields, for the obvious reason that any user
  33.  click on the image will send the form.
  34. </p>
  35.  
  36. !set p=anstype/coord
  37. !readproc tabletheme
  38. $table_header
  39. !set caption=!record 1 of help/$p
  40.   <caption>$caption</caption>
  41.   !set header=!record 2 of help/$p
  42.   $table_tr<th>$(header[1])</th><th>$(header[2])</th></tr>
  43.   !set cnt_record=!recordcnt help/$p
  44.   !for u= 3 to $cnt_record
  45.     !set l_=!record $u of help/$p
  46.     $table_tr<td class="tt wims_code_words">
  47. !line 1 of $l_
  48.     </td><td>
  49. !line 2 to -1 of $l_
  50.    </td>
  51.   !next
  52. $table_end
  53.