[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstathelpers.pm lonstudentassessment.pm lonsurveyreports.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Sun, 14 Sep 2008 15:16:33 -0000
raeburn Sun Sep 14 11:16:33 2008 EDT
Modified files:
/loncom/interface/statistics lonstathelpers.pm lonsurveyreports.pm
lonstudentassessment.pm
Log:
Resource and symb in links to encrypted resources included in CHRT (assessment progress chart) and also STAT (course assessment statistics) need to be encrypted if viewer does not an advanced role (i.e., TA role) to prevent access denied message when following link.
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.54 loncom/interface/statistics/lonstathelpers.pm:1.55
--- loncom/interface/statistics/lonstathelpers.pm:1.54 Fri Dec 29 16:47:11 2006
+++ loncom/interface/statistics/lonstathelpers.pm Sun Sep 14 11:16:29 2008
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstathelpers.pm,v 1.54 2006/12/29 21:47:11 albertel Exp $
+# $Id: lonstathelpers.pm,v 1.55 2008/09/14 15:16:29 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -86,7 +86,7 @@
## Render the problem
my ($base) = ($resource->src =~ m|^(.*/)[^/]*$|);
$base="http://".$ENV{'SERVER_NAME'}.$base;
- my ($src,$symb)=($resource->src,&escape($resource->symb));
+ 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*/<nop /g;
$rendered_problem =~ s|(<\s*/form\s*>)|<\/nop>|g;
@@ -171,8 +171,7 @@
if (scalar(@response_ids) > 1) {
$seq_str .= &mt('response').' '.$respid;
}
- my $link = $res->src.'?symb='.
- &escape($res->symb);
+ my $link = $res->link.'?symb='.&escape($res->shown_symb);
$seq_str .= (' 'x2).
qq{<a target="preview" href="$link">view</a>};
$seq_str .= "</td></tr>\n";
@@ -329,8 +328,8 @@
'value="'.&escape($res->symb).'" />'.
' '.$res->compTitle.'</label>'.
(' 'x2).'<a target="preview" '.
- 'href="'.$res->src.'?symb='.
- &escape($res->symb).'">view</a>'.
+ 'href="'.$res->link.'?symb='.
+ &escape($res->shown_symb).'">view</a>'.
'</td></tr>'.$/;
} else {
if (defined($target)) {
Index: loncom/interface/statistics/lonsurveyreports.pm
diff -u loncom/interface/statistics/lonsurveyreports.pm:1.15 loncom/interface/statistics/lonsurveyreports.pm:1.16
--- loncom/interface/statistics/lonsurveyreports.pm:1.15 Tue Apr 3 16:10:41 2007
+++ loncom/interface/statistics/lonsurveyreports.pm Sun Sep 14 11:16:30 2008
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonsurveyreports.pm,v 1.15 2007/04/03 20:10:41 albertel Exp $
+# $Id: lonsurveyreports.pm,v 1.16 2008/09/14 15:16:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -203,8 +203,8 @@
if ($env{'form.problemchoice'} eq $value) {
$checked = 'checked ';
}
- my $link = $problem->{'res'}->src.
- '?symb='.&escape($problem->{'res'}->symb);
+ my $link = $problem->{'res'}->link.
+ '?symb='.&escape($problem->{'res'}->shown_symb);
$Str .= '<tr><td>'.
'<input type="radio" name="problemchoice" id="'.$id.'" '.
'value="'.$value.'" '.$checked.'/>'.'</td>'.
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.147 loncom/interface/statistics/lonstudentassessment.pm:1.148
--- loncom/interface/statistics/lonstudentassessment.pm:1.147 Fri Sep 12 10:35:45 2008
+++ loncom/interface/statistics/lonstudentassessment.pm Sun Sep 14 11:16:30 2008
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.147 2008/09/12 14:35:45 bisitz Exp $
+# $Id: lonstudentassessment.pm,v 1.148 2008/09/14 15:16:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1958,7 +1958,7 @@
if ( ($links eq 'yes' && $symbol ne ' ') ||
($links eq 'all')) {
my $link = '/adm/grades'.
- '?symb='.&escape($resource->symb).
+ '?symb='.&escape($resource->shown_symb).
'&student='.$student->{'username'}.
'&userdom='.$student->{'domain'}.
'&command=submission';
@@ -2113,7 +2113,7 @@
#
if ( ($links eq 'yes' && $symbol ne ' ') || ($links eq 'all')) {
my $link = '/adm/grades' .
- '?symb='.&escape($symb).
+ '?symb='.&escape($resource->shown_symb).
'&student='.$student->{'username'}.
'&userdom='.$student->{'domain'}.
'&command=submission';