help logoLON-CAPA Help


To add a picture to a problem, the picture must first be uploaded to your authoring space, then published. Then, in the text area of your problem, add the following:

<img src="/res/DOMAIN/AUTHOR/directory-of-picture/picture.jpg" />

where DOMAIN is the domain the picture is in, AUTHOR is the person who published the picture, and the rest is the standard path to the picture.

It is also possible for advanced users to use a script variable in the place of the picture URL, like this:

<img src="$picture" />

and use the string variable $picture in the script of the problem to select from several possible pictures. If you do this, you will need to Edit XML for the problem and add the various graphics used in the problem to the <allow> tags on the bottom.