Log of /branches/gage_dev/pg
Directory Listing
Revision
6438 -
Directory Listing
Modified
Wed Sep 22 03:37:42 2010 UTC (2 years, 7 months ago) by
gage
sync with trunk
Revision
6437 -
Directory Listing
Modified
Wed Sep 22 03:30:46 2010 UTC (2 years, 7 months ago) by
gage
make parserMultiAnswer compatible with quiz mode by adding a quiz prefix to MuLtIaNsWeR
This way if there are two multianswer questions they will be distinguished by the quiz prefix.
Revision
6434 -
Directory Listing
Modified
Thu Sep 16 15:34:31 2010 UTC (2 years, 8 months ago) by
gage
Cleaning things up by replacing references to psvnNumber by psvn (which is less redundant)
Revision
6433 -
Directory Listing
Modified
Thu Sep 16 03:36:41 2010 UTC (2 years, 8 months ago) by
gage
make changes to PGgraphmacros.pl and PGalias.pm to protect periods, commas and at
signs when creating links to pictures
add Arnie's changes to PGgraders.pl in trunk to gage_dev
Revision
6429 -
Directory Listing
Modified
Tue Sep 14 14:50:39 2010 UTC (2 years, 8 months ago) by
gage
commit directory
Revision
6428 -
Directory Listing
Modified
Tue Sep 14 14:48:56 2010 UTC (2 years, 8 months ago) by
gage
added mathJax code
Revision
6427 -
Directory Listing
Modified
Tue Sep 14 14:48:10 2010 UTC (2 years, 8 months ago) by
gage
added mathJax code
Revision
6422 -
Directory Listing
Modified
Tue Sep 14 14:18:39 2010 UTC (2 years, 8 months ago) by
gage
made sure that surePathToFile is called as a method
Revision
6403 -
Directory Listing
Modified
Thu Sep 2 15:25:58 2010 UTC (2 years, 8 months ago) by
gage
changes to comments
Revision
6402 -
Directory Listing
Modified
Thu Sep 2 15:24:45 2010 UTC (2 years, 8 months ago) by
gage
updating changes from trunk
Revision
6400 -
Directory Listing
Modified
Wed Sep 1 18:46:45 2010 UTC (2 years, 8 months ago) by
gage
publishing student answers in hardcopy quizzes
Revision
6399 -
Directory Listing
Modified
Wed Sep 1 18:45:30 2010 UTC (2 years, 8 months ago) by
gage
added closing script tag
Revision
6386 -
Directory Listing
Modified
Wed Jul 21 15:41:33 2010 UTC (2 years, 9 months ago) by
gage
merge from trunk -- fixed findAppletCodebase
Revision
6383 -
Directory Listing
Modified
Wed Jul 21 15:20:27 2010 UTC (2 years, 9 months ago) by
gage
minor fixes about storing the PGcore object
postpone dealing with obtaining warnings from the grader operation
Revision
6382 -
Directory Listing
Modified
Wed Jul 21 15:15:31 2010 UTC (2 years, 9 months ago) by
gage
replaced calls to PG_FLAGS with calls to
$main::PG->{flags}
Revision
6381 -
Directory Listing
Modified
Wed Jul 21 15:09:16 2010 UTC (2 years, 9 months ago) by
gage
replace calls to PG_FLAGS with calls to
$main::PG->{flags}
This will work for now at least.
Revision
6380 -
Directory Listing
Modified
Wed Jul 21 15:07:55 2010 UTC (2 years, 9 months ago) by
gage
moved install_problem_grader from PGanswermacros.pl to
PG.pl also set alias: current_problem_grader to the same routine
this can be used to get the current problem grader as well
as to set it.
Revision
6377 -
Directory Listing
Modified
Sat Jul 17 20:11:18 2010 UTC (2 years, 10 months ago) by
gage
porting updates from trunk.
Added pass through methods to VectorFields.pm so that AUTOLOAD is not needed.
I missed this file the first time through.
Revision
6369 -
Directory Listing
Modified
Thu Jul 15 03:17:23 2010 UTC (2 years, 10 months ago) by
gage
changes to support preserving state for geogebra applets
Revision
6365 -
Directory Listing
Modified
Wed Jul 14 17:52:02 2010 UTC (2 years, 10 months ago) by
gage
commit tree structure
Revision
6364 -
Directory Listing
Modified
Wed Jul 14 17:44:48 2010 UTC (2 years, 10 months ago) by
gage
Many changes have been made to the applet support ((particularly in the javaScript) to
insure that the state of the applet is stored and retreived "exactly" -- no matter how
funny the characters. This was harder than one might think.
Revision
6359 -
Directory Listing
Modified
Mon Jul 12 04:15:40 2010 UTC (2 years, 10 months ago) by
gage
clear tree differences
Revision
6357 -
Directory Listing
Modified
Mon Jul 12 04:01:31 2010 UTC (2 years, 10 months ago) by
gage
minor syntactic change in the way that Matrices are addressed in PGanswermacros.pl
Prevents error messages when certain files are loaded before PGanswermacros.pl
Added support for type and visibility attributes for applets
Revision
6345 -
Directory Listing
Modified
Sat Jul 10 12:35:35 2010 UTC (2 years, 10 months ago) by
gage
committing libraries
Revision
6343 -
Directory Listing
Modified
Sat Jul 10 12:09:32 2010 UTC (2 years, 10 months ago) by
gage
allow a parameter_string in addition to (and overriding) the parameter hash params.
Makes it easier to cut and paste a geogebra object from a webpage into a PG problem.
Revision
6342 -
Directory Listing
Modified
Sat Jul 10 03:10:44 2010 UTC (2 years, 10 months ago) by
gage
This is a renaming of the List.pm module so that it doesn't conflict with the MathObjects List
Revision
6341 -
Directory Listing
Modified
Sat Jul 10 03:09:43 2010 UTC (2 years, 10 months ago) by
gage
Add check to see if there is an onInit function from the applet that will initialize
loading -- it indicates that the applet is completely initialized.
Revision
6332 -
Directory Listing
Modified
Sat Jul 10 00:25:39 2010 UTC (2 years, 10 months ago) by
gage
removed <form></form> from the comments. (Also in the previous update reverted
the tags for java applets back to <applets> instead of <object> -- it seems
safer --- at least with geogebra.
Revision
6331 -
Directory Listing
Modified
Sat Jul 10 00:18:09 2010 UTC (2 years, 10 months ago) by
gage
Remove all references to AUTOLOAD -- they cause trouble with new versions of the Safe compartment
and we dont' really need them -- they were just a convenience so that we didn't have to write out
pass through measures by hand.
Revision
6330 -
Directory Listing
Modified
Sat Jul 10 00:16:37 2010 UTC (2 years, 10 months ago) by
gage
don't alter the correct_ans latex string if it is already some non-empty string.
This will allow the MathObject to construct a correct_ans latex string when it receives
the correct answer rather when the answer is being checked.
Revision
6325 -
Directory Listing
Modified
Wed Jul 7 01:42:14 2010 UTC (2 years, 10 months ago) by
gage
improved version of findAppletCodebase.
addition of channels for communicating debug, warning and internal_warning messages
Revision
6324 -
Directory Listing
Modified
Wed Jul 7 01:38:26 2010 UTC (2 years, 10 months ago) by
gage
merged upgrades from Trunk. better handling of typeset version of correct answer and better
version of Applet API
Revision
6323 -
Directory Listing
Modified
Wed Jul 7 01:36:59 2010 UTC (2 years, 10 months ago) by
gage
add extra channels for reporting errors
Revision
6322 -
Directory Listing
Modified
Wed Jul 7 01:34:38 2010 UTC (2 years, 10 months ago) by
gage
modifications so that the number of points plotted is not so flakey
Revision
6315 -
Directory Listing
Modified
Thu Jul 1 20:31:45 2010 UTC (2 years, 10 months ago) by
gage
this now works mostly
issues:
for ie8 -- for java applets this sometimes fails (for example on reload) but not always -- timing issue?
for firefox -- this works for java and usually works for flash -- it fails to work for shift reload on flash
Revision
6313 -
Directory Listing
Modified
Thu Jul 1 19:01:02 2010 UTC (2 years, 10 months ago) by
gage
this now works on ie8 with java applets but not with flash applets
Revision
6312 -
Directory Listing
Modified
Thu Jul 1 18:59:59 2010 UTC (2 years, 10 months ago) by
gage
this works with java applets but not yet with flash applets
Revision
6307 -
Directory Listing
Modified
Fri Jun 25 01:00:12 2010 UTC (2 years, 10 months ago) by
gage
submitting Davide Cervone's fix to handle currency numbers that contain more than
one comma.
Revision
6300 -
Directory Listing
Modified
Tue Jun 22 14:59:59 2010 UTC (2 years, 10 months ago) by
gage
updating changes for CanvasObject to the dev version
Revision
6299 -
Directory Listing
Modified
Tue Jun 22 14:46:58 2010 UTC (2 years, 10 months ago) by
gage
test development branch
Revision
6298 -
Directory Listing
Modified
Mon Jun 21 23:01:05 2010 UTC (2 years, 10 months ago) by
gage
Original Path:
trunk/pg
Adding CanvasObject.pl for use in HTML5 input
Revision
6296 -
Directory Listing
Modified
Mon Jun 21 20:51:40 2010 UTC (2 years, 10 months ago) by
gage
Original Path:
trunk/pg
added decode_base64 and encode_base64 routines for use in WW questions
Revision
6294 -
Directory Listing
Modified
Fri Jun 18 01:38:07 2010 UTC (2 years, 11 months ago) by
gage
Original Path:
trunk/pg
Added correct_ans_latex_string -> ... element to the answer hash for displaying the TeX version of the correct answer
Revision
6292 -
Directory Listing
Modified
Tue Jun 8 18:00:53 2010 UTC (2 years, 11 months ago) by
mgage
Original Path:
trunk/pg
syncing cvn with changes made to the cvs
Revision
6290 -
Directory Listing
Modified
Mon May 31 23:22:15 2010 UTC (2 years, 11 months ago) by
gage
Original Path:
trunk/pg
attempted fix for finding applets automatically.
Revision
6289 -
Directory Listing
Modified
Mon May 31 18:41:40 2010 UTC (2 years, 11 months ago) by
gage
Original Path:
trunk/pg
brings the pg copy in line with the copy in NPL/macros/Union
Revision
6281 -
Directory Listing
Modified
Thu May 27 03:53:23 2010 UTC (2 years, 11 months ago) by
gage
Original Path:
trunk/pg
corrected typos.
Revision
6280 -
Directory Listing
Modified
Thu May 27 02:22:51 2010 UTC (2 years, 11 months ago) by
gage
Original Path:
trunk/pg
changed parts of LABELED_ANS (and PGcore::new) so that it properly handles the
QUIZ_PREFIX needed by gateway quizzes.
Revision
6278 -
Directory Listing
Modified
Tue May 25 22:47:52 2010 UTC (2 years, 11 months ago) by
gage
Original Path:
trunk/pg
Fixed the not_null bug? perhaps. Insure that the Exporter 'import' subroutine is available
in the BEGIN statement of PGcore
Revision
6277 -
Directory Listing
Modified
Tue May 25 22:22:27 2010 UTC (2 years, 11 months ago) by
gage
Original Path:
trunk/pg
added Exporter to the inheritance tree of PGcore
Revision
6276 -
Directory Listing
Modified
Tue May 25 22:13:52 2010 UTC (2 years, 11 months ago) by
gage
Original Path:
trunk/pg
regularizing calls to no_null -- something puzzling is going on here
since it appears to work on some systems but not others.
Revision
6264 -
Directory Listing
Modified
Sat May 15 19:38:49 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
commented out a warning about using RCORD_FORM_LABELS until
I can fix it properly -- it's used by ProblemRandomize for example.
Revision
6261 -
Directory Listing
Modified
Sat May 15 18:41:23 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
added fixes to PGalias.pm and PGcore.pm related to using $self-> in contexts
where the binding was not as expected (e.g. in 'blah'. $self->{foobar} .'blah' )
Other minor fixes and improvements.
Revision
6259 -
Directory Listing
Modified
Sat May 15 01:53:57 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
Fixed a bug that interferec with constructing the correct path to a gif file
Revision
6257 -
Directory Listing
Modified
Fri May 14 16:53:28 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
correct initialiazation problem for showPartialCorrectAnswers
Revision
6256 -
Directory Listing
Modified
Fri May 14 16:48:45 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
Changed the name of {PG_FLAGS} to {flags} for confomity
Revision
6255 -
Directory Listing
Modified
Fri May 14 15:44:55 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
inserted $self-> before directoryFromPath and surePathToTmpFile calls
Revision
6254 -
Directory Listing
Modified
Fri May 14 14:14:52 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
fixed an error in which surePathToTmp file wasn't prefixed by $self->
Revision
6252 -
Directory Listing
Modified
Fri May 14 12:31:19 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
remove extraneous warning signs.
Revision
6251 -
Directory Listing
Modified
Fri May 14 12:07:45 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
removed duplicate definition of not_null
Revision
6249 -
Directory Listing
Modified
Fri May 14 11:39:02 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
major update which adds objective methods to the basic code of PG.
HEAD should be considered more beta than usual for a few days until minor glitches
are shaken out.
new modules needed:
PGcore PGalias PGresource PGloadfiles PGanswergroup PGresponsegroup Tie::IxHash
Revision
6248 -
Directory Listing
Modified
Fri May 14 01:17:21 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
major update which adds objective methods to the basic code of PG.
HEAD should be considered more beta than usual for a few days until minor glitches
are shaken out.
new modules needed:
PGcore PGalias PGresource PGloadfiles PGanswergroup PGresponsegroup Tie::IxHash
Revision
6247 -
Directory Listing
Modified
Fri May 14 01:16:25 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
insure that MatrixReal1.pm is used
Revision
6245 -
Directory Listing
Modified
Fri May 14 01:13:52 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
major update which adds objective methods to the basic code of PG.
HEAD should be considered more beta than usual for a few days until minor glitches
are shaken out.
new modules needed:
PGcore PGalias PGresource PGloadfiles PGanswergroup PGresponsegroup Tie::IxHash
dangerousMacros.pl is no longer used.
Revision
6244 -
Directory Listing
Modified
Fri May 14 01:07:37 2010 UTC (3 years ago) by
gage
Original Path:
trunk/pg
major change to the base
major update which adds objective methods to the basic code of PG.
HEAD should be considered more beta than usual for a few days until minor glitches
are shaken out.
new modules needed:
PGcore PGalias PGresource PGloadfiles PGanswergroup PGresponsegroup Tie::IxHash
Revision
6226 -
Directory Listing
Modified
Tue Apr 27 02:09:04 2010 UTC (3 years ago) by
dpvc
Original Path:
trunk/pg
Make penalties cumulative (they were supposed to be, but weren't
Revision
6225 -
Directory Listing
Modified
Tue Apr 27 02:00:37 2010 UTC (3 years ago) by
dpvc
Original Path:
trunk/pg
Correct problem with documentation of GradeWithPenalty
Revision
6223 -
Directory Listing
Modified
Wed Apr 14 14:26:12 2010 UTC (3 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Make sure inherited formulas get the right variables
Revision
6222 -
Directory Listing
Modified
Thu Apr 8 10:49:05 2010 UTC (3 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Since $self->{tree} is not inherited, cache it beforehand so that we
can use it afterward.
Revision
6221 -
Directory Listing
Modified
Sat Apr 3 20:28:25 2010 UTC (3 years, 1 month ago) by
gage
Original Path:
trunk/pg
Added line so that if the dot_radius on a vector arrow is 0 then the dot is not drawn at all.
Revision
6220 -
Directory Listing
Modified
Thu Apr 1 00:24:26 2010 UTC (3 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Back out of accidental commit of complex macros
Revision
6219 -
Directory Listing
Modified
Thu Apr 1 00:21:45 2010 UTC (3 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Provide a limited context in which rational functions can be specified
Revision
6218 -
Directory Listing
Modified
Thu Apr 1 00:21:01 2010 UTC (3 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Make it easier to subclass this class for RationalFunction context, and fix a bug with the stict division check
Revision
6217 -
Directory Listing
Modified
Wed Mar 31 21:45:42 2010 UTC (3 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Remove unneeded parent class
Revision
6216 -
Directory Listing
Modified
Wed Mar 31 21:01:14 2010 UTC (3 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
New context for products of powers of polynomials
Revision
6215 -
Directory Listing
Modified
Mon Mar 29 13:59:36 2010 UTC (3 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Set main::problemSeed so images will refresh when the problem is re-seeded. Make changes made by professors acting as students only temporary changes
Revision
6214 -
Directory Listing
Modified
Tue Mar 23 00:26:03 2010 UTC (3 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Add requirePureFraction flag and include more documentation
Revision
6213 -
Directory Listing
Modified
Mon Mar 22 11:01:55 2010 UTC (3 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Add =< and => operators and flag to control whether they are allowed or not. Added more documentation
Revision
6211 -
Directory Listing
Modified
Sat Mar 20 00:53:25 2010 UTC (3 years, 2 months ago) by
gage
Original Path:
trunk/pg
Add id tag as well as name tag to HIDDEN_ANS_RULE
Revision
6210 -
Directory Listing
Modified
Sat Mar 20 00:46:38 2010 UTC (3 years, 2 months ago) by
gage
Original Path:
trunk/pg
added id tags as well as name tags to input items
Revision
6208 -
Directory Listing
Modified
Sat Mar 13 01:09:08 2010 UTC (3 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem with the signed number pattern that cause Real("4*3") to produce 4 rather than 12.
Revision
6207 -
Directory Listing
Modified
Mon Feb 22 13:54:02 2010 UTC (3 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Make inherit() properly not inherit the noinherit attributes from self
Revision
6206 -
Directory Listing
Modified
Thu Feb 11 02:31:52 2010 UTC (3 years, 3 months ago) by
jj
Original Path:
trunk/pg
Backing out previous change. There is still a serious problem with this
file, although we hadn't fixed it.
Revision
6205 -
Directory Listing
Modified
Wed Feb 10 17:31:32 2010 UTC (3 years, 3 months ago) by
jj
Original Path:
trunk/pg
Fix a bug where problems produce a pink screen on checking answers. We
don't bother evaluating the student answer if it is empty.
Revision
6204 -
Directory Listing
Modified
Mon Feb 8 14:35:15 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Make sure variable substitution has occured BEFORE switching the contexts (so we don't get an undefined variable message); contexts must agree in order to compare the two.
Revision
6203 -
Directory Listing
Modified
Mon Feb 8 14:31:40 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Make sure makeValue set's the context, if requested
Revision
6201 -
Directory Listing
Modified
Sun Feb 7 10:24:42 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Corrected interpretation of 0 a/b (thanks to Adam Weyhaupt)
Revision
6200 -
Directory Listing
Modified
Mon Feb 1 14:51:35 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Allow formula to be point-valued (if promotePoints is 1)
Revision
6195 -
Directory Listing
Modified
Mon Feb 1 01:33:05 2010 UTC (3 years, 3 months ago) by
apizer
Original Path:
trunk/pg
Replace "Reduced Scoring" by "Reduced Credit". Don't displat message after due date
Revision
6192 -
Directory Listing
Modified
Fri Jan 29 10:52:10 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
A context that allows students to enter any string
Revision
6191 -
Directory Listing
Modified
Wed Jan 27 12:00:46 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Allow error for correct answer but not student answer in getTypicalValue
Revision
6190 -
Directory Listing
Modified
Wed Jan 27 11:48:18 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Allow creation of test points with no errors
Revision
6189 -
Directory Listing
Modified
Wed Jan 27 11:44:18 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Make Formula typeMatch work with test_points, and not produce error messages
Revision
6188 -
Directory Listing
Modified
Sun Jan 24 22:32:28 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Changed warning message for decimal numbers in no-decimal modes
Revision
6187 -
Directory Listing
Modified
Sun Jan 24 02:13:38 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Removed deletion of i,j,k which are not in the original Point context
Revision
6185 -
Directory Listing
Modified
Sat Jan 23 16:39:35 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed wrong default value in comments
Revision
6184 -
Directory Listing
Modified
Sat Jan 23 16:38:59 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typos in comments
Revision
6183 -
Directory Listing
Modified
Sat Jan 23 16:38:03 2010 UTC (3 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Change ProperFractions to MixedNumbers in several parameters, but allow originals for backward compatibility
Revision
6179 -
Directory Listing
Modified
Thu Jan 7 18:02:53 2010 UTC (3 years, 4 months ago) by
jj
Original Path:
trunk/pg
Added macros to make it easier to have underlined text in a problem:
BUL and EUL
Revision
6178 -
Directory Listing
Modified
Sun Jan 3 17:13:46 2010 UTC (3 years, 4 months ago) by
gage
Original Path:
trunk/pg
The buttons for setConfig and getConfig are only shown in the debug display
if those commands are defined and non-empty.
Likewise for the setState and getState buttons.
Revision
6172 -
Directory Listing
Modified
Sun Dec 13 23:52:10 2009 UTC (3 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Added back in accidentally removed log() function
Revision
6171 -
Directory Listing
Modified
Sat Dec 5 19:37:13 2009 UTC (3 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Added missing comma
Revision
6170 -
Directory Listing
Modified
Sat Dec 5 19:33:57 2009 UTC (3 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Correct output for j vector in Vector2D context (obsolete)
Revision
6168 -
Directory Listing
Modified
Sat Nov 14 21:56:12 2009 UTC (3 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Fixed PopUp to handle entries with arbitrary strings
Revision
6164 -
Directory Listing
Modified
Thu Nov 5 13:00:43 2009 UTC (3 years, 6 months ago) by
gage
Original Path:
trunk/pg
Added BEGIN_PGML and END_PGML
Revision
6163 -
Directory Listing
Modified
Thu Nov 5 12:58:37 2009 UTC (3 years, 6 months ago) by
gage
Original Path:
trunk/pg
default PGcourse.pl file
added init_PGcourse subroutine to keep it from being loaded twice
Revision
6162 -
Directory Listing
Modified
Wed Nov 4 20:47:47 2009 UTC (3 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Fixed some incorrect spellings, and added round() and truncate()
methods to allow currency objects to remove extra decimal places.
Revision
6161 -
Directory Listing
Modified
Wed Nov 4 17:54:42 2009 UTC (3 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Avoid unwanted error message in log file about redefining log() function
Revision
6160 -
Directory Listing
Modified
Wed Nov 4 17:14:45 2009 UTC (3 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Fix problem with useBaseTenLog in perl code
Revision
6158 -
Directory Listing
Modified
Mon Nov 2 16:58:43 2009 UTC (3 years, 6 months ago) by
apizer
Original Path:
trunk/pg
Allow reduced scoring to be enabled or disabled for individual assignments. Default is disabled.
Revision
6149 -
Directory Listing
Modified
Sat Oct 17 15:53:19 2009 UTC (3 years, 7 months ago) by
apizer
Original Path:
trunk/pg
Implement a Reduced Scoring Period. The Reduced Scoring Period is a period before the due date during which all additional work done by the student counts at a reduced rate.
Revision
6147 -
Directory Listing
Modified
Sun Oct 11 00:44:22 2009 UTC (3 years, 7 months ago) by
gage
Original Path:
trunk/pg
pod doc corrections
Revision
6146 -
Directory Listing
Modified
Sat Oct 10 13:43:52 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Added comments and minor cleanup
Revision
6145 -
Directory Listing
Modified
Sat Oct 10 13:17:17 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
A new context for chemical reactions
Revision
6141 -
Directory Listing
Modified
Wed Oct 7 14:39:19 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
fixed spelling error
Revision
6140 -
Directory Listing
Modified
Sun Oct 4 17:42:18 2009 UTC (3 years, 7 months ago) by
gage
Original Path:
trunk/pg
edited some pod documentation
Revision
6136 -
Directory Listing
Modified
Sat Oct 3 16:40:47 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Handle formula 'constants' properly
Revision
6135 -
Directory Listing
Modified
Sat Oct 3 16:40:09 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Handle variables in formula 'constants' properly
Revision
6134 -
Directory Listing
Modified
Sat Oct 3 16:39:42 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Reduction rule should be off by default
Revision
6133 -
Directory Listing
Modified
Sat Oct 3 15:58:49 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Accidentally had left 'prime' as
Revision
6132 -
Directory Listing
Modified
Fri Oct 2 17:44:54 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
New MathObject to implement differentiation via prime operator
Revision
6126 -
Directory Listing
Modified
Thu Oct 1 22:06:11 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Handle arbitrary variable names
Revision
6125 -
Directory Listing
Modified
Thu Oct 1 22:05:05 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
count {\rm } as a blank string
Revision
6120 -
Directory Listing
Modified
Thu Oct 1 14:44:54 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
During substitution, remove cached values that could change
Revision
6119 -
Directory Listing
Modified
Thu Oct 1 14:12:06 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fix problem with processing lists where a constant answer produces a computation error
Revision
6118 -
Directory Listing
Modified
Thu Oct 1 14:10:02 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fix error message for powers of negatives
Revision
6117 -
Directory Listing
Modified
Thu Oct 1 14:09:03 2009 UTC (3 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Add LimitedProperFraction context, and some cosmetic fixes
Revision
6105 -
Directory Listing
Modified
Fri Sep 18 17:46:56 2009 UTC (3 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with domain errors
Revision
6104 -
Directory Listing
Modified
Wed Sep 16 10:59:38 2009 UTC (3 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fix context() method to SET the context when one is passed
Revision
6092 -
Directory Listing
Modified
Fri Jul 31 14:50:51 2009 UTC (3 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make fractions stringify with parentheses properly
Revision
6091 -
Directory Listing
Modified
Fri Jul 31 02:25:09 2009 UTC (3 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
handle negative fraction reductions
Revision
6090 -
Directory Listing
Modified
Fri Jul 31 01:51:44 2009 UTC (3 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
make reduce work with negative numbers
Revision
6085 -
Directory Listing
Modified
Sat Jul 18 02:50:50 2009 UTC (3 years, 10 months ago) by
gage
Original Path:
trunk/pg
added effectivePermissionLevel to the PG environment
-- the permission level of the effectiveUser, the user to which the question has been assigned.
Changed the printing of the path to files in beginproblem
so that it is shown if the effectivePermissionLevel is higher than
the "PRINT_FILE_NAMES_PERMISSION_LEVEL" value. This responds to user requests that make it easier for an
instructor to print hardcopy for the student.
Revision
6080 -
Directory Listing
Modified
Sun Jul 12 23:39:20 2009 UTC (3 years, 10 months ago) by
gage
Original Path:
trunk/pg
Added id tags to most HTML entities defined in PGbasicmacros.pl
Revision
6079 -
Directory Listing
Modified
Sun Jul 12 23:38:12 2009 UTC (3 years, 10 months ago) by
gage
Original Path:
trunk/pg
Changed how errors are caught in methodDefined() to prevent unneeded error messages in firefox
Made cosmetic corrections to how error messages are reported.
Revision
6071 -
Directory Listing
Modified
Sun Jun 28 14:31:57 2009 UTC (3 years, 10 months ago) by
gage
Original Path:
trunk/pg
Fixed spelling errors
Revision
6059 -
Directory Listing
Modified
Thu Jun 25 23:33:26 2009 UTC (3 years, 10 months ago) by
gage
Original Path:
trunk/pg
add copyright to PGbasicmacros.pl
Revision
6058 -
Directory Listing
Modified
Thu Jun 25 23:28:44 2009 UTC (3 years, 10 months ago) by
gage
Original Path:
trunk/pg
syncing pg HEAD with pg2.4.7 on 6/25/2009
Revision
6052 -
Directory Listing
Modified
Thu Jun 25 14:51:10 2009 UTC (3 years, 10 months ago) by
gage
Original Path:
trunk/pg
Change the "return applet to virgin state" button into a submit button so that the action takes place immediately rather than after entering
an answer
Revision
6051 -
Directory Listing
Modified
Thu Jun 25 14:49:16 2009 UTC (3 years, 10 months ago) by
gage
Original Path:
trunk/pg
Update information to instructor about hints in the problem.
Revision
6049 -
Directory Listing
Modified
Tue Jun 9 20:23:04 2009 UTC (3 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Only shorten the labels for display, not internally.\nPlus removed trailing spaces and fixed a typo in the javascript
Revision
6048 -
Directory Listing
Modified
Tue Jun 9 11:58:23 2009 UTC (3 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Put off adding % to label key until just before needed
Revision
6047 -
Directory Listing
Modified
Sun Jun 7 12:33:27 2009 UTC (3 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Don't do equivalence check if prefilters are erased
Revision
6046 -
Directory Listing
Modified
Thu Jun 4 13:29:59 2009 UTC (3 years, 11 months ago) by
glarose
Original Path:
trunk/pg
WWPlot: slightly better choice of dash-length and spacing for dashing
option on lines and arrows.
Revision
6039 -
Directory Listing
Modified
Wed Jun 3 21:17:13 2009 UTC (3 years, 11 months ago) by
glarose
Original Path:
trunk/pg
WWPlot: add a dashed option to lines and arrows
Revision
6038 -
Directory Listing
Modified
Wed Jun 3 19:24:25 2009 UTC (3 years, 11 months ago) by
glarose
Original Path:
trunk/pg
WWPlot: add arrowTo() method, support for width in lineTo()
Revision
6037 -
Directory Listing
Modified
Sun May 24 19:54:29 2009 UTC (3 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
make sure formulas are in the correct context
Revision
6036 -
Directory Listing
Modified
Tue Apr 28 18:20:56 2009 UTC (4 years ago) by
gage
Original Path:
trunk/pg
cumulative updates made while developing Applet.pm on hosted2
Revision
6034 -
Directory Listing
Modified
Sun Apr 5 22:41:16 2009 UTC (4 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
remove number pattern so that strings can start with digits
Revision
6030 -
Directory Listing
Modified
Sun Mar 22 18:33:06 2009 UTC (4 years, 1 month ago) by
gage
Original Path:
trunk/pg
minor changes to refine the applet interface and to make
it work smoothly in both debuMode and non-debugMode
Also changed the name of the reset_button to the reinitialize_button
and the title the button carries
Revision
6027 -
Directory Listing
Modified
Sun Mar 22 10:57:08 2009 UTC (4 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Have popup handle a context passed to its new() method, lik all other MathObjects
Revision
6026 -
Directory Listing
Modified
Sun Mar 15 19:25:03 2009 UTC (4 years, 2 months ago) by
gage
Original Path:
trunk/pg
Added documentation for applet API
added initialState to the instance variables
Revision
6025 -
Directory Listing
Modified
Tue Mar 10 20:58:46 2009 UTC (4 years, 2 months ago) by
gage
Original Path:
trunk/pg
Fixed an extra paren that was causing problems.
Revision
6023 -
Directory Listing
Modified
Tue Mar 10 20:48:51 2009 UTC (4 years, 2 months ago) by
gage
Original Path:
trunk/pg
complete the conversion from configAlias to setConfigAlias
Revision
6022 -
Directory Listing
Modified
Tue Mar 10 14:08:50 2009 UTC (4 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Fix the context::Fraction::Real object so that new() and make() will
handle being passed a fraction as a string (since Value::makeValue()
will pass that to context::Fraction::Real->make() when it is given a
fraction as a string).
Revision
6021 -
Directory Listing
Modified
Tue Mar 10 12:10:36 2009 UTC (4 years, 2 months ago) by
gage
Original Path:
trunk/pg
replaced configAlias by setConfigAlias
receivedFieldName replaced by answerBoxName
Revision
6020 -
Directory Listing
Modified
Tue Mar 10 12:09:15 2009 UTC (4 years, 2 months ago) by
gage
Original Path:
trunk/pg
Added some comments about how to replace this functionality by using Contexts.
Revision
6019 -
Directory Listing
Modified
Tue Mar 10 12:07:47 2009 UTC (4 years, 2 months ago) by
gage
Original Path:
trunk/pg
refactored code using methodDefined()
converted configAlias to setConfigAlias
replaced debug by jsDebugMode (for now -- eventually we'll have a debug mode for each applet)
Revision
6018 -
Directory Listing
Modified
Thu Mar 5 01:14:05 2009 UTC (4 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
make sure $permissionLevel is defined (since it was added recently)
Revision
6017 -
Directory Listing
Modified
Tue Mar 3 15:34:58 2009 UTC (4 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Corrected documentation (panic => panicked)
Revision
6016 -
Directory Listing
Modified
Sun Mar 1 22:56:23 2009 UTC (4 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Added grader information
Revision
6015 -
Directory Listing
Modified
Sun Mar 1 15:15:35 2009 UTC (4 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
New macros for adding 'panic buttons' to get more hints
Revision
6014 -
Directory Listing
Modified
Tue Feb 24 23:58:13 2009 UTC (4 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Apply message conversion before adding position information
Revision
6013 -
Directory Listing
Modified
Thu Feb 19 16:35:26 2009 UTC (4 years, 2 months ago) by
gage
Original Path:
trunk/pg
Cleaning up duplicated lines
Revision
6011 -
Directory Listing
Modified
Thu Feb 19 03:17:38 2009 UTC (4 years, 2 months ago) by
gage
Original Path:
trunk/pg
Corrected premature commit which contained a code hack for the macbook.
Revision
6010 -
Directory Listing
Modified
Thu Feb 19 03:05:14 2009 UTC (4 years, 2 months ago) by
gage
Original Path:
trunk/pg
Minor cosmetic change
Revision
6009 -
Directory Listing
Modified
Thu Feb 19 03:04:22 2009 UTC (4 years, 2 months ago) by
gage
Original Path:
trunk/pg
Additional support for debugging
Revision
6005 -
Directory Listing
Modified
Wed Feb 11 23:06:43 2009 UTC (4 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Prevent extra dots from appearing in image names for TeX mode
Revision
5997 -
Directory Listing
Modified
Sat Feb 7 23:08:34 2009 UTC (4 years, 3 months ago) by
gage
Original Path:
trunk/pg
More code to check that the javaScript file is availabe.
Revision
5995 -
Directory Listing
Modified
Sat Feb 7 22:53:18 2009 UTC (4 years, 3 months ago) by
gage
Original Path:
trunk/pg
print warning if the javaScript file is not available.
Revision
5994 -
Directory Listing
Modified
Sat Feb 7 22:28:34 2009 UTC (4 years, 3 months ago) by
gage
Original Path:
trunk/pg
Reworked support code for applets to use a more object oriented approach.
Revision
5993 -
Directory Listing
Modified
Sat Feb 7 22:27:29 2009 UTC (4 years, 3 months ago) by
gage
Original Path:
trunk/pg
Reworked applet support code to use more object oriented approach.
Revision
5992 -
Directory Listing
Modified
Thu Feb 5 15:01:44 2009 UTC (4 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Removed unused variable
Revision
5991 -
Directory Listing
Modified
Thu Feb 5 14:59:02 2009 UTC (4 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Changed wording of a warning message
Revision
5990 -
Directory Listing
Modified
Thu Feb 5 14:57:48 2009 UTC (4 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fix inheritance to copy the tree rather than just the pointer. This
makes sure that the nodes point to the proper equation.
In the routine for adapting to parameters, check that the coefficient
matrix isn't singular, and try new random points if it is.
Revision
5988 -
Directory Listing
Modified
Thu Feb 5 14:53:57 2009 UTC (4 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fix inheritance so that text_values and test_adapt are preserved when
transferring to the stored copy of the adapted function. (These are
needed for the diagnostics output.) Use new Parser::Eval to avoid
ugliness in trying to trap errors in comparisons.
Revision
5984 -
Directory Listing
Modified
Wed Jan 28 17:07:08 2009 UTC (4 years, 3 months ago) by
gage
Original Path:
trunk/pg
Added submitActionScript option which allows you to add javaScript commands that
are executed when you submit the webwork question.
It's possible that this should replace submitActionAlias which hasn't really been implemented
yet.
Revision
5977 -
Directory Listing
Modified
Tue Jan 20 18:54:56 2009 UTC (4 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed incorrect parentheses being added when $showparens eq "same"
Revision
5976 -
Directory Listing
Modified
Mon Jan 19 18:50:45 2009 UTC (4 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed some typos in the comments.
Revision
5975 -
Directory Listing
Modified
Mon Jan 19 13:56:09 2009 UTC (4 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed incorrect use of => when -> was intended.
Revision
5972 -
Directory Listing
Modified
Sat Jan 17 15:06:06 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Avoid ambiguity with CORE::abs() versus overloaded abs().
Revision
5970 -
Directory Listing
Modified
Sat Jan 17 03:24:09 2009 UTC (4 years, 4 months ago) by
gage
Original Path:
trunk/pg
Fixed error in hint() associated with always showing the instructor that
a hint exists.
Revision
5969 -
Directory Listing
Modified
Thu Jan 15 22:56:18 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Typo that prevented the context name from being set properly.
Revision
5968 -
Directory Listing
Modified
Thu Jan 15 13:11:23 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a typo in an error message.
Revision
5967 -
Directory Listing
Modified
Thu Jan 15 12:50:31 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Make Ordering() break a string at > and = rather than assume the
variable names are single letters.
Revision
5965 -
Directory Listing
Modified
Wed Jan 14 03:57:50 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
This file implements a Fraction object for the MathObjects library.
See the comments in the file for details about how they work and how
to control the various options.
Revision
5964 -
Directory Listing
Modified
Tue Jan 13 01:38:03 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Simplify mechanism of maintaining the letters used in an ordering.
No need for the ugly hack to get around reducing to Value objects;
just leave the letters attached to the Value object rather than
deleting them.
Revision
5963 -
Directory Listing
Modified
Mon Jan 12 17:22:55 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Added a message for when the student answer does not include all the
letters used in the correct answer.
Revision
5962 -
Directory Listing
Modified
Mon Jan 12 15:13:40 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Produce error messages if a letter is used more than once in an ordering.
Revision
5961 -
Directory Listing
Modified
Sun Jan 11 19:51:51 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
When a parentheses have been removed, mark the enclosed item so that
we can tell later, if we need to know about the missing parens.
Revision
5960 -
Directory Listing
Modified
Sun Jan 11 15:04:36 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Use the Package() method to create the ordering object, so that
ordering objects can be properly subclassed.
Revision
5959 -
Directory Listing
Modified
Sat Jan 10 19:36:51 2009 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
New Context for handling ordered lists of letters like "D > A = C > B".
See the comments for details about how to use it.
Revision
5952 -
Directory Listing
Modified
Tue Dec 30 14:05:30 2008 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Combined TeX and string into a common routine since the two were
nearly identical.
Revision
5951 -
Directory Listing
Modified
Tue Dec 30 08:18:24 2008 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Inequalities that are evaluated and turned into intervals now properly
retain the order of operands (x > 10 remains x > 10 rather than
becoming 10 < x).
Unions of the form "x < a or x > a" will be displayed as "x != a" instead,
and "a < x < b or b < x < c" will be shown as "a < x < c and x != b"
instead. This behavior is controlled by the showNotEquals context
flag. Setting it to zero prevents conversion of unions to their
not-equal forms.
Revision
5950 -
Directory Listing
Modified
Tue Dec 30 08:13:45 2008 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Added a final_period=>1 flag for PiecewiseFunction objects so that the
final condition will include a period (so that you can put a piecewise
function as the last thing in a sentence).
Revision
5949 -
Directory Listing
Modified
Tue Dec 30 00:41:40 2008 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Fixed the name stored in the StrictFraction context (removed the
trailling s).
Revision
5948 -
Directory Listing
Modified
Mon Dec 29 02:14:32 2008 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
The \s regular expression was matching newlines, and so newlines
around BEGIN_TEXT/END_TEXT (and other such constructs) were being
removed. This is OK when the problem runs correctly, but when an
error message is produced, the line number of the error report will
not correspond to the proper line number in the code listing.
Solution is to use [ \t] instead.
Revision
5947 -
Directory Listing
Modified
Mon Dec 22 05:18:26 2008 UTC (4 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Added code to save/restore the images_created counts so that
on-the-fly graphics in more than one part will work properly.
Old data format is updated automatically to the new one, so problems
should continue to work even if they are already in use by students.
Revision
5945 -
Directory Listing
Modified
Wed Nov 19 15:42:16 2008 UTC (4 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug where if the student answer has an evaluation error
in a problem with adaptive parameters, the error message could
incorrectly be displayed in the message area. The correct behavior is
to mark the answer incorrect silently.
Also, properly report errors in correct answer under similar circumstances.
Revision
5944 -
Directory Listing
Modified
Wed Nov 19 04:39:43 2008 UTC (4 years, 6 months ago) by
gage
Original Path:
trunk/pg
corrected formatting in POD documentation
Revision
5943 -
Directory Listing
Modified
Fri Nov 14 04:08:37 2008 UTC (4 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Updated ans_array and TeX methods so that Matrix arrays don't have an
extra blank line at the bottom. (There was an extra \cr that
shouldn't have been there.)
Revision
5941 -
Directory Listing
Modified
Tue Oct 21 17:52:43 2008 UTC (4 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Clear the error message before checking the student's answer for errors.
Revision
5938 -
Directory Listing
Modified
Tue Oct 14 12:37:45 2008 UTC (4 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
The copy() method now does not copy values listed by the noinherit()
method (e.g., correct_ans, test_values, etc). This resolves bug #1528.
Revision
5930 -
Directory Listing
Modified
Tue Oct 7 23:14:10 2008 UTC (4 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Use a compiled vesion of the MathObjects formula rather than the
less-efficient eval method. This should bring graphing speeds back in
line with the original non-MathObject version.
Revision
5929 -
Directory Listing
Modified
Tue Oct 7 23:12:06 2008 UTC (4 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Added a routine to trap errors in a function call. I've needed this
for a long time, and got tired of working around the lack by hacks
involving PG_restricted_eval, which can't handle local variables from
the calling function. This addition is still safe because it is
passed code (not a string) and the code is already compiled in the
safe compartment, so it can't include the disallowed commands.
Now I need to go back to remove the hacks from the various pg/macros
files where they currently exist.
Revision
5927 -
Directory Listing
Modified
Fri Oct 3 12:36:29 2008 UTC (4 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Allow the perlFunction method to produce functions that return
formulas when not all the variables are used as arguments.
For example:
Formula("x+y")->perlFunction('f',['x']);
$f = f(2);
would produce the equivalent of
$f = Formula("2+y");
Using the substitute method is more efficient, but this now does the
right thing rather than generate error messages.
Revision
5924 -
Directory Listing
Modified
Thu Oct 2 10:50:02 2008 UTC (4 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
avoid side-effect of loading String context that sets the string
context to being the current context. (This fixes bug 1520)
Revision
5921 -
Directory Listing
Modified
Tue Sep 23 21:56:01 2008 UTC (4 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fix the check for equivalent answers so that it uses the limits and
other settings from the answer checker and the original formula
object.
Revision
5920 -
Directory Listing
Modified
Tue Sep 23 21:54:27 2008 UTC (4 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Include a noinherit routine so that things like test_values and other
temporary items are not inheritted. Only things like limits and so on.
Revision
5919 -
Directory Listing
Modified
Tue Sep 23 21:52:56 2008 UTC (4 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Handle the no-inherit values better by deleting them from the copy
before inserting the ones from the original hash. That way, you don't
lose your copies of those values, you just don't inherit from the
given objects.
Revision
5917 -
Directory Listing
Modified
Sun Sep 21 18:06:19 2008 UTC (4 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Protect against errors in student formula in the postfilter when
looking to determine the error message to give about the student
answer.
Use cmp_compare to do equality checks between objects (rather than the
hack that uses PG_restricted_eval).
Handle MathObjects in the test_points and test_at list better.
Revision
5916 -
Directory Listing
Modified
Sun Sep 21 18:01:17 2008 UTC (4 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Report bad function calls in student Formulas (e.g., roots of
negatives), which used to be silently marked as incorrect. This is
done during the post-processing phase by calling the formula's reduce
method, which will return an error if there are illegal function calls
(or other errors).
Revision
5915 -
Directory Listing
Modified
Thu Sep 18 19:25:24 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fix problem with using value method on an undefined value when the
point returned by the graphed funciton is undefined.
Revision
5914 -
Directory Listing
Modified
Tue Sep 16 03:23:54 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow graphs of single-variable functions in diagnostics.
Revision
5913 -
Directory Listing
Modified
Tue Sep 16 03:01:17 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow diagnostics to show the adapted function's values.
Revision
5912 -
Directory Listing
Modified
Mon Sep 15 15:35:34 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with inerhiting test points into the adapted formula
used for the comparison. In its context, the arbitrary constant is an
extra variable, and so extra coordinates have to be added to the test
points. This is now handled properly.
(It may be a good idea to make $f->removeConstant revert to the
original context of the formula rather than the modified one that
includes its constants, rather than having to adjust the test points
in that case.)
Revision
5907 -
Directory Listing
Modified
Fri Sep 12 21:53:52 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make sure flags set on the FormulaUpToConstant object are inherited by
the formulas used internally during the checking for equality.
Revision
5905 -
Directory Listing
Modified
Fri Sep 12 21:31:43 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Trap errors when comparing to student answer while trying to determine
the correct error message. This prevents extraneous warnings that
would confuse the student (and instructor).
Revision
5903 -
Directory Listing
Modified
Fri Sep 12 15:21:34 2008 UTC (4 years, 8 months ago) by
gage
Original Path:
trunk/pg
Make sure $attempts is properly defined
Revision
5901 -
Directory Listing
Modified
Fri Sep 12 14:28:59 2008 UTC (4 years, 8 months ago) by
gage
Original Path:
trunk/pg
have hint always print hints for instructorsCVS: ----------------------------------------------------------------------
Revision
5897 -
Directory Listing
Modified
Thu Sep 11 17:26:57 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
BACKPORT: Fixed a problem where if two FormulaUpToConstant objects were used in
the same problem, the second would always be marked as incorrect.
(Subtle interplay of variable names in the safe compartment.)
Revision
5896 -
Directory Listing
Modified
Thu Sep 11 17:26:18 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem where if two FormulaUpToConstant objects were used in
the same problem, the second would always be marked as incorrect.
(Subtle interplay of variable names in the safe compartment.)
Revision
5894 -
Directory Listing
Modified
Mon Sep 8 15:20:39 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
read_whole_file was reporting the wrong routine name in its error messages.
Revision
5892 -
Directory Listing
Modified
Thu Sep 4 21:59:03 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Demote Real() results of Formula() evaluation back to Perl reals.
Revision
5888 -
Directory Listing
Modified
Mon Sep 1 11:45:50 2008 UTC (4 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Don't inherit the ColumnVector flag from Vector operands. (This fixes
a problem with using the result of matrix-vector multiplication
together with the ->ans_array method.)
Revision
5867 -
Directory Listing
Modified
Mon Aug 11 14:02:34 2008 UTC (4 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typos in comments.
Revision
5858 -
Directory Listing
Modified
Wed Jul 30 14:39:00 2008 UTC (4 years, 9 months ago) by
apizer
Original Path:
trunk/pg
Port rel-2-4-patches changes to Head
Revision
5847 -
Directory Listing
Modified
Mon Jul 14 15:43:06 2008 UTC (4 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed documentation typos.
Revision
5843 -
Directory Listing
Modified
Tue Jul 8 15:13:18 2008 UTC (4 years, 10 months ago) by
gage
Original Path:
trunk/pg
forward port of bug fix in rel-2-4-5
Revision
5826 -
Directory Listing
Modified
Sat Jun 28 19:27:31 2008 UTC (4 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with Union answer checker where incorrect error messages
could be given when intervals needed to be checked for syntax
errors. Also fixed some comments.
Revision
5817 -
Directory Listing
Modified
Fri Jun 27 01:22:13 2008 UTC (4 years, 10 months ago) by
gage
Original Path:
trunk/pg
Moved to modelCourse/templates/setOrientation
Revision
5816 -
Directory Listing
Modified
Fri Jun 27 00:55:09 2008 UTC (4 years, 10 months ago) by
gage
Original Path:
trunk/pg
forward port file path printing from rel-2-4-5
Revision
5797 -
Directory Listing
Modified
Thu Jun 26 17:18:30 2008 UTC (4 years, 10 months ago) by
gage
Original Path:
trunk/pg
forward port of rel-2-4-5
Revision
5792 -
Directory Listing
Modified
Thu Jun 26 14:53:59 2008 UTC (4 years, 10 months ago) by
gage
Original Path:
trunk/pg
Forward ports from rel-2-4-5
Revision
5789 -
Directory Listing
Modified
Wed Jun 25 20:06:48 2008 UTC (4 years, 10 months ago) by
gage
Original Path:
trunk/pg
remove attempt to set formatting with $#
causes bad warnings in perl 5.10.x
forward port from rel-2-4-patches
Revision
5787 -
Directory Listing
Modified
Wed Jun 25 19:46:38 2008 UTC (4 years, 10 months ago) by
apizer
Original Path:
trunk/pg
Added
no strict "refs"
to try to avoid new error checking in Perl 5.10.
Revision
5754 -
Directory Listing
Modified
Tue Jun 24 21:36:19 2008 UTC (4 years, 10 months ago) by
gage
Original Path:
trunk/pg
forward port
of the rel-2-4-5 changes that allow BEGIN_HINT, etc.
Revision
5753 -
Directory Listing
Modified
Tue Jun 24 21:30:38 2008 UTC (4 years, 10 months ago) by
gage
Original Path:
trunk/pg
formatting changes
Revision
5709 -
Directory Listing
Modified
Fri Jun 20 15:02:22 2008 UTC (4 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make non-inheritance scheme more general, and include additional
values in the default list. (Still need to look through all the basic
objects to see what might not want to be inherited.)
Revision
5707 -
Directory Listing
Modified
Fri Jun 20 14:40:35 2008 UTC (4 years, 10 months ago) by
gage
Original Path:
trunk/pg
An experimental collection of macros designed as a first attempt
to make writing sequential problems easier (Davide Cervone principal author)
The rules for using these macros may well change as we gain experience writing
sequential problems. (See also PGsequentialmacros.pl for some additional, lower level tools.)
Revision
5706 -
Directory Listing
Modified
Fri Jun 20 02:49:33 2008 UTC (4 years, 11 months ago) by
gage
Original Path:
trunk/pg
Added a ->cmp method for checking the answers.
It needs further improvement but it is a first
step toward making the List elements more
compatible with MathObjects.
The ->cmp method will be inherited by the
Select, Match and so forth objects
Revision
5703 -
Directory Listing
Modified
Thu Jun 19 12:30:04 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Don't inherit the correct_ans field when combining objects via binary operators.
Revision
5701 -
Directory Listing
Modified
Sun Jun 15 12:25:41 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Remove cached perlFunction when a substitution or reduction is made.
Revision
5700 -
Directory Listing
Modified
Sun Jun 15 12:24:08 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Added ability to assign to function names, like f(x)=x+1.
Revision
5699 -
Directory Listing
Modified
Sun Jun 15 03:54:01 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Implements an assignment operator that can be used to force the
student to include the "y=" part of "y = 3x + 1" rather than having to
include the "y=" as part of the text of the problem. You can also
request lists of assignments, e.g., x = 1, x = -1, and the type of
object assigned can be any MathObject (e.g., vector, complex,
infinity, interval, whatever).
Revision
5697 -
Directory Listing
Modified
Sat Jun 14 22:51:04 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fix typo in changes for "no strict refs".
Revision
5696 -
Directory Listing
Modified
Sat Jun 14 12:14:21 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Added
no strict "refs"
to try to avoid new error checking in Perl 5.10.
Revision
5695 -
Directory Listing
Modified
Sat Jun 14 11:56:02 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fix typo in comments
Revision
5694 -
Directory Listing
Modified
Sat Jun 14 11:53:42 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Use \verb rather than \text, since it will show more characters
properly, and will handle missmatched braces in student answers.
Revision
5693 -
Directory Listing
Modified
Sat Jun 14 11:52:26 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Better check for constant formula.
Revision
5692 -
Directory Listing
Modified
Sat Jun 14 11:46:28 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Make sure the previous answer is of the same MathObject class as the
object being checked (so the comparison is done by the right object).
This came up with the ImplicitEquation object).
Revision
5690 -
Directory Listing
Modified
Wed Jun 11 19:17:30 2008 UTC (4 years, 11 months ago) by
apizer
Original Path:
trunk/pg
correct syntax error in BEGIN that caused a warning in Perl 5.10
Revision
5688 -
Directory Listing
Modified
Wed Jun 11 13:22:54 2008 UTC (4 years, 11 months ago) by
gage
Original Path:
trunk/pg
Corrected documentation for the ?{4.56:%0.2f} and !{4.5645:%0.2f} constructions --
their behavior had been reversed. Indicated that the !{ } construction is
deprecated since it behave just like {4.5645:%0.2f}
Revision
5684 -
Directory Listing
Modified
Sat May 24 23:05:02 2008 UTC (4 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Moved previous_equivalence_message filter to Formula object directly,
so it is no longer needed in the FUNCTION_CMP macro itself.
Revision
5677 -
Directory Listing
Modified
Thu May 22 19:17:10 2008 UTC (4 years, 11 months ago) by
gage
Original Path:
trunk/pg
minor changes to help with debugging
Revision
5676 -
Directory Listing
Modified
Thu May 22 19:15:59 2008 UTC (4 years, 11 months ago) by
gage
Original Path:
trunk/pg
minor changes to help with debugging.
Revision
5673 -
Directory Listing
Modified
Sat May 17 13:55:57 2008 UTC (5 years ago) by
dpvc
Original Path:
trunk/pg
Added error trapping so that large adaptive parameters will not cause
errors. These situations are silently reported as incorrect (though
potentially they COULD be correct, but that it unlikely).
Revision
5672 -
Directory Listing
Modified
Mon May 12 20:49:49 2008 UTC (5 years ago) by
sh002i
Original Path:
trunk/pg
added the ability to specify an order for the choices or push some
choices to the top or bottom.
Revision
5671 -
Directory Listing
Modified
Mon May 12 20:41:21 2008 UTC (5 years ago) by
sh002i
Original Path:
trunk/pg
typo in symbol map metadata
Revision
5667 -
Directory Listing
Modified
Mon May 12 00:50:24 2008 UTC (5 years ago) by
gage
Original Path:
trunk/pg
Uploading changes in the AppletObjects.pl and Applet.pm modules.
Revision
5663 -
Directory Listing
Modified
Thu May 8 00:37:31 2008 UTC (5 years ago) by
sh002i
Original Path:
trunk/pg
add "my" and "our" specifiers to ^variable definitions. (This breaks
compatibility with the current version of ww-symbol-map, but it is the
format that the upcoming version will use. I hope to commit that new
version soon but testing is taking longer than expected.)
Revision
5661 -
Directory Listing
Modified
Mon May 5 16:44:11 2008 UTC (5 years ago) by
gage
Original Path:
trunk/pg
Latest improvements for the Applet.pm and AppletObjects.pl files
Revision
5660 -
Directory Listing
Modified
Mon May 5 16:43:29 2008 UTC (5 years ago) by
gage
Original Path:
trunk/pg
Latest reworking of the Applets.pm and AppletObjects.pl files
Debugging and error reporting should be better now.
Revision
5643 -
Directory Listing
Modified
Sat Apr 26 23:07:02 2008 UTC (5 years ago) by
gage
Original Path:
trunk/pg
Moved placement of loadMacros(subfiles) to inside the
_PGanswermacros_init() subroutine. Even though the subfiles
do not have to be recompiled they do have to be reinitialized every time they are
used and calling loadMacros() is the appropriate way to insure this.
loadMacros() is smart about recompiling only if necessary.
Revision
5642 -
Directory Listing
Modified
Sat Apr 26 21:19:14 2008 UTC (5 years ago) by
gage
Original Path:
trunk/pg
add reinitialize applet button to the standard installation to complement
reset state button.
CVS: ----------------------------------------------------------------------
Revision
5641 -
Directory Listing
Modified
Sat Apr 26 21:14:05 2008 UTC (5 years ago) by
gage
Original Path:
trunk/pg
Fixed bug that would cause problem with checking previous answers if there
was not answer label provided to the answer evaluator.
Revision
5640 -
Directory Listing
Modified
Sat Apr 26 21:13:23 2008 UTC (5 years ago) by
gage
Original Path:
trunk/pg
Modifications to pass answer label for previous answer. This still does not
provide correct functionality because the previous answer is an equation of the form
lhs = rhs while the form being passed to fun_cmp is lhs - rhs
Revision
5639 -
Directory Listing
Modified
Sat Apr 26 21:00:02 2008 UTC (5 years ago) by
gage
Original Path:
trunk/pg
define ans_label slot in a new AnswerHash to be undefined.
Revision
5638 -
Directory Listing
Modified
Sat Apr 26 20:52:18 2008 UTC (5 years ago) by
gage
Original Path:
trunk/pg
provide ans_label for the current answer being evaluated to
answer evaluator subroutines as well to AnswerEvaluator objects.
Revision
5635 -
Directory Listing
Modified
Tue Apr 22 02:02:30 2008 UTC (5 years ago) by
gage
Original Path:
trunk/pg
Fixed an error in formatting comment
Revision
5634 -
Directory Listing
Modified
Tue Apr 15 04:41:17 2008 UTC (5 years, 1 month ago) by
gage
Original Path:
trunk/pg
Edited the first three paragraphs describing why math objects are used.
(I also copied these paragraphs into the wiki itself in the "introduction to math objects" page.)
Revision
5633 -
Directory Listing
Modified
Mon Apr 14 23:29:53 2008 UTC (5 years, 1 month ago) by
sh002i
Original Path:
trunk/pg
documentation improvements
Revision
5626 -
Directory Listing
Modified
Wed Mar 26 02:43:07 2008 UTC (5 years, 1 month ago) by
gage
Original Path:
trunk/pg
Fixed bug in base64Q subroutine
Revision
5625 -
Directory Listing
Modified
Wed Mar 26 02:42:20 2008 UTC (5 years, 1 month ago) by
gage
Original Path:
trunk/pg
Added more debugging code
Revision
5624 -
Directory Listing
Modified
Wed Mar 26 01:25:52 2008 UTC (5 years, 1 month ago) by
gage
Original Path:
trunk/pg
Modified method in which parameters are passed to
flash applets (uses FlashVars parameter )
Revision
5623 -
Directory Listing
Modified
Tue Mar 25 22:00:23 2008 UTC (5 years, 1 month ago) by
gage
Original Path:
trunk/pg
corrected typos in setState macros.
Revision
5622 -
Directory Listing
Modified
Tue Mar 25 21:59:06 2008 UTC (5 years, 1 month ago) by
gage
Original Path:
trunk/pg
cosmetic changes
some corrections on typos for setState subroutines.
Revision
5619 -
Directory Listing
Modified
Sun Mar 16 14:39:39 2008 UTC (5 years, 2 months ago) by
gage
Original Path:
trunk/pg
New version of Applet.pm and AppletObjects.pl that supports both flashnew FlashApplet();
and java applets
new JavaApplet();
see pod docs in those two files for more details.
Revision
5618 -
Directory Listing
Modified
Sun Mar 16 14:39:14 2008 UTC (5 years, 2 months ago) by
gage
Original Path:
trunk/pg
New version of Applet.pm and AppletObjects.pl that supports both flash
new FlashApplet();
and java applets
new JavaApplet();
see pod docs in those two files for more details.
Revision
5608 -
Directory Listing
Modified
Mon Feb 4 21:40:58 2008 UTC (5 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with variable patterns for variable names that are more
than one character long.
Revision
5607 -
Directory Listing
Modified
Thu Jan 31 14:26:45 2008 UTC (5 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed differentiation of log() function (it used to give an error
about undefined function D_ln).
Revision
5606 -
Directory Listing
Modified
Sat Jan 26 01:40:32 2008 UTC (5 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Added trimTrailingZeros flag to allow values to print as $50 rather
than $50.00
Revision
5601 -
Directory Listing
Modified
Wed Jan 16 22:56:24 2008 UTC (5 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Make sure Currency() actually returns a Currency object (it used to
return a Real if one was passed to it).
Revision
5600 -
Directory Listing
Modified
Wed Jan 16 22:51:52 2008 UTC (5 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Make sure that real and complex values have their contexts changed if
one is specified in the call to new().
Revision
5597 -
Directory Listing
Modified
Thu Jan 3 15:17:40 2008 UTC (5 years, 4 months ago) by
gage
Original Path:
trunk/pg
Fixed bug. Pass variables in $foo = FlashApplet(...) to the actual applet creator
Revision
5595 -
Directory Listing
Modified
Thu Dec 20 00:08:17 2007 UTC (5 years, 5 months ago) by
gage
Original Path:
trunk/pg
remove \ensuremath
from around the output. I don't think it will work properly (although it might have worked with LatexToHTML)
Revision
5594 -
Directory Listing
Modified
Thu Dec 20 00:04:39 2007 UTC (5 years, 5 months ago) by
gage
Original Path:
trunk/pg
Updated documentation. Fixed a hard coded reference in the DEFAULT_OBJECT_TEXT.
Added getQE(name) for referencing HTML elements in PG questions.
Added listQuestionElements() for discovering the names/ids of input HTML elements in PG questions.
Revision
5593 -
Directory Listing
Modified
Mon Dec 3 22:32:01 2007 UTC (5 years, 5 months ago) by
gage
Original Path:
trunk/pg
Corrected spelling in pod documents.
Revision
5592 -
Directory Listing
Modified
Sun Dec 2 14:19:50 2007 UTC (5 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem where intervals minus sets containing more than one
point were not being handled properly.
Revision
5591 -
Directory Listing
Modified
Mon Nov 26 17:58:28 2007 UTC (5 years, 5 months ago) by
glarose
Original Path:
trunk/pg
Add mg as a mass unit. Hopefully the fact that this wasn't here before
is an oddity rather than indicating that I'm screwing something up.
Revision
5590 -
Directory Listing
Modified
Tue Nov 20 15:04:47 2007 UTC (5 years, 5 months ago) by
glarose
Original Path:
trunk/pg
Make VectorField plotting honor setting of x_steps and y_steps.
Revision
5589 -
Directory Listing
Modified
Thu Nov 15 12:31:50 2007 UTC (5 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
When two sets are added, combine them rather than form a union.
(This allows Inequailities context to report errors better when
student answers are of the form x=a or x=b.)
Revision
5588 -
Directory Listing
Modified
Thu Nov 15 12:30:47 2007 UTC (5 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Do the reduction check on sets when they are compared (to see if there
are repeated values, for example).
Revision
5587 -
Directory Listing
Modified
Thu Nov 15 12:29:06 2007 UTC (5 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Produce error messages when the student enters something like x=1 or x=1.
Revision
5586 -
Directory Listing
Modified
Sat Nov 10 21:48:22 2007 UTC (5 years, 6 months ago) by
gage
Original Path:
trunk/pg
Corrected typo in string answer evaluators (affecting blank answers mainly)
Removed FIXME note from PGnumericevaluators.pl
Revision
5585 -
Directory Listing
Modified
Sat Nov 10 20:55:23 2007 UTC (5 years, 6 months ago) by
gage
Original Path:
trunk/pg
Made changes in the way the default values for answer evaluators are set.
(They were frequently undefined.)
We now get them from the envir variable which seems to work. For example:
$functAbsTolDefault = PG_restricted_eval(q/$envir{functAbsTolDefault}/);
Revision
5584 -
Directory Listing
Modified
Thu Nov 8 00:00:15 2007 UTC (5 years, 6 months ago) by
sh002i
Original Path:
trunk/pg
Split answer evaluators into several new files, based on the type of
answer being evaluated. The answer evaluators are fully documented, but
the rest of the functions in PGanswermacros.pl still need docs. This
still needs to be tested a bunch before it's ready for prime time.
Revision
5583 -
Directory Listing
Modified
Tue Nov 6 16:47:19 2007 UTC (5 years, 6 months ago) by
gage
Original Path:
trunk/pg
Added some further documentation pointing out the workaround to make
flash objects embedded within forms (as all objects in a PG problem are)
work with IE.
-- Mike
Revision
5582 -
Directory Listing
Modified
Tue Nov 6 16:45:28 2007 UTC (5 years, 6 months ago) by
gage
Original Path:
trunk/pg
Provides front end for Applet.pm.
To use applets add loadMacros("AppletObjects.pl")
to the top of your PG problem file.
$applet = FlashApplet();
gets you started. There is reasonable POD documentation in this file including a working problem
for the ExternalInterface.swf flash object.
-- Mike
Revision
5581 -
Directory Listing
Modified
Tue Nov 6 16:23:33 2007 UTC (5 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
When (-x)*y or x*(-y) reductions are performed, don't print extra
parentheses in string and TeX version. I.e., display as -xy not
-(xy). This makes reduction with polynomials work better.
Revision
5580 -
Directory Listing
Modified
Tue Nov 6 16:19:49 2007 UTC (5 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Don't reduce -ax+b to b-ax in polynomial contexts.
Revision
5579 -
Directory Listing
Modified
Tue Nov 6 15:49:03 2007 UTC (5 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem introduced in the previous version where an error is
reported about undefined values used in addition.
Revision
5578 -
Directory Listing
Modified
Mon Nov 5 16:45:33 2007 UTC (5 years, 6 months ago) by
gage
Original Path:
trunk/pg
This version of Applet.pm now works with IE.
More documentation and features are forth coming
but it is ready for some experimental use by those
developing Applets.
Revision
5576 -
Directory Listing
Modified
Wed Oct 31 01:40:01 2007 UTC (5 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Make numbers be considered coefficients of x^0 in singlePowers mode,
not just LimitedPolynomial-Strict context. For LimitedPolynomials
with singlePowers set to 1, you can still do addition in the
constant term by using parentheses, e.g. 4x^2 + (3+4).
Revision
5575 -
Directory Listing
Modified
Wed Oct 31 01:34:11 2007 UTC (5 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Fix LimitedPolynomial-Strict to check for singlePowers (there was a
typo) and to consider constants to be coefficients of x^0.
Give better error messages in some cases.
Revision
5574 -
Directory Listing
Modified
Tue Oct 30 15:57:04 2007 UTC (5 years, 6 months ago) by
gage
Original Path:
trunk/pg
Preliminary version of Applet.pm which will provide a uniform interface
for including FlashApplets (eventually other applets) in a webwork
problem. This remains experimental so the interface will probably
change.
Revision
5573 -
Directory Listing
Modified
Mon Oct 29 02:33:27 2007 UTC (5 years, 6 months ago) by
gage
Original Path:
trunk/pg
Modifications PGgraphicsmacros.pl suggested by Davide Cervone.
1. Don't load MathObjects (since this causes conflicts if the webwork
question also uses Matrices as well as GraphObjects).
(This incompatibility is itself a bug, but not one we can solve immediately.)
2. Make sure that the variable is defined by defining the new rule in a local
context and insuring that the variable is defined.
(Unfortunately we don't have the original Formula, just the normalString created by the Formula
so we won't be able to guarantee the same context that created the original Formula. However
we can get the current context and add the independent variable if it is missing.)
3. Evaluate using Parser::Evaluate so that the errors are trapped if the input is
not in the domain of definition of the function.
-------
A reasonable next step would be to define plot_formula with syntax something like
plot_formula($formula, domain=>[0,10],color=>'red',weight=>2)
which could take further advantage of the MathObjects paradigm, but we'll probably
have to find a more robust solution to the Matrix confusion at the same time.
--Mike
Revision
5570 -
Directory Listing
Modified
Sun Oct 28 16:33:36 2007 UTC (5 years, 6 months ago) by
gage
Original Path:
trunk/pg
Added explicit loadMacros("MathObject.pl") to
handle webwork questions which don't use math objects
for any other purpose other than graphs.
CVS: ----------------------------------------------------------------------
Revision
5569 -
Directory Listing
Modified
Sat Oct 27 14:13:31 2007 UTC (5 years, 6 months ago) by
gage
Original Path:
trunk/pg
Changed plot_functions so that it uses the Formula MathObject to parse the
the function in
$f1 = qq! x^2 - 3*x + 45 for x in [0, 45) using color:red and weight:2!
instead of using the built in perl parser.
This allows things such as $formula=Formula("|x|");
$f1 = qq! $formula for x in [0, 45) using color:red and weight:2!
to be evaluated. There should be no apparent change to old problems
since the Formula MathObject parser handles a superset of the builtin perl parser syntax.
This is not yet the most efficient method to have GraphObjects and
Formula's interact since the same string is being recompiled several times,
but it is a useful hack which preserves backward compatibility.
Revision
5568 -
Directory Listing
Modified
Thu Oct 25 17:11:59 2007 UTC (5 years, 6 months ago) by
sh002i
Original Path:
trunk/pg
new/improved documentation
Revision
5566 -
Directory Listing
Modified
Sun Oct 21 12:12:55 2007 UTC (5 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with ordered=>"strict" in number_list_cmp()
Revision
5557 -
Directory Listing
Modified
Thu Oct 4 16:41:07 2007 UTC (5 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
documentation cleanup
Revision
5556 -
Directory Listing
Modified
Thu Oct 4 16:40:49 2007 UTC (5 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
added standard copyright/license header
Revision
5555 -
Directory Listing
Modified
Wed Oct 3 19:47:42 2007 UTC (5 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
fixed indentation of verbatim paragraphs: now using hard tabs
exclusively. the downside of this is that these get rendered as
eight-column tabs.
Revision
5554 -
Directory Listing
Modified
Wed Oct 3 19:30:31 2007 UTC (5 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
fixed some POD errors, indentation
Revision
5553 -
Directory Listing
Modified
Wed Oct 3 18:47:43 2007 UTC (5 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
reformatted documentation for the rest of the MathObjects-related macros
Revision
5552 -
Directory Listing
Modified
Tue Oct 2 22:57:33 2007 UTC (5 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
changed name message
Revision
5551 -
Directory Listing
Modified
Tue Oct 2 20:48:05 2007 UTC (5 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
improved formatting for docs -- these were in pod sections but were all
formatted as verbatim sections, and i moved them into normal paragraphs,
lists, etc. should make things more readable from the web.
Revision
5545 -
Directory Listing
Modified
Sun Sep 30 11:18:39 2007 UTC (5 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Don't use dollar signs in the TeX output, since BEGIN_TEXT/END_TEX
does command substitution then variable substitution then math, so
\{$f->TeX\} would insert dollars, which would then be substituted as
variables.
Revision
5543 -
Directory Listing
Modified
Fri Sep 28 23:58:02 2007 UTC (5 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Allow inequalities to include infinity and -infinity (so you can enter
-inf < x < inf to get all reals).
Revision
5541 -
Directory Listing
Modified
Fri Sep 28 23:24:52 2007 UTC (5 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem where the context was not properly maintained when
intervals are combined.
Revision
5540 -
Directory Listing
Modified
Fri Sep 28 00:33:46 2007 UTC (5 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
added MathObjects examples from webwork2/doc/parser
Revision
5539 -
Directory Listing
Modified
Fri Sep 28 00:23:44 2007 UTC (5 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
converted basic mathobjects docs to POD
Revision
5535 -
Directory Listing
Modified
Wed Sep 26 02:15:29 2007 UTC (5 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Localize the $ans variable (rather than incorrectly using a closure).
Revision
5520 -
Directory Listing
Modified
Mon Sep 24 22:33:16 2007 UTC (5 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Update the List() object to not add "(" and ")" around the list unless
they are explicitly entered by the author. This prevents extraneous
parentheses from being introduced into the problem text that the
author hadn't expected.
Parentheses now are added only for nested lists, as in
List(1,List(2,3)), which will display as "1, (2, 3)", not "1, 2, 3".
Revision
5518 -
Directory Listing
Modified
Thu Sep 20 22:47:01 2007 UTC (5 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Adds a new context that is more limited by not allowing operations
within the coefficients and exponents themselves. Access this context
using
Context("LimitedPolynomial-Strict");
Revision
5517 -
Directory Listing
Modified
Thu Sep 20 18:02:24 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make adaptive parameters try again if they fail to be found the first
time (Gavin has found cases where the random points cause the
coefficient matrix to be singular, so a second try should resolve the
problem).
Revision
5515 -
Directory Listing
Modified
Wed Sep 19 12:11:39 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
One last change to make hardcopy work properly.
Revision
5514 -
Directory Listing
Modified
Wed Sep 19 12:06:09 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make sure comma's are represented correctly in TeX mode. (They need
to be enclosed in braces to get the spacing right.)
Revision
5513 -
Directory Listing
Modified
Wed Sep 19 12:01:56 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
This was accidentally removed in the last update. OOPS!
Revision
5512 -
Directory Listing
Modified
Wed Sep 19 11:58:05 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Handle TeX special characters better when used as the currency
symbol. (Quote them when displayMode is TeX.)
Revision
5511 -
Directory Listing
Modified
Sat Sep 15 14:45:22 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Cosmetic changes.
Revision
5509 -
Directory Listing
Modified
Sat Sep 15 00:56:51 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Formula objects and Context objects contain reference loops, which
prevent them from being freed properly by perl when they are no longer
needed. This is a source of an important memory leak in WeBWorK. The
problem has been fixed by using Scalar::Util::weaken for these
recursive references, so these objects can be freed properly when they
go out of scope. This should cause an improvement in the memory usage
of the httpd child processes.
Revision
5485 -
Directory Listing
Modified
Tue Sep 11 14:07:51 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
A couple of syntax issues.
Revision
5484 -
Directory Listing
Modified
Mon Sep 10 23:21:24 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Don't factor negatives out of multiple terms at once.
Revision
5475 -
Directory Listing
Modified
Sat Sep 8 22:54:17 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Report error messages correctly when ijk notation is involved and
ijkAnyDimension is set.
Revision
5474 -
Directory Listing
Modified
Sat Sep 8 22:30:40 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Use ijkAnyDimension in the check for parallel vectors as well.
Revision
5473 -
Directory Listing
Modified
Sat Sep 8 22:27:02 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Had the inequality going the wrong way. OOPS!
Revision
5472 -
Directory Listing
Modified
Sat Sep 8 22:24:06 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make vectors that are creates using ijk notation remain in ijk
notation when displayed. (This is easy now that objects produced by
combining others inherit the parent objects' flags.)
Added another context flag (ijkAnyDimension) that controls whether
vectors in ijk notation will conform to whatever dimension is used by
the vector they are being compared to. When set, i+2*j will equal
<1,2> even though i and j are vectors in 3-space. The value of
ijkAnyDimension is 1 by default.
This eliminates the need for the Vector2D context.
Revision
5471 -
Directory Listing
Modified
Sat Sep 8 21:46:52 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make copies of the components rather than just copying the pointers.
Revision
5470 -
Directory Listing
Modified
Sat Sep 8 21:44:43 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
No longer need to change the order of the data, since
Value::Interval->make() now handles the alternative order.
Revision
5469 -
Directory Listing
Modified
Sat Sep 8 21:35:21 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Removed an experiment that I accidentally left in during the last commit.
Revision
5468 -
Directory Listing
Modified
Sat Sep 8 21:33:53 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
The make() method now inherits all the settings of the parent object,
so that flags set by the user (e.g., tolerances, periods, and so on)
will be passed on as new objects are created. For example, in
$x = Real(1)=>with(tolerance=>.0001);
$y = sin($x);
$y will also have tolerance set to .0001.
This also applies to binary operations, where the result will now
inherit all the values of either operand, with the left-hand operand
taking precedence when they both have a flag set but to different
values.
This is a significant change, and there may be unforeseen side effects
that I'll have to take care of as they appear. It passes my test
suite, however, so I'm hoping they will be limited.
Revision
5467 -
Directory Listing
Modified
Sat Sep 8 21:25:06 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow interval data to be given in more forms (eg, (a,b,"(",")") in
addition to ("(",a,b,")"), since that is the order that the value()
method returns the data.)
Revision
5464 -
Directory Listing
Modified
Fri Sep 7 14:18:30 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Derivatives of absolute values were leaving out the chain rule when
written as |...| (but not as abs(...)). The chain rule is built into
the derivatives of function objects automatically, but not of lists,
which is how |...| is implemented (a special form of parentheses), and
so I missed it when adding the derivative in this form. Argh!
Revision
5463 -
Directory Listing
Modified
Thu Sep 6 10:47:02 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed check to use a variable that is known to be in the context
(rather than incorrectly assuming 'x' is there).
Revision
5462 -
Directory Listing
Modified
Thu Sep 6 10:36:15 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Only try to reduce intervals, sets and unions. (Don't call isReduced
on objects that don't support it).
Revision
5461 -
Directory Listing
Modified
Thu Sep 6 00:19:23 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make error messages more consistent when student's answer is off by a constant.
Revision
5460 -
Directory Listing
Modified
Wed Sep 5 23:56:19 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
In making the checker work with +C, I forgot to add the parameter that
provides for the student's answer to be off by a constant. (Since the
C is actually a variable, not a parameter.) OOPS!
Revision
5458 -
Directory Listing
Modified
Fri Aug 31 13:41:16 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Add the PGcourse.pl file, since we are encouraging authors to include
this in theie loadMacros() calls.
Revision
5457 -
Directory Listing
Modified
Fri Aug 31 13:40:27 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed POD documentation formatting.
Revision
5455 -
Directory Listing
Modified
Thu Aug 30 02:45:18 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make sure Formula's value() method doesn't produce an error when it
can't extact the separate entries of the formula.
Revision
5454 -
Directory Listing
Modified
Thu Aug 30 02:38:07 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Disassemble Formula's properly when used with multiple variables in
substitute(), etc. For example:
$f->substitute(['x','y'] => Formula("xy,x^2-y^2"));
Revision
5453 -
Directory Listing
Modified
Thu Aug 30 02:20:06 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow specification of values for multiple variables a once for
eval(), substitute() and so on. You can use
$f->eval(['x','y'] => Point(1,2));
or
$f->eval(['x','y'] => [1,2]);
or
$P = Point(1,2);
$f->eval(['x','y'] => $P);
to do the equivalent of
$f->eval(x=>1,y=>2);
Note that you must use quotes for the variable names and that they
must be enclosed in square brackets, not parentheses, when you supply
more than one variable. You can combine single with multiple
variables, as in
$f->eval(['x','y']=>Point(1,2),z=>3);
Revision
5446 -
Directory Listing
Modified
Wed Aug 29 02:06:01 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fix substitute() so that if the variable is being substituted for a
constant, only the branch that contains that value is returned. If it
is substituted by another variable, the variables for the inequalities
will also be changed. (Otherwise the variable is replaced only in the
functions; not perfect, but the best that I could come up with.)
Revision
5445 -
Directory Listing
Modified
Wed Aug 29 02:01:24 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Check that "and" and "or" combine inequalities that use the same variable.
Revision
5444 -
Directory Listing
Modified
Wed Aug 29 00:07:47 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Implementation of a PiecewiseFunction class. Both students and
problem authors can enter peicewise functions, and they will display
nicely in TeX mode. They can be evaluated, reduced, substituted, and
so on, just like other functions.
There are undoubtedly more features that it needs, but it's a start.
Revision
5443 -
Directory Listing
Modified
Wed Aug 29 00:03:27 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make the TeX output for <= be \le rather than <=
Revision
5442 -
Directory Listing
Modified
Tue Aug 28 23:08:44 2007 UTC (5 years, 8 months ago) by
gage
Original Path:
trunk/pg
Backporting changes from HEAD to rel-2-4-dev
Revision
5441 -
Directory Listing
Modified
Tue Aug 28 22:40:15 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Add context names for the context(s) created here.
Revision
5440 -
Directory Listing
Modified
Tue Aug 28 22:39:04 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Add error messages when student's answer is not linear in the constant
he or she has used.
Revision
5439 -
Directory Listing
Modified
Tue Aug 28 21:53:42 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Updated contexts to include a "name" field that at least tracks what
context you started with (though it can be modified and no longer be
the same as the original context).
Remove the individual named variables in the Default.pm file; they are
now available only through the %Parser::Context::Default::context
hash.
Remove the >< and . operators, the <...> parentheses, the norm and
unit functions, and the i, j, and k constants from the Point context.
So the Point context no longer includes vectors and vector
operaterations.
Revision
5436 -
Directory Listing
Modified
Tue Aug 28 01:30:25 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Had the wrong inequality (but since answers won't usually contain
newlines, this won't have affected anyone).
Revision
5434 -
Directory Listing
Modified
Sun Aug 26 19:11:18 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
This is a rewrite of the Inequalities context that makes a number of
improvements over the older version.
First, the error messages are much better when students enter
incorrect answers.
Second, inequalities and intervals are now separate classes and so you
can enter both types of notation and they will stringify and texify
correctly, so there is no need for the stringifyAsInequalities flag
any longer.
Finally, there is a new Inequality() constructor that can be used to
coerce Intervals, Sets, and Unions to become their corresponding
inequalities, and vice versa, Interval(), Set() and Union() can be
used to coerce an Inequality to be represented in its interval-style
notation.
This is not backaward compatible with the ealier version, but since
that is only a couple of weeks old, I don't think it should be an
issue, as very few problems will have been written for it in that
time.
Revision
5433 -
Directory Listing
Modified
Sun Aug 26 19:05:18 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Improve error messages for unreduced unions.
Revision
5432 -
Directory Listing
Modified
Sun Aug 26 18:53:23 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Only try to form intervals from lists that could be intervals when
they are of length 2.
Revision
5431 -
Directory Listing
Modified
Sun Aug 26 12:14:00 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow object classes to override their own precedence values.
Revision
5430 -
Directory Listing
Modified
Sun Aug 26 12:13:12 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Had the test reversed in isReduced when returning a boolean rather
than an array (Argh!)
Revision
5429 -
Directory Listing
Modified
Sun Aug 26 11:56:24 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make sure the constructor creates the interval in the correct context.
Revision
5428 -
Directory Listing
Modified
Sun Aug 26 03:03:29 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow Interval constructor to handle more situations.
Revision
5427 -
Directory Listing
Modified
Sun Aug 26 03:02:06 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Minor change (don't need to check for isValue since we are already
assuming that in the previous line).
Revision
5426 -
Directory Listing
Modified
Sun Aug 26 03:00:59 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Add a predefined type structure for intervals.
Revision
5410 -
Directory Listing
Modified
Fri Aug 24 03:05:07 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Use the original when determining what structures to copy.
Revision
5409 -
Directory Listing
Modified
Fri Aug 24 03:03:55 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Use string() rather than stringify() since we don't want the
StringifyAsTeX setting to affect this check.
Revision
5408 -
Directory Listing
Modified
Fri Aug 24 03:02:54 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Load the UNIVERSAL package and make it available to Parser Items and Contexts.
Revision
5407 -
Directory Listing
Modified
Fri Aug 24 01:44:56 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fix loadMacros() and alias() so that they find auxiliary files even
when the .pg file is in templates/tmpEdit.
Revision
5406 -
Directory Listing
Modified
Fri Aug 24 01:02:40 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
The Library Browser has a bad interaction with browser image caches if
it displays two .pg files with fixed .gif files that have the same
name (this happens in several of the setMV* files, for example
setMVlevelsets/levels-1/levels-1.pg and setMVlevelsets/levels-2/levels-2.pg).
This fixes the problem by including a portion of the file name in the
name of the gif file to (help) make it unique.
Revision
5405 -
Directory Listing
Modified
Wed Aug 22 23:38:13 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Revamp the isReduced() method for Unions and Sets so that it produces
error indicators in addition to the T/F result. The answer checker
now uses that to produce more meaningful error messages for students
(in the past it always said "Your union can be produced without
overlaps" even when that was not the actual reason why the union is
not reduced).
Revision
5404 -
Directory Listing
Modified
Wed Aug 22 23:35:41 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Set the cmpDefaults so that you don't get error messages for things
like "x=1 or x=2" (which are not reduced when considered as {1} U {2}).
Also, improve the error messages a bit.
There is a better way to handle this context so that intervals, sets
and unions are distinct from inequalities. That will clear up the
ambiguity about how to stringify the objects, and will make it easier
for the two types of notation to coincide.
Revision
5403 -
Directory Listing
Modified
Wed Aug 22 23:31:10 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make sure Context's cmpDefaults hash is copied when duplicated. (Now
that isHash() and so on can be used, this can be improved.)
Revision
5402 -
Directory Listing
Modified
Wed Aug 22 21:06:25 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
This file implements the ability to have String() add strings to the
context automatically if they are not already defined. (This should
please Mike). I also provides a more convenient call for creating
strings within the context.
Revision
5401 -
Directory Listing
Modified
Wed Aug 22 20:16:26 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow conversion of error messages after the value substitution has
been performed. Also provide a subroutine to do more complex
conversion of error messages:
Context()->{error}{convert} = sub {
my $message = shift;
... manipulate message ...
return $message;
}
Revision
5400 -
Directory Listing
Modified
Wed Aug 22 19:54:50 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Use new feature to make Real() create ScientificNotation objects.
Revision
5399 -
Directory Listing
Modified
Wed Aug 22 19:49:36 2007 UTC (5 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow contexts to override the MathObject constructors separately from
the ones generated by the parser. That way, you can define Real(),
for example, to produce ScientificNotation, without screwing up the
reals used in the parser itself.
Revision
5398 -
Directory Listing
Modified
Wed Aug 22 19:04:25 2007 UTC (5 years, 8 months ago) by
sh002i
Original Path:
trunk/pg
normalized documentation -- still needs a USAGE section though.
Revision
5396 -
Directory Listing
Modified
Mon Aug 20 06:35:54 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make sure copy() creates new variables and values hash references (and
any other hash or array refs in the formula).
Revision
5395 -
Directory Listing
Modified
Mon Aug 20 04:43:48 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typo in documentation.
Revision
5394 -
Directory Listing
Modified
Mon Aug 20 04:27:00 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added documentation for the showHints flag to the cmp() method.
Revision
5393 -
Directory Listing
Modified
Mon Aug 20 04:23:02 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Implements a general antiderivative formula object where the student
must include a "+ C" (using any variable he or she chooses) and the
correct answer also shows a "+ C". See the comments in the file for
details.
Revision
5392 -
Directory Listing
Modified
Sun Aug 19 21:50:23 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Move the context creation to the _init routine so that modifications
to main:: occur at initialization time, not when the file is loaded.
Revision
5391 -
Directory Listing
Modified
Sun Aug 19 21:45:47 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Move the context creation into the _init routine so that changes to
main:: are only made at initializaiton time, not load time.
Revision
5390 -
Directory Listing
Modified
Sun Aug 19 21:44:49 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fix up the examples and documentation a bit.
Revision
5389 -
Directory Listing
Modified
Sun Aug 19 21:43:37 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Only do this translation when not in hardcopy mode (but the answer
checkers aren't called then anyway, so that is probably not ever going
to occur).
Revision
5388 -
Directory Listing
Modified
Sun Aug 19 21:40:59 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added the HTML special characters to the list of translated ones, so
they will be properly preserved as well.
Revision
5387 -
Directory Listing
Modified
Sun Aug 19 21:31:17 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Always make units be in \textstyle (in particular, in the preview display).
Revision
5386 -
Directory Listing
Modified
Sun Aug 19 20:38:30 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Move the context creation into the _init routine.
Don't generate the error about implied multiplication, since that
doesn't make sense here (produce the standard error instead).
Revision
5385 -
Directory Listing
Modified
Sun Aug 19 20:02:41 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added context flags to more finely control the allowed entry format
(e.g., force the use of commas, force the use of decimal places, and
so on.) See the documentation at the top of the file for details.
Revision
5384 -
Directory Listing
Modified
Sun Aug 19 19:18:18 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Allow objects to explicitly DENY being a given type, even if isa()
says they are.
Revision
5383 -
Directory Listing
Modified
Sun Aug 19 18:07:19 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
The copy method was not copying all the values from the original
(since it was making a new object from scratch). We now copy the
complete hash and recursively copy the parse tree.
Revision
5382 -
Directory Listing
Modified
Sun Aug 19 18:00:48 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
The overridden with() method was not preserving all the settings in
the Formula. This has been fixed.
Revision
5381 -
Directory Listing
Modified
Sun Aug 19 15:38:31 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Correct the example so the answer given is actually a correct one.
Revision
5380 -
Directory Listing
Modified
Sun Aug 19 14:58:51 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixes to format POD documentation better.
Revision
5379 -
Directory Listing
Modified
Sun Aug 19 14:54:35 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
More fixes to POD sections.
Revision
5378 -
Directory Listing
Modified
Sun Aug 19 14:44:55 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Now that parens->clear doesn't remove the 'start' paren, we can use
clear as we can with the others.
Revision
5377 -
Directory Listing
Modified
Sun Aug 19 14:41:26 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make sure clear doesn't remove the special 'start' paren that is
required by the Parser class.
Revision
5376 -
Directory Listing
Modified
Sun Aug 19 03:41:45 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Allow formatted answers to include newlines, and convert them to <BR>
so that we can try to improve the layout in the results table.
(Piecewise functions will want this, since they can be very long
otherwise. Raw matrix entries might want that, too.)
Revision
5375 -
Directory Listing
Modified
Sun Aug 19 03:39:10 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Improved method of looking up the item class so that it will work with
more deeply nested namespaces.
Revision
5374 -
Directory Listing
Modified
Sun Aug 19 02:52:28 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Macro files should return a non-zero value
Revision
5373 -
Directory Listing
Modified
Sun Aug 19 02:01:57 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Normalized comments and headers to that they will format their POD
documentation properly. (I know that the POD processing was supposed
to strip off the initial #, but that doesn't seem to happen, so I've
added a space throughout.)
Revision
5371 -
Directory Listing
Modified
Sun Aug 19 00:56:25 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changed Parser.pl to MathObjects.pl
Revision
5370 -
Directory Listing
Modified
Sun Aug 19 00:48:19 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Updated calls to Parser::Context->getCopy to remove unneeded undef
argument.
Revision
5369 -
Directory Listing
Modified
Sun Aug 19 00:30:41 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
The "undef" in Parser::Context->getCopy(undef,"NAME") is no longer
needed, and will be ignored if provided, but you can now use
Parser::Context->getCopy("NAME");
which is more reasonable to read.
Revision
5368 -
Directory Listing
Modified
Sun Aug 19 00:21:46 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make Compute() retain the original Formula as well as the correct
answer string (for reference if you need it). Also provide a hook for
subclasses of Parser::Item to force a Formula to be computed as a
Formula-based Value object (e.g., this is needed for
PiecewiseFunctions, which don't compute to constants, but don't want
to be Formula's either).
Revision
5367 -
Directory Listing
Modified
Sat Aug 18 23:46:02 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Include extra parens when they have been requested.
Revision
5366 -
Directory Listing
Modified
Sat Aug 18 23:43:47 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Miscellaneous improvements to TeX and string output.
Fixed typo in propagation of equation pointer in one location.
Propagate the varName field in "or" and "and" operations.
Revision
5365 -
Directory Listing
Modified
Sat Aug 18 23:39:57 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Use alternative method of testing if whether two objects are the same
(without causing them to stringify first).
[Technically, this should call Value::address, the renamed version of
Value::Ref, but I didn't want the AIM participants to have to update
to the latests version of MathObjects to be able to use this.]
Revision
5364 -
Directory Listing
Modified
Sat Aug 18 23:34:09 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Handle promotion of Parser::Items better when they have been
subclassed, and be sure to initialize the {variables} field.
Revision
5363 -
Directory Listing
Modified
Sat Aug 18 23:33:05 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added a number of methods to improve the ability to test unknown
values for their types (e.g., isHash, isBlessed, etc), and modified
several of the service routines to use them.
Improved the isValue and related routines to use more sophisticated
methods of determining whether a class is a MathObject.
Made the UNIVERSAL isa() and can() methods available for use from
within the safe compartment.
Some miscellaneous cleanup.
Revision
5362 -
Directory Listing
Modified
Sat Aug 18 21:47:03 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
The changes in version 1.81 broke promotion of objects created by hand
through the MathObject constructors since they don't have open and
close explicitly like the parsed versions do. So check the context
for the default parens for these.
Revision
5357 -
Directory Listing
Modified
Sat Aug 18 03:45:58 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed up some comments.
Added two new opions: format and tex_format. These provide
sprintf-style strings that are used to format the student answers
for display in the results area, so you have full control over how
these are displayed.
Added isPreview flag to the answer hash so that you can tell if you
should issue error messages in your checker routine.
Revision
5356 -
Directory Listing
Modified
Sat Aug 18 02:47:09 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
The MultiAnswer object calls cmp_compare() in a non-standard way (in
order to get its checker routine to run inside an eval call, which it
can't do itself since it is not a .pm file, and so is in the safe
compartment). Recent changes to this routine to take advantage of
MathObjects storing their contexts broke this non-standard usage. (It
should really be changed so that this hack isn't necessary in the
MultiAnswer object.)
Revision
5355 -
Directory Listing
Modified
Sat Aug 18 02:17:20 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Minor fix to error message code (table tags were missing).
Add missing parameter to one call to perform_check().
Use context method rather than looking up the field directly.
Revision
5354 -
Directory Listing
Modified
Fri Aug 17 22:46:02 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make sure the creation o MathObjects internally preserves the context
saved in the object.
Revision
5353 -
Directory Listing
Modified
Fri Aug 17 21:36:31 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Finished the comment that was left incomplete. (Sorry about that.)
Revision
5352 -
Directory Listing
Modified
Fri Aug 17 21:30:16 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changed the POD line at the top, which incorrectly suggested that you
use Context("LimitedPowers") to access this (many other contexts work
that way, but not this one).
Revision
5351 -
Directory Listing
Modified
Fri Aug 17 21:25:02 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Add some examples into the documentation.
Put quotes around some string literals where they were missing.
Move the isInteger routine to an easier location to use, and
pass it the evaluated power as well as the BOP::power
(so it won't have to be evaluated more than once).
Revision
5350 -
Directory Listing
Modified
Fri Aug 17 21:07:00 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Updated to allow more flexibility in controlling the range of powers
to be allowed (as per John Jones' suggestion). Also changed the
way that you request the changes: you now make a function call rather
than modify the operators list directly yourself. (The old way is
still provided, however, for backward compatibility.)
See the comments in the file for more details.
Revision
5349 -
Directory Listing
Modified
Fri Aug 17 19:40:55 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Use the more powerful getFlag method to get the context flag rather
looking in the context directly.
Revision
5348 -
Directory Listing
Modified
Fri Aug 17 19:37:53 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Modified Value::Error so that it works as a method as well as a direct
call. So you can use Value::Error(), Value->Error() or $mathObj->Error()
to call it. I probably should change all the Value::Error calls to
Value->Error ones, but may not bother, as there is not much gain in
it and I've gotten pretty used to it the way it is.
Also fixed a typo where the showTraceback flag was not being honored.
Revision
5347 -
Directory Listing
Modified
Fri Aug 17 18:59:05 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
change POD documenation (try to get it to handle the leading #'s
properly. I know it can be done, but don't know what triggers it.
Revision
5346 -
Directory Listing
Modified
Fri Aug 17 18:30:34 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
This file implements a context where students can enter numbers in
scientific notation. You can control the number of decimal digits
they need/can enter, and how many are used when the answers are
displayed.
See the comments at the top of the file for more details.
Revision
5345 -
Directory Listing
Modified
Fri Aug 17 16:24:40 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a typo that prevented the flags from the cmp() method from being
accessible to the getFlag() method. OOPS!
Revision
5344 -
Directory Listing
Modified
Fri Aug 17 16:11:55 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Incorrectly had promoteReals to 1 instead of 0 (left over from
testing). Now added promoteReals to the context in addition to the
answer cmp method, and produce error messages when computations are
performed between currency and reals. (The message is not as good as
it should be, but to do it right would require overriding all the
operators. I need to work out a better way of hooking into the type
checking mechanism for the operators.)
Revision
5343 -
Directory Listing
Modified
Fri Aug 17 02:01:07 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
This file implements a context in which students can provide answers
that are monitary values. You can control the currency symbol and the
characters used for commas and decimals (for potential localization in
the future).
See the comments in the file for more details and examples.
Revision
5342 -
Directory Listing
Modified
Fri Aug 17 01:59:33 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
This is a temporary hack that allows sticky answers to preserve all
the characters the student typed. PGbasicmacros.pl currently removes
several characters, including $, which is needed for monitary
answers. Eventually, PGbasicmacros.pl should be fixed, but for now
this will work, and it should not cause trouble after PGbasicmacros.pl
is fixed. In the end, this file can be emptied, then it should issue
a warning message, and finally it can be removed.
The hack is to copy the inputs_ref and modify the answers so that the
PGbasicmacros.pl macros will not remove those characters (the key is
to convert them to HTML entities instead). Then after the problem has
been processed, we put the original answers back so that the answer
checkers will work properly on them. This is accomplished by
replacing ENDDOCUMENT with a new routine that first puts back the
answers and then calls the old ENDDOCUMENT. This has the unwanted
side effect of putting error messages into the error log, but I can't
seem to work around that.
Revision
5341 -
Directory Listing
Modified
Thu Aug 16 04:41:26 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Had a typo: answer_submitted should have been answers_submitted, but
it turns out that this is ALWAYS set, even when answers AREN'T
submitted, so I had to look for the individual buttons instead. This
might break if someone adds more buttons, but it works for now.
Revision
5340 -
Directory Listing
Modified
Thu Aug 16 03:45:33 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Show the reseed button and message even if the student hasn't
submitted answers (like when they have just loaded the problem).
Revision
5339 -
Directory Listing
Modified
Thu Aug 16 03:24:45 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added a message when the "when" condition is met but the due-date
condition is not. The message informs the student that the problem
can be reseeded after the due date.
Revision
5338 -
Directory Listing
Modified
Thu Aug 16 02:37:54 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make reseeding save better (when submits are allowed) so that if a
student comes back to a reseeded problem, they will get the reseeded
version.
Also don't let to reseeding count as a submit in the number of attempts
so far.
Revision
5337 -
Directory Listing
Modified
Wed Aug 15 21:45:01 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug where onlyAfterDue was not working correctly. (The button
showed up when it shouldn't, and would have no effect.)
Revision
5336 -
Directory Listing
Modified
Wed Aug 15 21:32:05 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Provides a mechanism for reseeding problems under specific
conditions. For example, when the student has gotten the problem
right and it is past the due date, he or she can reseed the problem.
Other criteria are also available.
See the comments at the top of the file for more details.
Revision
5332 -
Directory Listing
Modified
Wed Aug 15 04:12:15 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make @LimitedPowers::OnlyPositiveIntegers do as its name suggests and
rule out zero as well. Added @LimitedPowers::OnlyNonNegativeIntegers
to handle 0 and positive values.
Revision
5331 -
Directory Listing
Modified
Wed Aug 15 04:10:41 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added a reduce flag for x^1 processing (it was not able to be
disabled before).
Revision
5330 -
Directory Listing
Modified
Wed Aug 15 04:09:41 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added a Ref() function that returns the reference address (for
checking if two MathObject references are to the identical object).
Without this, the objects would be compared as MathObjects rather than
perl references.
Revision
5329 -
Directory Listing
Modified
Wed Aug 15 04:03:57 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
USe filter names for the answer checkers to identify them in debugging
message more easily. Mark the MultiAnswer as a Value object. Handle
allowBlankAnswers properly.
Revision
5328 -
Directory Listing
Modified
Wed Aug 15 03:58:26 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
This file implements a postfilter for AnswerEvaluators that allows you
to specify answer hint messages to use when specific answers or sets
of answers are given by the student. You can use specific constants
or a perl subroutine to determine which answers to respond to. You
can also specify a score to use when the answers are triggered, and
whether to replace existing messages or not. See the comments in the
file for more details.
Revision
5327 -
Directory Listing
Modified
Wed Aug 15 03:56:11 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
This file defines contexts in which intervals can (or must) be
entered as inequalities. The contexts include "and" and "or" for
combining inequalities, and you can force intervals to be shown as
inequalities rather than their usual form. See the comments in the
file for additional details.
Revision
5323 -
Directory Listing
Modified
Tue Aug 14 15:57:19 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem where Real's were being promoted to NumberWithReals
during the numeric comparison (when units should be ignored). This
error was a result of the changes made this summer.
[This class should probably be redesigned to implement the overloaded
operators and, in particular, handle the equality check in compare()
rather than an over-ridden cmp_parse. That would make it possible to
manipulate numbers-with-units via perl code in a natural way, just
like all the other MathObjects.]
Revision
5312 -
Directory Listing
Modified
Fri Aug 10 20:00:24 2007 UTC (5 years, 9 months ago) by
sh002i
Original Path:
trunk/pg
forward-port (sh002i): Fix PG_restricted_eval so that no lexicals are
used in the scope of the eval()
Revision
5310 -
Directory Listing
Modified
Fri Aug 10 18:36:10 2007 UTC (5 years, 9 months ago) by
sh002i
Original Path:
trunk/pg
forward-port (sh002i): Added a version of PGstandard.pl which loads
PG.pl, PGbasicmacros.pl, PGanswermacros.pl, and PGauxiliaryFunctions.pl.
It also includes POD docs!
Revision
5274 -
Directory Listing
Modified
Fri Aug 10 00:21:17 2007 UTC (5 years, 9 months ago) by
sh002i
Original Path:
trunk/pg
forward-port (sh002i): when using loadMacros, add a newline before the
file's contents in the eval() statemet. this allows a POD directive on
the first line of the included file.
Revision
5269 -
Directory Listing
Modified
Thu Aug 9 23:24:56 2007 UTC (5 years, 9 months ago) by
jj
Original Path:
trunk/pg
Add function so that pg problems can include any other problem under the
templates directory.
Revision
5253 -
Directory Listing
Modified
Thu Aug 9 06:30:52 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Copy the error message translation array when a Context is duplicated.
Revision
5252 -
Directory Listing
Modified
Thu Aug 9 06:01:48 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make sure ^ is quoted in character patterns so it doesn't become a
negatted character pattern.
Revision
5251 -
Directory Listing
Modified
Thu Aug 9 03:22:43 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added withPostFilter and withPreFilter methods to the AnswerHash.
These install the filter but return the AnswerHash rather than the
filter lists so that you can do things like
ANS(Real(10)->cmp->withPostFilter(...));
rather than having to save the answer checker, add the filter, then
call ANS with it.
Also adjusted some spacing.
Revision
5246 -
Directory Listing
Modified
Wed Aug 8 07:16:46 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Don't convert lists to inervals unless they have the correct types of parens.
Revision
5241 -
Directory Listing
Modified
Tue Aug 7 04:35:32 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make perlFunction() maintain the context properly when the function is
evaluated. (Still need to make it set the {equation} field?)
Also set the {equation} field for values returned by eval().
Revision
5240 -
Directory Listing
Modified
Tue Aug 7 04:33:31 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Use cached value of context rather than looking it up each time.
Revision
5239 -
Directory Listing
Modified
Tue Aug 7 04:32:33 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Use corret indices for the left and right endpoints. (The paren types
are not stared in the data, only the endpoints, so use entries 0
and 1, not 1 and 2).
Revision
5238 -
Directory Listing
Modified
Tue Aug 7 04:30:59 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Use getCopy() rather than depricated get() method.
Revision
5237 -
Directory Listing
Modified
Tue Aug 7 04:30:27 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Allow Context()->variables-add(name=>[type,options]) format for
declaring a variable.
Revision
5236 -
Directory Listing
Modified
Tue Aug 7 04:27:35 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed an error in the documentation.
Revision
5214 -
Directory Listing
Modified
Mon Jul 23 12:11:14 2007 UTC (5 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Allow Parser::Formula to accept context parameter.
Revision
5209 -
Directory Listing
Modified
Sun Jul 22 03:24:54 2007 UTC (5 years, 9 months ago) by
gage
Original Path:
trunk/pg
Updated documentation of appletLink and helpLink macros
Revision
5181 -
Directory Listing
Modified
Sun Jul 15 13:03:43 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Removed promote() from calls to funcitons where the operand will
already be a Complex; overloaded operations guarantee this, unless the
funciton is called explicitly through the package name. It is
more direct to do something like sin(Complex($a,$b)) than
Value::Complex::sin($a,$b) anyway. Although I was trying to allow
both forms, it is not worth the overhead to allow the second form, and
it is nor really "best practice" anyway.
Revision
5180 -
Directory Listing
Modified
Sun Jul 15 12:11:07 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Accidental typo due to global search and replace.
Revision
5179 -
Directory Listing
Modified
Fri Jul 13 22:43:22 2007 UTC (5 years, 10 months ago) by
sh002i
Original Path:
trunk/pg
expanded POD docs
Revision
5178 -
Directory Listing
Modified
Fri Jul 13 21:59:34 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make periodic comparisons have their tolerances based on the correct
answer point rather than just the period. (This avoids zeroLevel
checks on one coordiante when period is pure imaginary or pure real.)
Also fixed promote() calls since it has been moved to Value.pm.
Revision
5175 -
Directory Listing
Modified
Fri Jul 13 21:35:34 2007 UTC (5 years, 10 months ago) by
sh002i
Original Path:
trunk/pg
quick hack to satisfy gedit's dumb syntax hiliting
Revision
5170 -
Directory Listing
Modified
Fri Jul 13 20:50:45 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make Real and Complex objects promote their period fields so that they
can be specified as strings rather than actual objects.
Also make the default promote() routine be the more sophisticated one
used by Real and Complex (and so remove the reoutine from those objects).
Revision
5145 -
Directory Listing
Modified
Wed Jul 11 19:28:21 2007 UTC (5 years, 10 months ago) by
gage
Original Path:
trunk/pg
More detailed doucmentation on MathObjects
Revision
5141 -
Directory Listing
Modified
Wed Jul 11 02:42:12 2007 UTC (5 years, 10 months ago) by
gage
Original Path:
trunk/pg
Add comment explaining that Infinity is defined in dangerousMacros.pl along with pi and sometimes
the complex version of i as well.
Revision
5139 -
Directory Listing
Modified
Wed Jul 11 01:07:09 2007 UTC (5 years, 10 months ago) by
gage
Original Path:
trunk/pg
Removed PGinfomacros.pl
there is already a file named PGinfo.pl which does the same thing
Revision
5138 -
Directory Listing
Modified
Wed Jul 11 01:03:08 2007 UTC (5 years, 10 months ago) by
gage
Original Path:
trunk/pg
Added a file containing macros that are useful for determining the current environment and
other debugging activities. This collection is far from complete. It currently contains
some useful macros that originally appeared in PGsequentialmacros.pl but were really only used
for debugging and problem construction.
Revision
5132 -
Directory Listing
Modified
Mon Jul 9 19:54:21 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Better control over when extra parentheses are added.
Revision
5131 -
Directory Listing
Modified
Mon Jul 9 19:53:15 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Remove the space inserted by \left...\right when it appears in a
multiplication operation (so function calls look better, for example).
Revision
5130 -
Directory Listing
Modified
Mon Jul 9 12:45:06 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Added new flags to error checking of operands and function arguments.
This is so that a context can be developed that is more forgiving
about what can be put next to what. Such a context can NOT be used
for evaluation or answer checking, but can be used to generate TeX
output in more sophisticated situations.
Revision
5128 -
Directory Listing
Modified
Fri Jul 6 15:22:29 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Have getFlag look in the equation's equation for the flag as well (so
that formulas that are split into separate formulas will have their
points be able to find flags from the original list-values formula.
Revision
5127 -
Directory Listing
Modified
Fri Jul 6 15:21:12 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Record the equation of the separate components of the list so that
getFlag will be able to obtain the values from the original list or
formula.
Revision
5126 -
Directory Listing
Modified
Fri Jul 6 15:19:37 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
The value computed by modulo() is already a Complex, so no need to
cast it to be one (in fact, it screwed up the value, since make()
expects the real and imagniary parts separately).
Revision
5125 -
Directory Listing
Modified
Wed Jul 4 20:26:24 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use precompiled patterns for efficiency.
Revision
5124 -
Directory Listing
Modified
Wed Jul 4 20:13:03 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make the patterns be pre-compiled patterns for efficiency.
Revision
5123 -
Directory Listing
Modified
Wed Jul 4 20:11:17 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make sure the caiseInsensitive array is copied when the context is
copied (so that the token list will be maintained correctly).
Revision
5122 -
Directory Listing
Modified
Wed Jul 4 17:04:51 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Allow constants to be defined by a hash (like everything else) if desired.
Revision
5120 -
Directory Listing
Modified
Wed Jul 4 17:00:18 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Allow constants to override their string representations.
Revision
5119 -
Directory Listing
Modified
Wed Jul 4 01:19:18 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Removed some unneeded spaces in the comments.
Revision
5118 -
Directory Listing
Modified
Wed Jul 4 01:18:52 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make string() method use the separator specified in the List
definition rather than a hard coded comma.
Revision
5117 -
Directory Listing
Modified
Wed Jul 4 01:17:56 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use a precedence lower than the lowest allowed precedence when closing
the formula as a whole (to force ALL the operators to be performed).
Revision
5116 -
Directory Listing
Modified
Tue Jul 3 10:44:30 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Modified the method used to tokenize a formula to use one large
pattern that includes all the token types rather than individual
patterns for variables, strings, operators, and so on. This allows
the Parser to handle the situation where a token of one type is a
prefix of a token of another type (e.g., < as a parenthesis but <- as
an operator) without worrying about which one is checked first. The
new mtheod is also more flexible about having additional patterns
(like quoted strings, or arbitrary variable names) and about
specifying the order in which they are applied.
Revision
5115 -
Directory Listing
Modified
Mon Jul 2 23:48:00 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Get the period and logperiodic values using getFlags rather than only
looking in the object itself (this allows it to inherit the values
from a Formula, for example).
Revision
5114 -
Directory Listing
Modified
Mon Jul 2 23:21:06 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed error in derivative of quotients introduced by recent bad editing.
Revision
5113 -
Directory Listing
Modified
Mon Jul 2 16:27:13 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Improve some error messages.
In comparisons, mark the values created by the formulas so that they
will use the formula's tolerances.
Revision
5112 -
Directory Listing
Modified
Mon Jul 2 16:18:49 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make getFlag() look for an {equation} field and add that into the
search path for the flag. This lets Formula object tag their results
so that printing and comparisons will use the flags from the Formula
for formats and tolerances.
Revision
5111 -
Directory Listing
Modified
Mon Jul 2 00:50:14 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Changed with() to make a copy (as suggested last week). This one is a
deep copy, however, since the tree is modified and we don't want to
change the original, we need to make a deep copy.
Adjust bop() to remove dependency on hard-coded Parser package name.
Remove stringify, which is now identical to parent version
Move usesOneOf to near isConstant (cosmetic change only).
Revision
5108 -
Directory Listing
Modified
Sun Jul 1 18:34:13 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Remove unneeded parens and do better type coersion in new() method.
Preserve contexts in more situations.
Handle errors in powers better.
Promote more types of objects (specifically, parse string values) in several places.
Handle dimensions more carefully in comparison.
Handle dimensions more carefully in column extraction.
Allow identity matrix dimension to come from the object creating it, when applicable.
Don't override stringify or string methods. (This used to be needed
to force the display to use proper open and close symbols, but
we now coerce the rows to be of matrix type, so that is no longer needed.)
Revision
5107 -
Directory Listing
Modified
Sun Jul 1 18:25:24 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Arrange for creation of constant Matrices to produce 1 x n matrices
(rather than vectors) properly. (This involves including an extra
array reference in List.pm, which must be removed in list types that
don't need them, namely intervals and absolute value.)
Revision
5106 -
Directory Listing
Modified
Sun Jul 1 18:22:48 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make extract() handle out-of-bound indices better.
Revision
5105 -
Directory Listing
Modified
Sun Jul 1 11:18:39 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Do a better version of promote (get the context right) for these
function calls.
Revision
5104 -
Directory Listing
Modified
Sun Jul 1 11:17:31 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Remove unneeded parens, and don't use $isMatrix (scalar(@d) being
non-zero can be used instead).
Make sure ColumnVector status is retained in make() (so that adding
column vectors produces a column vector, for example).
Convert more values in promote (e.g., strings).
Fix a number of error messages and comments, and some formatting.
Handle contexts better.
Arrange for method inheritence in abs and areParallel.
Don't need stringify since it is now the same as the parent version.
Revision
5103 -
Directory Listing
Modified
Sun Jul 1 11:11:01 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Promote more possible values (e.g., strings).
Revision
5102 -
Directory Listing
Modified
Sun Jul 1 11:10:08 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Break out of makeValue earlier if the object is already a Value object.
Revision
5101 -
Directory Listing
Modified
Sun Jul 1 01:50:21 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Remove unneeded paretheses.
Don't need $isMatrix (since scalar(@d) non-zero tells us that).
Fix up some error messages.
Revision
5100 -
Directory Listing
Modified
Sat Jun 30 15:07:45 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Maintain context in a number of places where it was being lost.
Properly create Intervals from List and Point objects, when apropriate.
Properly create Formulas from non-constant Unions.
Properly report whether Unions of single items are reduced.
Only add parentheses when needed in stringify.
Revision
5099 -
Directory Listing
Modified
Sat Jun 30 15:02:17 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make sure classMatch always has a Context object, and don't report
Package errors in this routine.
Revision
5097 -
Directory Listing
Modified
Sat Jun 30 02:39:10 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Promote arguments to Union operations.
Fix a typo.
Remove stringify since it is now the same as the parent class.
Revision
5096 -
Directory Listing
Modified
Sat Jun 30 02:37:34 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Remove unneeded parens in if statements.
Don't need $isMatrix (since scalar(@d) > 0 only in that case).
Promote arguements to Set operations.
Use Union routine to handle subtraction, since promotion may return an
interval or union under some circumstances.
Revision
5095 -
Directory Listing
Modified
Sat Jun 30 02:33:11 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Need to use flag() not getFlag() for context objects.
Revision
5094 -
Directory Listing
Modified
Sat Jun 30 02:32:34 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Don't need those parens.
Revision
5093 -
Directory Listing
Modified
Sat Jun 30 00:35:17 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Produce a set when the endpoints of the interval are the same.
Fixed an error with the length method.
Make transferFlags only operate on the endpoints, no the parens.
Allow subtraction between intervals and non-intervals.
Promote non-intervals in the set operations.
Revision
5092 -
Directory Listing
Modified
Sat Jun 30 00:29:52 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Vectors can't be in Unions, even when of length two and with no parens.
Revision
5091 -
Directory Listing
Modified
Sat Jun 30 00:28:32 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Handle canBeInUnion properly (it must come AFTER isSetOfReals, and
needs to deal with empty parens).
Revision
5090 -
Directory Listing
Modified
Sat Jun 30 00:26:42 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Allow empty open and close parens for canBeInUnion method.
Reverse order of loops in transferFlags so that we can skip the
transfer if there is no flag in the object (true most of the time).
Revision
5089 -
Directory Listing
Modified
Fri Jun 29 22:07:10 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Transfer flags from parent objects to their children for comparisons
and printing purposes. Also touch up a few type-coersion issues. (It
may be possible to not to need Value::isValue() if these can all be
taken care of.)
Revision
5088 -
Directory Listing
Modified
Fri Jun 29 20:05:15 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Improved an error message, fixed comparison of infinity to real
numbers, and aded a missing space in TeX output.
Revision
5085 -
Directory Listing
Modified
Fri Jun 29 19:13:37 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed some type checking. Removed some unwantedd fuzzy checks (use
exact checks instead). Preserve context flags from complex object to
real and imaginary parts. Preserve context during function evaluations.
Revision
5084 -
Directory Listing
Modified
Fri Jun 29 19:11:05 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Adjusted some of the type checking to use more appropriate tests.
Revision
5083 -
Directory Listing
Modified
Fri Jun 29 19:08:53 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Combine isReal and isComplex into a single classMatch call.
Revision
5082 -
Directory Listing
Modified
Fri Jun 29 19:08:04 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Only promote complex numbers of they aren't already complex (this
prevents changing the context, since Parser::Function->call is called
directly, so $self->context is the current context, not the context of
the argument being passed).
Revision
5076 -
Directory Listing
Modified
Fri Jun 29 02:02:41 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Renamed the MultiPart object as the MultiAnswer object. The MultiPart
object now issues a warning indicating that change so that problem
authors will be encouraged to change their code.
Revision
5075 -
Directory Listing
Modified
Thu Jun 28 23:53:40 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use new context methods.
Revision
5074 -
Directory Listing
Modified
Thu Jun 28 23:44:45 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Updated to use new context methods.
Revision
5073 -
Directory Listing
Modified
Thu Jun 28 23:42:18 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use new context methods.
Revision
5072 -
Directory Listing
Modified
Thu Jun 28 23:40:46 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a typo in the compare method.
Revision
5071 -
Directory Listing
Modified
Thu Jun 28 23:19:00 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Correct and expand some documentation.
Revision
5070 -
Directory Listing
Modified
Thu Jun 28 22:49:38 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed up some comments and spacing.
Revision
5069 -
Directory Listing
Modified
Thu Jun 28 22:48:41 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use the new context methods, and restructure the saving/restoring of contexts.
Revision
5068 -
Directory Listing
Modified
Thu Jun 28 22:45:57 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Look for the StringifyAsTeX flag in the current context only (not the
original context of the object). This will make Context()->texStrings
work properly even when some objects are created in other contexts.
Revision
5067 -
Directory Listing
Modified
Thu Jun 28 22:33:31 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Added perl method so that the result is always a number (not a blank
when it is false).
Revision
5066 -
Directory Listing
Modified
Thu Jun 28 22:31:59 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Updated to use the new context methods.
Revision
5061 -
Directory Listing
Modified
Thu Jun 28 20:44:17 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Update to use new context methods.
Revision
5060 -
Directory Listing
Modified
Thu Jun 28 20:42:53 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use Value->context rather than $$Value::context.
Revision
5059 -
Directory Listing
Modified
Thu Jun 28 20:17:12 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Updated to use new context methods.
Revision
5056 -
Directory Listing
Modified
Thu Jun 28 11:32:10 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make List() preserve the correct_ans field when it is used to coerce a
single element to a singleton list.
Revision
5055 -
Directory Listing
Modified
Thu Jun 28 02:28:20 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Update to use new context methods.
Revision
5054 -
Directory Listing
Modified
Thu Jun 28 02:26:44 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Updated to use new package method to look up the Formula package name.
Revision
5053 -
Directory Listing
Modified
Thu Jun 28 02:23:21 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Change documentation for how to copy a context.
Revision
5052 -
Directory Listing
Modified
Thu Jun 28 02:21:32 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use new package method to find the Function package name.
Revision
5051 -
Directory Listing
Modified
Thu Jun 28 02:20:00 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use new context methods.
Revision
5050 -
Directory Listing
Modified
Thu Jun 28 02:17:32 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Updated context method calls.
Revision
5049 -
Directory Listing
Modified
Thu Jun 28 02:14:33 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use the new context copying method, and copy the Point context not the
Vector context.
Revision
5048 -
Directory Listing
Modified
Thu Jun 28 02:11:28 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Updated to use new context methods.
Revision
5047 -
Directory Listing
Modified
Thu Jun 28 02:08:18 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
The file needs to return a true value.
Revision
5046 -
Directory Listing
Modified
Thu Jun 28 02:06:36 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Updated to use new context copying method.
Revision
5045 -
Directory Listing
Modified
Thu Jun 28 01:55:03 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Updated to use the new context copy method.
Revision
5044 -
Directory Listing
Modified
Thu Jun 28 01:51:27 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use the new method to copy the String context
Revision
5043 -
Directory Listing
Modified
Thu Jun 28 01:39:58 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Updated to comply with recent changes in the Value library.
Revision
5042 -
Directory Listing
Modified
Thu Jun 28 01:31:09 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Recent changes to automatically do promotion in the Value methods was
a mistake. I put it back into the subclass methods again.
Revision
5041 -
Directory Listing
Modified
Wed Jun 27 23:30:54 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed incorrect use of numeric rather than string comparison.
Revision
5040 -
Directory Listing
Modified
Wed Jun 27 22:45:39 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Don't create a new copy of an object if it is already of the correct
class in promote().
Revision
5039 -
Directory Listing
Modified
Wed Jun 27 20:22:20 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
OOPS, the example in the previous message is wrong. You need to use
$a = Context()->variables->get("a")->{value};
$b = Context()->variables->get("b")->{value};
(brtaces around the "value").
Revision
5038 -
Directory Listing
Modified
Wed Jun 27 20:20:12 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Adaptive-parameter values are now stored in the Context so that they
can be retreived if needed. E.g.,
Formula("a x + b") == Formula("5 x - 3");
$a = Context()->variables->get("a")->value;
$b = Context()->variables->get("b")->value;
will have $a equal to 5 and $b equal to -3.
Revision
5037 -
Directory Listing
Modified
Wed Jun 27 19:50:45 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Changed the with() method to produce a (shallow) copy rather than
modify the original object. So now $x->with(foo=>'bar') will make a
copy of $x with a field "foo" set to "bar" rather than set "foo" to
"bar" in $x itself.
(This is in response to discussion from our June 26th meeting at UofR.)
Revision
5027 -
Directory Listing
Modified
Sat Jun 23 20:20:09 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Forgot to handle context in the make() method.
Revision
5026 -
Directory Listing
Modified
Sat Jun 23 20:08:07 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make the Package method really be a method of the context rather than
the Value objects, and make the Value method call the context one.
This means it is not necessary to pass the context as a parameter any
longer.
Revision
5025 -
Directory Listing
Modified
Sat Jun 23 20:05:49 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Was taking the context form the wrong position in the parameter list.
Revision
5024 -
Directory Listing
Modified
Sat Jun 23 19:46:00 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fix typo, and handle case where Allow is called from package.
Revision
5023 -
Directory Listing
Modified
Sat Jun 23 19:45:17 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make context method work when called from package rather than blessed object.
Revision
5017 -
Directory Listing
Modified
Fri Jun 22 12:40:32 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Left out a "return" in my changes of two weeks ago. OOPS!
Revision
5016 -
Directory Listing
Modified
Fri Jun 22 02:39:24 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Handle ans_array() correctly again (context issues, and allow parser
to create a formula from an existing subtree).
Revision
5015 -
Directory Listing
Modified
Fri Jun 22 01:56:06 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
more fixes to handle the contexts properly.
Revision
5014 -
Directory Listing
Modified
Fri Jun 22 00:26:47 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed context issues and a typo (must have been interrupted when
editing this file earlier). Also modified the units pattern to allow
trailing spaces.
Revision
5013 -
Directory Listing
Modified
Thu Jun 21 23:29:10 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Don't use \cdot with things like 3i.
Revision
5012 -
Directory Listing
Modified
Thu Jun 21 23:10:13 2007 UTC (5 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Added Package method to the Context object to replace the
Value->Package() calls and simplify the $self->Package calls (don't
have to look up the context again).
Revision
5006 -
Directory Listing
Modified
Sat Jun 16 02:08:02 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed an error with the modulo method, and adjusted formatting.
Revision
5005 -
Directory Listing
Modified
Sat Jun 16 02:07:07 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem with modulo method.
Revision
5004 -
Directory Listing
Modified
Fri Jun 15 03:17:31 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Only set the context if the data is a MathObject.
Revision
5001 -
Directory Listing
Modified
Tue Jun 12 04:05:56 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
More fixes for creating items in the corret context. Also added a
method for looking up the package associated with a particular Parser
class (for consistency with the Value->Package call).
Revision
4999 -
Directory Listing
Modified
Tue Jun 12 01:00:53 2007 UTC (5 years, 11 months ago) by
gage
Original Path:
trunk/pg
testing -- please ignore
Revision
4998 -
Directory Listing
Modified
Tue Jun 12 01:00:10 2007 UTC (5 years, 11 months ago) by
gage
Original Path:
trunk/pg
testing -- added a space.
Revision
4997 -
Directory Listing
Modified
Mon Jun 11 18:16:40 2007 UTC (5 years, 11 months ago) by
gage
Original Path:
trunk/pg
Fixing docementation so that it can be read from the web.
Revision
4996 -
Directory Listing
Modified
Sun Jun 10 11:34:27 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Allow promote() to accept a context as the first argument so that the
promoted object can be forced into the given context.
Revision
4995 -
Directory Listing
Modified
Sun Jun 10 01:19:29 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Use numeric rather than string comparison to see if contexts are
equal.
Revision
4994 -
Directory Listing
Modified
Sun Jun 10 01:17:29 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Update to handle the fact that the Value package now includes the
context with all MathObjects. (This may still need some work.)
Revision
4993 -
Directory Listing
Modified
Fri Jun 8 12:09:53 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Added more flexible type checking for MathObject classes. This makes
it possible to correctly match types even when the context has
specified a different package to handle a given type, for example.
Revision
4991 -
Directory Listing
Modified
Fri Jun 8 02:09:21 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Update new() and make() methods to accept a context as the first
parameter (making it easier to create objects in a given context
without having to resort to a separate call to coerce them to the
given context after the fact).
Revision
4990 -
Directory Listing
Modified
Thu Jun 7 23:48:20 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
More updates to use the new Value->Package() call. This will make the
standard object-creation functions like Real() and Complex() use the
new lookup method.
Revision
4989 -
Directory Listing
Modified
Thu Jun 7 23:47:14 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
can't use inContext() with the "fake" make that produces perl reals,
so remove it for now. (Perhaps we should just go with the Reals() and
not try to be fancy about it, since it will often get converted to a
Real anyway). This will need more work.
Revision
4988 -
Directory Listing
Modified
Thu Jun 7 23:43:42 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Give the MathObjects answer checker a _filter_name so it is easier to recognize.
Revision
4987 -
Directory Listing
Modified
Thu Jun 7 21:54:46 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Added Value->Package(name[,context]) to look up what package is
currently set to handle the named type. E.g.,
Value->Package("Complex") usually returns "Value::Complex". These can
be overridden in the Context so that modified vesions of the
MathObjects can be made to replace the existing ones more easily. In
particular, the Parser classes should call these (not yet implemented)
when they create objects, so that you can override the object they
create.
Also cleaned up some more context issues (with still more to come).
Revision
4986 -
Directory Listing
Modified
Thu Jun 7 18:19:56 2007 UTC (5 years, 11 months ago) by
sroubos
Original Path:
trunk/pg
Changed POD documentation
Revision
4985 -
Directory Listing
Modified
Thu Jun 7 17:42:29 2007 UTC (5 years, 11 months ago) by
sroubos
Original Path:
trunk/pg
Make readable by POD documentation from the web
Revision
4984 -
Directory Listing
Modified
Thu Jun 7 13:20:36 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Always root the current directory in the templates directory (unless
it is an absolute reference absolute).
Include the set number in the names of PNG files, just like in GIF and
other files, so that they will not conflict with ones of the same name
in other sets.
Revision
4983 -
Directory Listing
Modified
Thu Jun 7 13:14:52 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Allow Compute() to create formulas as well as Value objects (with the
correct answer set to the original formula).
Also update some comments and formatting.
Revision
4982 -
Directory Listing
Modified
Thu Jun 7 13:12:45 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Normalized the definitions of i, j, k, etc.
Revision
4981 -
Directory Listing
Modified
Thu Jun 7 12:35:02 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Context() now always makes a copy of the context, even if it comes
from the problem's local contxt table. That way it will work
consistently no matter where the context comes from. (In the past, if
PGcourse.pl made a local copy of a context that it could modify, for
example, then Context() would not copy it when it was called, and that
means problems that relied on Context(name) resetting the context to
its original values would not work properly.
Revision
4980 -
Directory Listing
Modified
Thu Jun 7 12:30:28 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Updated to include some recent changes in documentation and removal of
old commented-out code.
Revision
4979 -
Directory Listing
Modified
Thu Jun 7 11:59:05 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
More updates for marking MathObjects with the context in which they
were created, so they should now work like the Formula objects in that
respect. As they are combined via overloaded operators, they should
pass on their contexts correctly.
Also normalized the use of getFlag() to obtain flags from the
MathObject's context rather than looking in the context directly.
This allows the math object to override the flag by setting the flag
value in the object's hash (e.g., $f->{tolerance} = .001). I've also
added the ability to override context flags via the answerHash (e.g.,
$f->cmp(tolerance => .001)), though some filtering may need to be
added to this at some point. Note that ONLY the context flags can be
overridden, not other parts of the context.
Revision
4978 -
Directory Listing
Modified
Wed Jun 6 23:23:34 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
This file is now obsolete since the functionality has been added to
the Real and Complex objects directly. So this file is maintained
only for backward compatibility.
Revision
4977 -
Directory Listing
Modified
Wed Jun 6 23:02:06 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Foxed some documentation. You use the standard "Numeric" and
"Complex" contexts, not "RealPeriodic" and "ComplexPeriodic",
for these.
Revision
4976 -
Directory Listing
Modified
Wed Jun 6 23:00:14 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Added comparisons for periodic reals and complex numbers (numbers that
match up to reduction module some number). This makes
contextPeriodic.pl obsolete, but the problems that use it should not
need to change. (It would be good to remove the loadMacros() call,
however.)
Reals and Complex numbers now overload the % operator for the modulo
operation.
Revision
4975 -
Directory Listing
Modified
Wed Jun 6 21:44:05 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
This begins some major updates to the Parser and Value libraries.
This may make the MathObjects unstable as things shake down, but I'll
try to keep that to a minimum.
This update reorganizes how the overloading of operations are
implemented. The base Value class is now overloaded rather than the
individual Value classes. This makes it easier to make subclasses
that take advantage of the overloading.
The code that handles promoting one MathObject to another has been
updated as a part of this. This should also make subclassing the
existing MathObjects more flexible.
In the past, Formula objects included a pointer to the Context in
which the object was created, but other MathObject did not. This
update is the first round of updates to include the context in the
other MathObjects, but more work needs to be done.
The changes here should not affect existing problems; it is possible
that some macro files will need to be updated, but none of the
standard ones in pg/macros seem to need it at the moment.
Revision
4974 -
Directory Listing
Modified
Wed Jun 6 17:58:03 2007 UTC (5 years, 11 months ago) by
gage
Original Path:
trunk/pg
This is an experimental version of PGcomplexmacros2Exp.pl
Revision
4969 -
Directory Listing
Modified
Thu May 24 17:55:37 2007 UTC (5 years, 11 months ago) by
gage
Original Path:
trunk/pg
Pod documentation upgrades
Revision
4968 -
Directory Listing
Modified
Thu May 24 12:44:58 2007 UTC (5 years, 11 months ago) by
gage
Original Path:
trunk/pg
Pod documentation added
Revision
4967 -
Directory Listing
Modified
Thu May 24 12:05:30 2007 UTC (5 years, 11 months ago) by
gage
Original Path:
trunk/pg
Added pod documentation
Revision
4966 -
Directory Listing
Modified
Wed May 23 17:30:35 2007 UTC (5 years, 11 months ago) by
gage
Original Path:
trunk/pg
Added Davide Cervone's methods for evaluating formulas module 2pi
Used in complex variables in particular.
Revision
4964 -
Directory Listing
Modified
Tue May 22 18:02:40 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed an error with List answer checking when one of the elements was
the constant 0 (a check for whether a value was defined was not
properly handling the case when the answer is zero (which counts as
false in a boolean check)).
Revision
4963 -
Directory Listing
Modified
Tue May 22 17:46:52 2007 UTC (5 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
When complex=>'ok' is used, make a COPY of the Complex context before
modifying it. (Otherwise we modify the ORIGINAL copy, and that is
persistent from problem to problem within one httpd child, which would
mean one problem could affect later ones.)
Revision
4962 -
Directory Listing
Modified
Wed May 16 00:36:37 2007 UTC (6 years ago) by
dpvc
Original Path:
trunk/pg
Allow Real object to override the context's number format by setting
its format field. E.g.:
Real(1.2345)->with(format=>"%.2f")
Revision
4930 -
Directory Listing
Modified
Wed Apr 18 22:37:59 2007 UTC (6 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Clear the error message in Context before it is used in an answer
checker (prevents bleading of one error into a later answer).
Revision
4928 -
Directory Listing
Modified
Tue Apr 17 00:36:16 2007 UTC (6 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Modified the way the Parser-based versions of the traditional answer
checkers get copies of their contexts. They now use a new method
getCopy to obtain the copy either from the problem's context table or
the default table (rather than only from the default). That way the
instructor can use parserCustomization.pl to customize the contexts
used by the answer checkers.
Revision
4927 -
Directory Listing
Modified
Tue Apr 17 00:31:13 2007 UTC (6 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Added a Vector2D context that has i and j defined as vectors in
2-space so that they can be used to generate vectors in 2D. This
avoids students getting the "incorrect number of coordinates" error.
Revision
4887 -
Directory Listing
Modified
Thu Mar 15 22:08:55 2007 UTC (6 years, 2 months ago) by
glarose
Original Path:
trunk/pg
Update quiz prefix for arrays. This is not a complete fix, but it
gets incrementally closer to a fix.
Revision
4877 -
Directory Listing
Modified
Wed Mar 14 00:35:38 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Added comments about working with complex variables
Revision
4867 -
Directory Listing
Modified
Sun Mar 11 16:11:20 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
This file loads Parser.pl. It is part of a campaign to replace the term "parser object"
with MathObject which should sound more intuitive for those who are unaware of the development
history of the PG language.
Revision
4866 -
Directory Listing
Modified
Sun Mar 11 11:40:46 2007 UTC (6 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a deprecated usage of defined(@result)
Revision
4856 -
Directory Listing
Modified
Wed Mar 7 18:34:55 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Added documentation
Revision
4845 -
Directory Listing
Modified
Tue Mar 6 01:52:26 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Documenation addition
Revision
4834 -
Directory Listing
Modified
Sun Mar 4 23:39:20 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Formatting changes in documentation
Revision
4833 -
Directory Listing
Modified
Sun Mar 4 23:26:12 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
More format changes to documentation
Revision
4832 -
Directory Listing
Modified
Sun Mar 4 22:50:35 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
More formatting changes.
Revision
4831 -
Directory Listing
Modified
Sun Mar 4 22:46:01 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Documentation formatting changes
Revision
4829 -
Directory Listing
Modified
Sun Mar 4 22:10:40 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Updated documentation in response to comments from Davide.
More comments welcome. :-)
--Mike
Revision
4828 -
Directory Listing
Modified
Sun Mar 4 21:06:17 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Use this macro package to define macros for
examining the current environment. Useful for
creating problems and for debugging.
Revision
4827 -
Directory Listing
Modified
Sun Mar 4 20:58:26 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Added pod documentation for these files
Revision
4826 -
Directory Listing
Modified
Sun Mar 4 20:57:00 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Correct pretty_print so that it protects for HTML output
(replaces < by <)
Revision
4825 -
Directory Listing
Modified
Sun Mar 4 20:44:37 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Correct pretty_print
so that it protects < for printing in HTML.
Replace occurences of < with < in the data
This was done with straight substitution -- perhaps a protectHTML macro should have been used?
Revision
4824 -
Directory Listing
Modified
Sat Mar 3 00:31:14 2007 UTC (6 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Only show the adaptive parameters where there actually ARE some, and
fix a typo when looking up the adaptive points when there aren't any.
Revision
4823 -
Directory Listing
Modified
Sat Mar 3 00:17:12 2007 UTC (6 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Improved Formula diagonstics when adaptive parameters are used. They
now allow you to graph the functions (they are no longer considered
multi-variable functions), and the values reported are the adapted
values rather then the unadapted correct answers. This now correctly
reflects the tests that are being performed.
Revision
4822 -
Directory Listing
Modified
Sat Mar 3 00:11:28 2007 UTC (6 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Use zeroLevelTol values when checking answers that have adaptive parameters.
Revision
4808 -
Directory Listing
Modified
Thu Mar 1 23:35:18 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Documentation additions
Revision
4806 -
Directory Listing
Modified
Thu Mar 1 22:43:38 2007 UTC (6 years, 2 months ago) by
gage
Original Path:
trunk/pg
Minor documentation changes.
Use html entity to represent dollar sign on the web.
Revision
4795 -
Directory Listing
Modified
Sun Feb 25 20:59:09 2007 UTC (6 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Avoid an infinite loop when string-values formulas are used in a List.
Allow diagonstics to work for complex-valued functions.
Revision
4773 -
Directory Listing
Modified
Sun Feb 11 04:44:27 2007 UTC (6 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Added support for uncheckable radio buttons (when JavaScript it
active). You specify an uncheckable buttons by including the
uncheckable=>1 or uncheckable=>"shift" options to the RadioButtons()
call.
Revision
4772 -
Directory Listing
Modified
Sat Feb 10 00:09:52 2007 UTC (6 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
New macros for using Radio buttons with the new Parser
Revision
4771 -
Directory Listing
Modified
Sat Feb 10 00:07:50 2007 UTC (6 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed an error with the custom list checker setting the wrong field
for the checker (OOPS!)
Revision
4767 -
Directory Listing
Modified
Sat Feb 3 15:32:06 2007 UTC (6 years, 3 months ago) by
gage
Original Path:
trunk/pg
Changed input to rungeKutta4 so that it matches the pod description --
i.e. it takes as its first argument a reference to a
subroutine defining a vectorField
as opposed to an answer hash.
Revision
4766 -
Directory Listing
Modified
Sat Feb 3 15:25:18 2007 UTC (6 years, 3 months ago) by
gage
Original Path:
trunk/pg
Added new permissable log files.
that can be written to.
Revision
4765 -
Directory Listing
Modified
Sat Feb 3 15:23:05 2007 UTC (6 years, 3 months ago) by
gage
Original Path:
trunk/pg
Begin pod documentation.
Revision
4764 -
Directory Listing
Modified
Sat Feb 3 15:20:25 2007 UTC (6 years, 3 months ago) by
gage
Original Path:
trunk/pg
added a "level" to pretty_print to prevent it from descending too far down
nested hashes. The default level is set at 3 which is probably enough for
most purposes.
Revision
4762 -
Directory Listing
Modified
Thu Feb 1 04:37:11 2007 UTC (6 years, 3 months ago) by
gage
Original Path:
trunk/pg
Removed scommented out code and
spiffed up the documentation.
--------------------------------------------------------------------
Revision
4761 -
Directory Listing
Modified
Wed Jan 31 16:17:48 2007 UTC (6 years, 3 months ago) by
gage
Original Path:
trunk/pg
Added code to multi_cmp which makes it easier to debug.
We will probably want to get rid of this entirely in favor of List answers, but meantime
I'm documenting the problems.
Revision
4760 -
Directory Listing
Modified
Wed Jan 31 16:16:44 2007 UTC (6 years, 3 months ago) by
gage
Original Path:
trunk/pg
Added space when combining preview latex strings (foo + bar became foo\quadbar which didn't work
now its foo \quad bar which is better.
Revision
4729 -
Directory Listing
Modified
Sat Dec 16 14:10:12 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Add a new operator // to be the same as / except its TeX form is a/b
rather than \frac{a}{b}. This makes it possible get horizontal
fractions in exponents, for example, where vertical fractions often
don't look so good.
Revision
4728 -
Directory Listing
Modified
Sat Dec 16 14:07:58 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Use Perl reals rather than Parser Reals in matrix for adaptive
parameters.
Revision
4727 -
Directory Listing
Modified
Sat Dec 16 14:07:22 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Fixed type in comment.
Revision
4701 -
Directory Listing
Modified
Tue Dec 5 23:23:07 2006 UTC (6 years, 5 months ago) by
sh002i
Original Path:
trunk/pg
changes for DelayedMailer
Revision
4680 -
Directory Listing
Modified
Tue Nov 28 19:12:12 2006 UTC (6 years, 5 months ago) by
sh002i
Original Path:
trunk/pg
SECURITY: tighter constraints on which macro files can be loaded without
restriction. Previously, any file that *contained* the strings PG.pl,
dangerousMacros.pl, or IO.pl would be loaded with an empty opmask.
This is the second attempt to close this hole. The previous attempt
assumed that | binds tighter than ^ and $, which is not true. (Noticed
by dpvc). It also failed to escape metacharacters in the file names.
Revision
4679 -
Directory Listing
Modified
Mon Nov 27 22:11:54 2006 UTC (6 years, 5 months ago) by
sh002i
Original Path:
trunk/pg
added mail_answers_to3, which currently does not work, to eventually
replace mail_answers_to2, which also does not work.
I thought now would be a good time to commit this, so that others can
look at it if they like. The problem is that when RestrictedMailer is
used within a PG safe compartment, it hangs on opening the SMTP
connection and the problem times out after 60 seconds.
This mockup I made works perfectly however, and I can't see how the PG
safe compartment is different. Here it is:
my $mailer = new WeBWorK::Utils::RestrictedMailer(
params => {
from => 'sh002i@math.rochester.edu',
smtp => 'mail.math.rochester.edu',
headers => 'X-Remote-Host: 128.151.231.10',
debug => "debug.txt",
keepconnection => 1,
subject => "generic subject",
on_errors => 'die',
},
lock_by_default => 1,
allow_change => [qw/fake_from to fake_to cc fake_cc bcc/],
allowed_recipients => [qw/sh002i@math.rochester.edu sam@uofr.net/],
fatal_errors => 1,
);
my $rmailer = new WeBWorK::Utils::RestrictedClosureClass($mailer,
qw/Open SendEnc Close Cancel skipped_recipients error error_msg/);
my $safe = new Safe;
${$safe->varglob('the_date')} = `date`;
my $hole = new Safe::Hole {};
my $rmailer_wrapped = $hole->wrap($rmailer);
${$safe->varglob('TEST')}{rmailer} = $rmailer_wrapped;
my $result = $safe->reval(<<'EOF');
my $rmailer = $TEST{rmailer};
my $open_result = $rmailer->Open({
to => 'sam@uofr.net',
#subject => "this is only a test",
});
print "open_result=$open_result\n";
my $sendenc_result = $rmailer->SendEnc("Hello world, the time is " . $the_date);
print "sendenc_result=$sendenc_result\n";
$rmailer->Close;
EOF
die "reval threw an exception: $@" if $@;
Revision
4678 -
Directory Listing
Modified
Mon Nov 27 18:57:41 2006 UTC (6 years, 5 months ago) by
sh002i
Original Path:
trunk/pg
formatting, ordering
Revision
4673 -
Directory Listing
Modified
Mon Nov 27 04:21:59 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Moved the guts of this to pg/lib/Parser/Legacy/NumberWithUnits.pl,
since most of the code is common. This is a shell that now only
defines the FormulaWithUnits() function.
Revision
4672 -
Directory Listing
Modified
Mon Nov 27 04:20:40 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Abstracted the NumberWithUnits to a more general ObjectWithUnits and
moved the FormulaWithUnits to this file as well, since most of the
code is common. Although, strictly speaking, FormulaWithUnits is not
legacy code, since the general object-with-units is here, it will be
easier to maintain FormulaWithUnits here as well. When the Parser
gets a real units class, all of this can be removed.
Also fixed the unit lookup code to use the actual names from the Units
library, so we can now be more accurate about determining the extent
of the units, and can handle things like '5 kg m / s' now. In the
case of ambiguous formulas with units, e.g., '5m kg' where m is a
variable, use '5*m kg' or '(5m) kg'.
Revision
4671 -
Directory Listing
Modified
Mon Nov 27 02:01:24 2006 UTC (6 years, 5 months ago) by
gage
Original Path:
trunk/pg
Make
Units::fundamental_units and
Units::known_units public hashes.
Revision
4670 -
Directory Listing
Modified
Mon Nov 27 00:08:31 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Fixed usage comments to do formulas rather than just numbers.
Revision
4669 -
Directory Listing
Modified
Mon Nov 27 00:00:46 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
The Units.pm library only accepts one division within the units, and
the Parser wasn't taking that into account, so students could enter
m/s/s and still get credit even if the units were m/s. This have been
fixed.
Revision
4668 -
Directory Listing
Modified
Sun Nov 26 23:59:22 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Provides a formula with units (as opposed to a number with units).
This does introduce some ambiguity issues, since variable names could
look like units in some cases. E.g., s + 5 m/s could look like
(s + 5*m/s) rather than (s + 5) meters/second.
The parser will take the largest string at the end of the answer that
could be treated as units so s + 5m/s is (s+5) meters/second.
The Units.pm library requries units to be separated by * or / and
only one / is allowed, so s + 5m s is (s+5m) seconds not (s+5) m*s.
Something like 5 m/s/s will generate an error (it shouold be written
m/s*s or m/s^2), and 5 kg m/s should be written 5 kg*m/s.
[If we made the hash of known units be public rather than private in
Units, we could do a better job of this, and could treat kg m/s as
kg*m/s for example.]
Revision
4667 -
Directory Listing
Modified
Sun Nov 26 21:58:43 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem where the TeX version included two copies of the units
(one in TeX mode and one from the string() output).
Revision
4666 -
Directory Listing
Modified
Sun Nov 26 21:57:39 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Updated NumberWithUnits to use Parser::LEgacy::NumberWithUnits rather
than having a separate implementation here. This will guarantee that
it is consistent with num_cmp() and prevents unneeded duplication of
code.
Revision
4665 -
Directory Listing
Modified
Sun Nov 26 21:28:40 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Didn't need to override the perl fields for the integer-only methods,
since all the checking is done in the parser.
Revision
4664 -
Directory Listing
Modified
Sun Nov 26 21:15:24 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
This file implements special power operators that check for special
conditions (like no powers of 'e', or only integer powers). See the
contents of the file for documentation.
Revision
4663 -
Directory Listing
Modified
Sun Nov 26 20:30:17 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Added ability to have additional information given when not enough
test points can be generated for a function comparison. By default,
this information is NOT shown (since it could give students additional
information about what answer is expectd). Professors can request it
by setting the 'showTestPointErrors' flag in the Context().
Revision
4662 -
Directory Listing
Modified
Sun Nov 26 20:11:03 2006 UTC (6 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Allow overridden Parser classes to generate error messages that the
student will see. (For formulas, error messages are trapped silently
by the overridden == and will not be seen. This lets Parser objects
force a message to be seen.)
Revision
4654 -
Directory Listing
Modified
Wed Nov 15 16:50:05 2006 UTC (6 years, 6 months ago) by
sh002i
Original Path:
trunk/pg
SECURITY: tighter constraints on which macro files can be loaded without
restriction. Previously, any file that *contained* the strings PG.pl,
dangerousMacros.pl, or IO.pl would be loaded with an empty opmask.
Revision
4626 -
Directory Listing
Modified
Fri Nov 3 23:35:31 2006 UTC (6 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Made str_cmp accept blank answers again. Fixes bug #1123.
Note: if you use blank answers, the "n of the questions remain
unanswered" message will tell you how many of the answers should be
left blank. It is probably worth working out a method of having blank
entries that are only marked correct when all the other answers are
correct (this would take a special grader; I have this as part of the
weighted grader, but it is not common knowledge).
Revision
4625 -
Directory Listing
Modified
Fri Nov 3 23:05:37 2006 UTC (6 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with checking Matrices of dimension 1 x n.
(Fixes bug 1122.)
Revision
4583 -
Directory Listing
Modified
Mon Oct 23 11:43:40 2006 UTC (6 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Make sure \cdot is only used for a numeric right-hand part (finishes
fix of bug 1114).
Revision
4582 -
Directory Listing
Modified
Mon Oct 23 11:38:14 2006 UTC (6 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Use \cdot when a number is followed by a numeric fraction.
(Fixes bug 1114.)
Revision
4571 -
Directory Listing
Modified
Fri Oct 13 21:43:47 2006 UTC (6 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with function checking when vars are specified with
limits and the vars are not in alphabetical order. (The Parser expects
the limits and test points to have coordinates specified in
alphabetical order, so they need to be reordered if the author has
them in another order.)
Revision
4562 -
Directory Listing
Modified
Tue Oct 10 15:45:11 2006 UTC (6 years, 7 months ago) by
jj
Original Path:
trunk/pg
Catch errors which get thrown by other filters.
Revision
4546 -
Directory Listing
Modified
Thu Oct 5 11:10:06 2006 UTC (6 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed bad check for if the complex number is 1 (caused reduce to
incorrectly remove the complex number when used in multiplication).
Revision
4528 -
Directory Listing
Modified
Wed Sep 27 17:15:18 2006 UTC (6 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem where a zero with units would me marked as "not looking
like anumber with units".
Revision
4513 -
Directory Listing
Modified
Fri Sep 22 16:36:57 2006 UTC (6 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Make ijk mode use the TeX definitions from the i, j and k constants as
defined in the context, if they exist, otherwise fall back on the
defaults.
Revision
4512 -
Directory Listing
Modified
Thu Sep 21 22:08:49 2006 UTC (6 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fix problem with formula comparisons involving vector-valued formulas.
The coordinates for the vectors used in checking equality were plain
Perl reals rather than Parser-based reals, and so the comparisons were
being done using exact rather than fuzzy comparisons.
Revision
4511 -
Directory Listing
Modified
Wed Sep 20 23:38:38 2006 UTC (6 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Make a more sophisticated unit check so that it will handle things
like "3ft / s" (that don't have a space before the units).
Really need to make a units class for the Parser.
Revision
4510 -
Directory Listing
Modified
Wed Sep 20 21:50:56 2006 UTC (6 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed unit checking so that units can include spaces (like 4 ft /
min). Also fixed a problem where units were not being reported as
part of the student's entered answer.
Revision
4488 -
Directory Listing
Modified
Mon Sep 11 22:23:45 2006 UTC (6 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow matrices to set their own templates (instead of using "c" for
all columns), and handle missing open and close delimiters better.
Revision
4487 -
Directory Listing
Modified
Mon Sep 11 22:21:49 2006 UTC (6 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow the _check subroutine to affect the {isConstant} field.
Revision
4464 -
Directory Listing
Modified
Sat Sep 9 00:22:13 2006 UTC (6 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Add parenthesis around ijk vectors for string concatenation.
Revision
4454 -
Directory Listing
Modified
Thu Sep 7 01:18:08 2006 UTC (6 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added ability to overrid TeX and perl versions by specifying a TeX or
perl field in the variable definition. Also made vector-valued
variables show up in bold.
Revision
4424 -
Directory Listing
Modified
Tue Aug 29 11:14:28 2006 UTC (6 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Check routine can now return an array rather than an array reference.
(This requires pg/lib/Value/AnswerCheckers.pm to be at least version 1.80).
Revision
4423 -
Directory Listing
Modified
Tue Aug 29 11:12:56 2006 UTC (6 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Allow cmp_compare to return an array of answers, if requested (needed
by parserMultiPart.pl).
Revision
4388 -
Directory Listing
Modified
Sat Aug 19 23:31:38 2006 UTC (6 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed the problem I pointed out at MathFest where some errors were not
being reported in the traditional num_cmp() function. (Things like
'x+3' in a numeric field would not be reported as an error and x would
be treated as 0). This is due to a change in version 1.14 when Sam
was normalizing the error reporting code; he didn't notice that warn
had been rerouted to die in PG_answer_eval(). I have replaced it.
Revision
4386 -
Directory Listing
Modified
Thu Aug 17 23:55:17 2006 UTC (6 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added LaTeXMathML mode.
Revision
4385 -
Directory Listing
Modified
Wed Aug 16 01:42:46 2006 UTC (6 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Report the objec type better in parser error messages.
Revision
4384 -
Directory Listing
Modified
Wed Aug 16 01:41:02 2006 UTC (6 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed spelling errors in error messages.
Revision
4383 -
Directory Listing
Modified
Wed Aug 16 01:40:06 2006 UTC (6 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem where Set objects could incorrectly complain about the
parentheses (braces) used to declare the set.
Revision
4382 -
Directory Listing
Modified
Wed Aug 16 01:37:28 2006 UTC (6 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug where substituting values into a Formula object would not
be cleaned up properly (so later actions could incorrectly include the
same substitution).
Revision
4379 -
Directory Listing
Modified
Mon Aug 14 18:24:44 2006 UTC (6 years, 9 months ago) by
sh002i
Original Path:
trunk/pg
allow partial URLs in appletPath -- these get the server_root_url
prepended to them.
Revision
4363 -
Directory Listing
Modified
Wed Aug 9 14:32:14 2006 UTC (6 years, 9 months ago) by
sh002i
Original Path:
trunk/pg
append "1;" to these files, to satisfy Apache2.
Revision
4318 -
Directory Listing
Modified
Sat Jul 29 16:19:18 2006 UTC (6 years, 9 months ago) by
gage
Original Path:
trunk/pg
Added rungeKutta4 method to PGnumericalmacros.pl Updated documentation on rungeKutta4a, an answer filter in PGdiffeqmacros.pl
Revision
4301 -
Directory Listing
Modified
Wed Jul 26 13:23:09 2006 UTC (6 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Allow matrices to be created from lists of vectors or points, or from
formulas returning vectors or points.
Revision
4300 -
Directory Listing
Modified
Wed Jul 26 13:18:25 2006 UTC (6 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem with derivatives of constant-valued Matrices (and
vectors and points). They were incorrectly getting an extra level of
nesting.
Revision
4299 -
Directory Listing
Modified
Wed Jul 26 12:27:07 2006 UTC (6 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Extended the differentiation operator to handle multiple derivatives:
$f->D("x","y") is the same as $f->D("x")->D("y")
$f->D(2) is the same as $f->D->D
$f->D(2,"x") is the same as $f->D("x")->D("x")
and so on.
Revision
4298 -
Directory Listing
Modified
Wed Jul 26 02:54:01 2006 UTC (6 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Extended this context to handle multivariable polynomials. So you can
use things like
loadMacros("contextLimitedPolynomial.pl");
Context("LimitedPolynomial")->variables->are(x => 'Real', y => 'Real');
Context()->flags->set(singlePowers=>1);
$f = Formula("1 + x + y + 2xy + x^2 + y^2");
Revision
4275 -
Directory Listing
Modified
Mon Jul 17 21:12:44 2006 UTC (6 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make FUNCTION_CMP retain the professor's answer exactly as typed
rather than use the parsed version's reconstructed string.
Revision
4181 -
Directory Listing
Modified
Wed Jun 28 19:15:03 2006 UTC (6 years, 10 months ago) by
jj
Original Path:
trunk/pg
Fixed bug which caused warnings in problems containing hints and/or solutions
containing math (i.e., requiring images).
Revision
4144 -
Directory Listing
Modified
Fri Jun 23 22:07:44 2006 UTC (6 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Use tolerance flags from the Real object itself, if available, before
looking at the context.
Revision
4143 -
Directory Listing
Modified
Fri Jun 23 22:06:47 2006 UTC (6 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fix some problems with the Diagonstics output for Formula objects.
(The tolerances using in the diagnostics didn't always match the ones
used in the actual testing, and the wrong values were sometimes
displayed when a multi-variable function was displayed as a graph.)
Revision
4134 -
Directory Listing
Modified
Mon Jun 19 15:13:33 2006 UTC (6 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed grade_problem so taht is uses the safe compartment. (This is
important because the problem can supply its own grader, and that code
shoudl be run in the safe compartment, just like the answer checkers
are. Without this, graders could call PG_restricted_eval() and
actually get access to the full WW environment rather than the safe
compartment.)
Revision
4124 -
Directory Listing
Modified
Wed Jun 7 23:01:44 2006 UTC (6 years, 11 months ago) by
gage
Original Path:
trunk/pg
Make sure that WeBWorK::Constants has been loaded before this file is evaluated.
Revision
4121 -
Directory Listing
Modified
Mon Jun 5 20:43:22 2006 UTC (6 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem where things like x+4x would be accepted even in
single-power mode (the initial x was not being identified as a single
power of x correctly).
Revision
4098 -
Directory Listing
Modified
Tue May 23 20:45:02 2006 UTC (6 years, 11 months ago) by
gage
Original Path:
trunk/pg
Added support for searching for appletin anumber of places defined in
$pg{directories}{appletPath} in global.conf
Revision
4093 -
Directory Listing
Modified
Tue May 23 11:51:55 2006 UTC (6 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem where a pick screen error was produced if a student
entered a vector-valued formula rather than a constant vector when
parallel answers are being checked and the student used the Preview
button to submit the answer.
Revision
4088 -
Directory Listing
Modified
Sun May 21 00:44:40 2006 UTC (7 years ago) by
gage
Original Path:
trunk/pg
added findAppletFile to dangerous macros.
This is still not in its final form which should involve checking the url
rather than the file location.
Revision
4044 -
Directory Listing
Modified
Thu Apr 6 00:23:59 2006 UTC (7 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug that caused can error when a Complex1 object was passed to
the answer checker (rather than a string that needs to be parsed).
Revision
4043 -
Directory Listing
Modified
Thu Apr 6 00:20:01 2006 UTC (7 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Fixed getFlag so that it sodesn't accidentally create the {context}
field of an object that doesn't already have one (Perl will create
hashes that don't already exist if you reference them). This was
causing problems with the ans_array processing
Revision
4041 -
Directory Listing
Modified
Fri Mar 31 22:59:43 2006 UTC (7 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
A change to the way lists are processed in AnswerChecker.pm in
December (v1.75) requires that implicitList => 0 be added to the
defaults for variable_cmp().
Revision
4028 -
Directory Listing
Modified
Sat Feb 18 22:42:55 2006 UTC (7 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Change check for zero from fuzzy check to strict check (when the
problem used absolute tolerances, in particular, this can causebig
problems).
Revision
3992 -
Directory Listing
Modified
Mon Jan 30 16:20:09 2006 UTC (7 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
When checking for division by zero, don't do fuzzy check.
Revision
3971 -
Directory Listing
Modified
Wed Jan 25 12:47:17 2006 UTC (7 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Forward port to HEAD (Prevent "unquoted dx may conflict with future
usage" messages.)
Revision
3915 -
Directory Listing
Modified
Tue Jan 17 02:20:19 2006 UTC (7 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with formula-valued matrices producing an error message
incorrectly. (Was checking the wrong attribute of the entries.)
Revision
3913 -
Directory Listing
Modified
Tue Jan 17 01:56:24 2006 UTC (7 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with variables that are multiplied with no space between
them (e.g., "ax") that was introduced when I changed the pattern to
allow multi-letter variable names.
The solution is to first check against the defined names before
checking for the more complete name pattern.
Revision
3912 -
Directory Listing
Modified
Fri Jan 13 21:15:19 2006 UTC (7 years, 4 months ago) by
sh002i
Original Path:
trunk/pg
changed license and readme to have generic "2.x" version numbers and no
specific readme test. (i may add some message about this being an
unreleased development version or something at a later date.)
Revision
3872 -
Directory Listing
Modified
Sat Dec 31 16:31:48 2005 UTC (7 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Added ability to supply a code reference (rather than a Value object)
for the typeMatch and extra fields for the List answer checker (and
the String answer checker). This makes these more useful in
overriding the match for specific problems that want better error
messages, for example.
Revision
3871 -
Directory Listing
Modified
Sat Dec 31 16:29:29 2005 UTC (7 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Avoid error when a CODE reference is checked to see if it is a Value object.
Revision
3870 -
Directory Listing
Modified
Sat Dec 31 15:00:37 2005 UTC (7 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Added ability to specify variables that are part of the union/list
rather than requiring just constants. E.g.,
interval_cmp("(1,a),(2a-1,a)",unions=>'no',var=>'a');
or
interval_cmp("(x,y),(2x,3y)",unions=>'no',vars=>['x','y']);
Revision
3869 -
Directory Listing
Modified
Sat Dec 31 14:57:39 2005 UTC (7 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Added a new flag that controls how a list with a single entry that is
a list is handled. In the past, the student could not specify such an
item, but now the default is to form a list with a single entry that
is a list, provided the student has used parens explicitly around his
list. So "1,2" will be a list with two items and "(1,2)" will be a
list with one item (a list). This improves the ability to use the
list checker for lists of arbitrary pairs (like "(1,max)") especially
when you want to check for lists of these (e.g., "(1,max),(2,min)"),
since otherwise a single pair "(1,max)" entered by the student would
become the list "1,max" rather than the list containing the single
pair.
If you really want "(1,max)" to become the list "1,max", use
List("1,max")->cmp(implicitList=>0);
to prevent single lists from forming a list of a single item.
Revision
3868 -
Directory Listing
Modified
Sat Dec 31 02:42:46 2005 UTC (7 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Now that the Parser allows multi-letter variable names, there is no
need to handle C0 specially.
Revision
3867 -
Directory Listing
Modified
Sat Dec 31 02:41:16 2005 UTC (7 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Now that the parser accepts multi-character variables, there is no
need for the special treatment of dx. Also, allow the context to
specify the default variable to use, and if not available, take the
LAST varaible alphabetically, not the first. (x is more likely to be
last, and the author might have added dx as a variable so that it will
not cause an error if used in other answers in the problem, for
example.)
Revision
3866 -
Directory Listing
Modified
Sat Dec 31 01:39:54 2005 UTC (7 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Allow multi-letter variable names and names like x1, x2, etc.
Revision
3814 -
Directory Listing
Modified
Wed Dec 14 17:47:00 2005 UTC (7 years, 5 months ago) by
sh002i
Original Path:
trunk/pg
Really fix fun_cmp equivalence warning message.
We show the equivalence message when: we're not in preview mode AND the
answers are equivalent AND the answers are not identical. We DON'T CARE
whether the answers are correct or not, because that leaks information
in multipart questions when $showPartialCorrectAnswers is off.
Both the Parser-version (FUNCTION_CMP) and the non-Parser-version
(ORIGINAL_FUNCTION_CMP) behave as descibed above now.
And this time we test *before* we commit...
Revision
3812 -
Directory Listing
Modified
Wed Dec 14 00:51:23 2005 UTC (7 years, 5 months ago) by
sh002i
Original Path:
trunk/pg
parser version was ok, bug #752 fixed in non-parser version.
Revision
3808 -
Directory Listing
Modified
Tue Dec 13 18:23:46 2005 UTC (7 years, 5 months ago) by
sh002i
Original Path:
trunk/pg
give answer is equivalent message regardless of correctness.
fixes bug #752.
Revision
3800 -
Directory Listing
Modified
Wed Dec 7 16:13:48 2005 UTC (7 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Prevent error message when num_cmp specifies the same string more than
once (e.g., upper and lower case versions of the same thing).
Revision
3792 -
Directory Listing
Modified
Mon Dec 5 16:09:56 2005 UTC (7 years, 5 months ago) by
sh002i
Original Path:
trunk/pg
Corrected error message when mailing to an address is not allowed. This
used to refer to the courseWeBWorK.ph file, which is WW1-specific. It
now mentions global.conf and course.conf.
Revision
3782 -
Directory Listing
Modified
Thu Dec 1 13:17:27 2005 UTC (7 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem with not including parentheses when a negative number
is the base of a power. (And in general, when a negative is used as an
operand of a higher-precendence operation, but it really only affected
powers.)
Revision
3781 -
Directory Listing
Modified
Tue Nov 29 21:25:25 2005 UTC (7 years, 5 months ago) by
apizer
Original Path:
trunk/pg
Add underscores to the anonymous unique identifier for
questionnaires in WW 2 by using
${setNumber}_${courseName}_$psvnNumber
Revision
3769 -
Directory Listing
Modified
Mon Nov 21 13:13:35 2005 UTC (7 years, 5 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem with formatStudentAnswer not being defined in the
special context created for this answer checker.
Revision
3765 -
Directory Listing
Modified
Thu Nov 17 22:57:39 2005 UTC (7 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Handle the new global.conf setting for jsMath's processDoubleClicks option.
Revision
3763 -
Directory Listing
Modified
Thu Nov 17 13:21:43 2005 UTC (7 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Give better error messages when the entries in Points, Vectors and
Matrices are not of the right type.
Revision
3762 -
Directory Listing
Modified
Thu Nov 17 13:20:50 2005 UTC (7 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Adjusted the parentheses slightly so that matrices will only be formed
in Matrix context, not Point or Vector context (this produced
confusing messages for students in some circumstances where they didn't
balence their parentheses correctly).
Revision
3759 -
Directory Listing
Modified
Sat Nov 12 01:31:10 2005 UTC (7 years, 6 months ago) by
gage
Original Path:
trunk/pg
Roll back my changes. Use Davide's method of detecting the preview Button
Revision
3758 -
Directory Listing
Modified
Sat Nov 12 00:58:57 2005 UTC (7 years, 6 months ago) by
gage
Original Path:
trunk/pg
Check to see if $inputs_ref->{previewAnswers} is defined. If it is then
the preview button has been pressed. In this case emit a warning if
the answer has been given previously regardless of whether the answer is
correct or incorrect. The warning message indicates that the previous
matching answer might have been either a preview or a submitted answer.
Let's see how this works.
Revision
3757 -
Directory Listing
Modified
Sat Nov 12 00:50:07 2005 UTC (7 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Take care of the issue where Preview could be used to gather
information about whether an answer is correct by using the "this
answer is the same as the previous one" message. Now if Preview is
used, the warning is given whether the answer is right or not.
(Maybe it is not necessary to check for correct at all, since that was
there to prevent the message from being issued when there are multiple
answer blanks and the student is working on other ones. But the exact
match check will take care of those. Should the message be issued if
the student changes a correct answer to an equivalent one?)
Revision
3756 -
Directory Listing
Modified
Sat Nov 12 00:34:33 2005 UTC (7 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Updated a comment to make it more accurate.
Revision
3755 -
Directory Listing
Modified
Sat Nov 12 00:31:22 2005 UTC (7 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Make had the right idea, but used the wrong context (or what might be
the wrong context in some circumstances).
Revision
3754 -
Directory Listing
Modified
Sat Nov 12 00:30:31 2005 UTC (7 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Roll back Mike's change, since this can cause unwanted error messages
in list comparisons and other situations where the equality check
could compare different types of objects (for example) or where the
comparison could legitimately fail. We only want to report errors
here when the user-supplied checker code fails.
This change would cause errors to be reported, for example, when the
user (incorrectly) entered a vector one time and then a formula
(correctly) the next time. When the previous answer is checked against
the current one, this change would report an error rather than
silently ignoring the error, as it should.
Revision
3753 -
Directory Listing
Modified
Sat Nov 12 00:13:03 2005 UTC (7 years, 6 months ago) by
gage
Original Path:
trunk/pg
Changes to code checking whether the previous answer is equivalent to the current answer.
In this module additional code was answer to check for errors in the overloaded ==
in case the two Values can't be compared.
In PGanswermacros.pl the filter which handles "parse_previous_answer"
was modified to make sure the context is the same in the previous answer and the current answer.
Revision
3752 -
Directory Listing
Modified
Sat Nov 12 00:12:54 2005 UTC (7 years, 6 months ago) by
gage
Original Path:
trunk/pg
Changes to code checking whether the previous answer is equivalent to the current answer.
In this module additional code was answer to check for errors in the overloaded ==
in case the two Values can't be compared.
In PGanswermacros.pl the filter which handles "parse_previous_answer"
was modified to make sure the context is the same in the previous answer and the current answer.
Revision
3735 -
Directory Listing
Modified
Mon Oct 31 21:19:40 2005 UTC (7 years, 6 months ago) by
apizer
Original Path:
trunk/pg
Create an anonymous unique identifier for
questionnaires in WW 2 by using
$setNumber$courseName$psvnNumber in place of
$psvnNumber.
Revision
3723 -
Directory Listing
Modified
Thu Oct 20 00:57:19 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
A new parser object that handles popup menus. Mainly this is so that
you can use them with the MultiPart object, which requires all the
objects to be Value objects. See the comments in the file for
documentation and examples.
Revision
3716 -
Directory Listing
Modified
Sun Oct 16 03:37:17 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
In the past, when Value objects were inserted into strings, they would
automatically include parentheses so that if you had $f equal to 1+x
and $g equal to 1-x, then Formula("$f/$g") would mean (1+x)/(1-x)
rather than 1+(x/1)-x, which is what would happen as a straing string
substitution.
The problem is that this would also happen for real numbers, vectors,
and everything else, even when it wasn't necessary. So if $x=Real(3),
then "Let x = $x" would be "Let x = (3)".
I have changed the behavior of the string concatenation for Value
objects so that parentheses are only added in a few cases: for
Formulas, Complex numbers, and Unions. This makes the other Value
objects work more like regular variables in strings, but might cause
some problems with strings that are used as formulas. For example, if
$a = Real(-3), then "x + 2 $a" will become "x + 2 -3", or "x-1" rather
than the expected "x - 6". (The old approach would have made it "x +
2 (-3)" which would have worked properly). For the most part, it is
easier to use something like "x + 2*$a" or even "x" + 2*$a in this
case, so the extra trouble of having to avoid parentheses when you
really meant to substitute the value into a string didn't seem worth
it.
Revision
3715 -
Directory Listing
Modified
Sun Oct 16 03:27:35 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Added a new experimental diagonstic function for the function answer
checker. When enabled, it will produce graphs of the correct answer,
the student answer, and the absolute and relative errors, and will
list the data points used in the comparison, plus the numerical values
of the results and errors.
To enable the diagnostic, use
ANS(fun_cmp($f,diagnostics=>1));
Note that only single-variable functions can be graphed at the moment,
so if you are using a multi-variable check, you need to disable the
graphing. To do this use
ANS(fun_cmp($f,vars=>['x','y'],diagnostics=>[showGraphs=>0]));
The diagnostic mode is only available for the Parser-based versions of
the function checker, and (of course) with the native Parser objects
as well:
ANS(Formula($f)->cmp(diagnostics=>1));
There are now Context settings to control the diagnostics, which can
be set through Context()->diagnostics->set(). For example
Context()->diagnostics->set(formulas=>{showGraphs=>0});
would turn off graphs for all functions comparisons. Some of the
other values you can set are:
formulas => {
showTestPoints => 1, # show the test points and function values
showRelativeErrors => 1, # show the relative errors for the student answer
showAbsoluteErrors => 1, # show the absolute errors for the student answer
showGraphs => 1, # show the various graphs
graphRelativeErrors => 1, # show the relative error graph
graphAbsoluteErrors => 1, # show the absolute error graph
clipRelativeError => 5, # don't show relative errors above 5
clipAbsoluteError => 5, # don't show absolute errors above 5
plotTestPoints => 1, # include dots at the test points
combineGraphs => 1, # show correct and student graphs in one image
},
graphs => {
divisions => 75, # the number of data points to plot
limits => [-2,2], # the lower and upper limit of the plot
# (taken from the function limits if not provided)
size => 250, # pixel size of the image (could be [width,height])
grid => [10,10], # number of grid lines in each direction
axes => [0,0], # where to put axes relative to origin
}
Any of these can be set in the Context(), or in the answer checker
itself. If you set diagnostics to an array reference, the entries in
the array refer to element of the formulas hash. If you set
diagonstics to a hash reference, then you can set values in either the
formulas or graphs hashes, as in:
ANS(Formula($f)->cmp(diagnostics=>{
formulas => {showAbsoluteErrors=>0},
graphs => {size=>300, divisions=>100},
}));
If you want all function checkers to show diagnostics, use
Context()->diagonstics->set(formulas=>{show=>1});
The image file names are modified to include the current time so that
the names will be unique. This avoids problems with the browser cache
showing a old image when a new one has been generated. But this also
means that the temporary image directory will fill up fast, so you may
need to empty it if you use the diagnostic images frequently.
This is just a first attempt at a diagnostic feature. I think it will
help when you are not sure if the tolerances are set properly, or if
you think a student answer should be markes correct but isn't, as it
will point out which point(s) are not being accepted.
Revision
3714 -
Directory Listing
Modified
Sun Oct 16 02:44:34 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Modified context data objects to provide a copy method so that the
various types of data can copy themselves (and can provide a more
comprehensive copy if necessary).
Revision
3713 -
Directory Listing
Modified
Fri Oct 14 23:33:58 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Let Parser object's cmp(debug=>1) option set the debug feature of the
answer evaluator.
Revision
3704 -
Directory Listing
Modified
Tue Oct 11 17:59:30 2005 UTC (7 years, 7 months ago) by
jj
Original Path:
trunk/pg
Added syntactic sugar for pop_up_lists.
A common situation is that a problem includes a short multiple-choice question along with other answers. Often, these questions are written as fill-in-the-blank where the student is told a list of legal words to put in the blanks. The idea is to make it as simple as possible for problem writers to replace the fill-in-the-blank with a drop-down list of alternatives.
So, now the text of a problem can contain
is the function increasing on [0,1]? \{ pop_up_list(['?', 'yes', 'no']) \}
instead of
is the function increasing on [0,1]? \{ pop_up_list('?' => '?', 'yes' => 'yes', 'no' => 'no') \}
The result is checked with something like
ANS(str_cmp('yes'));
Existing problems are unaffected since the added syntax uses a reference to a list (the extra square brackets).
Revision
3703 -
Directory Listing
Modified
Mon Oct 10 23:47:26 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Add a new context flag that controls how the student answer should be
displayed. The formatStudentAnswer flag can be set to 'evaluated'
(the default), which shows the final numeric answer; 'parsed', which
shows the fully parsed version (including extra parentheses for
clarity); or 'reduced', which performs constant operations, but
doesn't perform function evaluations or named-constant substitutions.
For example, if the student answers 1+2+sqrt(3), then 'evaluated' will
produce 4.73205, 'reduced' will show 3+sqrt(3), and 'parsed' will
show 1+2+sqrt(3).
Revision
3702 -
Directory Listing
Modified
Mon Oct 10 23:41:05 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
If constant functions are not being reduced, don't mark the function
call as constant (since otherwise it might be evaluated later accidentally).
Revision
3696 -
Directory Listing
Modified
Mon Oct 10 12:37:13 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug where correct_ans could not be overridden in the cmp()
method for Lists.
Revision
3689 -
Directory Listing
Modified
Fri Oct 7 02:38:41 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Corrected a problem with contexts not being reset properly after
num_cmp or fun_cmp.
Revision
3680 -
Directory Listing
Modified
Sun Oct 2 12:13:16 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Removed unneeded "my" for a varaible that is already local.
Revision
3679 -
Directory Listing
Modified
Sat Oct 1 01:17:24 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Major update to allow ImplicitPlane objects to be created
automatically by the Parser when it sees equal signs. This makes it
possible to use ImplicitPlanes in Lists. (Before, when the List was
turned into a Formula returning a List, the equality became a plane
old equality rather than an ImplicitPlane object.)
This is a bit of a hack for now until I can make List and other Value
objects be allowed to have Formulas as their entries rather than turn
into Formulas returning Lists (or whatever type).
Revision
3678 -
Directory Listing
Modified
Sat Oct 1 01:13:27 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Handle the names of entries in Lists and Formulas returning lists
better. Also do better typechecking on these lists. Finally, allow
better typechecking for String objects that are being used when a
Formula answer is allowed.
Revision
3677 -
Directory Listing
Modified
Sat Oct 1 01:10:27 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Allow context to override object class used to create formula objects
(so that things like ImplicitPlane can create instances of themselves
automatically when needed).
This mechanism needs to be enlarged to encompass the other Value
object classes as well (like the Context()->{parser}{...} hash).
The real problem is that the List object probably shouldn't create a
formula returning a list when it is passed formulas, since there
really isn't much need for a formula returning a list to be
autogenerated (you can create one by hand using Formula if needed).
Right now, ALL the Value objects make themselves into Formulas when
one of their entries is a formula. For example, Point(1,"x") produces
the same thing as Formula("(1,x)"), and List(1,"x") is the same as
Formula("1,x"). This is good for points, but not so good for lists.
And it might sometimes be nice to have a Vector of Formulas, or a
Matrix with Formula entries (rather than Formulas returning Vectors or
Matrices). But this would require some serious changes internally in
the Value objects, which make assumptions about their values being
constant. Changing that will be for another day...
Revision
3676 -
Directory Listing
Modified
Sat Oct 1 00:59:06 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Correctly create Formula returning List when a list has formula
entries.
Revision
3670 -
Directory Listing
Modified
Thu Sep 29 22:08:43 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Only add the 'dx' variable if it isn't already in the context.
Revision
3669 -
Directory Listing
Modified
Thu Sep 29 22:02:07 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem with the automatic upgrading of object classes for
when Value objects are subclassed but are not entered into the
precedence list.
Revision
3662 -
Directory Listing
Modified
Wed Sep 28 20:40:20 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug where if you specified a variable other than dx, the
division by zero check didn't work properly.
Revision
3661 -
Directory Listing
Modified
Wed Sep 28 11:11:29 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typo in comments.
Revision
3655 -
Directory Listing
Modified
Mon Sep 26 04:11:25 2005 UTC (7 years, 7 months ago) by
gage
Original Path:
trunk/pg
Changed the numerical values of lbf to make it more accurate (assuming that lbf is an abbreviation for ft-lbs which I doubt).
Also replaced the conversion factor for pounds with a more accurate figure.
Revision
3654 -
Directory Listing
Modified
Sat Sep 24 02:38:19 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Updated to be able to handle empty anwswer blanks. There is a new
parameter for the MultiPart object (allowBlankAnswers) that controls
whether the checker routine will be called even when there are blank
entries (normally, the checker is not called unless all the entries
are non-blank). Use
$mp = MultiPart(1,2)->with(checkTypes=>0,allowBlankAnswers=>0);
to have the checker routine called when answers are left blank.
You can now also include blank answers in the list itself:
$mp = MultiPart(1,2,"");
(there is no need to include allowBlankAnswers in this case, because
the blank string will take care of itself.
Revision
3652 -
Directory Listing
Modified
Sat Sep 24 00:47:30 2005 UTC (7 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Added ability to have answers that are empty strings. String("") now
will produce a valid string object regardless of the Context's defined
string values. (You can prevent this using
Context()->flags->set(allowEmptyStrings=>0);
if you wish). String("")->cmp will produce an answer checker for an
empty string (it removes the blank checker that WW installs).
Revision
3638 -
Directory Listing
Modified
Mon Sep 19 00:58:35 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed bug where str_cmp("0") was changing the correct answer to "",
making it impossible to get correct.
Revision
3637 -
Directory Listing
Modified
Mon Sep 19 00:16:24 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Prevent the empty list from having open and close be set to 'start'
(a value used internally).
Revision
3633 -
Directory Listing
Modified
Sat Sep 17 13:22:52 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Don't allow wrapping in label for ans_array errors.
Revision
3632 -
Directory Listing
Modified
Sat Sep 17 13:22:19 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Improved layout and labeling of error messages.
Revision
3631 -
Directory Listing
Modified
Sat Sep 17 13:02:24 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
The Parser answer checkers used to give the student answer as the
parsed but unevaluated answer. This has been changed so that the
student answer is now the computed result, no the parsed answer.
The answer preview still shows the parsed equation. This is more
consistent with the traditional answer checkers, and probably is more
valuable to the students.
Revision
3630 -
Directory Listing
Modified
Sat Sep 17 12:39:09 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Better error messages for unreduced unions.
Revision
3629 -
Directory Listing
Modified
Sat Sep 17 12:25:38 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Improved error message layout and labeling for when ans_array is used.
Revision
3628 -
Directory Listing
Modified
Sat Sep 17 12:22:25 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Improved error messages for formulas returning infinity
Revision
3616 -
Directory Listing
Modified
Tue Sep 13 16:24:21 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with recognizing MINF in NUM_CMP.
Revision
3615 -
Directory Listing
Modified
Tue Sep 13 14:07:32 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
The ORIGINAL_NUM_CMP was calling str_cmp as a code reference rather
than as the more modern AnswerEvaluator object. This causes error
messages when string answers were used. It now uses the evaluate()
method of the AnswerEvaluator.
Revision
3613 -
Directory Listing
Modified
Mon Sep 12 23:28:37 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed an error where scalar() was used on a hash ref.
Fixed a misfeature where operations on formulas could return Value
objects of other classes; they should always return formulas, even
when the formula is constant.
Revision
3612 -
Directory Listing
Modified
Mon Sep 12 20:26:01 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Avoid undefined value of $name.
Revision
3603 -
Directory Listing
Modified
Wed Sep 7 01:10:58 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added support for cplx_cmp() using the Parser. Move
lib/Parser/Legacy/PGcomplexmacros.pl to the pg/macros directory to use
it. As with the other legacy macros, $useOldAnswerMacros can be
controlled to determine whether the new or the old macros are used.
There is a new mode 'strict_cartesian' that is parallel to
'strict_polar'. You must enter a+bi form, but the a and b can have
operations within them.
Revision
3602 -
Directory Listing
Modified
Wed Sep 7 01:06:13 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added "strict" versions of the limited complex contexts that don't
allow operations within the real and imaginary parts. Also cleaned up
some of the code and fixed a few situations that had been missed
before.
Note that in strict mode, e^(pi i) is accepted, but e^(pi/2 i) is
not. Should that be changed? It would be possible to make a context
in which a*e^(b*pi/c i) is accepted.
Revision
3601 -
Directory Listing
Modified
Tue Sep 6 21:02:05 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Movified the copying of functions from Complex1:: into main:: to avoid
conflicts with the PGcommonFunctions.pl versions (these errors were
trapped, but still show up in the error log unnecessarily).
Also commented out some code that was not doing anything other than
producing error messages in the error log. (It was left over from a
syntax check on the professor's answer, but the actual check was
removed, leaving a portion that tries to process the answer, but
usually fails (because things like "1+4i" need to be converted to
"1+4*i" before they can be used in PG_answer_eval, but that was not
being done).
Because of this, it is not possible currently to do cplx_cmp("1+4i"),
and instead you must to cplx_cmp(new Complex(1,4)).
To fix this, you would need to call check_syntax (and the other
filters that are called on the student's answer) before calling
PG_answer_eval. Of course, you should only do this when the
professor's answer isn't already a Complex object.
I am going to work on a Legacy module like the ones for num_cmp and
fun_cmp to replace cplx_cmp, which should avoid these problems and
make the changes suggested above unnecessary.
Revision
3596 -
Directory Listing
Modified
Fri Sep 2 22:29:59 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed error in atan2 where second argument was not promoted to a Real.
Revision
3591 -
Directory Listing
Modified
Tue Aug 30 12:21:36 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
The perl method for UOP and BOP now put spaces around the operator, to
prevent Perl from thinking that things like -e is a file test and
*Parser::Function->call is a name reference. (Some of these had been
done by hand earlier, but now the base BOP and UOP classes handle it,
so we should not have problems in the future). I removed the ad hoc
fixes from several other locations (Parser/Function.pm,
Parser/Context/Default.pm).
Also extended the operator definitions to allow operators to create
function-call syntax in perl mode (for when the operator doesn't
correspond to a perl operator).
Revision
3589 -
Directory Listing
Modified
Tue Aug 30 00:44:53 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added the ability to put class-specific answer-checker defaults into
the Context object. For example,
Context("Vector")->{cmpDefaults}{Vector}{promotePoints} = 1;
would make all Vector answer checkers include promotePoints=>1
automatically. (Note however that if a subclass of Vector is used, it
will not get this defaults, since its class name would be different.
Perhaps something more sophisticated will be needed in the future.)
Revision
3588 -
Directory Listing
Modified
Tue Aug 30 00:41:34 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added a parserCustomization.pl file that is loaded whenever the
Parser.pl file is. This can be used on a course-by-course basis to
customize features of the Parser. Some examples are listed in the
file.
You need to be VERY careful when doing this, as this will affect ALL
problems that use the Parser. Your changes may cause some .pg files
to fail if they rely on the default behavior that you are changing.
If you wish to override settings in one of the predefined contexts
(like "Vector"), then define $context{Vector} as a copy of
$Parser::Context::Default::context{Vector}, as in the commented out
examples. Then Context("Vector") will use your copy rather than the
original. If you were to change the version in
Parser::Context::Default, that would change the parser for ALL
courses, not just yours.
Revision
3587 -
Directory Listing
Modified
Tue Aug 30 00:36:55 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added a Point context that is a copy of the Vector context. This will
allow users to override some settings in Vector context (namely, how
they are entered and displayed) without preventing users from being
able to enter points (in Point context).
Revision
3578 -
Directory Listing
Modified
Fri Aug 26 14:06:39 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
Fix bug where perl functions which may need parentheses by forcing them
when the function starts Parser::Function->. This seems to work, but
there might be a better way to do it, or need other cleaning up.
Revision
3577 -
Directory Listing
Modified
Fri Aug 26 04:19:09 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
When making on-the-fly image names, replace periods in the student login
name to avoid problems with pdflatex. Changed the replacement in set
names to use the same new trick (the old way had an infintesimal chance
of collision). The new scheme is first double all instances of "Q". Then
replace periods with "-Q-".
Revision
3576 -
Directory Listing
Modified
Thu Aug 25 20:01:25 2005 UTC (7 years, 8 months ago) by
glarose
Original Path:
trunk/pg
Add some electrical units. Take two, hopefully in the correct branch
this time.
Revision
3574 -
Directory Listing
Modified
Thu Aug 25 18:32:01 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
Updated instructions to match changes to global.conf.dist and the move
or PGanswermacros.pl.
Revision
3573 -
Directory Listing
Modified
Thu Aug 25 18:24:55 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
A separate copy of this file is no longer needed.
Revision
3572 -
Directory Listing
Modified
Thu Aug 25 18:21:21 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
This makes the pg/lib/Parser/Legacy copy of PGanswermacros.pl the
official copy here. This still leaves the original answer evaluators as
the default, but simplifies the update process, and we don't have to
maintain two copies of the original functions.
Revision
3569 -
Directory Listing
Modified
Thu Aug 25 03:40:44 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with Context's not properly initializing themselves with
the WW environment parameters (like zeroLevelTol and useBaseTenLog).
The copy method and the method that did an initialized copy used to be
separate routines, but that turned out to be unnecessary, so they have
now been merged (copy always tries to initialize the WW values when it
can, and when the copied context doesn't already have them).
The reason this is complicated is that a number contexts are set up
before the global.conf data is available, so these can't be
initialized with the WW values. Also, these default contexts are
stored in the persistant processes, and we don't want to leave
possibly course-specific values lying around in them, so whenever a
context is selected, it is copied from the standard version and the
WW parameters are inserted into it. The problem author can only
modify the copy, not the original, so this is OK with mod_perl.
The context's copy method now always tries to initialize (we used to
have to call initCoopy to get a copy that has the WW parameters
inserted). That turned out to cause trouble with code that handled
contexts without the usual Context() command.
Revision
3568 -
Directory Listing
Modified
Thu Aug 25 03:32:16 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed log and log10 perl methods so that log obeys the useBaseTenLog
flag, and log10 doesn't try to call main::log10, which is not
available from within this preloaded package. The in- and outside
the safe compartment stuff is very confusing, and functions that are
not overloaded native perl functions seem to be not callable from the
Value::Formula package, so the perl method now calls
Parser::Function->call() directly (doesn't look pretty, but I've given
up on that).
Revision
3566 -
Directory Listing
Modified
Thu Aug 25 00:35:18 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
In order to overcome an MSIE bug that affects jsMath, the call is
changed from jsMath.ProcessBeforeShowing() to jsMath.wwProcess(),
which is added by the jsMath-ww.js file. (This routine uses an onload
handler for MSIE to put off the processing until MSIE can handle it
properly, but allows all others to do it at the usual time.)
Revision
3562 -
Directory Listing
Modified
Wed Aug 24 19:07:10 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Changed stringify to check for an answer that is zero by using the
zeroLevelTol value directly (rather than use the fuzzy equality check
for zero, which depends on the tolType in a bad way).
Revision
3560 -
Directory Listing
Modified
Wed Aug 24 11:44:49 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Made relative tolerances the default for when the tolType is not one
of 'relative' or 'absolute'.
Revision
3557 -
Directory Listing
Modified
Wed Aug 24 01:35:01 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
Hopefully fixed the logic of setting numerical tolerance defaults.
Revision
3556 -
Directory Listing
Modified
Tue Aug 23 23:59:46 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
Fixed problem with display_matrix_mm so its behaviour matches its
documentation. This may break problems which relied on its previous
incorrect behavior.
Revision
3555 -
Directory Listing
Modified
Tue Aug 23 23:57:01 2005 UTC (7 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Use a default for the zeroLevelTol set in the current context.
Revision
3554 -
Directory Listing
Modified
Tue Aug 23 23:10:02 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
Deleted commented out line (which had been used for debugging).
Revision
3553 -
Directory Listing
Modified
Tue Aug 23 22:56:50 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
This adds wiring to the pg side for special bits of html to be included before/after the body of a problem. You also need to update global.conf (and probably want to update Tasks.pm).
A commented out example in global.conf.dist shows how to use this to produce boxed problems a la the Union College server. In this approach, the added parts are not used for problems rendered in the Library Browser or Problem Set Detail.
This addresses bug 817. This solution may not be suitable for inclusion of needed bits for modes such as asciimath or tth because the those bits of html are probably needed for display in the Library Browser. It is hard to distinguish bits which are always wanted, and those which are only wanted for use by Problem.
Revision
3547 -
Directory Listing
Modified
Mon Aug 22 01:26:04 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
Part of change dealing with bug 813.
Possible things still to do here:
change names of variables to reflect that they contain commands and
not scripts
have a variable for the path to cat
remove the scripts themselves
Revision
3544 -
Directory Listing
Modified
Sun Aug 21 21:46:49 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
Removed bits which were accidentally included during last commit.
Revision
3543 -
Directory Listing
Modified
Sun Aug 21 18:12:30 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/pg
Should fix bug 696 by replacing consecutive whitespace with a single
space for answers in an individual ans_rule.
Revision
3540 -
Directory Listing
Modified
Sun Aug 21 05:21:07 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/pg
level_curve_check now forces the use of the old style (not Parser::Legacy)
answer evaluators resolving bug 820.
Revision
3539 -
Directory Listing
Modified
Sun Aug 21 00:04:40 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Updated to handle jsMath version 2.
Revision
3536 -
Directory Listing
Modified
Sat Aug 20 23:07:13 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added code to handle the case where the professor's answer is in
expondential notation using a little e instead of a big one. (Perl
will convert .0000001 to 1E-07, for example, before it is passed to
num_cmp.)
Revision
3531 -
Directory Listing
Modified
Mon Aug 15 22:42:37 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed more undefined values
Revision
3529 -
Directory Listing
Modified
Mon Aug 15 01:50:21 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changed Context() call to direct reference to context, so as not to
leave the wrong content selected as the current one.
Revision
3525 -
Directory Listing
Modified
Sun Aug 14 00:23:10 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added methods for testing containment of one set in another, and so
on. These include:
$A->contains($B) Test if $B is a subset of $A (or an
element of $A if $B$ is a real number).
$A->isSubsetOf($B) Test if $A is a subset of $B.
$A->isEmpty True if $A is the empty set.
$A->intersects($B) True if $A and $B have numbers in common.
$A->intersect($B) The set of numbers common to both $A and $B.
Be careful of the difference between "intersect" and "intersects".
One is a set the other a true/false value.
Revision
3524 -
Directory Listing
Modified
Sun Aug 14 00:18:46 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added a copy method that produces a deep copy of the given object.
This probably should be used through the new() methods to ducplicate
the data used when creating an object, otherwise changes to the
sub-objects will cause changes to the outer one. For example, if an
interval is used to create a union and then the internal data for the
interval is changed by hand, the changes will also occur in the
union. That is, Value objects contain their data by REFERENCE. This
should probably be changed, but fortunately, no one should be
adjusting the internal structure of the objects by hand.
Revision
3523 -
Directory Listing
Modified
Sat Aug 13 22:38:39 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added canBeInUnion and isSetOfReals methods to the Parser package
(similar to the ones in the Value package), replacing the
canBeInterval flag and other ad hoc checks.
Removed ability to form interval like [a] now that we have sets.
Revision
3522 -
Directory Listing
Modified
Sat Aug 13 22:34:31 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Maintain parentheses correctly when converting to perl.
Revision
3520 -
Directory Listing
Modified
Sat Aug 13 21:45:46 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/pg
Implimentation of COMMENT for comments to appear in the library browser.
Revision
3518 -
Directory Listing
Modified
Sat Aug 13 21:34:50 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Allow a list of numbers to be converted to a set.
Revision
3517 -
Directory Listing
Modified
Sat Aug 13 21:31:46 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Pass the canBeInUnion call on to the Formula's root node
Revision
3516 -
Directory Listing
Modified
Sat Aug 13 20:59:28 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added isSetOfReals and canBeInUnion methods to the Value objects, and
replaced the ad hoc tests for these conditions to call these
routines.
Cleaned up the make() methods for Intervals, Sets and Unions, and
improved the new() methods to handle more cases better.
Fixed Value::makeValue() to handle an array reference correctly.
I don't THINK any of this will break anything. :-)
Revision
3515 -
Directory Listing
Modified
Sat Aug 13 20:55:35 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make formulas that produce lists get default open and close parens,
and have them retained in Formula() results.
Revision
3514 -
Directory Listing
Modified
Sat Aug 13 19:10:41 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make sure the singletons are sorted before comparing them to the
intervals (and each other).
Revision
3513 -
Directory Listing
Modified
Sat Aug 13 18:51:54 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/pg
Fixed treatment of options in setting the mode and optional parameters
related to reducing unions.
Revision
3512 -
Directory Listing
Modified
Sat Aug 13 18:19:01 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Can't use the length check when reducing unions, since it could
contain a single set that is not reduced, and we need to check that,
too.
Revision
3511 -
Directory Listing
Modified
Sat Aug 13 17:50:11 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed reduction warnings for individual sets, intervals and unions (in
making it work for lists, I broke it for the single items).
Revision
3510 -
Directory Listing
Modified
Sat Aug 13 17:32:58 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem with redefine when used with classes that store their
data in a on-standard form (i.e., by overridding the create()
method). Now they can define uncreate() to get the original data back
for use with redefine().
Revision
3509 -
Directory Listing
Modified
Sat Aug 13 17:24:00 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed mad error message (change needed due to new message translation
facility).
Revision
3508 -
Directory Listing
Modified
Sat Aug 13 16:58:56 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added isReduced method to tell if a Union, Set or Interval is already
reduced. Fixed up sort to use CORE::sort, and added sort and reduce
to Intervals, which do nothing, but are there for consistency.
Revision
3507 -
Directory Listing
Modified
Sat Aug 13 16:57:14 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed error in testing is a union is reduced (didn't test if sets
within a union were reduced properly).
Revision
3506 -
Directory Listing
Modified
Sat Aug 13 16:47:23 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/pg
Moved a chunk of duplicated code to its own function, and tweaked the setting
of the context in a few cases.
Revision
3505 -
Directory Listing
Modified
Sat Aug 13 16:33:50 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added sort methods to Union and Set that return objects with their
data sorted.
Revision
3504 -
Directory Listing
Modified
Sat Aug 13 15:57:17 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Moved the union and set reduction checks from cmp_equal to cmp_compare
so that the messages can be produced even in lists of unions.
Improved the message facilities for the list comparison so that
cmp_compare can make errors that refer to the number of the entry in
the student's answer (otherwise an extra "There was a problem with
your nth value" message needs to be prepended, which looks bad if it
can be avoided).
Use the "extra" answer checker to report syntax error messages in unordered
lists.
Revision
3503 -
Directory Listing
Modified
Sat Aug 13 15:44:41 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with call to $equation->Error (due to change in
error-handling that allows for translation of error messages).
Revision
3502 -
Directory Listing
Modified
Sat Aug 13 05:54:10 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/pg
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
3501 -
Directory Listing
Modified
Sat Aug 13 01:40:45 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added differentiation of (single-variable) functions created with
parserFunction.
Revision
3500 -
Directory Listing
Modified
Sat Aug 13 01:39:14 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typo in previous update.
Revision
3499 -
Directory Listing
Modified
Sat Aug 13 00:41:24 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added sets to the differentiation information (no derivatives allowed)
Revision
3498 -
Directory Listing
Modified
Sat Aug 13 00:35:11 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a typo in an error message.
Revision
3497 -
Directory Listing
Modified
Sat Aug 13 00:25:27 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added ability for Unions and Sets to simplify themselves
(automatically or on demand), and added flags to the Context and
answer checkers to control these features. The new Context flags
are
reduceUnions tells whether unions are automatically
reduced when they are created.
reduceUnionsForComparison tells whether unions are reduced
before comparing them for equality
or inequality (etc) if they aren't
reduced already.
reduceSets tells whether redundent elements are
removed from sets as they are created.
reduceSetsForComparison tells whether sets are reduced before
comparing them.
All of these default to true.
The Interval, Set, Union, and List answer checkers not have two new
flags for controlling these values:
studentsMustReduceUnions tells whether unions and sets will be
counted as incorrect when they are not
reduced to non-overlapping intervals
and at most one set with no repeated
entries.
showUnionReduceWarnings tells whether an error message will
be produced for non-reduced unions and
sets, or if they will be marked wrong
silently. (Not available in Lists.)
Both of these are true by default, since most professors probably want
their students to write intervals in reduced form. (Is this true?)
This corresponds the the current behavior of the interval checkers,
which require the student's answer to be the same set of intervals as
in the professor's, but with the addition of an error message when the
student answer is not reduced.
Revision
3495 -
Directory Listing
Modified
Fri Aug 12 23:21:52 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed use of undefined value for $position in TeX and String methods.
Revision
3494 -
Directory Listing
Modified
Fri Aug 12 23:02:11 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Made the 'R' constant in Interval context show up as a bold R in TeX
mode.
Revision
3493 -
Directory Listing
Modified
Fri Aug 12 22:56:04 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Detect preview mode correctly for either WW1 or WW2.
Revision
3491 -
Directory Listing
Modified
Fri Aug 12 22:54:38 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Mark function as constant if it is.
Revision
3489 -
Directory Listing
Modified
Fri Aug 12 18:43:25 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/pg
Completed conversion of interval_cmp to use Parser objects. Also, minor
updates to number_list_cmp.
Revision
3488 -
Directory Listing
Modified
Fri Aug 12 17:40:07 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Avoid problem with undefined value being passed to protectHTML.
Revision
3487 -
Directory Listing
Modified
Fri Aug 12 17:09:42 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changed how Intervals implement the requireParenMatch flag for the
interval and union answer checker. (Use a Context flag rather than a
flag on the interval itself.) Moved the getFlag method from
Formula.pm to Value.pm so it can be used by any object class. New
feature where classes can add more context flags to set (and reset
after the answer checker runs).
Revision
3484 -
Directory Listing
Modified
Fri Aug 12 01:26:11 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Removed erroneous dollar sign.
Revision
3483 -
Directory Listing
Modified
Fri Aug 12 01:21:48 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added redefine() function to complement undefine() for various
Context() values. For example
Context()->operators->undefine('+');
makes '+' undefined, but
Context()->operators->redefine('+');
will put it back. You can specify a context from which to take the
redefinition, and a name in that context, as in
Context()->operators->redefine('U',from=>"Interval");
Context()->operators->redefine('u',from=>"Interval",using=>"U");
Context()->operators->redefine('U',from=>$content);
where $content is a reference to a Context object.
The undefine() function lets you undefine several items at once, as in
Context()->operators->undefine('+','-');
For redefine, you must put multiple names in square brackets because
of the optional parmeters:
Context()->operators->redefine(['+','-']);
Revision
3482 -
Directory Listing
Modified
Fri Aug 12 01:15:30 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed bug with missing fields in initialization.
Revision
3477 -
Directory Listing
Modified
Thu Aug 11 20:57:18 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added ability to subtract intervals, sets and unions. Adjusted the
precedence of the union 'U' to be above _ and + so that things like
(1,5) U (7,10) - {8} U (2,3) will do ((1,5) U (7,10)) - ({8} U (2,3))
rather than the previous (1,5) U ((7,10) - {8}) U (2,3). Finally,
added a constant 'R' to the Interval context that is equivalent to
(-inf,inf), so you can do things like R-{0} now.
Still need to work out reducing unions so that things like (1,3)U(2,4)
can become (1,4).
Revision
3474 -
Directory Listing
Modified
Thu Aug 11 14:37:18 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changes needed for new Set object, plus for moving string, TeX and
perl into Value.pm. Also removed unneeded spaces in perl versions of
the constants (these were to fix problems with the minus sign, but
that is now being handled by the minus operators themselves).
Revision
3473 -
Directory Listing
Modified
Thu Aug 11 14:34:24 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changes needt for Set object, and fixed a bug with unions containing
constant intervals with non-constant ones.
Revision
3472 -
Directory Listing
Modified
Thu Aug 11 14:33:09 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changes needed to Set object. Also, use Parser to handle unions
defined as strings rather than doing it by hand (that's the whole
point, isn't it?). Added object promotion from lower-precedence
classes (for better error messages), and fixed up the comparison
routine.
Revision
3471 -
Directory Listing
Modified
Thu Aug 11 14:28:07 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changes needed for Set object, better handling of an interval given as
a string, and a few misc. fixes.
Revision
3470 -
Directory Listing
Modified
Thu Aug 11 14:25:53 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changes needed for new Set object, and moving of string, TeX and perl
methods to Value.pm
Revision
3469 -
Directory Listing
Modified
Thu Aug 11 14:23:16 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added changes needed for the new Set object.
Revision
3468 -
Directory Listing
Modified
Thu Aug 11 14:22:36 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added in the Set object class. Also made more comprehensive defaults
for string, TeX and perl output, so these don't have to be subclassed
so often. These handle looking up the open and close parens and
recursively handling the entries in a list-type object.
Revision
3467 -
Directory Listing
Modified
Thu Aug 11 14:20:31 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Properly maintain open and close parens in emtpy lists.
Revision
3466 -
Directory Listing
Modified
Thu Aug 11 14:19:26 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added new Set object class to the Parser. It implements a finite set
of real numbers, for use with unions and intervals. E.g., (1,2) U {3}
or (1,2) U {3,4,5}. You can created Set objects in your perl code via
the Set() command, e.g, Set(3,4,5) or Set("{1,2,3}"). You should set
the Context to Context("Interval") if you plan to use Set objects, as
this defined the braces to form sets (rather than using them as
parentheses, which is the default WW behavior). Note that in Interval
context, you can NOT use braces as parentheses.
Current, Set objects are only allowed to be sets of numbers. It would
be possible to extend that in the future.
Revision
3465 -
Directory Listing
Modified
Thu Aug 11 00:38:33 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make upper-case alias a hidden one (since it is not needed for the
pattern).
Revision
3464 -
Directory Listing
Modified
Thu Aug 11 00:37:35 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Dereference aliases to aliases properly.
Revision
3463 -
Directory Listing
Modified
Wed Aug 10 23:05:41 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/pg
Default behavior of number_list_cmp set to be backward compatible
(no hints of any kind or partial credit). These features can now be
activated by optional arguments.
Also improvements on parser-based interval_cmp.
Revision
3462 -
Directory Listing
Modified
Wed Aug 10 18:57:17 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/pg
Hopefully improved some of how the temporary context is set for number_list_cmp.
Many whitespace changes (spaces to tabs). Work in progress for a version of
interval_cmp which uses Parser, temporarily called interval_cmp2.
Revision
3460 -
Directory Listing
Modified
Wed Aug 10 15:07:12 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Interval (and Union) checker now accepts requireParenMatch flag for
deciding whether the interval type must match. Setting
requireParenMatch to 0 will let (1,2) match (1,2] or [1,2], etc.
Revision
3458 -
Directory Listing
Modified
Wed Aug 10 14:28:59 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
The Parser versions of num_cmp and fun_cmp incorrectly left the
current Context set to the base context used by the answer checker.
The Context is now correctly reset to the one in effect before the
call to num_cmp or fun_cmp.
Also removed some redundant values in if-then checks.
Revision
3457 -
Directory Listing
Modified
Wed Aug 10 14:22:48 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Enable commas when mode=>"frac" is specified.
Revision
3455 -
Directory Listing
Modified
Mon Aug 8 15:56:09 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/pg
Changed number_list_cmp to use Parser.
Revision
3446 -
Directory Listing
Modified
Mon Aug 1 15:14:20 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug that would cause step() to produce an error when called on
a constant value. Also, added fact() function that was defined in
Algparser but not in Parser (which uses x! notation).
Revision
3445 -
Directory Listing
Modified
Mon Aug 1 14:20:16 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added missing "step" function that was defined in the AlgParser but
not in the Parser.
Be sure to copy the updated PGanswermacros.pl to the pg/macros directory.
Revision
3444 -
Directory Listing
Modified
Mon Aug 1 13:10:52 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make List("1,2,3") work like List("1","2","3") rather than produce a
list with one element that is a list.
Revision
3443 -
Directory Listing
Modified
Mon Aug 1 12:42:21 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added postfilter to Parser-based implementation of NUM_CMP so that the
student's answer is updated to be the result of evaluating the answer
(when there is no error in evaluating the answer). This correctly
reflects the behaviour of the original NUM_CMP.
Revision
3442 -
Directory Listing
Modified
Mon Aug 1 12:37:35 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typo that caused hilighting of the position of errors to be lost.
Revision
3441 -
Directory Listing
Modified
Mon Aug 1 12:04:23 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Updates to make mode=>'frac' properly emulate the original num_cmp
behavior (it now allows decimals and fractions instead of requiring a
fraction). There is also a new LimitedNumeric-StrictFraction context
(not currently used) that disallows decimals and requires fractions.
Revision
3440 -
Directory Listing
Modified
Mon Aug 1 12:01:39 2005 UTC (7 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Folded in Mike's changes for status messages.
Revision
3426 -
Directory Listing
Modified
Fri Jul 29 19:44:04 2005 UTC (7 years, 9 months ago) by
sh002i
Original Path:
trunk/pg
Fix use of $SIG{__WARN__} and $SIG{__DIE__}.
* Each change to $SIG{__WARN__} and $SIG{__DIE__} is now dynamically
scoped with "local", rather than changing globally and then restoring at
the end of the block.
* The special value "DEFAULT" is used instead of sub {CORE::die(@_)} or
sub {CORE::warn(@_)} when preparing to eval STRING code.
* Where $SIG{__WARN__} and $SIG{__DIE__} are overridden to do
preprocessing with PG_errorMessage, the previously installed handlers
will be called instead of the built-in warn or die functions after
preprocessing occurs. (For example, the warn and die handlers defined in
Apache::WeBWorK or the warn handler defined in WeBWorK::PG will be
called.)
* The behavior in process_answers is modified so that the custom
handlers are installed once before the answer evaluation loop. This
causes them to be in effect during the setup/teardown code, but I don't
think this will be a problem.
Revision
3400 -
Directory Listing
Modified
Fri Jul 22 22:59:12 2005 UTC (7 years, 9 months ago) by
gage
Original Path:
trunk/pg
Made listVariables and listFormVariables synonyms for listing all variables available to
the problem.
Revision
3393 -
Directory Listing
Modified
Wed Jul 20 18:30:59 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Added a modification of the grades that shows where the
state_summary_msg can be added. This message is
printed at the bottom of each problem page. The current default
is a blank message, which means that the default message
defined in Problem.pm is printed.
There is currently no way to turn the message off entirely. Perhaps
on the next revision.
Revision
3387 -
Directory Listing
Modified
Sat Jul 16 22:31:41 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Added documentation for macros used in constructing
sequential problems.
Revision
3386 -
Directory Listing
Modified
Sat Jul 16 22:01:08 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Macros that aid the construction sequentialProblems. For these
problems certain sections of text are hidden until earlier
answers have been answered correctly.
-- Mike
Revision
3385 -
Directory Listing
Modified
Sat Jul 16 21:59:35 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Added support for sequentialProblems.
Revision
3384 -
Directory Listing
Modified
Sat Jul 16 19:24:31 2005 UTC (7 years, 10 months ago) by
jj
Original Path:
trunk/pg
Fixed typo related to useBaseTenLog.
Revision
3375 -
Directory Listing
Modified
Wed Jul 13 03:03:25 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
This file implements an easy way to add functions that are defined
within the Parser's Context. See the comments in the file itself for
documentation on how to use it.
Revision
3374 -
Directory Listing
Modified
Wed Jul 13 01:46:49 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Wrong correction in the previous commit. Use CODE::push
Revision
3373 -
Directory Listing
Modified
Wed Jul 13 01:23:38 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Made modifications that allow use of complex numbers in matrices. You can
also LR decompose a non-square matrix. Documentation is still needed
and further testing.
Revision
3372 -
Directory Listing
Modified
Wed Jul 13 01:22:43 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Made modifications that allow the use of complex numbers in matrices
Revision
3371 -
Directory Listing
Modified
Tue Jul 12 22:39:56 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Make error messages potentially localizable (by making them use
sprintf-style strings rather than variable subtitution).
Revision
3370 -
Directory Listing
Modified
Tue Jul 12 22:29:53 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
A first pass at making parser error messages localizable. The
Context()->{error}{msg} hash can be used to specify translations of
the standard messages. For example,
Context()->{error}{msg}{'Division by zero'} = "Don't divide by zero, dude!";
Context()->{error}{msg}{'Function '%s' has too many inputs'} =
"You passed too many arguments to '%s'";
(I didn't translate into another language, here, but you could do
that, too.)
The msg hash could also be used within answer checkers to make certain
answer messages more appropriate for the given type of expected answer.
Revision
3369 -
Directory Listing
Modified
Tue Jul 12 21:05:37 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed various perl compiler warnings (due to extra "my", and so on).
Revision
3367 -
Directory Listing
Modified
Tue Jul 12 02:02:46 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with minus signs in formulas that are turned into perl
mode. Perl needs extra spaces to avoid problems with -e type operators.
Revision
3364 -
Directory Listing
Modified
Fri Jul 8 21:45:14 2005 UTC (7 years, 10 months ago) by
jj
Original Path:
trunk/pg
Fixed typo in installation instructions.
Revision
3363 -
Directory Listing
Modified
Thu Jul 7 02:40:52 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Added some pod documentation to this file. It needs more -- several methods
of MatrixReal1 have been overridden
Revision
3360 -
Directory Listing
Modified
Tue Jul 5 22:13:16 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Added some pod documentation
Revision
3359 -
Directory Listing
Modified
Tue Jul 5 21:58:51 2005 UTC (7 years, 10 months ago) by
sh002i
Original Path:
trunk/pg
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
3353 -
Directory Listing
Modified
Tue Jul 5 01:43:30 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Don't load Parser.pl (it causes trouble with the Matrix.pm module).
We only needed it because of the calls to Real() that were being used
by Formula objects, so have them call Value::Real directly.
be sure to get the latest versions of Parser and Value (including the
top-level Parser.pm and Value.pm) in order to use this update.
Revision
3352 -
Directory Listing
Modified
Tue Jul 5 01:38:19 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Modified the perl() method to make calles to Value:: directly rather
than to the main:: stubs for creating Value objects. This will make
it work better from within packages or when Parser.pl hasn't been
loaded.
A few things still won't work in this case; e.g., calls to Closed()
for intervals (these could be handled better using ->with()) and to
functions like Factorial and log10 that are defined in Parser.pl.
Finally, there should be better object-based control over what
routines are called to create these objects, so that subclasses of the
Value objects will be able to be generated correctly.
Revision
3351 -
Directory Listing
Modified
Tue Jul 5 00:31:57 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Modified formatting
Revision
3350 -
Directory Listing
Modified
Tue Jul 5 00:08:54 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Main file that calls in the legacy modules.
Revision
3348 -
Directory Listing
Modified
Mon Jul 4 20:18:40 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Folded in Mike's changes to checkbox_cmp.
Revision
3347 -
Directory Listing
Modified
Mon Jul 4 20:12:22 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
This is an attempt at making the traditional answer checkers call the
new Parser in place of their original ones. That is, if you follow
the instructions in the README file, then problems that use
std_num_cmp(), fun_cmp(), etc. will really be using the new Parser
instead of the original PGanswermacros.pl versions.
The old answer checkers are still available, and can be switched back
on a site-wide, course-wide, or problem-by-problem basis. See the
README for details.
Revision
3346 -
Directory Listing
Modified
Mon Jul 4 19:52:38 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Rewrote checkbox_cmp as an AnswerEvaluator
Revision
3345 -
Directory Listing
Modified
Mon Jul 4 19:49:06 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Reworked some of the code for AnswerEvaluator
The messages printed out when using the debug flag should now
be somewhat better.
-- Mike
Revision
3344 -
Directory Listing
Modified
Mon Jul 4 19:39:37 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed problem with sorting (problem with $a, $b, I think).
Revision
3343 -
Directory Listing
Modified
Mon Jul 4 16:21:04 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Handle TeX versions of variables whose names include underscores
better.
Revision
3342 -
Directory Listing
Modified
Mon Jul 4 15:53:26 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Better messages when adaptive parameters are too big.
Revision
3341 -
Directory Listing
Modified
Mon Jul 4 15:43:53 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Implement "remove trailing zeros" format, like in prfmt(). I still
think '%g' works better in most cases ('%f#' will print larger values
without using scientific notation, which is nice, but will print small
numbers like .000000005 as 0, even though the fuzzy comparison of this
to zero will not be true.)
Revision
3340 -
Directory Listing
Modified
Mon Jul 4 15:22:40 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Commenting out unused code. This file still needs a lot of work.
Revision
3339 -
Directory Listing
Modified
Mon Jul 4 15:22:22 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Don't use the overloaded Real class for doing adaptive parameter
checks (use non-fuzzy checks, since we are checking the fuzziness by hand).
Revision
3338 -
Directory Listing
Modified
Mon Jul 4 15:21:52 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Restored str_filters -- removing it broke some of the other answer evaluators.
str_filters takes a string, filters it and then returns the filtered string.
The actual filters have been changed to work with answer hashes rather than with
strings, so str_filters warps the string in an answer hash before sending it through
the filters.
sorry for the breakage.
-- Mike
Revision
3336 -
Directory Listing
Modified
Mon Jul 4 13:15:57 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Change so as not to use raw HTML in the error messages.
Revision
3335 -
Directory Listing
Modified
Mon Jul 4 03:28:09 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Allow Parser::Number::NoDecimals() to accept a context to be modified
(rather than always changing the curent context).
Revision
3334 -
Directory Listing
Modified
Sun Jul 3 20:10:37 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Updates to allow string matches to be case-insensitive. This is now
the default, and can be overridden in the Context by setting the
string's "caseSensitive" attribute. e.g.:
Context()->strings->add("FooBar"=>{caseSensitive=>1});
would rewuire "FooBar" to be entered exactly as typed.
Revision
3333 -
Directory Listing
Modified
Sun Jul 3 20:06:33 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Adjusted some spacing
Revision
3332 -
Directory Listing
Modified
Sun Jul 3 20:05:28 2005 UTC (7 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug in the enable/disable routines that would cause them to
always work on the current context rather than the one whose
enable/disable method was being called.
Revision
3324 -
Directory Listing
Modified
Wed Jun 29 16:19:42 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Fixed bug in radio_cmp closing bug #258. We now check to make
sure that only a single string is being passed and not an array.
(The latter occurs if checkboxes are used instead of radio buttons.)
The presence of two checked checkboxes triggers a warning.
Revision
3323 -
Directory Listing
Modified
Wed Jun 29 02:48:55 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
MASSIVE changes to str_cmp and related subroutines (mostly in STR_CMP).
This answer evaluator now produces an AnswerEvaluator type rather than
a subroutine.
Revision
3322 -
Directory Listing
Modified
Wed Jun 29 02:47:40 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Corrected how preview_latex_strings are handled when two
AnswerHashes are ANDed or ORed.
Revision
3319 -
Directory Listing
Modified
Tue Jun 28 19:36:52 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Many changes to this file. I've fixed multi_cmp which
will check a comma separated string of answers.
I have commented out many other routines which do not appear
to be in use.
Revision
3314 -
Directory Listing
Modified
Fri Jun 24 20:11:23 2005 UTC (7 years, 10 months ago) by
gage
Original Path:
trunk/pg
Fixed conceptual error in compare_vec_solution. This should fix bug
#670. In my opinion the entire concept of vec_solution_cmp should be
reconsidered. In solving an underdetermined linear equation of the form
Ax-b=0 it seems to me that the solutions answer in the form:
x= a +bt+cu+ds where a,b,c,d are vectors should simply be evaluated
to see if it satisfies Ax-b=0 for 5 or six values of a,b,c,d --
checking the solution should use a
vector valued version of fun_cmp.
As it is, the student's coefficients for a,b,c,d are compared with the
instructors to see if they span the same space. This is quite a bit more
complicated -- and indeed the method came up with the wrong answer.
I believe I have the method corrected, but I would suggest that this
answer evaluator be replaced with one which operates more
directly and is therefore easier to maintain. Am I missing something in
this analysis? Has someone else created answer evaluators for this type
of problem?
-- Mike
Revision
3305 -
Directory Listing
Modified
Tue Jun 21 19:56:00 2005 UTC (7 years, 10 months ago) by
jj
Original Path:
trunk/pg
New context which allows students to use C(n,r) and P(n,r) in their
answers. To support this, the webwork versions of these functions
have been moved from PGaux... to PGcommon...
Revision
3298 -
Directory Listing
Modified
Thu Jun 16 15:32:02 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
New flag showAllErrors for when a custom checker is supplied. This
will cause all errors generated in the user's code to be reported
(normally, messages from the Value and Parser packages are ignored).
Revision
3297 -
Directory Listing
Modified
Thu Jun 16 04:04:23 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typos in comments.
Revision
3296 -
Directory Listing
Modified
Thu Jun 16 04:03:40 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem with auto-generated functions getting an incomplete
variable list.
Revision
3295 -
Directory Listing
Modified
Thu Jun 16 00:52:13 2005 UTC (7 years, 11 months ago) by
gage
Original Path:
trunk/pg
Fixed documentation for $graph->size()
Revision
3294 -
Directory Listing
Modified
Wed Jun 15 23:55:17 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Implements a Parser context in which only polynomials (of a single
variable) can be entered. Only sums of multiples of powers of the
variable are allowed to be entered (though the coefficients can
contain mathematical operations). An optional flag lets you specify
that only one term of each degree is allowed, so the student would
have to combine 1+x+x+x^2 to get 1+2x+x^2 in that case.
Revision
3291 -
Directory Listing
Modified
Wed Jun 15 22:00:32 2005 UTC (7 years, 11 months ago) by
jj
Original Path:
trunk/pg
Changed whitespace removal of TeX strings to safer version.
Revision
3274 -
Directory Listing
Modified
Thu Jun 9 11:16:01 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed Disable() and Enable() so that they can be called as
Context()->functions->disable()
and
Context()->functions->enable()
as well as
Parser::Context::Functions::Disable()
and
Parser::Context::Functions::Enable()
The former is the preferred syntax.
Revision
3273 -
Directory Listing
Modified
Mon Jun 6 02:32:20 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Forgot to check hardcopy mode. Fixed some problems with that. The
answer array items have to turn off verbatim mode that is used when
answer are included in the hardcopy. This causes paragraph breaks
between entries in a singleResult MultiPart that includes ans_arrays,
which make the output less pretty, but at least they show up.
Revision
3270 -
Directory Listing
Modified
Mon Jun 6 00:01:44 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
This file implements a Multi-Part parser object that allows you to tie
several input blanks to a single answer checker that can compare the
student's answers in several blanks in order to determine which are
correct.
For example:
$mp = MultiPart("x^2",1,-1)->with(
singleResult => 1,
checker => sub {
my ($correct,$student,$self) = @_; # get the parameters
my ($f,$x1,$x2) = @{$student}; # extract the student answers
Value::Error("Function can't be the identity") if ($f == 'x');
Value::Error("Function can't be constant") if ($f->isConstant);
return $f->eval(x=>$x1) == $f->eval(x=>$x2);
},
);
.
BEGIN_TEXT
\(f(x)\) = \{$mp->ans_rule(20)\} produces the same value
at \(x\) = \{$mp->ans_rule(10)\} as it does at \(x\) = \{$mp->ans_rule(10)\}.
END_TEXT
ANS($mp->cmp);
This produces three answer blanks all tied to the same checker, which
is supplied by the user when the MultiPart is specified. This one
checks if two inputs to a function provide the same output.
The answer blanks can each produce a separate row in the results area
at the top of the page, or they con be combined into a single row, as
in this case. The checker routine can provide error messages for
individual parts via the setMessage() method, or for the problem as a
whole, as above. Finally, the ans_array() method can be used to
produce answer blanks for individual entries for those objects that
support such arrays.
See the documentation at the top of the file for additional details.
Revision
3269 -
Directory Listing
Modified
Sun Jun 5 23:52:11 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Added ability to have Matrix, Vector and Point objects produce input
arrays similar to the ones available in PGmatrixmacros.pg. This
provides some substantial new functionality, and it may still have
some shaking down to do, but it should not affect the existing
functionality of the answer checkers.
To create an answer array for a matrix, vector or point, use the new
ans_array() or named_ans_array() methods of these objects. For
example:
Context("Matrix");
$M = Matrix([1,2],[3,4]);
BEGIN_TEXT
\{$M->TeX\} = \{$M->ans_array\}
END_TEXT
ANS($M->cmp);
This creates a matrix, then prints it ans creates an answer array of
the appropriate size for the matrix. The answer checker will
automatically know to handle the multiple entry blanks.
To used a named answer rule, use:
Context("Matrix");
$M = Matrix([1,2],[3,4]);
BEGIN_TEXT
\{$M->TeX\} = \{$M->named_ans_array('fred')\}
END_TEXT
NAMED_ANS(fred => $M->cmp);
Both methods also take an optional argument that specifies the width
of the answer rules. The default is 5.
You can get a multi-input point or vector array as well, and you can
make column vectors as follows:
Context("Vector");
$V = ColumnVector("1+x","3x","1-x");
BEGIN_TEXT
\{$V->TeX\} = \{$V->ans_array\}
END_TEXT
ANS($V->cmp);
Note that you can make answer arrays for matrices and vectors of
formulas as well as constants, provided the formula is an explicit
matrix or vector of formulas, and is not obtained by matrix
arithmatic.
For concistencey, all objets now have ans_rule and named_ans_rule
methods as well. The default width is 20 for these.
Revision
3268 -
Directory Listing
Modified
Sun Jun 5 23:36:28 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Removed some unused lines and comments.
Removed unnecessary spaces from around answer-rule-extension rules,
and made the TeX version of this rule be based on the width, as is
the case for ans_rule.
Revision
3267 -
Directory Listing
Modified
Sun Jun 5 23:25:20 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Allow for vectors to be marked as Column Vectors.
Revision
3266 -
Directory Listing
Modified
Sun Jun 5 23:24:29 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Better handling of delimiters that are explicitly set byt he user.
Fixed an incorrect call during object class promotion.
Added ability to sepcify that a vector is a Column Vector.
Revision
3265 -
Directory Listing
Modified
Sun Jun 5 23:22:20 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Better handling of open and close delimiters that are explicitly set.
Revision
3264 -
Directory Listing
Modified
Sun Jun 5 23:18:01 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fix some incorrect calls when the promoting types to higher precedence
object types.
Revision
3263 -
Directory Listing
Modified
Sun Jun 5 23:08:32 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug with Matrix->perl() method that would cause an extra level
of nesting in constant matrices.
Revision
3261 -
Directory Listing
Modified
Sat Jun 4 13:50:41 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Avoid possible infinite loop with length and typeref calls.
Revision
3260 -
Directory Listing
Modified
Sat Jun 4 13:50:01 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Remove unneeded comment.
Revision
3259 -
Directory Listing
Modified
Fri Jun 3 22:03:23 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Added a ->with() method that lets you set fields of a Parser object as
you create it. For example:
$f = Formula("sqrt(x)")->with(limits=>[0,3]);
or
ANS(Formula("(x+1)/x")->with(checkUndefinedPoints=>1,test_at=>[[0]])->cmp);
or
ANS($f->with(test_points=>[[0],[1],[2]])->cmp);
Revision
3258 -
Directory Listing
Modified
Fri Jun 3 19:14:00 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Better control over number of points that can be undefined, and
new ability to specify required test points plus additional random
ones. (Previously, if you set the test points, no random points were
generated.) For example:
$f = Formula("(x^2-1)/(x-1)");
$f->{test_at} = [[1]]; # test at x=1 plus random points
as opposed to
$f->{test_points} = [[-1],[0],[1]];
which tests only the points x = -1, x = 0 and x = 1.
Revision
3257 -
Directory Listing
Modified
Thu Jun 2 22:50:24 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Modified the Formula answer checker to allow checking of points where
the functions are undefined (i.e., attempt to check that the domains
agree). This can be enabled by setting the checkundefinedPoints flag
in the Context(), or in the formula itself. Test points where the
function is undefined will be retained and the student's answer will
have to be undefined at the same points. If the points are selected
at random, the points where the function is undefined are kept in
addition to the ones where it is defined, so the required number of
test points where the function IS defined will still need to be
found. The number of undefined points can be up to the number of
defined points. This number can be reduced by setting the
max_undefined flag. If you want to guarantee that a specific
undefined point be tested, you can provide that point using the
test_points field of the formula. For example:
Context()->flags->set(checkUndefinedPoints=>1);
$f = Formula("(x^2-1)/(x-1)");
$f->{test_points} = [[-1],[0],[1],[2]];
ANS($f->cmp);
will guarantee that the singularity at x=1 is tested, so the answer
x+1 will not be marked as correct.
If an answer matches at all the test points where the functions are
both defined, but some of the undefind points differ between the two
functions, the answer checker will generate an error message
indicating that the domains of the functions don't agree. (This is
ONLY generated with the functions match except for that.) This can be
controlled by setting the showDomainErrors flag in the formula's cmp()
call:
ANS($f->cmp(showDomainErrors=>0));
The default is to show these errors.
Revision
3256 -
Directory Listing
Modified
Thu Jun 2 19:53:06 2005 UTC (7 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed an accidental hard-coded operation from always being "add" to
being the correct operation when promoting the operations to an object
of higher precedence. (But since formulas are normally the highest
precedence, this will never have occurred.)
Revision
3225 -
Directory Listing
Modified
Sat May 14 01:42:25 2005 UTC (8 years ago) by
dpvc
Original Path:
trunk/pg
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
3221 -
Directory Listing
Modified
Mon May 2 00:58:00 2005 UTC (8 years ago) by
dpvc
Original Path:
trunk/pg
During a call(), if the evaluation produced an error message generated
by Value::Error, report it, otherwise report a generic message.
Revision
3220 -
Directory Listing
Modified
Mon May 2 00:56:19 2005 UTC (8 years ago) by
dpvc
Original Path:
trunk/pg
Changed the call method to check if the function is actually defined
inthe parser before calling the parser method. This allows things
like C(n,r) to be moved here but not automatically included in the
Context.
Revision
3219 -
Directory Listing
Modified
Fri Apr 29 22:30:55 2005 UTC (8 years ago) by
dpvc
Original Path:
trunk/pg
Added derivative of |x| as x/|x|.
Revision
3218 -
Directory Listing
Modified
Fri Apr 29 02:37:13 2005 UTC (8 years ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug with adaptive parameters where the relative tolerance
was not being properly computed. This allowed large constants to be
treated as correct when they shouldn't be.
Revision
3217 -
Directory Listing
Modified
Wed Apr 27 21:30:13 2005 UTC (8 years ago) by
dpvc
Original Path:
trunk/pg
Copy parameters like limits, etc, to the newly created formula when
'C0' is added by the "upToConstant=>1" option in formula cmp().
Revision
3216 -
Directory Listing
Modified
Wed Apr 27 21:29:10 2005 UTC (8 years ago) by
dpvc
Original Path:
trunk/pg
Use correct form of "x" with lists (rather than hack using split()).
Revision
3214 -
Directory Listing
Modified
Sat Apr 9 18:33:07 2005 UTC (8 years, 1 month ago) by
gage
Original Path:
trunk/pg
Provide a default warning subroutine if none has been defined.
Revision
3210 -
Directory Listing
Modified
Thu Mar 31 19:44:49 2005 UTC (8 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Added a check that the coordinates are numeric. This avoids an error
were <i+j+k> was accepted as OK.
Revision
3208 -
Directory Listing
Modified
Tue Mar 29 19:16:36 2005 UTC (8 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Provide an easy means of generating a custom answer checker based on
an user-supplied subroutine. Most of the work is done by the Parser's
answer checker framework, and the user's routine is called at the
point that the student's answer is compared to the correct answer.
Revision
3207 -
Directory Listing
Modified
Tue Mar 29 13:14:17 2005 UTC (8 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Handle error messages in the list checker better. In particular, make
the error messages generated by custom checkers called on elements in
the list look better. Also, in an ordered list, if the student enters
extra values, call an answer checker to do a syntax check. (By
default, use the first element again, but the user can supply a
separate object to use for the checker using the extra=>object
option.)
Revision
3206 -
Directory Listing
Modified
Tue Mar 29 03:25:29 2005 UTC (8 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Compartmentalize the equality check one step further. The cmp_equal
method now calls a new cmp_compare method to perform the actual
comparison (rather than use == directly). The cmp_compare method
either calls a user-supplied checker routine, or defaults to using the
== operator. The list checker also uses cmp_compare to check the
individual items in the list. The list checker also calls a new
cmp_list_checker method to perform the list check. This can be
overridden by a user-supplied list-checking routine.
To supply an alternate checking routine, use the "checker" option to
the cmp() method of the correct answer object. For example:
sub check {
my ($correct,$student,$ans) = @_;
return 0 unless $correct->length == $student->length;
my ($x,$y) = $student->value; # break up a point;
return $x**2 - $y**2 = 1; # check if it is on a hyperbola
}
Point(1,0)->cmp(checker=>~~&check);
This will check if the student's point lies on the given hyperbola. All
the usual error messages will be issued if the student's answer is not
a point, or is of the wrong dimension, etc.
You can use
sub list_check {
my ($correct,$student,$ans) = @_;
my @correct = @{$correct}; my @student = @{$student};
...
return ($score,@errors);
}
List(...)->cmp(list_checker=>~~&list_check);
to replace the list-checking routine with your own custom one. The
$correct and $student values are array references to the elements in
the lists provided by the professor and student. (Note that you do
NOT get a List() object; this allows you to handle lists of formulas,
since a List of formulas becomes a formula returning a list). The
checker routine should return the number of correct elements in the
student's list ($score), and a list of error messages produced while
checking the two lists (@errors). (This is a list of messages, since
you might want to include an error for each entry in the list, for
example).
If your checker or list_checker routine wants to die with an error
message, use Value::Error(message). This will put the message in the
WeBWorK display area at the top of the page. If you use die(message),
or if the code fails due to a runtime error, then "pink screen of
death" will be produced indicating the error and asking the student to
report the error to the professor.
Revision
3205 -
Directory Listing
Modified
Tue Mar 29 02:55:10 2005 UTC (8 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Properly handle string values in postprocessing of vectors and other
related lists. (It used to report a dimension error for things like 'NONE').
Revision
3204 -
Directory Listing
Modified
Mon Mar 28 23:47:50 2005 UTC (8 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Peroperly negate infinities even when reduceConstants is not in
effect.
Revision
3203 -
Directory Listing
Modified
Mon Mar 28 23:46:06 2005 UTC (8 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Handle extra parentheses better.
Revision
3202 -
Directory Listing
Modified
Mon Mar 28 23:45:27 2005 UTC (8 years, 1 month ago) by
dpvc
Original Path:
trunk/pg
Handle log as ln or log properly.
Revision
3199 -
Directory Listing
Modified
Sun Mar 20 13:13:44 2005 UTC (8 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Implements an experimental answer checker for implicitly defined
curves and surfaces.
Revision
3196 -
Directory Listing
Modified
Wed Mar 16 13:40:29 2005 UTC (8 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Implements an answer evaluator that checks if a students answer
satisfies a given equality. See the comments in the file for details
about how to use the answer checker.
Revision
3195 -
Directory Listing
Modified
Wed Mar 16 13:36:33 2005 UTC (8 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Now that the uverloaded operators handle subclassing properly, we can
use promotePrecedence in the compare routines, just in case we define
a subclass with even HIGHER precedence!
Revision
3194 -
Directory Listing
Modified
Wed Mar 16 13:35:01 2005 UTC (8 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
removed a commented-out line that was no longer needed.
Revision
3192 -
Directory Listing
Modified
Wed Mar 16 13:30:28 2005 UTC (8 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Update the overloaded operators so that they can be overridden by
subclasses of the predefined object classes. This involves calling
the objects method rather than using a hard reference to the routine
in the parent class.
Also, change the name of the string comparison routine to
compare_string to avoid conflicts with cmp that is used to produce the
answer checker for the class.
Finally, in Value.pm, promotePrecedence no longer has to do fancy
footwork to get "special" precedence to work (this was a hack to get
around the misfeature of the overloaded operators -- now that that is
being handled correctly, there is no need for it).
Revision
3191 -
Directory Listing
Modified
Wed Mar 16 04:17:35 2005 UTC (8 years, 2 months ago) by
dpvc
Original Path:
trunk/pg
Fixed error with asec and acsc where the parameters were not being
passed properly.
Revision
3187 -
Directory Listing
Modified
Sat Feb 26 23:03:12 2005 UTC (8 years, 2 months ago) by
gage
Original Path:
trunk/pg
Allow subclasses of AnswerEvalutor to be used. Check for a match
with a substring AnswerEvaluator instead of equality.
Revision
3180 -
Directory Listing
Modified
Sat Feb 19 16:47:36 2005 UTC (8 years, 3 months ago) by
gage
Original Path:
trunk/pg
Small correction that makes sure that _init subroutines are read
properly. The original works on some versions of perl, but not on
others.
Revision
3177 -
Directory Listing
Modified
Fri Feb 18 00:04:09 2005 UTC (8 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Missed one situation when making the previous update. Fixed it.
Revision
3174 -
Directory Listing
Modified
Thu Feb 17 16:12:45 2005 UTC (8 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed it so that direct calls to the add, sub, mult, etc functions
would work as expected (even though there is no need to call them directly).
Revision
3172 -
Directory Listing
Modified
Tue Feb 15 21:58:54 2005 UTC (8 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Updated the answer checkers so that you can more easily specify how
the correct answer shoudl be displayed. In the past, you could use
something like Real(sqrt(2))->cmp(correct_ans=>"sqrt(2)") to do this,
but that is awkward. Now the Compute() function (which parses and
then evaluates a string) sets things up so that the original string
will be what is used as the correct answer. That means
Compute("sqrt(2)")->cmp will have the same result as the example
above.
You can also set the {correct_ans} properly of any Parser object to
have that value used as the correct answer. For example
$x = Real(sqrt(2));
$x->{correct_ans} = "sqrt(2)";
ANS($x->cmp)
would also produce the same answer checker as the two previous
examples. All three methods should work. Use the one that is most
convenient for you.
Revision
3171 -
Directory Listing
Modified
Tue Feb 15 21:53:23 2005 UTC (8 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Improved the Real(), Complex(), Point(), Vector(), Matrix() and
String() constructors so that they will process formulas passed to
them as strings rather than requiring perl objects for these.
For example, you can use Real("2/3") rather than Real(2/3) if you
want. Also, Real("1+x") will return a formula returning a real
(essentially the same as Formula("1+x") in this case).
Revision
3166 -
Directory Listing
Modified
Tue Feb 15 02:20:52 2005 UTC (8 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed an error with Matrix() that could cause it to loop infinitely
when bad data is passed to it.
Also, allow Matrix(), Point(), Vector(), and Real() to accept string
values that are evaluated to produce the value returned.
(Sorry, accidentally committed with a blank message.)
Revision
3165 -
Directory Listing
Modified
Tue Feb 15 02:16:10 2005 UTC (8 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
*** empty log message ***
Revision
3159 -
Directory Listing
Modified
Thu Feb 10 22:34:01 2005 UTC (8 years, 3 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a problem that caused errors to occur when ImplicitPlane() was
called with a formula whose constant term is a negative number that is
produced by a computation.
Revision
3158 -
Directory Listing
Modified
Wed Feb 9 18:36:18 2005 UTC (8 years, 3 months ago) by
apizer
Original Path:
trunk/pg
Allow labels A - ZZ
Arnie
Revision
3136 -
Directory Listing
Modified
Sat Feb 5 14:07:55 2005 UTC (8 years, 3 months ago) by
jj
Original Path:
trunk/pg
Work around IE bug for ordered lists. Maybe someday this can be undone.
Revision
3093 -
Directory Listing
Modified
Sun Jan 16 00:52:49 2005 UTC (8 years, 4 months ago) by
gage
Original Path:
trunk/pg
Undoing some of the temporary changes I made to the warn message.
This may break what happens with xmlrpc however. (sigh)
Revision
3074 -
Directory Listing
Modified
Tue Jan 4 17:56:33 2005 UTC (8 years, 4 months ago) by
dpvc
Original Path:
trunk/pg
Fixed index problem with matrix multiplciation. (It was returning the
transpose!)
Revision
3071 -
Directory Listing
Modified
Sat Jan 1 22:29:41 2005 UTC (8 years, 4 months ago) by
gage
Original Path:
trunk/pg
Temporary modifications which allow the Warning mechanisms to work when
using the XML access methods.
This needs to be looked at again. There is also a problem with defining
permissions for creating directories. There is a temporary #FIXME
that seems to work.
Revision
3047 -
Directory Listing
Modified
Sat Dec 18 21:52:58 2004 UTC (8 years, 5 months ago) by
gage
Original Path:
trunk/pg
Changed comment to This answer is the same as the one you just submitted
or previewed. This addreses bug #557
Revision
3039 -
Directory Listing
Modified
Fri Dec 17 17:11:46 2004 UTC (8 years, 5 months ago) by
gage
Original Path:
trunk/pg
Added a check to handle the case when the $errors flag was not defined.
Revision
2991 -
Directory Listing
Modified
Tue Nov 9 15:23:38 2004 UTC (8 years, 6 months ago) by
gage
Original Path:
trunk/pg
Defined some variables that were causing warning messages.
Someone more familiar with this script should look at this
to make sure that this subsection of the parser is working correctly.
-- Mike
Revision
2988 -
Directory Listing
Modified
Fri Nov 5 17:54:12 2004 UTC (8 years, 6 months ago) by
jj
Original Path:
trunk/pg
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
2986 -
Directory Listing
Modified
Thu Nov 4 22:01:18 2004 UTC (8 years, 6 months ago) by
apizer
Original Path:
trunk/pg
relative tolerence was not being used correctly. Fixed this.
Arnie
Revision
2985 -
Directory Listing
Modified
Wed Nov 3 22:39:21 2004 UTC (8 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug in processing absolute values with implicit
multiplication.
Revision
2984 -
Directory Listing
Modified
Wed Nov 3 22:00:56 2004 UTC (8 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Modifications needed for the control of jsMath's "missing font"
message.
Revision
2982 -
Directory Listing
Modified
Wed Nov 3 21:27:42 2004 UTC (8 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Fixed an error where any plane is accepted if the d is 0 in
ax + by + cz = 0.
Revision
2972 -
Directory Listing
Modified
Tue Nov 2 20:47:23 2004 UTC (8 years, 6 months ago) by
sh002i
Original Path:
trunk/pg
added README and LICENCE files.
Revision
2969 -
Directory Listing
Modified
Tue Nov 2 01:55:21 2004 UTC (8 years, 6 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typo in a comment.
Revision
2958 -
Directory Listing
Modified
Sun Oct 24 14:36:35 2004 UTC (8 years, 6 months ago) by
jj
Original Path:
trunk/pg
This seems to fix bug 713. I don't see why one would want the line below
commented out.
Revision
2957 -
Directory Listing
Modified
Sun Oct 24 14:33:36 2004 UTC (8 years, 6 months ago) by
jj
Original Path:
trunk/pg
Make combinations function C(n,k) return 0 when k>n, which is standard.
Maybe P(n,k) should do the same instead of throwing an error?
Revision
2938 -
Directory Listing
Modified
Tue Oct 19 00:24:47 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Added reduction rules to remove redundent negatives.
Override string and TeX methods that avoid redundent parentheses.
Revision
2937 -
Directory Listing
Modified
Tue Oct 19 00:23:01 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Added "areParallel" method as a synonym for "isParallel".
Revision
2936 -
Directory Listing
Modified
Tue Oct 19 00:22:07 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Don't promote an object unless it is a Value object.
Revision
2935 -
Directory Listing
Modified
Tue Oct 19 00:20:02 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Prevent automatically reducing negatives in student answer, so the
sign doesn't change behind our back.
Revision
2934 -
Directory Listing
Modified
Tue Oct 19 00:15:54 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Handle error messages better. Produce an error if the student answer
is a constant vector. Prevent reduction of some negatives in order to
avoid -(a+bt). Allow students to provide answer in terms of points
rather than vectors.
Revision
2933 -
Directory Listing
Modified
Tue Oct 19 00:11:50 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Changed the order of variables in calls to Plane() so that it
corresponds to the usage in ImplictPlane(). Also fixed a typo in
capitalization of @N.
Revision
2932 -
Directory Listing
Modified
Tue Oct 19 00:08:04 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
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
2916 -
Directory Listing
Modified
Wed Oct 13 18:41:07 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Clear error messages before doing the answer check (this clears old
messages left over inclass this checker is called by another one,
e.g. when using UNORDERD_ANS()).
Revision
2915 -
Directory Listing
Modified
Wed Oct 13 03:31:17 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Trap errors in functions that are not native perl functions (like
acos() and csc(), etc.). In the past, if an error occurred within the
definition of a function, the error message that was reported was the
internal error within the definition of the function. For example
csc(0) would report "illegal division by zero", while acos(-2) would
report "can't take sqrt of -3". Now the errors will be "can't take
csc of 0" and "can't take acos of -2".
Revision
2914 -
Directory Listing
Modified
Wed Oct 13 02:41:33 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Added support for useBaseTenLogs to make log() work like ln() or
log10() depending on the value in the course.conf file.
Also fixed a bug that caused the WeBWorK parameters not to be
copied into contexts by initCopy().
Revision
2912 -
Directory Listing
Modified
Wed Oct 13 01:35:51 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typo in the comments.
Revision
2909 -
Directory Listing
Modified
Tue Oct 12 20:49:25 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
In Complex context, make sqrt() and log() of negative numbers return
their complex values. Also make ^ and ** do the same with negative
bases. These can be controlled by setting/clearing the
"negativeIsComplex" entry for these functions and operators.
Revision
2908 -
Directory Listing
Modified
Tue Oct 12 20:46:43 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Report errors for powers of negative numbers rather than return 'nan'.
Don't allow 'nan' to be made into a Real object.
Revision
2907 -
Directory Listing
Modified
Tue Oct 12 20:44:20 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
In StandardPrecedence mode, make the precedence of function apply
match that in use by that AlgParser.
Revision
2900 -
Directory Listing
Modified
Tue Oct 12 00:52:47 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Don't give coordinate hints during parallel vector checks. Also fixed
a typo.
Revision
2855 -
Directory Listing
Modified
Sat Oct 2 11:55:31 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
added generic string-only context, and converted contextABCD and
contextTF to use it.
Revision
2842 -
Directory Listing
Modified
Wed Sep 29 15:47:30 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Allow string constants to include spaces.
Revision
2832 -
Directory Listing
Modified
Mon Sep 27 17:47:04 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fix problem with TeX output of implicit multiplication between
items that would put two digits next to each other (like 2 3^2).
Revision
2824 -
Directory Listing
Modified
Thu Sep 23 21:31:41 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Two new Parser contexts, one for matching problems involving answers
like A, B, C and D, the other for T/F answers. These contexts have an
advantage over the standard str_cmp() checker in that it will give
additional error messages when the student enters an unrecognized answer.
Revision
2823 -
Directory Listing
Modified
Thu Sep 23 21:09:14 2004 UTC (8 years, 7 months ago) by
dpvc
Original Path:
trunk/pg
Fixed Parser so that you can replace the Formula class as well as the
other object types.
Revision
2803 -
Directory Listing
Modified
Sun Sep 19 15:11:08 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
The $Parser::class variable was being handled after the "use"
statements at the end, so had to put a BEGIN around it.
Revision
2802 -
Directory Listing
Modified
Sun Sep 19 14:43:32 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Eliminated unneeded parentheses in TeX output when unary minus and
plus are used with fractions.
Revision
2801 -
Directory Listing
Modified
Sun Sep 19 14:41:57 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
More changes for the isZero and isOne checks. (Missed this file when
I committed the others.)
Revision
2800 -
Directory Listing
Modified
Sun Sep 19 14:27:39 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added isZero and isOne checks for Parser::Value objects (i.e., for
constants within formulas). These now correctly handle vector and
matrices, in particular. The isOne and isZero checks are used in the
reduce() method to simplify formulas.
Revision
2799 -
Directory Listing
Modified
Sun Sep 19 11:49:32 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added a new flag to the Formula()->cmp answer checker that allows a
constant-valued formula to be evaluated and then use the checker for
the resulting type. This is useful when you want the correct answer
for a numeric check to be shown in a symbolic form (like "pi/4")
rather than as a decimal number. To do this, use
Formula("pi/4")->cmp(eval=>1);
rather than Real(pi/4)->cmp, which would show the correct answer as
0.785398. Note that Formula("pi/4")->cmp would also match against
pi/4, but it does it as a function rather than a number, so error
messages might be issued indicating that the checker is expecting a
formula that returns a number, rather than just a number; this might
be confusing to a student. It would also accept answers like
"pi/4-x+x" as correct, whereas with eval=>1 this would produce an
error message saying that the answer was supposed to be a number not a
formula returning a number.
Similarly, if you want to show sqrt(2)/2 as the correct answer, use
Context()->flags->set(reduceConstants=>0, reduceConstantFunctions=>0);
Formula("sqrt(2)/2")->cmp(eval=>1);
The first line tells the parser not to automatically reduce
expressions that only involve constants, so that the value of the
formula in the second line will not be reduced to a decimal before
the cmp method is called.
Revision
2798 -
Directory Listing
Modified
Sun Sep 19 11:29:06 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make Formula()->eval return a Real (ie, aValue::Real object) rather
than a perl number. That way, you can use $f->eval->cmp rather than
needing Real($f->eval)->cmp, and so on.
Also make Formula()->perl do the same, for consistency.
(This could have been accomplished by having the Parser::Number class
evaluate to a Real, but for efficiency during computation, we put
off making the Real object until the end. It probably doesn't make
that big a difference, but every little bit helps.)
Revision
2797 -
Directory Listing
Modified
Sun Sep 19 01:16:10 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
File needed to reduction flags that was accidentally left out of the
previous commit. Sorry!
Revision
2796 -
Directory Listing
Modified
Sun Sep 19 01:15:03 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added flags that control the reductions performed by
Formula()->reduce. Each reduction operation can be individually
enabled or disabled in the context, and in the reduce() call itself.
More complex reductions need to be developed.
Revision
2795 -
Directory Listing
Modified
Sat Sep 18 23:16:37 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typo in addParens method name.
Revision
2791 -
Directory Listing
Modified
Thu Sep 16 23:43:54 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Don't reduce constants in the display of student answers (so they can
tell how the parser interprets their answer). The drawback is that
the final number is not displayed. (We may need to add more columns
to the results display.)
Revision
2790 -
Directory Listing
Modified
Thu Sep 16 23:03:03 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Use extra parens in the string version of the student's answer, but
not in the professor's (unless the problem sets the showExtraParens
flag).
Revision
2789 -
Directory Listing
Modified
Thu Sep 16 22:24:32 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added context flags to control automatic reduction of operations that
involve only constant values. The default is to combine constants,
but this can now be disabled.
Also added a new flag to control the addition of extra parentheses
that make string values painfully unambiguous (these are for
situations that students tend to get wrong). By default this is
turned off (so that professor answers won't contain excessive
parentheses), but the answer checker will be made to turn this on for
student answers.
Finally, when extra parens are added to formulas, they alternate
between ( ) and [ ] to make it easier to read.
Revision
2788 -
Directory Listing
Modified
Thu Sep 16 22:19:59 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Produce an error when attempting to auto-create a formula using a
function that has been removed from the current context.
Revision
2781 -
Directory Listing
Modified
Tue Sep 14 21:36:45 2004 UTC (8 years, 8 months ago) by
apizer
Original Path:
trunk/pg
Fixed bug with useBaseTenLog
Arnie
Revision
2772 -
Directory Listing
Modified
Sun Sep 12 11:11:47 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Make partial credit in list answer checkers be the default (now that
WeBWorK can handle this).
Revision
2771 -
Directory Listing
Modified
Sat Sep 11 17:11:29 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug with constants where the values were being cached so that
changes in the context were not being reflected in the formulas that
use them.
Revision
2768 -
Directory Listing
Modified
Fri Sep 10 23:55:31 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
When creating formulas from functions, don't evaluate even if the
formula is constant. (This makes it possible to create automatically
create formulas even if they only contain constants.)
Revision
2757 -
Directory Listing
Modified
Fri Sep 10 14:50:14 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
No longer produces the message that there are too many answers if
hints are being shown about individual entries in a list. (This gave
away the answer about which ones to remove.)
Revision
2756 -
Directory Listing
Modified
Fri Sep 10 14:48:35 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Changed the error message produced for functions that have been
removed from the parser. I hope this will be more appropriate for
students.
Revision
2746 -
Directory Listing
Modified
Wed Sep 8 02:00:52 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed error where AlgParser produces \sech and \csch, which are not
defined in TeX. This fixes bug #665.
Revision
2733 -
Directory Listing
Modified
Sat Sep 4 20:45:31 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
This file defined an answer checker for lists of variable names
(ordered or unordered, and optionally enclosed in parentheses). You
can use this answer checker for questions that give a system of
equations and ask which variables are the dependent and which the
independent variables, for example.
Revision
2732 -
Directory Listing
Modified
Sat Sep 4 20:42:45 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
This file provides an answer checker that determines whether two
students answers compose to form a given function. The student
answers are not allowed to be the identity function, or a function
that is trivially generated from the composition.
See the comments within the file for details about how to use it.
Revision
2731 -
Directory Listing
Modified
Sat Sep 4 20:40:43 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
This file defines a NumberWithUnits class for that provides an answer
checker for numbers with units. It uses the same units package that
the standard answer checkers use, but this will eventually be replaced
by a more complete Units class within the parser itself. The class
produces a preview string in which the units show appropriately.
Revision
2730 -
Directory Listing
Modified
Sat Sep 4 20:31:55 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
This file defines a DifferenceQuotient class that provides an answer
checker for difference quotients. These include a variable "dx" (or a
user specified one) that can be used as part of the formula, and the
student must simplify the answer at least enough to remove the dx from
the denominator.
Revision
2729 -
Directory Listing
Modified
Sat Sep 4 20:29:52 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
This file provides some convenient tools for generating random points
and vectors that are not the zero vector, plus some other misc. utilities.
Revision
2728 -
Directory Listing
Modified
Sat Sep 4 20:28:33 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
This file defines a ParametricLine class that provides an answser
checker for lines in any dimension given parametrically. The answer
checker will recognize the line even if the point and direction vector
used by the student are not the same as the ones used by the
professor.
See the comments within the file for examples of how to use it.
Revision
2727 -
Directory Listing
Modified
Sat Sep 4 20:26:23 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
This macro file defines an ImplicitPlane (and inplicit line) class of
Parser object that provides an answer checker for planes (or
hyperplanes in any dimension) of the form ax + by + cz = d. Students
can provide their answer in any (linear) form that is equivalent to
this.
The class accepts several formats for specifying the correct-answer plane.
Revision
2726 -
Directory Listing
Modified
Sat Sep 4 20:21:32 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
These files provide contexts for the Parser in which only limited
operations are allowed. The LimitedNumeric context is analogous to
strict_num_cmp(). The other contexts are similar, but for the
indicated type of answer. In the LimitedVector context, for example,
the student can enter vectors, and can perform numeric operations
within the coordinates of the vectors, but can't perform vector
operations like vector addition or cross product.
Revision
2701 -
Directory Listing
Modified
Sat Aug 28 15:53:09 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Only convert (f(x))^2 to f^2(x) for specified functions f
(as marked in the Context).
Revision
2698 -
Directory Listing
Modified
Sat Aug 28 13:52:33 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
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
2697 -
Directory Listing
Modified
Sat Aug 28 12:43:57 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Two more minor TeX improvements.
Revision
2696 -
Directory Listing
Modified
Sat Aug 28 12:34:56 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Improved TeX and string output in a number of situations. Improved
use of parentheses to avoid things like x+-3. Fixed wrong parentheses
in powers. Display (sin(x))^2 as sin^2(x) in TeX output.
Revision
2692 -
Directory Listing
Modified
Fri Aug 27 21:49:36 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Use the current context if the answer doesn't have one itself (like
with Value objects).
Revision
2688 -
Directory Listing
Modified
Fri Aug 27 19:42:59 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added in functMaxConstantOfIntegration support in the adaptive
parameter answer checking. Also added a flag to the formula answer
checker that allows checking a formula up to a constant (for
integration problems). This really just adds a new parameter to the
context and adds that to the formula, so there is nothing deep about
this.
ANS(Formula("2x")->cmp(upToConstant=>1));
Finally, don't look for adaptive parameters if they aren't actually
used in the professor's formula (even if they are defined).
Revision
2687 -
Directory Listing
Modified
Fri Aug 27 00:28:27 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added ability to have linear adaptive parameters in the function
answer checker. It only works for real-valued functions, though.
To use a parameter, use
Context()->variables->add(a=>'Parameter');
and then use 'a' as a variable within your answer. The student will
not be allowed to enter the parameter, but the professor will.
Note that the correct answer will show the full professor's answer,
including the parameters, even though the student can't type it. Is
this the right behaviour?
Revision
2684 -
Directory Listing
Modified
Tue Aug 24 21:35:21 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added the makeUnion call that was removed earlier. The AnswerChecker
for formulas sometimes called it (when the student's answer is constant).
Revision
2682 -
Directory Listing
Modified
Tue Aug 24 03:36:54 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug with sin^2 x that introduced when I adjusted the
error report for implied multiplication.
Revision
2681 -
Directory Listing
Modified
Tue Aug 24 03:34:47 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
TeX mode now adds parentheses around fractions, when needed.
Revision
2680 -
Directory Listing
Modified
Tue Aug 24 03:33:30 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Made string function look for a string field in teh definition of the
function as an override for its name. (This way, you can make asin
appear as arcsin or even sin^(-1) if you want).
Revision
2679 -
Directory Listing
Modified
Tue Aug 24 03:31:47 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed wrong error messages when operators are undefined in a context.
Revision
2678 -
Directory Listing
Modified
Mon Aug 23 23:55:37 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Modified the parser so that the classes for the various object
constructors are stored in the context table rather than hard-coded
into the parser. That way, you can override the default classes with
your own. This gives you even more complete control to modify the
parser. (You had been able to replace the definitions of operators,
functions and list-like objects, but could not override the behaviour
of numbers, strings, variables, and so on. Now you can.)
This effects most of the files, but only by changing the name of the
calls that create the various objects.
There are also a couple of other minor fixes.
Revision
2676 -
Directory Listing
Modified
Mon Aug 23 05:00:16 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Better highlighting for syntax error involving implied
multiplication. (No highlighted had been done in the past.)
Revision
2675 -
Directory Listing
Modified
Mon Aug 23 04:59:05 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Get the type right when evaluating an AbsoluteValue and obtaining a
Value object.
Revision
2674 -
Directory Listing
Modified
Mon Aug 23 04:58:00 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Remove more lines in error messages produced while evaluation student
answers.
Revision
2673 -
Directory Listing
Modified
Mon Aug 23 01:21:27 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Moved WW-specific routines from Parser.pm to WeBWorK.pm.
Changed error reporting when the error message was not generated by
the parser directly. (The stack trace and line number references are
removed before the error is reported.)
Revision
2672 -
Directory Listing
Modified
Sun Aug 22 22:46:14 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added easy calls to disable/enable collections of functions or
individual functions in the current context. So you can say
Parser::Context::Functions::Disable('Trig');
to disallow the use of trig functions, or
Parser::Context::Functions::Disable('Trig','Numeric');
Parser::Context::Functions::Enable('sqrt');
to disable trig and numeric functions (like log, exp, abs, etc) but
allow sqrt.
Note that disabling sqrt() does not disable x^(1/2) (this must be done
through disabling the ^ and ** operators), and disabling abs() does
not disable |x| (which must be done by removing the '|' definition
from the Context's parens list).
Revision
2671 -
Directory Listing
Modified
Sun Aug 22 21:18:06 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed some inconsistencies between handing of matrices within the
parser and Value packages. Added a predefined Matrix context.
Revision
2670 -
Directory Listing
Modified
Sun Aug 22 16:06:28 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Had the default granularity the wrong direction.
Revision
2669 -
Directory Listing
Modified
Sun Aug 22 15:42:50 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Made the granularity of the test-point intervals be a parameter that
can be set on a global or variable-by-variable basis, so this is now
controlable from the .pg file. For example:
Context("Numeric")->variables->are(
k=>{limits=>[1,10], resolution=>1},
x=>{limits=>[-2,2], granularity=>1000},
);
will make k be a variable that will only take on integer values
between 1 and 10, and x a variable that will take on one of 1000
different values evenly spaced between -2 and 2 (so resolution is
4/1000 in this case).
These parameters can also be set for an individual formula:
$f = Formula("k^2-1");
$f->{resolution} = 1;
$f->{limits} = [0,10];
Revision
2668 -
Directory Listing
Modified
Sun Aug 22 02:55:38 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Fixed TeX output of Matrices to use \array rather than \matrix for
matrices with formulas as entries (this had already been fixed for
constant matrices). Made intervals produce formulas when of of the
endpoints is a formula. Removed unneeded comment.
Revision
2667 -
Directory Listing
Modified
Sun Aug 22 02:51:53 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added support for dimension warnings in the answer checker for
formulas that return points, vectors or matrices.
Revision
2666 -
Directory Listing
Modified
Sun Aug 22 00:56:32 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Formulas can now be compared even if their variables are complex
numbers, or even points or vectors! This makes it possible to ask
students for complex functions like z^2+i and so on.
You can specify limits for variables either via
Context()->variables->set(x=>{limits=>[0,1]}) (for reals) or
Context()->variables->set(z=>{limits=>[[-2,2],[0,1]]}) (for complexes).
Similarly for points and vectors (where the number of sub arrays
depends on the dimension). You can also give the limits for a
specific formula by assigning to its ->{limits} field:
$f = Formula("sqrt(x-10)");
$f->{limits} = [10,12];
There are now named variable types for 'Point2D', 'Point3D',
'Vector2D' and 'Vector3D', in addition to 'Real' and 'Complex'.
You can also specify a variable type by giving an explicit instance of
a value of the given type. E.g.
Context()->variables->add(x=>'Real',y=>0); # two real variables
Context()->variables->add(z=>'Complex',w=>i); # two complexes
Context()->variables->add(r=>Vector(0,0,0)); # a vector in R^3
Context()->variables->add(X=>'Vector3D'); # a vector in R^3
There still needs to be more error checking in processing
user-supplied limits, but I'm not sure how much overhead is worth it.
Revision
2665 -
Directory Listing
Modified
Sun Aug 22 00:41:44 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Made the default context be Numeric context rather than Full context.
Since there is only one variable in this context, it will speed up
function answer checking. It will also encourage you to choose the
correct context explicitly.
Also changed Complex context to have z as the only variable. If you
want x and y as reals, you need to add them in by hand. Again, this
is for efficiency in answer checking.
Revision
2664 -
Directory Listing
Modified
Sat Aug 21 22:02:14 2004 UTC (8 years, 8 months ago) by
dpvc
Original Path:
trunk/pg
Added a file to perform WeBWorK-specific modifications to the
Parser/Value packages. (I've tried to make these independent of
WeBWorK, so you can use them in other perl code if you want to.)
The parameters for fuzzy reals and some of the other parameters now
are taken from the pg->{ansEvalDefaults} values (as defined in
global.conf or course.conf). More still needs to be done with this,
however.
Revision
2661 -
Directory Listing
Modified
Fri Aug 20 15:56:56 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
A number of fixes to make handing lists work better. In particular,
you can now specify checks for whether the right kinds of parentheses
(or none at all) are used on the student's answer. Some of the flags
for the list checker have been changed to accommodate this.
Revision
2660 -
Directory Listing
Modified
Fri Aug 20 15:52:32 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
A number of adjustments to get negative infinities to work better.
They used to be stored as separate Parser strings, but now they are
flagged versions of a single string.
All of the problems are really due to the fact that there is no
Infinity class in the Parser (only a Value version). That should be
changed, but will require some work, and can be put off for now.
It would be best if the classes within the two packages would match up
nearly 1-to-1, but for historical reasons, they don't. Since the
introduction of Real, String and Infinity classes to the Value
package, The Infinity class is the one main difference between the
two, and once that is fixed, everything needs to be looked over to
check for unnecessary complications due to the historical lack of classes
in one or the other package.
Revision
2658 -
Directory Listing
Modified
Fri Aug 20 11:17:06 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make blank patterns be ^$ (which should never match) rather than empty
(which always matches). this fixes a problem where if a context has
no functions, for example, the parser would attempt to create function
calls to a function named ''.
Revision
2657 -
Directory Listing
Modified
Fri Aug 20 11:13:51 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Handle trapped error messages that are not produced by the parser
error reporter (i.e., by bugs within the parser itself). Also added
an error if implied multiplication is attempted when the operator for
it is not defined in the current context.
Revision
2656 -
Directory Listing
Modified
Fri Aug 20 02:13:38 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
We need to protect the HTML in the professor's answer so that if it
contains <, for example, it won't disappear.
Revision
2654 -
Directory Listing
Modified
Fri Aug 20 02:11:08 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Avoid possible infinite recursion in promotePrecedence() when special
precedence is used.
Revision
2653 -
Directory Listing
Modified
Thu Aug 19 17:31:18 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed error with handling of +infinity and -infinity.
(They had been defined as strings, but now we can let the + and -
operators handle them).
Revision
2650 -
Directory Listing
Modified
Thu Aug 19 14:23:00 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added Parser::Number::NoDecimals() function that causes the parser to
give an error message when the student types a decimal number. This
means the student must enter fractions as fractions, or values like
sqrt(2) or pi/4 symbolically not numerically.
Revision
2649 -
Directory Listing
Modified
Thu Aug 19 14:19:32 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed an error in the generation of regexp patterns for the various
data types.
Revision
2648 -
Directory Listing
Modified
Thu Aug 19 12:38:47 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
The answer checkers now work with subclasses of Formulas that are not
part of the Value:: package tree itself (we call Value::isFormula()
rather than checking the class directly).
I also removed the various cmp_* flags that stored method names as
they ended up not needing to be used (they were intended as a means of
overriding the default method names, but subclassing turned out to be
a better approach).
I moved some initialization of the answer checker out of the anonymous
subroutine that is installed in the checker and just have that
subroutine call the correct answer's main checker (which I renamed).
Finally, I changed the student_ans value to be an HTMLized version of
the student answer, since the student could include things like < in
his answer (e.g., for vectors), in which case his whole answer might
disappear. I wonder if this couldn't be handled better at a higher
level, as it seems wrong to make the student_ans be HTML rather than
the parsed string. I originally thought Problem.pm could do the
protecting of HTML special characters, but this won't work without
additional changes, since some answer checkers put HTML into
student_ans to mark sytanx errors in the student answer, and you DON'T
want to protect those HTML characters. The student_ans field is
probably being misused in this, and there might want to be another
field that gets used by Problem.pm in place of student_ans (which can
be HTML protected) when it is non-empty; say student_HTML or something
like that. The answer checkers could use that field if it wants to
add HTML to the student answer, and student_ans otherwise, with the
assurance that it's HTML characters will be protected. That way, if a
second answer checker calls the first (like some list checkers do),
then the second checker doesn't have to worry about removing HTML from
the student ans, and doesn't ahve to wonder whether the student_ans
actually contains an error message or syntax markings rather than the
actual student answer.
Revision
2647 -
Directory Listing
Modified
Thu Aug 19 12:18:56 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Context() now accepts a reference to an actual Context object rather
than a name of a predefined context, and will switch to that.
Revision
2646 -
Directory Listing
Modified
Thu Aug 19 12:16:41 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make it possible to create subclasses of objects in the value package
that are not actually in the Value:: package tree. This makes it
possible to have .pl files (that are run via loadMacros) that create
new Value object classes that are local to the problem rather than
global to the system. (With mod_perl, if a .pl file added to the
Value:: tree itself, the results would be persistent, and this could
adversely affect future problems processed by the same httpd child
process. It could lead to "redefined subroutine" errors, or worse.)
This provides a safe way to extend the parser on a problem-specific
basis.
This technique is used in the line and plane answer checkers (coming
soon), for example. If such a checker becomes widely used, it can
always be added into the Value:: tree at a later time.
Revision
2645 -
Directory Listing
Modified
Thu Aug 19 12:02:15 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make sure equality always returns a defined value, and
put spaces around the equal sign in string output.
Revision
2644 -
Directory Listing
Modified
Thu Aug 19 12:01:12 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make sure loadMacros() doesn't try to load these files more than once.
Revision
2643 -
Directory Listing
Modified
Thu Aug 19 11:55:56 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Use the standard precedences rather than the experimental ones by
default. The professor will need to specificaly request the
non-standard ones, for now.
Revision
2634 -
Directory Listing
Modified
Tue Aug 17 15:21:58 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changed the string used for the student answer to be taken from the
unevaluated formula rather than the fully-evaluated one. This leaves
constants unreplaced, for one thing.
Currently the parser combines constants automatically during the parse
[which should be controllable by a flag], so student answers that
produce numbers are fully evaluated at this point already, except for
constant substitution. This could be changed so that even for
numberic results, the student sees the parsed expression (rather than
the numeric result), which might help them identify where they and the
parser differ in their interpretation. It is still nice to see the
final computed result, however, but there is no place to show the
parsed input as well as the final result. One solution would be to
add another column (wasting space). Another would be to make the
value shown be "parsed-value = computed-value" when they are not the
same thing. A bit ugly, but works within the current framework.
Revision
2632 -
Directory Listing
Modified
Tue Aug 17 12:05:18 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed typo in name of random generator.
Revision
2629 -
Directory Listing
Modified
Tue Aug 17 02:01:27 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a number of minor problems with creating perl functions from
formulas (this is done automatically as part of the function answer
checker, so is showing up now that I have that checker in place).
Also improved error messages in the function answer checker, and fixed
a bug when students enter a constant list or union when the answer
checker expects formulas.
Revision
2628 -
Directory Listing
Modified
Mon Aug 16 21:41:05 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Allow parser "constants" to be (in reality) formulas. That way, for
example, you can defined T, N and B to be the formulas for the unit
tangent, normal and binormal of a space curve (as functions of "t")
and the student can write anwers in terms of T, N and B (without
having to compute them).
You could have created FUNCTIONS T(t), N(t) and B(t), and added them
to the parser to get almost the same effect, but the students would
have had to include the "(t)". (If you want that, go ahead and do it
that way.)
Revision
2627 -
Directory Listing
Modified
Mon Aug 16 20:22:16 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Removed unwanted side-effects of some type-match checks, and moved the
ignoreStrings flag so that it is available for the checkers of ANY type.
Revision
2626 -
Directory Listing
Modified
Mon Aug 16 19:44:26 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
One more fix for handling intervals properly (I think it's really
right this time). Also, named constants that end in numbers will
produce TeX output with the number as a subscript (this was already
true for variable names).
Revision
2625 -
Directory Listing
Modified
Mon Aug 16 18:35:12 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added string comparison to all Value object classes (to compare the
string value of an object to another string).
Overloaded perl '.' operator to do dot product when the operands are
formulas returning vectors. (Part of the auto-generation of
formulas).
A few improvements to real and complex class output results.
Made Union class slightly more robust and removed need for makeUnion
method other than in the Union itself.
Revision
2624 -
Directory Listing
Modified
Mon Aug 16 13:44:45 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added support for unorderd list or formulas with partial credit.
Fixed type mismatch reporting in formula answer checker.
Fixed an error with Unions producing incorrect perl versions under
some circumstances.
Revision
2622 -
Directory Listing
Modified
Sun Aug 15 22:46:57 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Created the first draft of the Parser's function answer checker. Some
work still needs to be done, in particular, type mismatches are not
being reported, and lists are being processed only as ordered lists
with no partial credit.
This doesn't implement everything from fun_cmp. In particular, there
is no support for parameter matching at the moment. This will have to
be added, but I'm not quite sure how to do it when the function's
return value is not a real number (e.g., an interval).
On the other hand, this checker is more forgiving about domain errors:
if tries a point where the professor's function is not defined, it
ignores that one and looks for another (until it decides it can't find
one). Once it has these points, it tries them on the student's
answer, and if the student's function is undefined, then the student
answer is wrong (since it is not defined somewhere that the
professor's funciton is). This avoids the "Error evaluating student
function at ..." messages, which just confused most students anyway.
Revision
2621 -
Directory Listing
Modified
Sun Aug 15 17:05:41 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Improved error messages, particularly when the student enters a
formula in an answer that should be constant, and also for incorrect
answers in lists of answers. There are a few other miscellaneous output
improvements as well.
Revision
2620 -
Directory Listing
Modified
Sun Aug 15 12:02:05 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Had to put back the global context variable after all. :-(
It gets reset in Parser.pl, so it should be OK even with mod_perl.
Revision
2619 -
Directory Listing
Modified
Sun Aug 15 00:45:46 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Modified Context() function so that it no longer uses a global package
variable for storing the user's context table.
Revision
2617 -
Directory Listing
Modified
Sun Aug 15 00:13:38 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
The Union answer checker now uses the generic List checker, so that it
will be able to produce partial credit and hints about which Intervals
are correct.
Revision
2616 -
Directory Listing
Modified
Sat Aug 14 21:29:21 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added an equality operator (not active initially) that can be used for
things like equations of planes and so on. I'm working on the answer
checker for that.
Revision
2615 -
Directory Listing
Modified
Sat Aug 14 21:27:45 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
*** empty log message ***
Revision
2612 -
Directory Listing
Modified
Sat Aug 14 19:29:42 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed some bugs in the handle of the context in ->string and ->TeX
methods of Value objects.
Revision
2611 -
Directory Listing
Modified
Sat Aug 14 15:59:35 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a typo in one of the parser answer checkers. Added a line that
was incorrecctly removed in the parser.
Revision
2610 -
Directory Listing
Modified
Sat Aug 14 13:55:54 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
The class file for the Value::String object. (Forgot to add it before
the last commit. Sorry!)
Revision
2609 -
Directory Listing
Modified
Sat Aug 14 13:54:52 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added a String type to the Value package. Mostly this is to make it
possible to generate an answer checker for it that uses the parser.
It also makes it more consistent for handling things like stringify,
especially when they are recursively called internally.
Added new default strings "NONE" and "DNE", since these get used a
lot.
Modified how the default parameters are set up for the answer
checkers, and how the answer checker reports the expected answer type
in type mismatch error messages.
Revision
2608 -
Directory Listing
Modified
Sat Aug 14 13:49:56 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added Infinity function (similar to i and pi) for creating infinity
constants.
Revision
2607 -
Directory Listing
Modified
Sat Aug 14 11:26:49 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Allow unary + and - to work on infinities.
Revision
2606 -
Directory Listing
Modified
Sat Aug 14 11:25:47 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Can now specify that the objects stringify themselfs in their TeX
forms rather than their answer-string forms. This makes it easier to
use the objects in the text of a problem (without having to call ->TeX
explicitly each reference).
Use
Context()->texStrings
to start outputting TeX strings, and
Context()->normalStrings
to switch back.
Revision
2605 -
Directory Listing
Modified
Sat Aug 14 02:50:18 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Incorporated infinities into Parser package better. They have been
stored as String objects (with extra data) in the parser, and I've
left it that way, but now they convert to/from Vallue::Infinity
objects correctly, and these are used for generating the output.
Also added the Infinity answer checker, and adjusted the error
messages produces by type mismatches in the answer checkers and
elsewhere.
Revision
2604 -
Directory Listing
Modified
Fri Aug 13 23:49:16 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed some output issues with intervals and unions.
Revision
2603 -
Directory Listing
Modified
Fri Aug 13 23:01:07 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added an Infinite object class for the Value package. Still need to
add it to the Parser package.
Revision
2602 -
Directory Listing
Modified
Fri Aug 13 22:57:27 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Changed the way the parser checks to see if it is loaded.
Revision
2601 -
Directory Listing
Modified
Fri Aug 13 19:06:09 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added ability to report incorrect coordinates in point and vector
answers, and incorrect endpoints and endpoint types in intervals.
Separated these kinds of checks from the typeMatch check, where they
didn't really belong.
Added ability to specify intervals and unions as strings in Interval()
and Union(), which makes it easier to make constants of these types.
There are still problems comparing intervals that contain infinities;
I really need to make the infinity object to solve this, so have put
off trying to fix that for now.
Revision
2600 -
Directory Listing
Modified
Fri Aug 13 14:39:16 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Handle list entries that are not Value objects better.
Revision
2599 -
Directory Listing
Modified
Fri Aug 13 14:19:23 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
The List object's answer checker is now considerably improved. It
will allow you to specify an unorderd or ordered check, and whether to
print various kinds of hints for wrong answers.
The checker can return partial credit, but WW doesn't deal well with
this at the moment (some small changes to Problem.pm can take care of
that). Partial credit should be based on $showPartialCorrectAnswers,
but it is disabled for now.
The list answer checker probably still needs some work, especially
with non-numeric lists.
Revision
2597 -
Directory Listing
Modified
Fri Aug 13 11:38:22 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added answer checker for parallel vectors.
Added option to number checker to have it not report type mismatches
for the known strings (like 'infinity'). (Really need a class for
infinities, and a Value.pm class for strings.)
Revision
2596 -
Directory Listing
Modified
Thu Aug 12 23:11:32 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Have parser handle infinities better.
Revision
2594 -
Directory Listing
Modified
Thu Aug 12 20:17:18 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixes for handling intervals better. In particular, deal better with
ambiguous situations, like (1,2) that could be a point.
You can use [a,a] to specify the single point a. I'd like to make {a}
represent this (and maybe even {a,b,c} to form finite sets), but this
would interfere with the use of { and } as alternative parentheses.
(Does anyone really use these?)
Do we need a cross product for intervals (and sets) as a means of
representing regions in R^2 (or higher)?
Revision
2593 -
Directory Listing
Modified
Thu Aug 12 16:48:52 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
This is a preliminary attempt at adding answer checkers that use the
parser. If you have a parser object (like a formula or a vector), you
can use the ->cmp method to get an answer checker appropriate for the
object. For example:
Context('Vector');
$v = Vector(1,2,3);
# print text of problem
ANS($v->cmp);
would produce an answer checker that matched against the vector <1,2,3>.
Most of the parameters are set in the Context, but additional ones can
be passed to the checker (this still needs work).
See the sample problems for more examples.
The checkers for Reals, Complexes, Points, Vectors, Matrices and
Intervals work pretty well. The ones for List and Union objects need
more work, as they only do an ORDERED check at the moment (the student
answers must be in the same order). This needs to be fixed.
The checker for Formula objects (which corresponds to fun_cmp) still
needs to be written.
Revision
2592 -
Directory Listing
Modified
Thu Aug 12 16:40:47 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
A number of small fixes. Most were to fix minor bugs in string and
TeX output, particulary for the various list-based objects (like
vectors, intervals, etc.). There were also some bug fixes in the
comparison routines. Some additional checks were added for valid
intervals when the coordinates are formulas.
Revision
2590 -
Directory Listing
Modified
Wed Aug 11 18:02:44 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Added Real() command to create fuzzy reals.
Revision
2583 -
Directory Listing
Modified
Tue Aug 10 11:22:19 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Fixed generation of LaTeX version of sqrt(...).
Revision
2580 -
Directory Listing
Modified
Mon Aug 9 21:38:58 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Forgot to add this file. It implements the "fuzzy real" class.
Revision
2579 -
Directory Listing
Modified
Mon Aug 9 21:38:01 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Significant update to new parser.
New features include:
Better control over format of vector output (you can now
specify ijk-format rather than <...> format)
"Fuzzy" reals, where the relations like == return true when the
two values are "close enough". (This is controlable using
parameters similar to those used in NUM_CMP).
The fuzzy reals are now used in vectors/points/matrices/complexes/intervals
and so on so that their relations will also be fuzzy. E.g.,
(1E-13,2) == (0,3) will be true, and norm(Vector(0,1E-13)) will
equal 0.
The two main portions of the parser (the Parser and Value packages)
now share a common context object for configuration purposes.
Revision
2576 -
Directory Listing
Modified
Wed Aug 4 20:52:28 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
Make Parser work with PGauxiliaryFunctions.pl, and add the macro files
needed to initialize the parser.
Revision
2574 -
Directory Listing
Modified
Wed Aug 4 20:23:11 2004 UTC (8 years, 9 months ago) by
dpvc
Original Path:
trunk/pg
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 -
Directory Listing
Modified
Wed Jul 28 20:32:33 2004 UTC (8 years, 9 months ago) by
sh002i
Original Path:
trunk/pg
merged changes from rel-2-1-a1 -- stop using that branch.
Revision
2518 -
Directory Listing
Modified
Fri Jul 16 01:32:52 2004 UTC (8 years, 10 months ago) by
gage
Original Path:
trunk/pg
Will create the tempDirectory if it is missing.
this is useful if, for example, you switch the tmp directory from
webwork2/courses/courseName/html/tmp to something like
/ww/htdocs/tmp/courseName
You don't want to create a courseName node for every course, you would
prefer to create only /ww/htdocs/tmp
the current version will create the node courseName if it doesn't exist
(or the name tmp in the first example) but will not create files
higher up the tree.
Revision
2488 -
Directory Listing
Modified
Sun Jul 11 21:36:26 2004 UTC (8 years, 10 months ago) by
gage
Original Path:
trunk/pg
Added better error messages. Removed and extraneous slash.
Revision
2469 -
Directory Listing
Modified
Thu Jul 8 15:29:45 2004 UTC (8 years, 10 months ago) by
apizer
Original Path:
trunk/pg
Create equations directory if it doesn't exist. All directories under
tmp should be recreated if they don't exist.
Arnie
Revision
2461 -
Directory Listing
Modified
Wed Jul 7 21:26:52 2004 UTC (8 years, 10 months ago) by
apizer
Original Path:
trunk/pg
Change permission of tmp files so that they can be removed.
Arnie
Revision
2445 -
Directory Listing
Modified
Tue Jul 6 21:21:20 2004 UTC (8 years, 10 months ago) by
jj
Original Path:
trunk/pg
Allow psvn to equal 0. It could happen in situations where a problem
isn't really assigned to the person.
Revision
2443 -
Directory Listing
Modified
Tue Jul 6 15:16:51 2004 UTC (8 years, 10 months ago) by
jj
Original Path:
trunk/pg
Allow new option for image. extra_html_tags are added to the img tag of the
image. Allows you to control the vertical alignment of an image.
Revision
2420 -
Directory Listing
Modified
Sat Jun 26 21:56:44 2004 UTC (8 years, 10 months ago) by
jj
Original Path:
trunk/pg
Most of the work for adjusting vertical alignment of images is here.
Revision
2409 -
Directory Listing
Modified
Fri Jun 25 16:27:55 2004 UTC (8 years, 10 months ago) by
jj
Original Path:
trunk/pg
Allow option of not using the cache. If its path is the empty string, then
we just return the md5 hash of the latex string followed by a 1.
Revision
2400 -
Directory Listing
Modified
Fri Jun 25 12:32:14 2004 UTC (8 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Fixed error in ANS_NUM_TO_NAME.
Revision
2396 -
Directory Listing
Modified
Thu Jun 24 22:07:22 2004 UTC (8 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Moved the <BR> in std_print_q from the beginning of a line to the end
of a line. This prevents unexpected initial blank lines.
Revision
2393 -
Directory Listing
Modified
Thu Jun 24 21:01:23 2004 UTC (8 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Removed the experimental Parser-based implementations of i(), j() and k().
(sorry about that).
Revision
2392 -
Directory Listing
Modified
Thu Jun 24 21:00:26 2004 UTC (8 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
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
2389 -
Directory Listing
Modified
Thu Jun 24 18:13:33 2004 UTC (8 years, 10 months ago) by
dpvc
Original Path:
trunk/pg
Removed extra spaces from around dvipng images.
(These can cause bad line breaks, e.g. between mathematics and the
punctuation that follows.)
Revision
2370 -
Directory Listing
Modified
Wed Jun 23 01:19:15 2004 UTC (8 years, 10 months ago) by
sh002i
Original Path:
trunk/pg
moved DISPLAY_MODE_FAILOVER into this file
Revision
2369 -
Directory Listing
Modified
Wed Jun 23 01:18:58 2004 UTC (8 years, 10 months ago) by
sh002i
Original Path:
trunk/pg
ImageGenerator is now using WeBWorK::Constants
Revision
2363 -
Directory Listing
Modified
Tue Jun 22 18:03:07 2004 UTC (8 years, 10 months ago) by
jj
Original Path:
trunk/pg
When using the imageCache (which is always), put images into subdirectories
based on the first two characters of their md5 hash.
Revision
2345 -
Directory Listing
Modified
Thu Jun 17 20:02:12 2004 UTC (8 years, 11 months ago) by
apizer
Original Path:
trunk/pg
Changed pacckage name from strict to ww_strict per Sam's suggestion
to prevent redefining warnings.
Arnie
Revision
2292 -
Directory Listing
Modified
Fri Jun 11 16:40:44 2004 UTC (8 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Fixed a bug in jsMath mode where it would not display < (when it looked like
part of a tag).
Also, removed unwanted spaced around input box.
Revision
2277 -
Directory Listing
Modified
Tue Jun 8 02:06:32 2004 UTC (8 years, 11 months ago) by
sh002i
Original Path:
trunk/pg
Reformatted the FUNCTION_CMP subroutine to make it more readable. Also,
one functional change:
< (defined ($inputs_ref->{$prev_ans_label} and $inputs_ref->{$prev_ans_label} =~/\S/) )
> (defined $inputs_ref->{$prev_ans_label} and $inputs_ref->{$prev_ans_label} =~/\S/)
I think the latter was what was intended.
Revision
2274 -
Directory Listing
Modified
Mon Jun 7 23:53:45 2004 UTC (8 years, 11 months ago) by
sh002i
Original Path:
trunk/pg
got rid of remaining calls to "wwerror". Fixes bug #530.
Revision
2270 -
Directory Listing
Modified
Mon Jun 7 11:52:47 2004 UTC (8 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Removed redundant HTML_jsMath check.
Revision
2267 -
Directory Listing
Modified
Mon Jun 7 01:34:34 2004 UTC (8 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Added jsMath support to these files.
Basically, HTML_jsMath should do whatever HTML_dpng mode does. I simply included
it HTML_jsMath every time HTML_dpng appeared.
Revision
2253 -
Directory Listing
Modified
Sat Jun 5 16:13:33 2004 UTC (8 years, 11 months ago) by
jj
Original Path:
trunk/pg
Allow on-the-fly graphics in jsmath and asciimath modes.
Revision
2243 -
Directory Listing
Modified
Wed Jun 2 20:18:48 2004 UTC (8 years, 11 months ago) by
jj
Original Path:
trunk/pg
Fixed bug which caused some debug output to always appear.
Revision
2232 -
Directory Listing
Modified
Mon May 31 15:44:43 2004 UTC (8 years, 11 months ago) by
jj
Original Path:
trunk/pg
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
2215 -
Directory Listing
Modified
Mon May 24 21:24:41 2004 UTC (8 years, 11 months ago) by
jj
Original Path:
trunk/pg
Allow default size of on the fly graphics to be set in global.conf, and make pop-ups of those graphs have windows closer to the size of the graph. Also, pop-ups always make a new window - important for problems which make you compare two or more popped up graphs.
Revision
2206 -
Directory Listing
Modified
Mon May 24 17:51:44 2004 UTC (8 years, 11 months ago) by
jj
Original Path:
trunk/pg
Made on the fly graph names use problem seed rather than psvn. It is a better identifier for pages like SetMaker. Also made image names workable for set names containing periods (for the day when set names are free to contain periods).
Revision
2201 -
Directory Listing
Modified
Mon May 24 02:32:45 2004 UTC (8 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
update to asciimath for MSIE.
Revision
2199 -
Directory Listing
Modified
Mon May 24 01:59:53 2004 UTC (8 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Support for asciimath.
Added preliminary support for asciimath rendering. You must use a
MathML-enabled browser.
Revision
2193 -
Directory Listing
Modified
Mon May 24 01:05:03 2004 UTC (8 years, 11 months ago) by
sh002i
Original Path:
trunk/pg
failover data now passed in via %envir.
Revision
2173 -
Directory Listing
Modified
Sun May 23 01:33:22 2004 UTC (8 years, 11 months ago) by
jj
Original Path:
trunk/pg
Added helpLink for standard help pages in pg files.
Revision
2167 -
Directory Listing
Modified
Sat May 22 22:32:43 2004 UTC (8 years, 11 months ago) by
gage
Original Path:
trunk/pg
Moved be_strict after package main;
Revision
2166 -
Directory Listing
Modified
Sat May 22 22:16:20 2004 UTC (8 years, 11 months ago) by
dpvc
Original Path:
trunk/pg
Files needed for jsMath display mode.
Revision
2164 -
Directory Listing
Modified
Sat May 22 22:10:30 2004 UTC (8 years, 11 months ago) by
gage
Original Path:
trunk/pg
Moving ww_strict.pm forward to 5.8.3 compatible version
with require Carp; commented out
Revision
2163 -
Directory Listing
Modified
Sat May 22 21:34:58 2004 UTC (8 years, 11 months ago) by
gage
Original Path:
trunk/pg
Moved ww_strict.pm back to be identical with strict.pm from perl 5.6
Revision
2158 -
Directory Listing
Modified
Sat May 22 20:48:51 2004 UTC (8 years, 11 months ago) by
gage
Original Path:
trunk/pg
We are now using ww_strict.pm instead of strict.pm in be_strict;
Revision
2157 -
Directory Listing
Modified
Sat May 22 20:46:20 2004 UTC (8 years, 11 months ago) by
gage
Original Path:
trunk/pg
We are using our own version of strict.pm that has a require Carp; commented out.
This is included in be_strict which is used to implement strict within PG macro files
which need to be evaluted inside the Safe compartment
Revision
2155 -
Directory Listing
Modified
Sat May 22 18:04:23 2004 UTC (8 years, 11 months ago) by
jj
Original Path:
trunk/pg
Moved nicestring to PGbasicmacros.
Revision
2153 -
Directory Listing
Modified
Sat May 22 15:53:00 2004 UTC (8 years, 11 months ago) by
gage
Original Path:
trunk/pg
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 -
Directory Listing
Modified
Sat May 22 01:23:17 2004 UTC (9 years ago) by
gage
Original Path:
trunk/pg
Roll back the previous changes. They were added to HEAD instead of to the experimental branch.
Revision
2150 -
Directory Listing
Modified
Sat May 22 01:19:11 2004 UTC (9 years ago) by
gage
Original Path:
trunk/pg
Experimental refactorization of answer evaluators will take place on this branch.
Revision
2144 -
Directory Listing
Modified
Fri May 21 23:58:13 2004 UTC (9 years ago) by
apizer
Original Path:
trunk/pg
Removed old commented out code dealing with PGsort.
Arnie
Revision
2143 -
Directory Listing
Modified
Fri May 21 23:56:48 2004 UTC (9 years ago) by
apizer
Original Path:
trunk/pg
Use the new PGsort which uses a true/false compare (e.g. < or lt )
rather than a -1,0,1 compare (e.g. <=> or cmp ).
Arnie
Revision
2142 -
Directory Listing
Modified
Fri May 21 23:54:00 2004 UTC (9 years ago) by
apizer
Original Path:
trunk/pg
Replaced PGsort with a version that uses quick sort. This fixes the
problem the old PGsort had with Perl compiled with ithreads.
Arnie
Revision
2135 -
Directory Listing
Modified
Fri May 21 01:34:28 2004 UTC (9 years ago) by
sh002i
Original Path:
trunk/pg
Modified DVIPNG_ARGS to work with dvipng >= 1.0.
Revision
2061 -
Directory Listing
Modified
Sun May 9 17:45:41 2004 UTC (9 years ago) by
gage
Original Path:
trunk/pg
Modifications to PGbasicmacros and PGanswermacros which check whether a function answer
is the same as the function answer submitted previously. Gives warning message
if the same incorrect answers is submitted twice in a row. The functions must
both compile in order to recognize that they are the same answer. Two syntactically
incorrect entries will not be recognized as equivalent, even if they are in some sense.
Revision
2060 -
Directory Listing
Modified
Sun May 9 17:43:32 2004 UTC (9 years ago) by
gage
Original Path:
trunk/pg
Cosmetic fixes to code layout.
Revision
2057 -
Directory Listing
Modified
Sat May 8 22:53:03 2004 UTC (9 years ago) by
gage
Original Path:
trunk/pg
Preliminary changes that may eventually allow us to solve the be_strict problem for 5.8.0
Revision
2056 -
Directory Listing
Modified
Sat May 8 22:51:38 2004 UTC (9 years ago) by
gage
Original Path:
trunk/pg
Updating answer evaluators in PGanswermacros.pl
Beginning to include code that will allow us to
check whether the current answer is the same
as the one submitted previously.
Revision
1964 -
Directory Listing
Modified
Thu Apr 22 14:39:28 2004 UTC (9 years ago) by
jj
Original Path:
trunk/pg
Added convention to beginproblem that point value of "" means that we don't
print the point value at all. It will also supress printing of the filename
if someone is supposed to have filenames printed, which is appropriate for
the one known time this convention is used.
Revision
1943 -
Directory Listing
Modified
Sun Apr 4 20:05:34 2004 UTC (9 years, 1 month ago) by
jj
Original Path:
trunk/pg
Synched with ASU version. Defunct functions deleted, new functions added,
and documentation added.
Revision
1941 -
Directory Listing
Modified
Sun Apr 4 15:56:59 2004 UTC (9 years, 1 month ago) by
jj
Original Path:
trunk/pg
WW 2 didn't like the top line. Inserting a comment seems to fix it. Also
corrected a typo.
Revision
1932 -
Directory Listing
Modified
Sat Apr 3 15:44:55 2004 UTC (9 years, 1 month ago) by
jj
Original Path:
trunk/pg
Added support for useBaseTenLog for ww2.
Revision
1896 -
Directory Listing
Modified
Wed Mar 17 00:45:28 2004 UTC (9 years, 2 months ago) by
gage
Original Path:
trunk/pg
Changed the naming of arrays from ArRaY[0,0,0] to ArRaY__0:0:0:__
This involved changes in PG.pl and PGmorematrixmacros (ans_array_filter)
Made other cosmetic fixes to code. Added names to many filters to help with
debugging. It seems to work for now.
Revision
1831 -
Directory Listing
Modified
Thu Mar 4 13:06:32 2004 UTC (9 years, 2 months ago) by
gage
Original Path:
trunk/pg
Changed documentation spacing
Revision
1812 -
Directory Listing
Modified
Mon Feb 16 20:34:01 2004 UTC (9 years, 3 months ago) by
gage
Original Path:
trunk/pg
This is a new attempt to fix the problem that there was no
preview string if the units were incorrect. The previous fix
caused difficulties if strings were entered for numerical answers.
The new code has been added to the subroutine fix_answers_for_display
which already performed answer cleanup of various kinds.
Revision
1797 -
Directory Listing
Modified
Thu Feb 12 20:26:26 2004 UTC (9 years, 3 months ago) by
toenail
Original Path:
trunk/pg
Reordered pre-filters in NUM_CMP to allow for latex previews of answers with no units
Revision
1791 -
Directory Listing
Modified
Thu Feb 12 14:23:36 2004 UTC (9 years, 3 months ago) by
gage
Original Path:
trunk/pg
Added RECORD_FORM_DATA for making sticky form data which
is not specifically related to answers.
Revision
1785 -
Directory Listing
Modified
Mon Feb 9 17:18:39 2004 UTC (9 years, 3 months ago) by
gage
Original Path:
trunk/pg
Modifications to checkbox_cmp to include preview_latex_string.
this completes the squashing of bug #400
Revision
1784 -
Directory Listing
Modified
Mon Feb 9 17:09:06 2004 UTC (9 years, 3 months ago) by
gage
Original Path:
trunk/pg
Made changes to the check box macros so that they will remain
sticky when more than one check box is checked.
Involves splitting a null separated string ( or perhaps converting
a reference to an array). uses a new subroutine contained_in(elem,
array_or_arrray_ref_or_null_separated_string)
this resolves part of bug #400
--Mike
Revision
1780 -
Directory Listing
Modified
Fri Feb 6 02:55:55 2004 UTC (9 years, 3 months ago) by
gage
Original Path:
trunk/pg
Corrected format of one line.
--Mike
Revision
1779 -
Directory Listing
Modified
Fri Feb 6 02:52:42 2004 UTC (9 years, 3 months ago) by
gage
Original Path:
trunk/pg
Allow a 256 error from dvipng. This seems to be necessary on webwork.math.rochester.edu, so I'm commiting
it to the CVS as well to keep the two systems in sync.
--Mike
Revision
1765 -
Directory Listing
Modified
Fri Jan 30 18:04:37 2004 UTC (9 years, 3 months ago) by
jj
Original Path:
trunk/pg
Fix bug from last fix, and a second bug caused by $Global::htmlModeDefault
being accidentally called $Global::htmldisplayModeDefault in this file.
Revision
1764 -
Directory Listing
Modified
Fri Jan 30 15:28:46 2004 UTC (9 years, 3 months ago) by
jj
Original Path:
trunk/pg
Some sites use only one display mode. In that case, the "choice of one"
display mode should not be displayed.
Revision
1759 -
Directory Listing
Modified
Mon Jan 26 16:59:30 2004 UTC (9 years, 3 months ago) by
gage
Original Path:
trunk/pg
Minor change to the definition of the timer
Revision
1758 -
Directory Listing
Modified
Mon Jan 26 16:36:29 2004 UTC (9 years, 3 months ago) by
jj
Original Path:
trunk/pg
If LaTeX formula ends in a backslash after removing training spaces,
then we removed too much space, so we add a space to the end of it so
it ends '\ \)'.
Revision
1710 -
Directory Listing
Modified
Tue Jan 6 14:04:34 2004 UTC (9 years, 4 months ago) by
apizer
Original Path:
trunk/pg
fixed bug in call to Romberg routine. Romberg now requires parameters
of the form "level => 8". This was fixed previously I thought. Not sure
how the fix was lost.
Arnie
Revision
1690 -
Directory Listing
Modified
Sun Dec 28 19:46:57 2003 UTC (9 years, 4 months ago) by
gage
Original Path:
trunk/pg
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
1688 -
Directory Listing
Modified
Sat Dec 27 21:34:04 2003 UTC (9 years, 4 months ago) by
gage
Original Path:
trunk/pg
Added error messages that should make it easier to tell if
certain directories have not been created. Also checks that
files are actually created and written at each step of the process.
--Mike
Revision
1620 -
Directory Listing
Modified
Fri Nov 7 14:55:12 2003 UTC (9 years, 6 months ago) by
apizer
Original Path:
trunk/pg
fixed a bug in line 2469 replacing \npsvnNumber by \n$psvnNumber
Arnie
Revision
1556 -
Directory Listing
Modified
Wed Oct 1 02:40:09 2003 UTC (9 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
changed the way the IO modules work: shared subroutines are in IO now,
and IO has a hash %WeBWorK::PG::IO::SHARE which can be added to
Translator's %shared_subroutine_hash directly.
Revision
1555 -
Directory Listing
Modified
Wed Oct 1 02:31:54 2003 UTC (9 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
changed documentation to reflect the fact that reh refresh and mtime
flags are no longer used
Revision
1553 -
Directory Listing
Modified
Tue Sep 30 01:20:55 2003 UTC (9 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
added files from WW2
Revision
1550 -
Directory Listing
Modified
Tue Sep 30 01:18:25 2003 UTC (9 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
check to see if $envir->{texDisposition} is defined before trying to
access it.
Revision
1540 -
Directory Listing
Modified
Sat Sep 27 16:47:34 2003 UTC (9 years, 7 months ago) by
gage
Original Path:
trunk/pg
When displaying a raw student answer, nulls are converted to \0 so that they
can be seen. This is probably redundant since strings with multiple values
separated by nulls are supposed to be converted to references to arrays before
they reach this point.
--Mike
Revision
1535 -
Directory Listing
Modified
Fri Sep 26 21:16:18 2003 UTC (9 years, 7 months ago) by
gage
Original Path:
trunk/pg
Added line which prints out the raw student answer when the debug
flag is on.
--Mike
Revision
1534 -
Directory Listing
Modified
Thu Sep 25 05:42:31 2003 UTC (9 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
removed unneeded #! line
Revision
1525 -
Directory Listing
Modified
Thu Sep 25 00:29:59 2003 UTC (9 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
removed unneeded #! lines
Revision
1524 -
Directory Listing
Modified
Thu Sep 25 00:28:15 2003 UTC (9 years, 7 months ago) by
sh002i
Original Path:
trunk/pg
added image generation modules from WW2
Revision
1506 -
Directory Listing
Modified
Fri Sep 19 01:30:13 2003 UTC (9 years, 8 months ago) by
gage
Original Path:
trunk/pg
Fixed check_string filter so that it places a
value in preivew_text_string and in preview_latex_string
in the answer hash. For example entering DNE did not
show up in answer preview, which bothered some students.
--Mike
Revision
1505 -
Directory Listing
Modified
Mon Sep 15 05:47:38 2003 UTC (9 years, 8 months ago) by
lr003k
Original Path:
trunk/pg
It seems as though the way I tried to fix long decimals isn't working the way I wanted it too, so I've commented it out for now.
~Liam
Revision
1494 -
Directory Listing
Modified
Tue Sep 9 02:06:31 2003 UTC (9 years, 8 months ago) by
jj
Original Path:
trunk/pg
Put mbox around entries of a matrix in TeX-based modes to protect
math inside of them.
Revision
1490 -
Directory Listing
Modified
Sun Sep 7 17:40:54 2003 UTC (9 years, 8 months ago) by
gage
Original Path:
trunk/pg
Corrected a typo in EV4
--Mike
Revision
1483 -
Directory Listing
Modified
Fri Sep 5 13:19:45 2003 UTC (9 years, 8 months ago) by
gage
Original Path:
trunk/pg
Added EV4 routine supplied by Zig Fiedorowicz
--Mike
Revision
1463 -
Directory Listing
Modified
Fri Aug 15 16:51:09 2003 UTC (9 years, 9 months ago) by
gage
Original Path:
trunk/pg
Changes to mail that make it work properly with ALLOW_MAIL_TO
--Mike
Revision
1462 -
Directory Listing
Modified
Fri Aug 15 16:49:42 2003 UTC (9 years, 9 months ago) by
gage
Original Path:
trunk/pg
Made changes to rh_sticky_answers so that they
are addressed correctly.
Long term I would like to remove all
references to main:: except for those
in the init routines. The references
can be replaced by a locally defined
pointer to the value in the current safe
compartment.
This procedure should make it easier to
maintain the macros. All references to
global variables will occur in the init
routine.
--Mike
Revision
1456 -
Directory Listing
Modified
Thu Aug 14 16:10:01 2003 UTC (9 years, 9 months ago) by
gage
Original Path:
trunk/pg
At least a temporary fix for mail_answers_to2
These evaluators are run in the grader and the
environment variables have disappeared?? I can't find
them at any rate.
this is at best a temporary fix until we get the global
variable situation under control when using cached code.
--Mike
Revision
1455 -
Directory Listing
Modified
Thu Aug 14 13:27:54 2003 UTC (9 years, 9 months ago) by
gage
Original Path:
trunk/pg
Made changes to anstext and a few
other answer evaluators so that they
evaluated "main::" correctly.
Still need to fix install problem
grader
--Mike
Revision
1454 -
Directory Listing
Modified
Tue Aug 12 16:43:36 2003 UTC (9 years, 9 months ago) by
jj
Original Path:
trunk/pg
Redoing fix to random so that random(2,7,3) won't produce 8. The original
fix was lost in the merger with mod-perl version.
Revision
1453 -
Directory Listing
Modified
Wed Aug 6 18:59:26 2003 UTC (9 years, 9 months ago) by
jj
Original Path:
trunk/pg
New file with linear programming simplex method related macros.
Revision
1452 -
Directory Listing
Modified
Tue Aug 5 16:37:10 2003 UTC (9 years, 9 months ago) by
jj
Original Path:
trunk/pg
Revised documentation for test_points.
Revision
1451 -
Directory Listing
Modified
Tue Aug 5 16:34:38 2003 UTC (9 years, 9 months ago) by
jj
Original Path:
trunk/pg
Added some documentation for test_points.
Revision
1450 -
Directory Listing
Modified
Tue Aug 5 16:24:48 2003 UTC (9 years, 9 months ago) by
jj
Original Path:
trunk/pg
Added option of test_points to fun_cmp.
Revision
1390 -
Directory Listing
Modified
Tue Jul 15 17:55:32 2003 UTC (9 years, 10 months ago) by
apizer
Original Path:
trunk/pg
Back off from Cervone's new definition of BR
Arnie
Revision
1385 -
Directory Listing
Modified
Mon Jul 14 20:22:19 2003 UTC (9 years, 10 months ago) by
apizer
Original Path:
trunk/pg
Fixed a bug in Davide Cervone's changes
Arnie
Revision
1379 -
Directory Listing
Modified
Mon Jul 14 15:16:30 2003 UTC (9 years, 10 months ago) by
apizer
Original Path:
trunk/pg
Incorporated Davide Cervone's improvements and bug fixes. This mostly
involved removing unwanted spaces, etc.
Arnie
Revision
1365 -
Directory Listing
Modified
Fri Jul 11 20:18:57 2003 UTC (9 years, 10 months ago) by
lr003k
Original Path:
trunk/pg
In order to make ans_array entries "sticky" I've had to change some stuff.
The answer labels for these entries are now put into $main::PG_FLAGS{ANSWER_ENTRY_ORDER} as an array reference in PG.pl.
In processProblem8.pl the labels are caught again in the subroutines logCourseData and encode_submitted_answers. It is important that
they're caught there rather than earlier because then the translator would think that every entry was it's own answer.
Professor Gage says that processProblem8.pl is no longer used in webwork2, and he says he'll fix this there.
Revision
1351 -
Directory Listing
Modified
Fri Jul 11 16:30:04 2003 UTC (9 years, 10 months ago) by
apizer
Original Path:
trunk/pg
incorporate some of davide Cervone'e changes
Arnie
Revision
1333 -
Directory Listing
Modified
Wed Jul 9 23:20:23 2003 UTC (9 years, 10 months ago) by
jj
Original Path:
trunk/pg
Fixed new bug introduced by, er, my previous bug fix.
Revision
1332 -
Directory Listing
Modified
Wed Jul 9 20:29:04 2003 UTC (9 years, 10 months ago) by
lr003k
Original Path:
trunk/pg
Fixed a rounding problem.
Revision
1331 -
Directory Listing
Modified
Wed Jul 9 20:28:40 2003 UTC (9 years, 10 months ago) by
lr003k
Original Path:
trunk/pg
Removed the last change, it's now handled in display_matrix.
Revision
1328 -
Directory Listing
Modified
Wed Jul 9 19:45:40 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Added $ to PG_random_generator in the subroutine SRAND. Why it worked
before as a bare word is anyone's guess. Now that $PG_random_generator
is a local variable the bareword no longer works properly.
--Mike
Revision
1327 -
Directory Listing
Modified
Wed Jul 9 18:06:52 2003 UTC (9 years, 10 months ago) by
lr003k
Original Path:
trunk/pg
Added a pretty_matrix sub routine to fix some rounding problems.
Revision
1319 -
Directory Listing
Modified
Mon Jul 7 02:27:15 2003 UTC (9 years, 10 months ago) by
jj
Original Path:
trunk/pg
Made box option functional for display_matrix. It lets you specify an
element to be boxed.
Revision
1318 -
Directory Listing
Modified
Mon Jul 7 01:34:38 2003 UTC (9 years, 10 months ago) by
jj
Original Path:
trunk/pg
Fixed bugs in matrix display when top_labels are present.
Revision
1317 -
Directory Listing
Modified
Fri Jul 4 05:08:37 2003 UTC (9 years, 10 months ago) by
jj
Original Path:
trunk/pg
Fixed tick marks for graphs - x/y values were reversed.
Revision
1314 -
Directory Listing
Modified
Wed Jul 2 15:27:59 2003 UTC (9 years, 10 months ago) by
apizer
Original Path:
trunk/pg
Add backslash to list of characters filtered out of sticky answers
Arnie
Revision
1312 -
Directory Listing
Modified
Tue Jul 1 17:55:12 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Fixed error in sourceAlias. The variable is %main::envir not
$main::envir !!!
--Mike
Revision
1311 -
Directory Listing
Modified
Tue Jul 1 15:36:43 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
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
1310 -
Directory Listing
Modified
Tue Jul 1 15:35:51 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Changed the defintion of *i to be inside the Complex package.
this and the change to dangerousMacros seems to have cured bug #116
--Mike
Revision
1305 -
Directory Listing
Modified
Tue Jul 1 00:48:01 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Latest attempt to get a version of dangerousMacros.pl that will
work with both 5.6.1 adn 5.6.0
--Mike
Revision
1304 -
Directory Listing
Modified
Mon Jun 30 23:24:29 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
removed unnecessary "no strict, use strict" pair
--Mike
Revision
1303 -
Directory Listing
Modified
Mon Jun 30 20:36:57 2003 UTC (9 years, 10 months ago) by
apizer
Original Path:
trunk/pg
added missing hyperbolic, inverse trig, and inverse hyperbolic functions
cintributed by Davide Cervone
Arnie
Revision
1298 -
Directory Listing
Modified
Fri Jun 27 19:53:50 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Fixed typo in beginproblem
--Mike
Revision
1294 -
Directory Listing
Modified
Fri Jun 27 13:57:09 2003 UTC (9 years, 10 months ago) by
lr003k
Original Path:
trunk/pg
Added a vec_solution_cmp. Used for problems where the answer
needs to be v1_s*v2+t*v3 where v1,v2,and v3 are vectors. v1 has
to be a linear combination of the professors answer where the
first one has a nonzero coefficient. The others are a basis, and
are compared with compare_basis.
Revision
1290 -
Directory Listing
Modified
Thu Jun 26 22:43:15 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Merge the time optimized branch and the main branch. I forgot one subroutine
--Mike
Revision
1286 -
Directory Listing
Modified
Thu Jun 26 21:08:47 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Make sure that the local my variables are updated in PGbasicmacros
as well as the variables in main::.
--Mike
Revision
1285 -
Directory Listing
Modified
Thu Jun 26 21:04:09 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Adding preliminary ability to decompose non-square matrices. Won't work
if a permutation is required (i.e. a pivot)
--Mike
Revision
1280 -
Directory Listing
Modified
Thu Jun 26 17:42:18 2003 UTC (9 years, 10 months ago) by
malsyned
Original Path:
trunk/pg
Merged the changes needed to work with the new WW2 translator
optimizations into the main pg branch.
Revision
1278 -
Directory Listing
Modified
Thu Jun 26 13:55:43 2003 UTC (9 years, 10 months ago) by
lr003k
Original Path:
trunk/pg
Matrices now displayed in previewer.
Revision
1276 -
Directory Listing
Modified
Wed Jun 25 16:26:42 2003 UTC (9 years, 10 months ago) by
lr003k
Original Path:
trunk/pg
committed the wrong thing
Revision
1267 -
Directory Listing
Modified
Tue Jun 24 15:25:58 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Changes that allow these files to work with caching version
of Webwork2.0 -- optimized for speed
--Mike
Revision
1266 -
Directory Listing
Modified
Tue Jun 24 15:24:09 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Changes that allow these files to work with optimized
version of WeBWorK2.0 which uses caching of macro files.
--Mike
Revision
1265 -
Directory Listing
Modified
Tue Jun 24 14:58:03 2003 UTC (9 years, 10 months ago) by
lr003k
Original Path:
trunk/pg
Made the code more object-oriented
Revision
1253 -
Directory Listing
Modified
Mon Jun 23 18:34:44 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
More changes to make these files compatible
with WeBWorK2.0 and cached compartments
-- Mike
Revision
1251 -
Directory Listing
Modified
Mon Jun 23 16:24:32 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
Changes made to PGbasicmacros so that it can be cached.
Changes should be compatible with webwork1.8
--MIke
Revision
1250 -
Directory Listing
Modified
Mon Jun 23 15:43:11 2003 UTC (9 years, 10 months ago) by
gage
Original Path:
trunk/pg
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
1238 -
Directory Listing
Modified
Fri Jun 20 19:05:38 2003 UTC (9 years, 11 months ago) by
lr003k
Original Path:
trunk/pg
Matrices now take math constants.
Revision
1237 -
Directory Listing
Modified
Fri Jun 20 18:59:44 2003 UTC (9 years, 11 months ago) by
lr003k
Original Path:
trunk/pg
Student answer now displayed in a html table given by jones's
display matrix method in PGmatrixmacros. The braces were giving
me headaches so I set the option to none, at least for now.
Revision
1161 -
Directory Listing
Modified
Fri Jun 13 17:36:10 2003 UTC (9 years, 11 months ago) by
lr003k
Original Path:
trunk/pg
Was not accepting negative answers, the sign problem is fixed now.
Revision
1158 -
Directory Listing
Modified
Fri Jun 13 17:12:18 2003 UTC (9 years, 11 months ago) by
sh002i
Original Path:
trunk/pg
rollback change to the way ImageGenerator::add is called.
-sam
Revision
1155 -
Directory Listing
Modified
Fri Jun 13 02:33:56 2003 UTC (9 years, 11 months ago) by
sh002i
Original Path:
trunk/pg
changes to the math_ev3 functions in PGbasicmacros.pl to support new
interface to ImageGenerator and some cleanup.
-sam
Revision
1140 -
Directory Listing
Modified
Thu Jun 12 19:14:38 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
Answer labels are now prefixed by a Quiz prefix which allows more
than one problem to appear on the same page.
-- Mike
Revision
1127 -
Directory Listing
Modified
Wed Jun 11 19:18:19 2003 UTC (9 years, 11 months ago) by
lr003k
Original Path:
trunk/pg
Was working from an older copy before my last update, sorry.
Revision
1126 -
Directory Listing
Modified
Wed Jun 11 18:34:40 2003 UTC (9 years, 11 months ago) by
jj
Original Path:
trunk/pg
Fixed isPrime, which had said that 4 was prime, and shortened its loop.
Revision
1123 -
Directory Listing
Modified
Wed Jun 11 15:28:47 2003 UTC (9 years, 11 months ago) by
lr003k
Original Path:
trunk/pg
Ok, there is the ans_array_filter added which allows for the answer to be coming from the ans_array.
Revision
1122 -
Directory Listing
Modified
Wed Jun 11 14:54:27 2003 UTC (9 years, 11 months ago) by
lr003k
Original Path:
trunk/pg
Added two methods for naming the blanks in ans_array. The names now have the format ArRaY3[1,0,2] (this would be the name of
the 3rd answer (it's taken from main::answer_count which is then incremented so the answer before it is AnSwEr2 and the
answer after it is AnSwEr4) and it would be the second matrix or vector in the answer ( I need to take multiple vectors for
things like basis cmp, so ans_array_extension puts the vectors in different locations) and the 0 and 2 are row and column in
that matrix or vector.
Revision
1121 -
Directory Listing
Modified
Wed Jun 11 14:47:59 2003 UTC (9 years, 11 months ago) by
lr003k
Original Path:
trunk/pg
I removed the subroutine answer_matrix since it really belongs in basic macros with the other answer blank methods.
Revision
1120 -
Directory Listing
Modified
Wed Jun 11 14:46:35 2003 UTC (9 years, 11 months ago) by
lr003k
Original Path:
trunk/pg
I've added ans_array and ans_array extension and moved answer_matrix here since this is probably where it should be with all
the other answer blank methods. I still have to comment the code.
Revision
1117 -
Directory Listing
Modified
Wed Jun 11 04:00:37 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
Added a feature to correspond to a change made in process_answers in Translator.pm.
Each answer
evaluator is given the
answer AND the answer label (e.g. AnSWer1) of the answer. The label
is placed in the answer hash at $hash{ans_label} for use by filters
that need to know the label of the answer they are evaluating.
--Mike
Revision
1115 -
Directory Listing
Modified
Wed Jun 11 02:43:42 2003 UTC (9 years, 11 months ago) by
apizer
Original Path:
trunk/pg
Fixed error concerning variable $string.
Cleaned up how polynomials are displayed.
Arnie
Revision
1102 -
Directory Listing
Modified
Tue Jun 10 16:23:47 2003 UTC (9 years, 11 months ago) by
lr003k
Original Path:
trunk/pg
ok, I'm pretty sure that this one is the one we want. Unfortunately the other one was an old one, that cmpl_cmp4 was not used
anywhere and I had removed it later, and this one has multi_cmp. Sorry for all the confusion.
Revision
1097 -
Directory Listing
Modified
Mon Jun 9 23:26:19 2003 UTC (9 years, 11 months ago) by
jj
Original Path:
trunk/pg
Slightly better handling of top_labels in tth mode when force_tex is set; namely
it ignores the labels instead of letting the TeX code confuse tth so badly that
the matrix is basically lost.
Revision
1094 -
Directory Listing
Modified
Mon Jun 9 22:46:25 2003 UTC (9 years, 11 months ago) by
jj
Original Path:
trunk/pg
Fixed bug when the function is sampled at a point where it is not defined.
Revision
1091 -
Directory Listing
Modified
Mon Jun 9 21:53:11 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
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
1090 -
Directory Listing
Modified
Mon Jun 9 21:24:08 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
Fixed a patch to round (and Round) originally due to Mark Schmitt
which didn't get included in the latest updates and transfer to pg
--Mike
Revision
1088 -
Directory Listing
Modified
Mon Jun 9 21:05:11 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
Commented out code that is not used (I believe)
comp_cplx4 and cplx_cmp4
-- Mike
Revision
1080 -
Directory Listing
Modified
Mon Jun 9 17:49:36 2003 UTC (9 years, 11 months ago) by
apizer
Original Path:
trunk/pg
remove unneccsary shebang lines
Arnie
Revision
1079 -
Directory Listing
Modified
Mon Jun 9 17:36:12 2003 UTC (9 years, 11 months ago) by
apizer
Original Path:
trunk/pg
removed unneccesary shebang lines
Revision
1073 -
Directory Listing
Modified
Mon Jun 9 13:30:46 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
This module contains IO used in saving an answer to a file.
--Mike
Revision
1072 -
Directory Listing
Modified
Mon Jun 9 02:27:04 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
The file PGcomplexmacros.pl is partially in sync with the version in
courseScripts. I need advice on the latest versions of some of the
subroutines from Liam.
--Mike
Revision
1071 -
Directory Listing
Modified
Mon Jun 9 02:26:17 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
Bringing these files in sync with the latest versions in the
courseScripts CVS
--Mike
Revision
1070 -
Directory Listing
Modified
Mon Jun 9 02:02:20 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
Bringing this version of Matrix.pm up to date with the latest in
courseScripts.
--Mike
Revision
1069 -
Directory Listing
Modified
Mon Jun 9 02:01:41 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
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
1068 -
Directory Listing
Modified
Mon Jun 9 01:59:37 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
Updating the copy of PGchoicemacros.pl to the latest version available
in courseScripts
--Mike
Revision
1066 -
Directory Listing
Modified
Mon Jun 9 00:54:33 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
Adding a newer version of PGmatrixmacros.pl
--Mike
Revision
1064 -
Directory Listing
Modified
Mon Jun 9 00:34:51 2003 UTC (9 years, 11 months ago) by
gage
Original Path:
trunk/pg
Adding recent macro files to the pg collection
--Mike
Revision
1050 -
Directory Listing
Added
Fri Jun 6 21:39:42 2003 UTC (9 years, 11 months ago) by
sh002i
Original Path:
trunk/pg
moved PG modules and macro files from webwork-modperl to pg
-sam