--- loncom/interface/statistics/lonstathelpers.pm 2005/02/28 20:16:03 1.40 +++ loncom/interface/statistics/lonstathelpers.pm 2005/03/14 20:28:22 1.44 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstathelpers.pm,v 1.40 2005/02/28 20:16:03 matthew Exp $ +# $Id: lonstathelpers.pm,v 1.44 2005/03/14 20:28:22 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -68,8 +68,7 @@ use Storable qw(freeze thaw); =item &render_resource($resource) -Input: a resource generated from -&Apache::loncoursedata::get_sequence_assessment_data(). +Input: a navmaps resource Retunrs: a scalar containing html for a rendering of the problem within a table. @@ -82,9 +81,8 @@ sub render_resource { my ($resource) = @_; ## ## Render the problem - my $base; - ($base,undef) = ($resource->{'src'} =~ m|(.*/)[^/]*$|); - $base = "http://".$ENV{'SERVER_NAME'}.$base; + my ($base) = ($resource->src =~ m|^(.*/)[^/]*$|); + $base="http://".$ENV{'SERVER_NAME'}.$base; my ($src,$symb)=($resource->src,&Apache::lonnet::escape($resource->symb)); my $rendered_problem = &Apache::lonnet::ssi_body($src.'?symb='.$symb); $rendered_problem =~ s/<\s*form\s*/ 1) { $seq_str .= &mt('response').' '.$respid; } - my $link = $res->{'src'}.'?symb='. + my $link = $res->src.'?symb='. &Apache::lonnet::escape($res->symb); $seq_str .= (' 'x2). qq{view}; @@ -1294,7 +1292,7 @@ sub get_time_limits { Inputs: @Sections, an array of sections -Returns: A text description of the sections selected. +Returns: A plaintext description of the sections selected. =cut @@ -1342,7 +1340,7 @@ sub manage_caches { join(',', map { &Apache::lonnet::escape($_); - } sort(@Apache::lonstatistics::SelectedSections) + } sort(&Apache::lonstatistics::get_selected_sections()) ); my $statuskey = $Apache::lonstatistics::enrollment_status; if (exists($ENV{'form.ClearCache'}) ||