--- loncom/interface/statistics/lonstathelpers.pm 2020/09/07 02:58:25 1.76.2.3 +++ loncom/interface/statistics/lonstathelpers.pm 2020/10/24 19:37:20 1.76.2.5 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstathelpers.pm,v 1.76.2.3 2020/09/07 02:58:25 raeburn Exp $ +# $Id: lonstathelpers.pm,v 1.76.2.5 2020/10/24 19:37:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -85,7 +85,7 @@ sub render_resource { ## ## Render the problem my ($base) = ($resource->src =~ m|^(.*/)[^/]*$|); - $base="http://".$ENV{'SERVER_NAME'}.$base; + $base=&Apache::lonnet::absolute_url().$base; my ($src,$symb)=($resource->link,&escape($resource->shown_symb)); my $rendered_problem = &Apache::lonnet::ssi_body($src.'?symb='.$symb); $rendered_problem =~ s/<\s*form\s*/'.&mt('view').''; $seq_str .= "". &Apache::loncommon::end_data_table_row()."\n"; - $rb_count++; } + $rb_count++; } } } @@ -277,6 +277,15 @@ sub problem_selector { } } $Str .= &Apache::loncommon::end_data_table().&Apache::loncommon::end_scrollbox()."\n"; + if (!$rb_count) { + if ($byres) { + $Str = '

'.&mt('No gradable problems found').'

'; + } elsif ($AcceptedResponseTypes eq '.') { + $Str = '

'.&mt('No problems found').'

'; + } else { + $Str = '

'.&mt('No analyzable problems found').'

'; + } + } return $Str; }