--- loncom/interface/groupsort.pm 2009/03/13 15:39:43 1.65 +++ loncom/interface/groupsort.pm 2010/05/03 13:53:47 1.66 @@ -2,7 +2,7 @@ # The LON-CAPA group sort handler # Allows for sorting prior to import into RAT. # -# $Id: groupsort.pm,v 1.65 2009/03/13 15:39:43 bisitz Exp $ +# $Id: groupsort.pm,v 1.66 2010/05/03 13:53:47 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -307,6 +307,15 @@ END my $ctr = 0; my $clen = scalar(@resources); + my $title = ''; + if ($env{'form.recover'}) { + $title = 'Recover Removed Resources'; + } else { + $title = 'Sort Imported Resources'; + } + if ($env{'form.bookmarks'}) { + $title = 'Import Resources from Bookmarks'; + } if (($clen > 1) || ($env{'form.readfile'}) || ($env{'form.bookmarks'})) { my %lt=&Apache::lonlocal::texthash( 'fin'=> 'Finalize order of resources', @@ -321,17 +330,9 @@ END 'pa' => 'Path', 'in' => 'Include' ); - my $title = ''; - if ($env{'form.recover'}) { - $title = 'Recover Removed Resources'; - } else { - $title = 'Sort Imported Resources'; - } - if ($env{'form.bookmarks'}) { - $title = 'Import Resources from Bookmarks'; - } $r->print(&Apache::loncommon::start_page($title, $js)); + $r->print('

'.&mt($title).'

'); $r->print(<print("$lt{'pa'}"); $r->print(&Apache::loncommon::end_data_table_header_row()."\n"); } else { - $r->print('

'); + my $errtxt = ''; + if ($env{'form.recover'}) { + $errtxt = 'There are no resources to recover.'; + } else { + $errtxt = 'There are no resources to import.'; + } if ($env{'form.bookmarks'}) { - $r->print(&mt('There are no resources in your bookmarks to import.')); + $errtxt = 'There are no resources in your bookmarks to import.'; } - $r->print('

'); + $r->print('

'.&mt($errtxt).'

'); } } else { $r->print(&Apache::loncommon::start_page(undef,$js, {'only_body' => 1})); +# $r->print('

'.&mt($title).'

'); $r->print(<