Log of /branches/rel-2-4-patches/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
Original Path:
trunk/pg/macros/PGbasicmacros.pl
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
Original Path:
trunk/pg/macros/PGbasicmacros.pl
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
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
Original Path:
trunk/pg/macros/PGbasicmacros.pl
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
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
Original Path:
trunk/pg/macros/PGbasicmacros.pl
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
2061 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun May 9 17:45:41 2004 UTC (9 years ago) by
gage
Original Path:
trunk/pg/macros/PGbasicmacros.pl
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, 1 month ago) by
jj
Original Path:
trunk/pg/macros/PGbasicmacros.pl
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
Original Path:
trunk/pg/macros/PGbasicmacros.pl
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
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
Original Path:
trunk/pg/macros/PGbasicmacros.pl
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
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.