We are trying to create a WeBWorK problem that uses static graphic files.
They are stored in the directory /web/webwork/courses/demoCourse/templates/
setBm305test/
Included below is the code and the compiler errors listed.
The question is: "Why is WeBWorK looking for the .gif files in the
directory:
/web/webwork/system/courses/demoCourse/templates/setBm305test/ ?"
-Barbra Bannon
University of New Hampshire
Thank you for your help in advance!
------------------------------------------------------------------------
##DESCRIPTION
## Problem involving graphs created previously as .gif files
##ENDDESCRIPTION
&DOCUMENT;
loadMacros(
PG.pl,
PGbasicmacros.pl,
PGchoicemacros.pl,
PGanswermacros.pl);
$showPartialCorrectAnswers = 0;
@images = ("familyx_squared1.gif","familyx_squared2.gif",
"familyx_squared3.gif","familyx_squared4.gif","familyx_squared5.gif",);
TEXT(&beginproblem);
BEGIN_TEXT
This is a graph of the function ( f(x) = x^2 ): $BBOLD Click on image
for a larger view $EBOLD
$PAR
{ ℑ($images[0]) }
$PAR
END_TEXT
&ENDDOCUMENT
------------------------------------------------------------------------
Page produced by script: /var/www/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl
Compiler warnings:
* ERROR in old_safe_ev, PGbasicmacros.pl:
## There is an error occuring inside evaluation brackets { ...code... }
## somewhere in an EV2 or EV3 or BEGIN_TEXT block. ## Code evaluated:
## ℑ($images[0]) ##The macro alias cannot find a GIF file at:
|/web/webwork/system/courses/demoCourse/templates/setBm305test/familyx_squared1.gif|
at /web/webwork/system/courseScripts/dangerousMacros.pl line 683. ##
parnoindent at (eval 108) line 1012.
##More details:
-------- PG_priv::old_safe_ev called at (eval 108) line 1000
---- PG_priv::safe_ev called at (eval 108) line 985
---- PG_priv::ev_substring called at (eval 108) line 1084
---- PG_priv::EV3 called at (eval 50) line 17
---- PG_priv::__ANON__ called at /usr/local/lib/perl5/5.6.1/i686-linux/Safe.pm line 222
---- Safe::reval called at /web/webwork/system//PGtranslator.pm line 691
---- PGtranslator::translate called at /var/www/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl line 420
<| Post or View Comments |>
|