That being said, the way to do what you want is through the MODES()
macro, which allows you to provide different text to be used in the various viewing modes. For example,
TEXT(MODES( HTML => "This is only on screen", TeX => "This is only in hardcopy", ));will produce different output on screen from in hardcopy. So you can use something like
TEXT(MODES( HTML => '<div>...</div>', TeX => '[ You need to log into WeBWorK to see the graph for this problem ]', ));would do what you want. You can do something like
TEXT(MODES( HTML => '<script ...>...</script>', TeX => "", ));to insert javascript into the page, though there are other methods as well (there is a macro that inserts javascript into the document
<HEAD>
, but I don't remember its name).
There are more possible choices for the modes (like HTML_dpng
for image mode, HTML_tth
for formatted text mode, and so on if you need to do something specific in one of these modes, but HTML
will cover all of these.
Hope that helps out.
Davide