--- loncom/interface/lonmsgdisplay.pm 2007/05/05 02:50:27 1.77 +++ loncom/interface/lonmsgdisplay.pm 2008/12/05 19:38:32 1.100 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.77 2007/05/05 02:50:27 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.100 2008/12/05 19:38:32 schafran Exp $ # # Copyright Michigan State University Board of Trustees # @@ -243,9 +243,9 @@ function folder_choice(targetform,caller
- | '.
- ''.&mt('New Folder').' '. + ' | '.&mt('Name').' '. ' |
'.
- ' '. - &Apache::loncommon::start_data_table(). - &Apache::loncommon::start_data_table_header_row(); - $result .= " | $lt{'name'} | ". + 'onclick="javascript:toggleAll('."this.form,'uncheck'".')" />'. + ''; + if ($status eq 'active') { + $result .= ' '; + } + $result .= '$lt{'name'} | ". "$lt{'usnm'} | ". "$lt{'doma'} | ". - &Apache::loncommon::end_data_table_header_row(); + &Apache::loncommon::end_data_table_header_row(); foreach my $key (sort(keys(%{$Sortby{$status}}))) { foreach my $user (@{$Sortby{$status}{$key}}) { $result .= @@ -615,12 +649,10 @@ sub disgroup { &Apache::loncommon::end_data_table_row(); } } - $result .= &Apache::loncommon::end_data_table(); + $result .= &Apache::loncommon::end_data_table().''; } - $result .= ' |
---|
$lt->{'to'} | ||
$cc | ||
$bcc |
+ + + | $prevbutton |
'); my $escmsgid=&escape($msgid); foreach (@messages) { if ($_->[5] eq $escmsgid){ @@ -2029,16 +2243,33 @@ sub displaymessage { } $counter++; } - $r->print(''); + + my $see_anonymous; + my $from_student = 0; + if ($env{'request.course.id'} eq $content{'courseid'}) { + my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; + my $username = $content{'sendername'}.':'.$content{'senderdomain'}; + my %classlist_entry = + &Apache::lonnet::get('classlist',[$username],$cdom,$cnum); + if (exists($classlist_entry{$username})) { + $from_student = 1; + $see_anonymous = &Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')); + } + } + + my $number_of_messages = scalar(@messages); #subtract 1 for last index # start output &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'}); my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'}); # Functions - $r->print('