From: jj v. a. <we...@ma...> - 2005-10-03 04:30:12
|
Log Message: ----------- Allow basic types to specify the width of their input fields, and changed the handling of the long doc strings. The long string is no longer sent as a parameter where it might be truncated. Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: Config.pm Revision Data ------------- Index: Config.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Config.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -Llib/WeBWorK/ContentGenerator/Instructor/Config.pm -Llib/WeBWorK/ContentGenerator/Instructor/Config.pm -u -r1.3 -r1.4 --- lib/WeBWorK/ContentGenerator/Instructor/Config.pm +++ lib/WeBWorK/ContentGenerator/Instructor/Config.pm @@ -83,10 +83,11 @@ # A widget to interact with the user sub entry_widget { my ($self, $name, $default) = @_; + my $width = $self->{width} || 15; return CGI::textfield( -name => $name, -value => $default, - -size => '15', + -size => $width, ); } @@ -99,7 +100,7 @@ CGI::a({href=>$self->{Module}->systemLink( $r->urlpath->new(type=>'instructor_config', args=>{courseID => $r->urlpath->arg("courseID")}), - params=>{show_long_doc=>$self->{doc2} || $self->{doc}, + params=>{show_long_doc=>1, var_name=>"$self->{var}"}), target=>"_blank"}, CGI::img({src=>$r->{ce}->{webworkURLs}->{htdocs}. @@ -501,9 +502,18 @@ } if ($r->param('show_long_doc')) { + my $docstring; + for my $consec (@$ConfigValues) { + my @configSectionArray = @$consec; + shift @configSectionArray; + for my $con (@configSectionArray) { + $docstring = $con->{doc2} || $con->{doc} + if($con->{var} eq $r->param('var_name')); + } + } print CGI::h2("Variable Documentation: ". CGI::code('$'.$r->param('var_name'))), CGI::p(), - CGI::blockquote( $r->param('show_long_doc')); + CGI::blockquote( $docstring ); return ""; } |