| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.136 2004/05/24 20:19:08 toenail Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.137 2004/05/24 20:41:10 apizer 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. |
| … | |
… | |
| 1036 | $optionLine and $optionLine .= join "", CGI::br(); |
1036 | $optionLine and $optionLine .= join "", CGI::br(); |
| 1037 | |
1037 | |
| 1038 | my %display_modes = %{WeBWorK::PG::DISPLAY_MODES()}; |
1038 | my %display_modes = %{WeBWorK::PG::DISPLAY_MODES()}; |
| 1039 | my @active_modes = grep { exists $display_modes{$_} } |
1039 | my @active_modes = grep { exists $display_modes{$_} } |
| 1040 | @{$ce->{pg}->{displayModes}}; |
1040 | @{$ce->{pg}->{displayModes}}; |
| 1041 | |
1041 | my $modeLine = (scalar(@active_modes)>1) ? |
| 1042 | return CGI::div({-style=>"border: thin groove; padding: 1ex; margin: 2ex align: left"}, |
|
|
| 1043 | "View equations as: ".CGI::br(), |
1042 | "View equations as: ".CGI::br(). |
| 1044 | CGI::radio_group( |
1043 | CGI::radio_group( |
| 1045 | -name => "displayMode", |
1044 | -name => "displayMode", |
| 1046 | -values => \@active_modes, |
1045 | -values => \@active_modes, |
| 1047 | -default => $displayMode, |
1046 | -default => $displayMode, |
| 1048 | -linebreak=>'true', |
1047 | -linebreak=>'true', |
| … | |
… | |
| 1051 | formattedText => "formatted", |
1050 | formattedText => "formatted", |
| 1052 | images => "images", |
1051 | images => "images", |
| 1053 | jsMath => "jsMath", |
1052 | jsMath => "jsMath", |
| 1054 | asciimath => "asciimath", |
1053 | asciimath => "asciimath", |
| 1055 | }, |
1054 | }, |
| 1056 | ), CGI::br(),CGI::hr(), |
1055 | ). CGI::br().CGI::hr() : ''; |
|
|
1056 | |
|
|
1057 | return CGI::div({-style=>"border: thin groove; padding: 1ex; margin: 2ex align: left"}, |
|
|
1058 | $modeLine, |
| 1057 | $optionLine, |
1059 | $optionLine, |
| 1058 | CGI::submit(-name=>"redisplay", -label=>"Save Options"), |
1060 | CGI::submit(-name=>"redisplay", -label=>"Save Options"), |
| 1059 | ); |
1061 | ); |
| 1060 | } |
1062 | } |
| 1061 | |
1063 | |