Log of /branches/rel-2-1-patches/pg
Directory Listing
Revision
3083 -
Directory Listing
Modified
Fri Jan 7 20:42:09 2005 UTC (8 years, 4 months ago) by
sh002i
HEAD backport: Defined some variables that were causing warning
messages. (gage)
Revision
3082 -
Directory Listing
Modified
Fri Jan 7 20:40:51 2005 UTC (8 years, 4 months ago) by
sh002i
HEAD backport: Avoids some name collisions for images converted from gif
to png in hardcopy (jj)
Revision
3081 -
Directory Listing
Modified
Fri Jan 7 20:39:02 2005 UTC (8 years, 4 months ago) by
sh002i
HEAD backport: relative tolerence was not being used correctly. Fixed
this. (apizer)
Revision
3080 -
Directory Listing
Modified
Fri Jan 7 20:37:48 2005 UTC (8 years, 4 months ago) by
sh002i
HEAD backport: Fixed a bug in processing absolute values with implicit
multiplication. (dpvc)
Revision
3078 -
Directory Listing
Modified
Fri Jan 7 20:19:02 2005 UTC (8 years, 4 months ago) by
sh002i
HEAD -> rel-2-1-patches backport: "Fixed an error where any plane is
accepted if the d is 0 in ax + by + cz = 0." (dpvc)
Revision
2993 -
Directory Listing
Modified
Wed Nov 10 18:02:44 2004 UTC (8 years, 6 months ago) by
sh002i
Ability to control missing tex fonts message (from HEAD).
Original log message:
Modifications needed for the control of jsMath's "missing font"
message.
Revision
2980 -
Directory Listing
Modified
Wed Nov 3 19:52:01 2004 UTC (8 years, 6 months ago) by
This commit was manufactured by cvs2svn to create branch 'rel-2-1-patches'.
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, 8 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, 8 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 9 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, 11 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, 11 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, 11 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, 11 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, 11 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, 11 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 (9 years 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 (9 years 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 (9 years 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 (9 years 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 (9 years 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 (9 years 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 (9 years 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 (9 years 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 (9 years 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 (9 years 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 (9 years 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 (9 years 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 (9 years ago) by
jj
Original Path:
trunk/pg
Moved nicestring to PGbasicmacros.
Revision
2153 -
Directory Listing
Modified
Sat May 22 15:53:00 2004 UTC (9 years 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, 1 month 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, 8 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, 8 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, 11 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, 11 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, 11 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, 11 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, 11 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, 11 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, 11 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