--- loncom/interface/lonmsgdisplay.pm 2009/10/13 16:37:57 1.137 +++ loncom/interface/lonmsgdisplay.pm 2009/11/04 18:30:17 1.138 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.137 2009/10/13 16:37:57 amueller Exp $ +# $Id: lonmsgdisplay.pm,v 1.138 2009/11/04 18:30:17 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,8 +525,14 @@ sub discourse { \%defaultUsers, 1,"selectedusers",1,'email') ) { + 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 .= '
' - .&mt('Bcc: course members with current access') + .$bcc_curr_hdr .'' .'
'; $result .= $tmptext.'

'; @@ -539,8 +546,14 @@ sub discourse { \%defaultUsers, 1, "selectedusers",0,'email') ) { + 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 .= '
' - .&mt('Bcc: course members with expired access') + .$bcc_prev_hdr .'' .'
'; $result .= $tmptext.'

'; @@ -555,8 +568,15 @@ sub discourse { \%defaultUsers, 1, "selectedusers",0,'email') ) { + 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 .= '
' - .&mt('Bcc: course members with future access') + .$bcc_future_hdr .'' .'
'; $result .= $tmptext.'
'; @@ -730,10 +750,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", @@ -1315,22 +1341,36 @@ 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.='
'; } } @@ -1982,12 +2022,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', @@ -2839,10 +2885,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 @@ -3252,7 +3298,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