--- loncom/interface/statistics/lonstathelpers.pm 2005/02/28 22:37:28 1.41 +++ 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.41 2005/02/28 22:37:28 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*/