[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstathelpers.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Tue, 07 Dec 2004 16:04:06 -0000
matthew Tue Dec 7 11:04:06 2004 EDT
Modified files:
/loncom/interface/statistics lonstathelpers.pm
Log:
&render_resource: pass symb along to avoid browsing resource verbage
&new_accumulator: Added symb passing
&ProblemSelector: Escape symb
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.33 loncom/interface/statistics/lonstathelpers.pm:1.34
--- loncom/interface/statistics/lonstathelpers.pm:1.33 Fri Dec 3 16:20:28 2004
+++ loncom/interface/statistics/lonstathelpers.pm Tue Dec 7 11:04:06 2004
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstathelpers.pm,v 1.33 2004/12/03 21:20:28 albertel Exp $
+# $Id: lonstathelpers.pm,v 1.34 2004/12/07 16:04:06 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -86,7 +86,7 @@
($base,undef) = ($resource->{'src'} =~ m|(.*/)[^/]*$|);
$base = "http://".$ENV{'SERVER_NAME'}.$base;
my $rendered_problem =
- &Apache::lonnet::ssi_body($resource->{'src'});
+ &Apache::lonnet::ssi_body($resource->{'src'}.'?symb='.&Apache::lonnet::escape($resource->{'symb'}));
$rendered_problem =~ s/<\s*form\s*/<nop /g;
$rendered_problem =~ s|(<\s*/form\s*>)|<\/nop>|g;
return '<table bgcolor="ffffff"><tr><td>'.
@@ -149,8 +149,10 @@
if (scalar(@{$partdata->{'ResponseIds'}}) > 1) {
$seq_str .= &mt('response').' '.$respid;
}
+ my $link = $res->{'src'}.'?symb='.
+ &Apache::lonnet::escape($res->{'symb'});
$seq_str .= (' 'x2).
- qq{<a target="preview" href="$res->{'src'}?symb=$res->{'symb'}">view</a>};
+ qq{<a target="preview" href="$link">view</a>};
$seq_str .= "</td></tr>\n";
$rb_count++;
}
@@ -308,7 +310,8 @@
'value="'.&Apache::lonnet::escape($res->symb).'" />'.
' '.$res->compTitle.'</label>'.
(' 'x2).'<a target="preview" '.
- 'href="'.$res->src.'">view</a>'.
+ 'href="'.$res->src.'?symb='.
+ &Apache::lonnet::escape($res->{'symb'}).'">view</a>'.
'</td></tr>'.$/;
} else {
if (defined($target)) {