[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 27 Nov 2003 09:43:42 -0000
albertel Thu Nov 27 04:43:42 2003 EDT
Modified files:
/loncom/interface lonfeedback.pm
Log:
- Part of BUG#2416, make the new bulletin boards backward compatabile with the old ones
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.72 loncom/interface/lonfeedback.pm:1.73
--- loncom/interface/lonfeedback.pm:1.72 Thu Nov 27 04:20:39 2003
+++ loncom/interface/lonfeedback.pm Thu Nov 27 04:43:42 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.72 2003/11/27 09:20:39 albertel Exp $
+# $Id: lonfeedback.pm,v 1.73 2003/11/27 09:43:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -70,7 +70,12 @@
my $seeid=&Apache::lonnet::allowed('rin',$crs);
my $viewgrades=&Apache::lonnet::allowed('vgr',$crs);
my @discussionitems=();
- my %contrib=&Apache::lonnet::restore($symb,$ENV{'request.course.id'},
+ # backward compatability (bulltein boards used to be 'wrapped')
+ my $ressymb=$symb;
+ if ($mode eq 'board') {
+ $ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|;
+ }
+ my %contrib=&Apache::lonnet::restore($ressymb,$ENV{'request.course.id'},
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'},
$ENV{'course.'.$ENV{'request.course.id'}.'.num'});
my $visible=0;
@@ -215,7 +220,7 @@
<form action="/adm/feedback" method="post" name="mailform" enctype="multipart/form-data">
<input type="submit" name="discuss" value="Post Discussion" />
<input type="submit" name="anondiscuss" value="Post Anonymous Discussion" />
-<input type="hidden" name="symb" value="$symb" />
+<input type="hidden" name="symb" value="$ressymb" />
<input type="hidden" name="sendit" value="true" />
<br />
<font size="1">Note: in anonymous discussion, your name is visible only to
@@ -765,7 +770,10 @@
if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) {
unless ($symb) { $goahead=0; }
}
-
+ # backward compatability (bulltein boards used to be 'wrapped')
+ if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) {
+ $feedurl=~s|^/adm/wrapper||;
+ }
if ($goahead) {
# Go ahead with feedback, no ambiguous reference
&Apache::loncommon::content_type($r,'text/html');