--- loncom/interface/lonfeedback.pm 2003/11/27 09:43:42 1.73 +++ loncom/interface/lonfeedback.pm 2004/01/28 16:10:26 1.75 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.73 2003/11/27 09:43:42 albertel Exp $ +# $Id: lonfeedback.pm,v 1.75 2004/01/28 16:10:26 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,7 @@ sub list_discussion { my $seeid=&Apache::lonnet::allowed('rin',$crs); my $viewgrades=&Apache::lonnet::allowed('vgr',$crs); my @discussionitems=(); - # backward compatability (bulltein boards used to be 'wrapped') + # backward compatibility (bulletin boards used to be 'wrapped') my $ressymb=$symb; if ($mode eq 'board') { $ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|; @@ -232,7 +236,16 @@ Attachment (128 KB max size): ENDDISCUSS $discussion.=&generate_preview_button(); - } + } else { + if (&Apache::lonnet::allowed('pch', + $ENV{'request.course.id'}. + ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) { + $discussion.='
'.
+ '![]() |
- +
ENDDOCUMENT @@ -421,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.='