From: jj v. a. <we...@ma...> - 2005-08-23 22:55:32
|
Log Message: ----------- 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. Modified Files: -------------- pg/macros: PG.pl PGbasicmacros.pl Revision Data ------------- Index: PGbasicmacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGbasicmacros.pl,v retrieving revision 1.41 retrieving revision 1.42 diff -Lmacros/PGbasicmacros.pl -Lmacros/PGbasicmacros.pl -u -r1.41 -r1.42 --- macros/PGbasicmacros.pl +++ macros/PGbasicmacros.pl @@ -1623,6 +1623,7 @@ "($problemValue $points) " ) if ($problemValue ne ""); } + $out .= MODES(%{main::PG_restricted_eval(q!$main::problemPreamble!)}); $out; } Index: PG.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PG.pl,v retrieving revision 1.23 retrieving revision 1.24 diff -Lmacros/PG.pl -Lmacros/PG.pl -u -r1.23 -r1.24 --- macros/PG.pl +++ macros/PG.pl @@ -526,6 +526,8 @@ '</object><?import namespace="mml" implementation="#mathplayer"?>' unless ($STRINGforHEADER_TEXT =~ m/mathplayer/); } + $STRINGforOUTPUT .= MODES(%{PG_restricted_eval('$main::problemPostamble')}); + #$STRINGforOUTPUT .= join('--', keys(PG_restricted_eval('$main::problemPostamble'))); (\$STRINGforOUTPUT, \$STRINGforHEADER_TEXT,\%PG_ANSWERS_HASH,eval(q!\%main::PG_FLAGS!)); } |