| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork2/lib/WeBWorK/PG.pm,v 1.67 2006/08/17 23:54:09 dpvc Exp $ |
4 | # $CVSHeader: webwork2/lib/WeBWorK/PG.pm,v 1.68 2006/08/24 21:16:36 sh002i Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 176 | |
176 | |
| 177 | # ---------------------------------------------------------------------- |
177 | # ---------------------------------------------------------------------- |
| 178 | |
178 | |
| 179 | # ADDED: ImageGenerator for images mode |
179 | # ADDED: ImageGenerator for images mode |
| 180 | if (defined $extras->{image_generator}) { |
180 | if (defined $extras->{image_generator}) { |
| 181 | $envir{imagegen} = $extras->{image_generator}; |
|
|
| 182 | # only allow access to the add() method |
181 | # only allow access to the add() method |
| 183 | $envir{imagegen} = new WeBWorK::Utils::RestrictedClosureClass($extras->{image_generator}, "add"); |
182 | $envir{imagegen} = new WeBWorK::Utils::RestrictedClosureClass($extras->{image_generator}, "add"); |
| 184 | } |
183 | } |
| 185 | |
184 | |
| 186 | # ADDED: jsMath options |
185 | # ADDED: jsMath options |