--- loncom/interface/lonfeedback.pm 2003/09/17 17:50:49 1.59 +++ loncom/interface/lonfeedback.pm 2003/11/03 20:34:54 1.65 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.59 2003/09/17 17:50:49 albertel Exp $ +# $Id: lonfeedback.pm,v 1.65 2003/11/03 20:34:54 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -51,6 +51,7 @@ use Apache::Constants qw(:common); use Apache::lonmsg(); use Apache::loncommon(); use Apache::lontexconvert(); +use Apache::lonlocal; sub list_discussion { my ($mode,$status,$symb)=@_; @@ -68,17 +69,13 @@ sub list_discussion { unless ($symb) { return ''; } my $seeid=&Apache::lonnet::allowed('rin',$crs); my $viewgrades=&Apache::lonnet::allowed('vgr',$crs); - my $discussion=''; + my %discussionitems=(); my %contrib=&Apache::lonnet::restore($symb,$ENV{'request.course.id'}, $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, $ENV{'course.'.$ENV{'request.course.id'}.'.num'}); if ($contrib{'version'}) { - unless ($discussiononly) { - $discussion.= - '
Attachment: '.$fname.'.'.$ft.''; + '">'.$fname.'.'.$ft.'
'; } if ($message) { if ($hidden) { @@ -104,7 +101,7 @@ sub list_discussion { $contrib{$idx.':sendername'}, $contrib{$idx.':senderdomain'}); - my $sender='Anonymous'; + my $sender=&mt('Anonymous'); if ((!$contrib{$idx.':anonymous'}) || ($seeid)) { $sender=&Apache::loncommon::aboutmewrapper( $plainname, @@ -113,19 +110,25 @@ sub list_discussion { $contrib{$idx.':sendername'}.' at '. $contrib{$idx.':senderdomain'}.')'; if ($contrib{$idx.':anonymous'}) { - $sender.=' [anonymous] '. + $sender.=' ['.&mt('anonymous').'] '. $screenname; } if ($seeid) { if ($hidden) { $sender.=' Make Visible'; + $symb.':::'.$idx.'">'.&mt('Make Visible').''; } else { $sender.=' Hide'; + $symb.':::'.$idx.'">'.&mt('Hide').''; } $sender.=' Delete'; + $symb.':::'.$idx.'">'.&mt('Delete').''; + } + if (&Apache::lonnet::allowed('pch', + $ENV{'request.course.id'}. + ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) { + $sender.=' '.&mt('Reply').''; } } else { if ($screenname) { @@ -137,16 +140,17 @@ sub list_discussion { $vgrlink=&Apache::loncommon::submlink('Submissions', $contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'},$symb); } - $discussion.=''.$sender.' '.$vgrlink.' ('. + $discussionitems{$idx}='
'.$sender.' '.$vgrlink.' ('. localtime($contrib{$idx.':timestamp'}). '):
'.$message. ''; } } } - unless ($discussiononly) { - $discussion.=''; - } + } + my $discussion='
Attachment (128 KB max size):
@@ -181,7 +185,8 @@ sub mail_screen { Feedback to resource author';
- }
- if (&feedback_available(1)) {
- $msgoptions.=
- '
Question about resource content';
- }
- if (&feedback_available(0,1)) {
- $msgoptions.=
- '
'.
- 'Question/Comment/Feedback about course content';
- }
- if (&feedback_available(0,0,1)) {
- $msgoptions.=
- '
'.
- 'Question/Comment/Feedback about course policy';
- }
-
- if ($ENV{'request.course.id'}) {
- if (&Apache::lonnet::allowed('pch',
- $ENV{'request.course.id'}.
- ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
- $discussoptions=' '.
- 'Contribution to course discussion of resource';
- $discussoptions.='
'.
- 'Anonymous contribution to course discussion of resource'.
- ' (name only visible to course faculty)';
+ my ($feedurl) = @_;
+ my $msgoptions='';
+ my $discussoptions='';
+ unless ($ENV{'form.replydisc'}) {
+ if (($feedurl=~/^\/res\//) && ($feedurl!~/^\/res\/adm/)) {
+ $msgoptions=
+ '
'. + &mt('Feedback to resource author').'
'; + } + if (&feedback_available(1)) { + $msgoptions.= + '