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

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

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 6248 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 14 01:17:21 2010 UTC (9 years, 6 months ago) by gage
File length: 82393 byte(s)
Diff to previous 6211
major update which adds objective methods to the basic code of PG.
HEAD should be considered more beta than usual for a few days until minor glitches
are shaken out.
new modules needed:

PGcore PGalias PGresource PGloadfiles PGanswergroup PGresponsegroup  Tie::IxHash

Revision 6211 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Mar 20 00:53:25 2010 UTC (9 years, 8 months ago) by gage
File length: 80587 byte(s)
Diff to previous 6179
Add id tag as well as name tag to HIDDEN_ANS_RULE

Revision 6179 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 7 18:02:53 2010 UTC (9 years, 11 months ago) by jj
File length: 80535 byte(s)
Diff to previous 6085
Added macros to make it easier to have underlined text in a problem:
BUL and EUL

Revision 6085 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 18 02:50:50 2009 UTC (10 years, 4 months ago) by gage
File length: 80146 byte(s)
Diff to previous 6080
added effectivePermissionLevel to the PG environment
 -- the permission level of the effectiveUser, the user to which the question has been assigned.

Changed the printing of the path to files in beginproblem
so that it is shown if the effectivePermissionLevel is higher than
the "PRINT_FILE_NAMES_PERMISSION_LEVEL" value.  This responds to user requests that make it easier for an
instructor to print hardcopy for the student.

Revision 6080 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 12 23:39:20 2009 UTC (10 years, 4 months ago) by gage
File length: 79974 byte(s)
Diff to previous 6059
Added id   tags to most HTML entities defined in PGbasicmacros.pl

Revision 6059 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 25 23:33:26 2009 UTC (10 years, 5 months ago) by gage
File length: 79764 byte(s)
Diff to previous 6051
add copyright to PGbasicmacros.pl

Revision 6051 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 25 14:49:16 2009 UTC (10 years, 5 months ago) by gage
File length: 79104 byte(s)
Diff to previous 6010
Update information to instructor about hints in the problem.

Revision 6010 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 19 03:05:14 2009 UTC (10 years, 9 months ago) by gage
File length: 79053 byte(s)
Diff to previous 5970
Minor cosmetic change

Revision 5970 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 17 03:24:09 2009 UTC (10 years, 10 months ago) by gage
File length: 79032 byte(s)
Diff to previous 5903
Fixed error in hint() associated with always showing the instructor that
a hint exists.

Revision 5903 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 12 15:21:34 2008 UTC (11 years, 2 months ago) by gage
File length: 78863 byte(s)
Diff to previous 5901
Make sure $attempts is properly defined

Revision 5901 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 12 14:28:59 2008 UTC (11 years, 2 months ago) by gage
File length: 78814 byte(s)
Diff to previous 5858
have  hint always print hints for instructorsCVS: ----------------------------------------------------------------------

Revision 5858 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 30 14:39:00 2008 UTC (11 years, 4 months ago) by apizer
File length: 78155 byte(s)
Diff to previous 5816
Port rel-2-4-patches changes to Head

Revision 5816 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 27 00:55:09 2008 UTC (11 years, 5 months ago) by gage
File length: 78139 byte(s)
Diff to previous 5792
forward port file path printing from rel-2-4-5

Revision 5792 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 26 14:53:59 2008 UTC (11 years, 5 months ago) by gage
File length: 77758 byte(s)
Diff to previous 5688
Forward ports from rel-2-4-5

Revision 5688 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 11 13:22:54 2008 UTC (11 years, 5 months ago) by gage
File length: 73604 byte(s)
Diff to previous 5626
Corrected documentation for the ?{4.56:%0.2f} and !{4.5645:%0.2f} constructions --
their behavior had been reversed.  Indicated that the !{ } construction is
deprecated since it behave just like {4.5645:%0.2f}

Revision 5626 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 26 02:43:07 2008 UTC (11 years, 8 months ago) by gage
File length: 73445 byte(s)
Diff to previous 5209
Fixed bug in base64Q subroutine

Revision 5209 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 22 03:24:54 2007 UTC (12 years, 4 months ago) by gage
File length: 71746 byte(s)
Diff to previous 5175
Updated documentation of appletLink and helpLink macros

Revision 5175 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 13 21:35:34 2007 UTC (12 years, 4 months ago) by sh002i
File length: 70881 byte(s)
Diff to previous 4806
quick hack to satisfy gedit's dumb syntax hiliting

Revision 4806 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 1 22:43:38 2007 UTC (12 years, 9 months ago) by gage
File length: 70873 byte(s)
Diff to previous 4386
Minor documentation changes.
Use html entity to represent dollar sign on the web.

Revision 4386 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 17 23:55:17 2006 UTC (13 years, 3 months ago) by dpvc
File length: 70867 byte(s)
Diff to previous 4098
Added LaTeXMathML mode.

Revision 4098 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 23 20:45:02 2006 UTC (13 years, 6 months ago) by gage
File length: 70112 byte(s)
Diff to previous 4088
Added support for searching for appletin  anumber of places defined in
$pg{directories}{appletPath}  in global.conf

Revision 4088 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun May 21 00:44:40 2006 UTC (13 years, 6 months ago) by gage
File length: 69806 byte(s)
Diff to previous 3704
added findAppletFile  to dangerous macros.

This is still not in its final form which should involve checking the url
rather than the file location.

Revision 3704 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 11 17:59:30 2005 UTC (14 years, 1 month ago) by jj
File length: 68142 byte(s)
Diff to previous 3553
Added syntactic sugar for pop_up_lists.

A common situation is that a problem includes a short multiple-choice question along with other answers.  Often, these questions are written as fill-in-the-blank where the student is told a list of legal words to put in the blanks.  The idea is to make it as simple as possible for problem writers to replace the fill-in-the-blank with a drop-down list of alternatives.

So, now the text of a problem can contain

 is the function increasing on [0,1]? \{ pop_up_list(['?', 'yes', 'no']) \}

instead of

 is the function increasing on [0,1]? \{ pop_up_list('?' => '?', 'yes' => 'yes', 'no' => 'no') \}

The result is checked with something like

 ANS(str_cmp('yes'));

Existing problems are unaffected since the added syntax uses a reference to a list (the extra square brackets).

Revision 3553 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 23 22:56:50 2005 UTC (14 years, 3 months ago) by jj
File length: 67701 byte(s)
Diff to previous 3544
This adds wiring to the pg side for special bits of html to be included before/after the body of a problem.  You also need to update global.conf (and probably want to update Tasks.pm).

A commented out example in global.conf.dist shows how to use this to produce boxed problems a la the Union College server.  In this approach, the added parts are not used for problems rendered in the Library Browser or Problem Set Detail.

This addresses bug 817.  This solution may not be suitable for inclusion of needed bits for modes such as asciimath or tth because the those bits of html are probably needed for display in the Library Browser.  It is hard to distinguish bits which are always wanted, and those which are only wanted for use by Problem.

Revision 3544 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Aug 21 21:46:49 2005 UTC (14 years, 3 months ago) by jj
File length: 67629 byte(s)
Diff to previous 3543
Removed bits which were accidentally included during last commit.

Revision 3543 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Aug 21 18:12:30 2005 UTC (14 years, 3 months ago) by jj
File length: 67793 byte(s)
Diff to previous 3520
Should fix bug 696 by replacing consecutive whitespace with a single
space for answers in an individual ans_rule.

Revision 3520 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 13 21:45:46 2005 UTC (14 years, 3 months ago) by jj
File length: 67461 byte(s)
Diff to previous 3268
Implimentation of COMMENT for comments to appear in the library browser.

Revision 3268 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 5 23:36:28 2005 UTC (14 years, 6 months ago) by dpvc
File length: 66820 byte(s)
Diff to previous 3158
Removed some unused lines and comments.
Removed unnecessary spaces from around answer-rule-extension rules,
and made the TeX version of this rule be based on the width, as is
the case for ans_rule.

Revision 3158 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 9 18:36:18 2005 UTC (14 years, 9 months ago) by apizer
File length: 66909 byte(s)
Diff to previous 3136
Allow labels A - ZZ

Arnie

Revision 3136 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 5 14:07:55 2005 UTC (14 years, 10 months ago) by jj
File length: 66897 byte(s)
Diff to previous 2443
Work around IE bug for ordered lists.  Maybe someday this can be undone.

Revision 2443 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 6 15:16:51 2004 UTC (15 years, 5 months ago) by jj
File length: 66609 byte(s)
Diff to previous 2392
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 2392 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 24 21:00:26 2004 UTC (15 years, 5 months ago) by dpvc
File length: 66445 byte(s)
Diff to previous 2370
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 2370 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 23 01:19:15 2004 UTC (15 years, 5 months ago) by sh002i
File length: 66522 byte(s)
Diff to previous 2292
moved DISPLAY_MODE_FAILOVER into this file

Revision 2292 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 11 16:40:44 2004 UTC (15 years, 5 months ago) by dpvc
File length: 68000 byte(s)
Diff to previous 2215
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 2215 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 24 21:24:41 2004 UTC (15 years, 6 months ago) by jj
File length: 67959 byte(s)
Diff to previous 2199
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 2199 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 24 01:59:53 2004 UTC (15 years, 6 months ago) by dpvc
File length: 67621 byte(s)
Diff to previous 2193
Support for asciimath.

Added preliminary support for asciimath rendering.  You must use a
MathML-enabled browser.

Revision 2193 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 24 01:05:03 2004 UTC (15 years, 6 months ago) by sh002i
File length: 66827 byte(s)
Diff to previous 2173
failover data now passed in via %envir.

Revision 2173 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun May 23 01:33:22 2004 UTC (15 years, 6 months ago) by jj
File length: 66209 byte(s)
Diff to previous 2166
Added helpLink for standard help pages in pg files.

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

Revision 2155 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 22 18:04:23 2004 UTC (15 years, 6 months ago) by jj
File length: 64981 byte(s)
Diff to previous 2143
Moved nicestring to PGbasicmacros.

Revision 2143 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 21 23:56:48 2004 UTC (15 years, 6 months ago) by apizer
File length: 63754 byte(s)
Diff to previous 2061
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 2061 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun May 9 17:45:41 2004 UTC (15 years, 7 months ago) by gage
File length: 63745 byte(s)
Diff to previous 1964
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 1964 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 22 14:39:28 2004 UTC (15 years, 7 months ago) by jj
File length: 63469 byte(s)
Diff to previous 1784
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 1784 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 9 17:09:06 2004 UTC (15 years, 10 months ago) by gage
File length: 63419 byte(s)
Diff to previous 1758
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 1758 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 26 16:36:29 2004 UTC (15 years, 10 months ago) by jj
File length: 62406 byte(s)
Diff to previous 1550
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 1550 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 30 01:18:25 2003 UTC (16 years, 2 months ago) by sh002i
File length: 62294 byte(s)
Diff to previous 1490
check to see if $envir->{texDisposition} is defined before trying to
access it.

Revision 1490 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Sep 7 17:40:54 2003 UTC (16 years, 3 months ago) by gage
File length: 62257 byte(s)
Diff to previous 1483
Corrected a typo in EV4
--Mike

Revision 1483 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 5 13:19:45 2003 UTC (16 years, 3 months ago) by gage
File length: 62258 byte(s)
Diff to previous 1462
Added EV4 routine supplied by Zig Fiedorowicz
--Mike

Revision 1462 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 15 16:49:42 2003 UTC (16 years, 3 months ago) by gage
File length: 61483 byte(s)
Diff to previous 1390
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 1390 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 15 17:55:32 2003 UTC (16 years, 4 months ago) by apizer
File length: 61430 byte(s)
Diff to previous 1385
Back off from Cervone's new definition of BR

Arnie

Revision 1385 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 14 20:22:19 2003 UTC (16 years, 4 months ago) by apizer
File length: 61169 byte(s)
Diff to previous 1379
Fixed a bug in Davide Cervone's changes

Arnie

Revision 1379 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 14 15:16:30 2003 UTC (16 years, 4 months ago) by apizer
File length: 61110 byte(s)
Diff to previous 1328
Incorporated Davide Cervone's improvements and bug fixes.  This mostly
involved removing unwanted spaces, etc.

Arnie

Revision 1328 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 9 19:45:40 2003 UTC (16 years, 5 months ago) by gage
File length: 60237 byte(s)
Diff to previous 1314
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 1314 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 2 15:27:59 2003 UTC (16 years, 5 months ago) by apizer
File length: 60236 byte(s)
Diff to previous 1298
Add backslash to list of characters filtered out of sticky answers

Arnie

Revision 1298 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 27 19:53:50 2003 UTC (16 years, 5 months ago) by gage
File length: 60284 byte(s)
Diff to previous 1286
Fixed typo in beginproblem
--Mike

Revision 1286 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 26 21:08:47 2003 UTC (16 years, 5 months ago) by gage
File length: 60288 byte(s)
Diff to previous 1267
Make sure that the local my variables are updated in PGbasicmacros
as well as the variables in main::.

--Mike

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

Revision 1253 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 23 18:34:44 2003 UTC (16 years, 5 months ago) by gage
File length: 60303 byte(s)
Diff to previous 1251
More changes to make these files compatible
with WeBWorK2.0 and cached compartments
-- Mike

Revision 1251 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 23 16:24:32 2003 UTC (16 years, 5 months ago) by gage
File length: 60209 byte(s)
Diff to previous 1158
Changes made to PGbasicmacros so that it can be cached.
Changes should be compatible with webwork1.8
--MIke

Revision 1158 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 13 17:12:18 2003 UTC (16 years, 5 months ago) by sh002i
File length: 58530 byte(s)
Diff to previous 1155
rollback change to the way ImageGenerator::add is called.
-sam

Revision 1155 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 13 02:33:56 2003 UTC (16 years, 5 months ago) by sh002i
File length: 58454 byte(s)
Diff to previous 1120
changes to the math_ev3 functions in PGbasicmacros.pl to support new
interface to ImageGenerator and some cleanup.
-sam

Revision 1120 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 11 14:46:35 2003 UTC (16 years, 6 months ago) by lr003k
File length: 58413 byte(s)
Diff to previous 1080
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 1080 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 17:49:36 2003 UTC (16 years, 6 months ago) by apizer
File length: 55306 byte(s)
Diff to previous 1071
remove unneccsary shebang lines

Arnie

Revision 1071 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 02:26:17 2003 UTC (16 years, 6 months ago) by gage
File length: 55387 byte(s)
Diff to previous 1050
Bringing these files in sync with the latest versions in the
courseScripts CVS
--Mike

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

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

  Diffs between and
  Type of Diff should be a

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9