| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: pg/lib/Applet.pm,v 1.17 2009/02/19 16:35:26 gage Exp $ |
4 | # $CVSHeader: pg/lib/Applet.pm,v 1.18 2009/03/10 12:10:36 gage 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. |
| … | |
… | |
| 266 | base64_config => undef, # this is the initial (and final?) configuration |
266 | base64_config => undef, # this is the initial (and final?) configuration |
| 267 | # configuration => '', # configuration defining the applet |
267 | # configuration => '', # configuration defining the applet |
| 268 | initialState => '', # initial state. (I'm considering storing everything as ascii and converting on the fly to base64 when needed.) |
268 | initialState => '', # initial state. (I'm considering storing everything as ascii and converting on the fly to base64 when needed.) |
| 269 | getStateAlias => 'getXML', |
269 | getStateAlias => 'getXML', |
| 270 | setStateAlias => 'setXML', |
270 | setStateAlias => 'setXML', |
| 271 | configAlias => '', |
271 | configAlias => '', # deprecated |
| 272 | getConfigAlias => 'getConfig', |
272 | getConfigAlias => 'getConfig', |
| 273 | setConfigAlias => 'setConfig', |
273 | setConfigAlias => 'setConfig', |
| 274 | initializeActionAlias => 'setXML', |
274 | initializeActionAlias => 'setXML', |
| 275 | submitActionAlias => 'getXML', |
275 | submitActionAlias => 'getXML', |
| 276 | submitActionScript => '', # script executed on submitting the WW question |
276 | submitActionScript => '', # script executed on submitting the WW question |
| 277 | answerBox => 'answerBox', |
277 | answerBoxAlias => 'answerBox', |
|
|
278 | answerBox => '', # deprecated |
|
|
279 | returnFieldName => '', # deprecated |
| 278 | headerText => DEFAULT_HEADER_TEXT(), |
280 | headerText => DEFAULT_HEADER_TEXT(), |
| 279 | objectText => '', |
281 | objectText => '', |
| 280 | debug => 0, |
282 | debug => 0, |
| 281 | @_, |
283 | @_, |
| 282 | }; |
284 | }; |
| 283 | bless $self, $class; |
285 | bless $self, $class; |
| 284 | $self->initialState('<xml></xml>'); |
286 | $self->initialState('<xml></xml>'); |
|
|
287 | if ($self->{returnFieldName}) or $self->{answerBox} ) { # backward compatibility |
|
|
288 | warn "use answerBoxAlias instead of returnFieldName or answerBox"; |
|
|
289 | $self->{answerBox}=''; |
|
|
290 | $self->{returnFieldName}=''; |
|
|
291 | } |
| 285 | if ($self->{configAlias}) { # backward compatibility |
292 | if ($self->{configAlias}) { # backward compatibility |
| 286 | warn "use setConfigAlias instead of configAlias"; |
293 | warn "use setConfigAlias instead of configAlias"; |
| 287 | $self->{configAlias}=''; |
294 | $self->{configAlias}=''; |
| 288 | } |
295 | } |
| 289 | $self->config('<xml></xml>'); |
296 | $self->config('<xml></xml>'); |