[system] / branches / rel-2-2-dev / webwork-modperl / lib / WeBWorK / ContentGenerator / Problem.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-2-dev/webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2171 Revision 2192
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.132 2004/05/22 22:14:07 dpvc Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.133 2004/05/23 01:17:42 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.
1015# # $str is a complex number 1015# # $str is a complex number
1016#} 1016#}
1017 1017
1018sub viewOptions { 1018sub viewOptions {
1019 my ($self) = @_; 1019 my ($self) = @_;
1020 my $ce = $self->r->ce;
1020 1021
1021 my $displayMode = $self->{displayMode}; 1022 my $displayMode = $self->{displayMode};
1022 my %must = %{ $self->{must} }; 1023 my %must = %{ $self->{must} };
1023 my %can = %{ $self->{can} }; 1024 my %can = %{ $self->{can} };
1024 my %will = %{ $self->{will} }; 1025 my %will = %{ $self->{will} };
1032 -label => "Saved answers", 1033 -label => "Saved answers",
1033 ), "  ".CGI::br(); 1034 ), "  ".CGI::br();
1034 1035
1035 $optionLine and $optionLine .= join "", CGI::br(); 1036 $optionLine and $optionLine .= join "", CGI::br();
1036 1037
1038 my %display_modes = %{WeBWorK::PG::DISPLAY_MODES()};
1039 my @active_modes = grep { exists $display_modes{$_} }
1040 @{$ce->{pg}->{displayModes}};
1041
1037 return CGI::div({-style=>"border: thin groove; padding: 1ex; margin: 2ex align: left"}, 1042 return CGI::div({-style=>"border: thin groove; padding: 1ex; margin: 2ex align: left"},
1038 "View equations as:    ".CGI::br(), 1043 "View equations as:    ".CGI::br(),
1039 CGI::radio_group( 1044 CGI::radio_group(
1040 -name => "displayMode", 1045 -name => "displayMode",
1041 -values => ['plainText', 'formattedText', 'images', 'jsMath'], 1046 -values => \@active_modes,
1042 -default => $displayMode, 1047 -default => $displayMode,
1043 -linebreak=>'true', 1048 -linebreak=>'true',
1044 -labels => { 1049 -labels => {
1045 plainText => "plain", 1050 plainText => "plain",
1046 formattedText => "formatted", 1051 formattedText => "formatted",
1047 images => "images",
1048 jsMath => "jsMath",
1049 } 1052 },
1050 ), CGI::br(),CGI::hr(), 1053 ), CGI::br(),CGI::hr(),
1051 $optionLine, 1054 $optionLine,
1052 CGI::submit(-name=>"redisplay", -label=>"Save Options"), 1055 CGI::submit(-name=>"redisplay", -label=>"Save Options"),
1053 ); 1056 );
1054} 1057}

Legend:
Removed from v.2171  
changed lines
  Added in v.2192

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9