--- loncom/xml/londefdef.pm 2010/11/18 17:42:15 1.426 +++ loncom/xml/londefdef.pm 2011/04/05 10:02:57 1.428 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.426 2010/11/18 17:42:15 raeburn Exp $ +# $Id: londefdef.pm,v 1.428 2011/04/05 10:02:57 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -47,6 +47,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(); @@ -588,7 +589,7 @@ sub start_body { sub edit_controls { my ($nochgview) = @_; my $result .= ' -
+
'; unless ($nochgview) { $result .= ' @@ -600,7 +601,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 .= '
@@ -2057,15 +2063,22 @@ sub start_table { if ((defined $border) && ($border > 0)) { # &Apache::lonnet::logthis("Turning on table borders: $border"); $table->table_border(1); - if ($cell_border ne 'none') { - $table->cell_border(1); # html specs that border turns on both...unless rules='none'. + if (!defined $cell_border) { + $table->cell_border(1); # Default for rules is all if rules not defined. } } # Only all or nothing for cell borders for now: - if ((defined $cell_border) && ($cell_border ne 'none')) { - # &Apache::lonnet::logthis("Turning on cell borders: $cell_border"); - $table->cell_border(1); + if ((defined $cell_border)) { + if ($cell_border eq 'all') { + $table->cell_border(1); + } elsif ($cell_border eq 'rows') { + $table->cell_border(2); + } elsif ($cell_border eq 'cols') { + $table->cell_border(3); + } else { + $table->cell_border(0); + } } if (defined $theme) { $table->theme($theme);