--- loncom/xml/londefdef.pm 2010/11/09 21:28:20 1.415.4.2 +++ loncom/xml/londefdef.pm 2010/12/25 00:10:16 1.415.4.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.415.4.2 2010/11/09 21:28:20 raeburn Exp $ +# $Id: londefdef.pm,v 1.415.4.3 2010/12/25 00:10:16 raeburn Exp $ # # # Copyright Michigan State University Board of Trustees @@ -48,6 +48,7 @@ use Image::Magick; use Apache::lonmenu(); use Apache::lonmeta(); use Apache::lonlocal; +use Apache::loncommon(); use Apache::Constants qw(:common); use File::Basename; use LONCAPA(); @@ -589,7 +590,7 @@ sub start_body { sub edit_controls { my ($nochgview) = @_; my $result .= ' -
+
'; unless ($nochgview) { $result .= ' @@ -601,7 +602,12 @@ sub edit_controls { $result .= '
'; if (($env{'request.course.id'}) && ($env{'form.forceedit'})) { - $result .= (' ' x 3).''; + my $viewtext = &mt('Course View'); + if (&Apache::loncommon::course_type() eq 'Community') { + $viewtext = &mt('Community View'); + } + $result .= (' ' x 3).''; } $result .= '
@@ -2733,14 +2739,20 @@ sub tag_check { sub cell_config_hash { my ($align, $rowspan, $colspan, $width) = @_; + if ($rowspan ne '') { + $rowspan =~ s/^\s+|\s+$//g; + } + if ($colspan ne '') { + $colspan =~ s/^\s+|\s+$//g; + } my %config; if ($align ne '') { $config{'halign'} = $align; } - if ($colspan ne "") { + if (($colspan =~ /^\d+$/) && ($colspan > 0)) { $config{'colspan'} = $colspan; } - if ($rowspan ne '') { + if (($rowspan =~ /^\d+$/) && ($rowspan > 0)) { $config{'rowspan'} = $rowspan; } if ($width ne '') {