--- loncom/interface/lonfeedback.pm 2003/11/27 09:20:39 1.72 +++ loncom/interface/lonfeedback.pm 2004/02/11 22:14:10 1.76 @@ -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.76 2004/02/11 22:14:10 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -55,6 +55,10 @@ use Apache::lonlocal; sub list_discussion { my ($mode,$status,$symb)=@_; + &Apache::lonnet::logthis("status is $status"); + if (!($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER')) { + return ''; + } my $discussiononly=0; if ($mode eq 'board') { $discussiononly=1; } unless ($ENV{'request.course.id'}) { return ''; } @@ -70,7 +74,12 @@ sub list_discussion { 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 compatibility (bulletin 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 +224,7 @@ sub list_discussion {
ENDDOCUMENT @@ -416,16 +435,17 @@ sub screen_header { if (&Apache::lonnet::allowed('pch', $ENV{'request.course.id'}. ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) { - $discussoptions=' '. + $discussoptions=' '. &mt('Contribution to course discussion of resource'); $discussoptions.='