--- loncom/interface/lonmsgdisplay.pm 2010/01/25 17:59:43 1.124.4.4 +++ loncom/interface/lonmsgdisplay.pm 2010/01/25 19:30:59 1.124.4.5 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.124.4.4 2010/01/25 17:59:43 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.124.4.5 2010/01/25 19:30:59 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -509,6 +509,7 @@ sub movemsg { sub discourse { my ($statushash) = @_; my ($result,$active,$previous,$future); + my $crstype = &Apache::loncommon::course_type(); my ($course_personnel, $current_members, $expired_members, @@ -524,11 +525,20 @@ sub discourse { \%defaultUsers, 1,"selectedusers",1,'email') ) { - $result .= '
'.&mt('Bcc: course members with current access').'
'; - $result .= $tmptext.'

'; - if (ref($statushash) eq 'HASH') { - $statushash->{'active'} = 1; - } + my $bcc_curr_hdr; + if ($crstype eq 'Community') { + $bcc_curr_hdr = &mt('Bcc: community participants with current access'); + } else { + $bcc_curr_hdr = &mt('Bcc: course members with current access'); + } + $result .= '
' + .''.$bcc_curr_hdr.''. + .'' + .'
'; + $result .= $tmptext.'

'; + if (ref($statushash) eq 'HASH') { + $statushash->{'active'} = 1; + } } if ($tmptext = &Apache::lonselstudent::render_student_list($expired_members, "previoususers", @@ -536,12 +546,20 @@ sub discourse { \%defaultUsers, 1, "selectedusers",0,'email') ) { - $result .= '
'.&mt('Bcc: course members with expired access').'
'; + my $bcc_prev_hdr; + if ($crstype eq 'Community') { + $bcc_prev_hdr = &mt('Bcc: community participants with expired access'); + } else { + $bcc_prev_hdr = &mt('Bcc: course members with expired access'); + } + $result .= '
' + .''.$bcc_prev_hdr.''. + .'' + .''; $result .= $tmptext.'

'; if (ref($statushash) eq 'HASH') { $statushash->{'previous'} = 1; } - } if ($tmptext = &Apache::lonselstudent::render_student_list($future_members, "futureusers", @@ -549,12 +567,20 @@ sub discourse { \%defaultUsers, 1, "selectedusers",0,'email') ) { - $result .= '
'.&mt('Bcc: course members with future access').'
'; + my $bcc_future_hdr; + if ($crstype eq 'Community') { + $bcc_future_hdr = &mt('Bcc: community participants with future access'); + } else { + $bcc_future_hdr = &mt('Bcc: course members with future access'); + } + $result .= '
' + .''.$bcc_future_hdr.''. + .'' + .''; $result .= $tmptext.'
'; if (ref($statushash) eq 'HASH') { $statushash->{'future'} = 1; } - } return $result; } @@ -720,10 +746,16 @@ sub groupmail_header { } &Apache::lonhtmlcommon::clear_breadcrumbs(); if ($refarg) { + my $brtitle; + if (&Apache::loncommon::course_type() eq 'Community') { + $brtitle = 'View community groups'; + } else { + $brtitle = 'View course groups'; + } &Apache::lonhtmlcommon::add_breadcrumb ({href=>"/adm/coursegroups", text=>"Groups", - title=>"View course groups"}); + title=>$brtitle}); } &Apache::lonhtmlcommon::add_breadcrumb ({href=>"/adm/$cdom/$cnum/$group/smppg?$refarg", @@ -1300,22 +1332,34 @@ sub compout { if (&Apache::lonnet::allowed('srm',$env{'request.course.id'}) || &Apache::lonnet::allowed('srm',$env{'request.course.id'}. '/'.$env{'request.course.sec'})) { + my $crstype = &Apache::loncommon::course_type(); my $crithelp = Apache::loncommon::help_open_topic("Course_Critical_Message"); + my $rsstxt; + if (&Apache::loncommon::course_type() eq 'Community') { + $rsstxt = &mt('Include in community RSS newsfeed'); + } else { + $rsstxt = &mt('Include in course RSS newsfeed'); + } $dispcrit= ''.$crithelp.'  '.&mt('Require return receipt?').'  
'. '
'. '
'; + $rsstxt.'
'; } if ($broadcast ne 'group') { if (&Apache::lonnet::allowed('dff',$env{'request.course.id'}) || &Apache::lonnet::allowed('dff',$env{'request.course.id'}. '/'.$env{'request.course.sec'})) { - + my $rectxt; + if (&Apache::loncommon::course_type() eq 'Community') { + $rectxt = &mt("Include in community's 'User records' for recipient(s)"); + } else { + $rectxt = &mt("Include in course's 'User records' for recipient(s)"); + } $dispcrit.='
'; } } @@ -1963,12 +2007,18 @@ sub examblock { $r->print('Not allowed'); return; } - my $usertype = (&Apache::loncommon::course_type() eq 'Community') ? 'members' - : 'students'; + my $usertype; + my $crstype = &Apache::loncommon::course_type(); + if ($crstype eq 'Community') { + $usertype = 'members'; + } else { + $usertype = 'students'; + } + my $lctype = lc($crstype); my %lt=&Apache::lonlocal::texthash( 'comb' => 'Communication Blocking', 'cbds' => 'Communication blocking during scheduled exams', - 'desc' => "You can use communication blocking to prevent $usertype enrolled in this course from displaying LON-CAPA messages sent by other $usertype during an online exam. As blocking of communication could potentially interrupt legitimate communication between $usertype who are also both enrolled in a different LON-CAPA course, please be careful that you select the correct start and end times for your scheduled exam when setting or modifying these parameters.", + 'desc' => "You can use communication blocking to prevent $usertype enrolled in this $lctype from displaying LON-CAPA messages sent by other $usertype during an online exam. As blocking of communication could potentially interrupt legitimate communication between $usertype who are also both enrolled in a different LON-CAPA course or community, please be careful that you select the correct start and end times for your scheduled exam when setting or modifying these parameters.", 'mecb' => 'Modify existing communication blocking periods', 'ncbc' => 'No communication blocks currently saved', 'stor' => 'Save', @@ -2828,10 +2878,10 @@ sub header { if ($baseurl) { $extra .= ""; } - $r->print(&Apache::loncommon::start_page('Communication', + $r->print(&Apache::loncommon::start_page('Messages', $extra)); $r->print(&Apache::lonhtmlcommon::breadcrumbs - (($title?$title:'Send and Receive Messages'))); + (($title?$title:'Send and display messages'))); } # ---------------------------------------------------------------- Print header @@ -3244,7 +3294,7 @@ sub handler { &Apache::lonhtmlcommon::clear_breadcrumbs(); &Apache::lonhtmlcommon::add_breadcrumb ({href=>"/adm/communicate", - text=>"Communication/Messages", + text=>"Messages", faq=>12,bug=>'Communication Tools',}); # ------------------------------------------------------------------ Get Folder