Log of /trunk/pg/macros/PGbasicmacros.pl
Parent Directory
Revision
3704 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 11 17:59:30 2005 UTC (7 years, 7 months 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 (7 years, 8 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
3268 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Jun 5 23:36:28 2005 UTC (7 years, 11 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
2443 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 6 15:16:51 2004 UTC (8 years, 10 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 (8 years, 10 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
2292 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 11 16:40:44 2004 UTC (8 years, 11 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 (8 years, 11 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
2143 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 21 23:56:48 2004 UTC (8 years, 11 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 (9 years 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 (9 years 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 (9 years, 3 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 (9 years, 3 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
1462 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 15 16:49:42 2003 UTC (9 years, 9 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
1379 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 14 15:16:30 2003 UTC (9 years, 10 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 (9 years, 10 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
1155 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 13 02:33:56 2003 UTC (9 years, 11 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 (9 years, 11 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.
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.