--- loncom/interface/lonfeedback.pm 2004/02/18 20:33:49 1.73.2.1 +++ loncom/interface/lonfeedback.pm 2004/01/13 02:31:09 1.74 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.73.2.1 2004/02/18 20:33:49 albertel Exp $ +# $Id: lonfeedback.pm,v 1.74 2004/01/13 02:31:09 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -25,7 +25,24 @@ # # http://www.lon-capa.org/ # -### +# (Internal Server Error Handler +# +# (Login Screen +# 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14, +# 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer) +# +# 3/1/1 Gerd Kortemeyer) +# +# 3/1,2/3,2/5,2/6,2/8 Gerd Kortemeyer +# 2/9 Guy Albertelli +# 2/10 Gerd Kortemeyer +# 2/13 Guy Albertelli +# 7/25 Gerd Kortemeyer +# 7/26 Guy Albertelli +# 7/26,8/10,10/1,11/5,11/6,12/27,12/29 Gerd Kortemeyer +# YEAR=2002 +# 1/1,1/16 Gerd Kortemeyer +# package Apache::lonfeedback; @@ -51,10 +68,9 @@ sub list_discussion { } unless ($symb) { return ''; } my $seeid=&Apache::lonnet::allowed('rin',$crs); - my $viewgrades=(&Apache::lonnet::allowed('vgr',$crs) - && ($symb=~/\.(problem|exam|quiz|assess|survey|form)$/)); + 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|; @@ -136,25 +152,25 @@ sub list_discussion { if ($seeid) { if ($hidden) { $sender.=' '.&mt('Make Visible').''; + $symb.':::'.$idx.'">'.&mt('Make Visible').''; } else { $sender.=' '.&mt('Hide').''; + $symb.':::'.$idx.'">'.&mt('Hide').''; } $sender.=' '.&mt('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) { $sender=''.$screenname.''; } } - if (&Apache::lonnet::allowed('pch', - $ENV{'request.course.id'}. - ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) { - $sender.=' '.&mt('Reply').''; - } my $vgrlink; if ($viewgrades) { $vgrlink=&Apache::loncommon::submlink('Submissions', @@ -216,7 +232,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.='
'. + ''. + &mt('Post Discussion').'
'; + } + } return $discussion; } @@ -239,6 +264,7 @@ sub mail_screen { } } my $latexHelp = Apache::loncommon::helpLatexCheatsheet(); + my $send=&mt('Send'); $r->print(< @@ -307,7 +333,7 @@ Attachment (128 KB max size):

- +

ENDDOCUMENT @@ -405,16 +431,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.='
'. &mt('Anonymous contribution to course discussion of resource'). ' ('.&mt('name only visible to course faculty').')'; } } - if ($msgoptions) { $msgoptions='

'.&mt('Sending Messages').'

'.$msgoptions; } + if ($msgoptions) { $msgoptions='

'.&mt('Sending Messages').'

'.$msgoptions; } if ($discussoptions) { - $discussoptions='

'.&mt('Discussion Contributions').'

'.$discussoptions; } + $discussoptions='

'.&mt('Discussion Contributions').'

'.$discussoptions; } return $msgoptions.$discussoptions; } @@ -726,8 +753,6 @@ sub handler { &mt('Changed discussion status').'
','0','0'); } elsif ($ENV{'form.preview'}) { # -------------------------------------------------------- User wants a preview - $r->content_type('text/html'); - $r->send_http_header; &show_preview($r); } else { # ------------------------------------------------------------- Normal feedback @@ -756,7 +781,7 @@ sub handler { if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) { unless ($symb) { $goahead=0; } } - # backward compatability (bulltein boards used to be 'wrapped') + # backward compatibility (bulltin boards used to be 'wrapped') if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) { $feedurl=~s|^/adm/wrapper||; }