--- loncom/interface/loncreateuser.pm 2009/11/18 20:01:36 1.326 +++ loncom/interface/loncreateuser.pm 2009/11/18 21:24:40 1.327 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.326 2009/11/18 20:01:36 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.327 2009/11/18 21:24:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5161,7 +5161,6 @@ sub print_userchangelogs_display { my %roleslog=&Apache::lonnet::dump('nohist_rolelog',$cdom,$cnum); if ((keys(%roleslog))[0]=~/^error\:/) { undef(%roleslog); } - $r->print('
'; - - # Only display table, if content is available (has been collected above) - if (!$content) { + if ($showntableheader) { # Table footer, if content displayed above + $r->print(&Apache::loncommon::end_data_table() + .$nav_links); + } else { # No content displayed above $r->print('' .&mt('There are no records to display.') .'
' ); - $r->print($form_footer); - return; } - # Content to display, so create navigation and display table + # Form Footer + $r->print( + '' + .'' + .''); + return; +} - # Create Navigation: - # Navigation Script - my $nav_script = <<"ENDSCRIPT"; +sub userlogdisplay_nav { + my ($formname,$curr,$more_records) = @_; + my ($nav_script,$nav_links); + if (ref($curr) eq 'HASH') { + # Create Navigation: + # Navigation Script + $nav_script = <<"ENDSCRIPT"; ENDSCRIPT - # Navigation Buttons - my $nav_links; - $nav_links = ''; - if (($curr{'page'} > 1) || ($more_records)) { - if ($curr{'page'} > 1) { - $nav_links .= ' '; - } - if ($more_records) { - $nav_links .= ''; + # Navigation Buttons + $nav_links = '
'; + if (($curr->{'page'} > 1) || ($more_records)) { + if ($curr->{'page'} > 1) { + $nav_links .= ' '; + } + if ($more_records) { + $nav_links .= ''; + } } + $nav_links .= '
'; } - $nav_links .= ''; - - # Table Header - my $tableheader = - &Apache::loncommon::start_data_table_header_row() - .'