--- loncom/interface/lonmsgdisplay.pm 2007/04/22 02:25:36 1.69 +++ loncom/interface/lonmsgdisplay.pm 2008/11/25 21:59:24 1.98 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.69 2007/04/22 02:25:36 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.98 2008/11/25 21:59:24 schafran Exp $ # # Copyright Michigan State University Board of Trustees # @@ -390,6 +390,9 @@ sub renamefolder { if ($env{'form.renamed'} eq '') { return &mt('The folder "[_1]" may not be renamed to "[_2]" as the new name you requested is an invalid name.',$folder,$newname); } + if (defined($permfolders{$folder})) { + return &mt('The folder "[_1]" may not be renamed as it is a folder provided by the system.',$folder); + } if (defined($permfolders{$newname})) { return &mt('The folder "[_1]" may not be renamed to "[_2]" as the new name you requested is reserved for folders provided automatically by the system.',$folder,$newname); } @@ -499,7 +502,8 @@ sub movemsg { # ======================================================= Display a course list sub discourse { - my $result; + my ($statushash) = @_; + my ($result,$active,$previous,$future); my ($course_personnel, $current_members, $expired_members, @@ -508,33 +512,55 @@ sub discourse { unshift @$current_members, (@$course_personnel); my %defaultUsers; - $result .= ''."\n"; + my $tmptext; + if ($tmptext = &Apache::lonselstudent::render_student_list($current_members, + "activeusers", + "current", + \%defaultUsers, + 1,"selectedusers",1,'email') + ) { + $result .= '
'.
- ' '. - &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 .= @@ -612,12 +649,10 @@ sub disgroup { &Apache::loncommon::end_data_table_row(); } } - $result .= &Apache::loncommon::end_data_table(); + $result .= &Apache::loncommon::end_data_table().''; } - $result .= ' |
---|