Description
This type of question displays an image together with some introductory text. As the student moves the mouse over the image, various "hotspots" light up. The goal is to click on the right hotspot.
The graphic must be provided as a separate web-friendly file, and must be uploaded to your EDU class web site. Here are the necessary steps to follow:
- Choose a location in your EDU class web site where the
image file will eventually reside. It is a good idea to set
up a separate folder for each testbank that you create.
Then insert the
\setImageBase
macro near the top of your testbank TeX source file to provide the path to this location. For example, if your EDU classname were 'calculus205', and you planned to place your image files in the 'chapter1' folder of your EDU class web site, then you would use the directive\setImageBase{../classes/calculus205/chapter1/}
. - Now your file can be incorporated into a question using
the clickableimage
environment. The
\begin{clickableimage}
command takes three arguments:\begin{clickableimage}{filename}{width}{height} ... \end{clickableimage}
- filename
- The name of the image file
- width
- The width of the image file in pixels
- height
- The height of the image file in pixels
- Finally, the
\region
command can be used to define the hotspots. The argument to the\region
macro is a comma-delimited list of points, giving the vertices of the clickable region. The x and y-coordinates are measured from the upper left corner of the graphic.More than one
\region
command may be used. Mark the correct region with an asterisk.
Note that \begin{clickableimage}...\end{clickableimage}
must appear outside the argument to \qutext
.
Example
\begin{question}{Clickable Image} \qutext{Find the dog in the picture below.} {\ignoreImageBase % use empty image base within this group \begin{clickableimage}% {http://www.math.unl.edu/~jorr/dogs/images/pose.gif}{192}{288} \region*{139,32, 144,40, 137,58, 115,68, 109,101, 132,155, 138,209, 155,273, 148,281, 52,282, 44,266, 29,224, 33,198, 36,176, 61,108, 59,57, 74,37, 93,29} \region{149,87, 168,90, 172,148, 151,122} \region{153,157, 186,152, 185,212, 158,218, 149,185} \end{clickableimage}} % image base returns to original value \end{question}