[system] / trunk / pg / macros / dangerousMacros.pl Repository:
ViewVC logotype

Log of /trunk/pg/macros/dangerousMacros.pl

Parent Directory Parent Directory


Sticky Revision:
(Current path doesn't exist after revision 6504)

Revision 3502 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 13 05:54:10 2005 UTC (14 years, 4 months ago) by jj
File length: 49984 byte(s)
Diff to previous 3359
If a problem file sets $refreshCachedImages=1 inside the pg file, then
cached copies of on the fly graphics are ignored and the graphic is
regenerated.

Revision 3359 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 5 21:58:51 2005 UTC (14 years, 5 months ago) by sh002i
File length: 49890 byte(s)
Diff to previous 3225
chech tthPreamble path and mtime to deal with changes to the file
between runs. this is necessary now that dangerousMacros.pl is cached.
Closes bug #798.

Revision 3225 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 14 01:42:25 2005 UTC (14 years, 7 months ago) by dpvc
File length: 49552 byte(s)
Diff to previous 3180
Changed loadMacros() to use search for amcros files via a
user-cusomizable path of directories.  This is specified in the
global.conf file, and can include any number of directories.

The path can include "." to mean look in the .pg file's directory.
This makes it possible to store special macros files with the code
that uses them.

By default, the path is ".", the course/templates/macro directory,
then the pg/macros directory (in that order).  This duplicates the
current behaviour, except for the ".", which is new.

You must also make the updates to the global.conf,
webwork2/lib/WeBWorK/PG.pm, and webwork2/lib/WeBWorK/PG/Local/pm files.

Revision 3180 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 19 16:47:36 2005 UTC (14 years, 9 months ago) by gage
File length: 49269 byte(s)
Diff to previous 2988
Small correction that makes sure that _init subroutines are read
properly.  The original works on some versions of perl, but not on
others.

Revision 2988 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 5 17:54:12 2004 UTC (15 years, 1 month ago) by jj
File length: 49258 byte(s)
Diff to previous 2932
Avoids some name collisions for images converted from gif to png in
hardcopy, specifically if two problems have different gif images
with the same name (but the gifs are in different directories).  Now one
png won't overwrite the other.

Revision 2932 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 19 00:08:04 2004 UTC (15 years, 1 month ago) by dpvc
File length: 49249 byte(s)
Diff to previous 2698
Updated i(), j() and k() functions to check if the Parser is loaded,
and if not, return a value that will cause perl to report a better
error than calling the parser outside of its normal context.

Since the current answer checkers call perl directly to evaluate their
expressions, when a variable is used by a student that is not a
variable used by the checker, this can cause perl to try to parse
those variables as function calls, or other perl constructs (like
matches if you use 'm' or translations if you use 'y').  This is bad
(and is not a problem with the new parser).

In particular, if the student uses 'k' in a formula for which k is not
defined, for example, perl will try to call the k() function.

Revision 2698 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 28 13:52:33 2004 UTC (15 years, 3 months ago) by dpvc
File length: 49150 byte(s)
Diff to previous 2608
Add better error reporting in PG translator.  In particular, these
changes add two new features:

	1)  produce a full stack trace when a .pg file dies, and
	2)  convert (eval nnn) references to filenames, when
	    possible, in warn and die messages while processing a
	    .pg file.

There is also a change in the webwork tree that is needed to make this
all work, so be sure to apply updates in both trees.

Revision 2608 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 14 13:49:56 2004 UTC (15 years, 3 months ago) by dpvc
File length: 48968 byte(s)
Diff to previous 2602
Added Infinity function (similar to i and pi) for creating infinity
constants.

Revision 2602 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 13 22:57:27 2004 UTC (15 years, 3 months ago) by dpvc
File length: 48927 byte(s)
Diff to previous 2574
Changed the way the parser checks to see if it is loaded.

Revision 2574 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 4 20:23:11 2004 UTC (15 years, 4 months ago) by dpvc
File length: 48920 byte(s)
Diff to previous 2558
Make Parser live nicely with Complex1.pm.

In particular, make the i() function determine whether it should
call the Complex::i() function or the Parser version.

Revision 2558 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 28 20:32:33 2004 UTC (15 years, 4 months ago) by sh002i
File length: 48740 byte(s)
Diff to previous 2488
merged changes from rel-2-1-a1 -- stop using that branch.

Revision 2488 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 11 21:36:26 2004 UTC (15 years, 5 months ago) by gage
File length: 48610 byte(s)
Diff to previous 2445
Added better error messages.  Removed and extraneous slash.

Revision 2445 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 6 21:21:20 2004 UTC (15 years, 5 months ago) by jj
File length: 48574 byte(s)
Diff to previous 2393
Allow psvn to equal 0.  It could happen in situations where a problem
isn't really assigned to the person.

Revision 2393 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 24 21:01:23 2004 UTC (15 years, 5 months ago) by dpvc
File length: 48565 byte(s)
Diff to previous 2392
Removed the experimental Parser-based implementations of i(), j() and k().
(sorry about that).

Revision 2392 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 24 21:00:26 2004 UTC (15 years, 5 months ago) by dpvc
File length: 48695 byte(s)
Diff to previous 2274
Removed skip and rule from problem header generated in TeX mode here,
and let the snippets handle it (they were producing redundent rules).

Also removed some unwanted spaces in htmllink().

(Accidentally committed experimental change to dangerousMacros.pl, and
don't know how to prevent it at this point, so I'll commit a change
back to the original in a moment.)

Revision 2274 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 7 23:53:45 2004 UTC (15 years, 6 months ago) by sh002i
File length: 48572 byte(s)
Diff to previous 2270
got rid of remaining calls to "wwerror". Fixes bug #530.

Revision 2270 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 7 11:52:47 2004 UTC (15 years, 6 months ago) by dpvc
File length: 48582 byte(s)
Diff to previous 2253
Removed redundant HTML_jsMath check.

Revision 2253 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 5 16:13:33 2004 UTC (15 years, 6 months ago) by jj
File length: 48610 byte(s)
Diff to previous 2232
Allow on-the-fly graphics in jsmath and asciimath modes.

Revision 2232 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 31 15:44:43 2004 UTC (15 years, 6 months ago) by jj
File length: 48447 byte(s)
Diff to previous 2166
Re-use on-the-fly graphs, unless problem seed has change, source file has changed, or the problem is being rendered without being part of a real set.

Revision 2166 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 22 22:16:20 2004 UTC (15 years, 6 months ago) by dpvc
File length: 48106 byte(s)
Diff to previous 2153
Files needed for jsMath display mode.

Revision 2153 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 22 15:53:00 2004 UTC (15 years, 6 months ago) by gage
File length: 48067 byte(s)
Diff to previous 2151
Removed warning messages.  The macroDirectory and courseScripts directory are now defined from the %envir
variable which is shared directly with the new Safe compartment rather than via calls to $main::macroDirectory
which seemed to be unstable in some instances.  I've left the FIXME sign in place just in case there
are still problems.

Revision 2151 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 22 01:23:17 2004 UTC (15 years, 6 months ago) by gage
File length: 48200 byte(s)
Diff to previous 2150
Roll back the previous changes.  They were added to HEAD instead of to the experimental branch.

Revision 2150 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 22 01:19:11 2004 UTC (15 years, 6 months ago) by gage
File length: 48150 byte(s)
Diff to previous 2144
Experimental refactorization of answer evaluators will take place on this branch.

Revision 2144 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 21 23:58:13 2004 UTC (15 years, 6 months ago) by apizer
File length: 48050 byte(s)
Diff to previous 2057
Removed old commented out code dealing with PGsort.

Arnie

Revision 2057 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 8 22:53:03 2004 UTC (15 years, 7 months ago) by gage
File length: 49353 byte(s)
Diff to previous 1690
Preliminary changes that may eventually allow us to solve the be_strict problem for 5.8.0

Revision 1690 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Dec 28 19:46:57 2003 UTC (15 years, 11 months ago) by gage
File length: 49352 byte(s)
Diff to previous 1312
Zeroed the variable storing the responses to questionnaires.  Should
fix the error on questionnaires revealed by the persistance of mod_perl
modules.

Changed warning message in dangerousMacros.pl to more accurately describe
what is wrong when the gif2eps script cannot be executed.  (Based on actual
experience running a course on webwork.math.rochester.edu -- I couldn't remember
what my own warning message implied.)
--Mike

Revision 1312 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 1 17:55:12 2003 UTC (16 years, 5 months ago) by gage
File length: 49267 byte(s)
Diff to previous 1311
Fixed error in sourceAlias.  The variable is %main::envir not
$main::envir !!!
--Mike

Revision 1311 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 1 15:36:43 2003 UTC (16 years, 5 months ago) by gage
File length: 49266 byte(s)
Diff to previous 1305
Changed the defintion of *i to be inside the Complex package.
this and the change to dangerousMacros seems to have cured bug #116

In dangerousMacros, I've added sub i {Complex::i}; after sub i;

--Mike

Revision 1305 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 1 00:48:01 2003 UTC (16 years, 5 months ago) by gage
File length: 49246 byte(s)
Diff to previous 1280
Latest attempt to get a version of dangerousMacros.pl that will
work with both 5.6.1 adn 5.6.0
--Mike

Revision 1280 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 26 17:42:18 2003 UTC (16 years, 5 months ago) by malsyned
File length: 48664 byte(s)
Diff to previous 1267
Merged the changes needed to work with the new WW2 translator
optimizations into the main pg branch.

Revision 1267 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 24 15:25:58 2003 UTC (16 years, 5 months ago) by gage
File length: 48606 byte(s)
Diff to previous 1250
Changes that allow these files to work with caching version
of Webwork2.0 -- optimized for speed
--Mike

Revision 1250 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 23 15:43:11 2003 UTC (16 years, 5 months ago) by gage
File length: 48009 byte(s)
Diff to previous 1091
Made changes required to allow caching of these files.
My tests indicate that these changes are compatible with webwork1.8
One possible problem might be the mail-to answer macros
which access the environement variable directly
I think I have this properly patched, but it has not been
tested yet.
--Mike

Revision 1091 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 21:53:11 2003 UTC (16 years, 6 months ago) by gage
File length: 47340 byte(s)
Diff to previous 1080
Added > /dev/null tags to the commands which run tex and dvi for
HTML_img mode.  These will probably work now for the most part.
I don't know how well this will work if there is an error in
getting either tex or dvips to run.

For many problems using WeBWorK1.8 and typeset3 mode  thing work fine.
Please submit example problems where the images don't show up or some
other image related error occurs as bugs to
http://webwork3.math.rochester.edu/bugzilla
--Mike

Revision 1080 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 17:49:36 2003 UTC (16 years, 6 months ago) by apizer
File length: 47316 byte(s)
Diff to previous 1069
remove unneccsary shebang lines

Arnie

Revision 1069 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 02:01:41 2003 UTC (16 years, 6 months ago) by gage
File length: 47692 byte(s)
Diff to previous 1050
Bringing this version into sync with the latest version in
courseScripts.
In particular dvipng is active in this script to make HTML_img
useable in WeBWorK2.0.  Not yet finished with this.
--Mike

Revision 1050 - (view) (download) (as text) (annotate) - [select for diffs]
Added Fri Jun 6 21:39:42 2003 UTC (16 years, 6 months ago) by sh002i
File length: 45293 byte(s)
moved PG modules and macro files from webwork-modperl to pg
-sam

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9