[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstathelpers.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Thu, 10 Mar 2005 16:58:53 -0000
matthew Thu Mar 10 11:58:53 2005 EDT
Modified files:
/loncom/interface/statistics lonstathelpers.pm
Log:
Small fix to render_resource to set up the <base> tag properly.
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.42 loncom/interface/statistics/lonstathelpers.pm:1.43
--- loncom/interface/statistics/lonstathelpers.pm:1.42 Thu Mar 3 12:55:06 2005
+++ loncom/interface/statistics/lonstathelpers.pm Thu Mar 10 11:58:52 2005
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstathelpers.pm,v 1.42 2005/03/03 17:55:06 matthew Exp $
+# $Id: lonstathelpers.pm,v 1.43 2005/03/10 16:58:52 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -81,9 +81,8 @@
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*/<nop /g;