--- loncom/interface/lonfeedback.pm 2006/12/24 22:13:19 1.237 +++ loncom/interface/lonfeedback.pm 2009/04/04 21:47:40 1.269 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.237 2006/12/24 22:13:19 raeburn Exp $ +# $Id: lonfeedback.pm,v 1.269 2009/04/04 21:47:40 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -91,7 +91,7 @@ sub list_discussion { if (not &discussion_visible($status)) { if ($mode ne 'board') { &Apache::lonenc::check_encrypt(\$ressymb); - return &send_message_link($ressymb); + return '
'.&send_message_link($ressymb); } } if ($group ne '' && $mode eq 'board') { @@ -625,7 +625,7 @@ END $filterchoice .= ' '.$role_types{$role}.','; } $filterchoice =~ s/,$//; - $filterchoice .= '
        '; + $filterchoice .= '
'.(' ' x8); } if ($statusfilter) { $filterchoice .= ''.&mt('status').'- '.$status_types{$statusfilter}; @@ -637,11 +637,11 @@ END } } if ($dischash{$toggkey}) { - my $storebutton = &mt('Store read/unread changes'); + my $storebutton = &mt('Save read/unread changes'); $discussion.=''. - ''."\n". + ''."\n". ''."\n". + ' onClick="this.form.submit();" />'."\n". ''; } $discussion .= (<'; + $discussion.= &send_feedback_link($ressymb,$target); } } if ($outputtarget ne 'tex') { $discussion.= &send_message_link($ressymb); } - $discussion.=''; + $discussion.=''; } return $discussion; } @@ -763,10 +762,10 @@ sub send_feedback_link { sub send_message_link { my ($ressymb) = @_; - my $output = ''. + my $output = ''. ' '.&mt('Send Message').''; return $output; } @@ -795,7 +794,7 @@ sub action_links_bar { $discussion .= '&previous='.$prevread; } $discussion .= &group_args($group); - $discussion .='">'.&mt('Sorting/Filtering options').'  '; + $discussion .='">'.&mt('Sorting/Filtering options').''.(' ' x2); } else { $discussion .= ''; } @@ -901,6 +900,9 @@ sub build_posting_display { $env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'}); + my $see_anonymous = + &Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')); + if ((@{$grouppick} == 0) || (grep(/^all$/,@{$grouppick}))) { $skip_group_check = 1; } @@ -1001,18 +1003,20 @@ sub build_posting_display { @{$$subjectsort{$subject}} = ("$idx"); } } - if ((!$contrib{$idx.':anonymous'}) || (&Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')))) { + if (!$contrib{$idx.':anonymous'} || $see_anonymous) { $sender=&Apache::loncommon::aboutmewrapper( $plainname, $contrib{$idx.':sendername'}, $contrib{$idx.':senderdomain'}).' ('. - $contrib{$idx.':sendername'}.' at '. + $contrib{$idx.':sendername'}.':'. $contrib{$idx.':senderdomain'}.')'; if ($contrib{$idx.':anonymous'}) { $sender.=' ['.$$anonhash{$key}.'] '. $screenname; } - + if ($see_anonymous) { + $sender.=&Apache::loncommon::student_image_tag($contrib{$idx.':senderdomain'},$contrib{$idx.':sendername'}); + } # Set up for sorting by domain, then username unless (defined($$usernamesort{$contrib{$idx.':senderdomain'}})) { %{$$usernamesort{$contrib{$idx.':senderdomain'}}} = (); @@ -1236,7 +1240,7 @@ sub build_posting_display { $$newitem{$idx} = 1; $$discussionitems[$idx] .= '

- '; + '; } else { $$newitem{$idx} = 0; $$discussionitems[$idx] .= ' @@ -1468,7 +1472,7 @@ sub replicate_attachments { } sub mail_screen { - my ($r,$feedurl,$options,$symb) = @_; + my ($r,$feedurl,$options,$caller_symb,$attachmaxtext) = @_; if (exists($env{'form.origpage'})) { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','currnewattach','addnewattach','deloldattach','delnewattach','timestamp','idx','anondiscuss','discuss','blog','group','ref']); } @@ -1478,9 +1482,9 @@ sub mail_screen { 'myqu' => 'My question/comment/feedback:', 'title' => 'Title', 'reta' => 'Retained attachments', - 'atta' => 'Attachment (128 KB max size)', + 'atta' => 'Attachment', ); - my $restitle = &get_resource_title($symb,$feedurl); + my $restitle = &get_resource_title($caller_symb,$feedurl); my $quote=''; my $subject = ''; my $comment = ''; @@ -1614,7 +1618,7 @@ END $comment = &unescape($env{'form.comment'}); &process_attachments(\@currnewattach,\@currdelold,\@keepold); } - my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(); + my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(undef,undef,1); my $send=&mt('Send'); my $alert = &mt('Please select a feedback type.'); my $js= <$lt{'myqu'}

$latexHelp +

+

$lt{'title'}:

NEW
'.&mt('NEW').'