[LON-CAPA-cvs] cvs: loncom /interface loncommunicate.pm londocs.pm lonmenu.pm lonmsgdisplay.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Tue, 30 May 2006 20:09:28 -0000


This is a MIME encoded message

--raeburn1149019768
Content-Type: text/plain

raeburn		Tue May 30 16:09:28 2006 EDT

  Modified files:              
    /loncom/interface	loncommunicate.pm londocs.pm lonmenu.pm 
                     	lonmsgdisplay.pm 
  Log:
  Adding thin veneer to support "ANGEL-style" groups.
  
  
--raeburn1149019768
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20060530160928.txt"

Index: loncom/interface/loncommunicate.pm
diff -u loncom/interface/loncommunicate.pm:1.33 loncom/interface/loncommunicate.pm:1.34
--- loncom/interface/loncommunicate.pm:1.33	Tue Apr 25 13:08:27 2006
+++ loncom/interface/loncommunicate.pm	Tue May 30 16:09:25 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Communicate
 #
-# $Id: loncommunicate.pm,v 1.33 2006/04/25 17:08:27 albertel Exp $
+# $Id: loncommunicate.pm,v 1.34 2006/05/30 20:09:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -38,16 +38,24 @@
 
 sub menu {
     my $r=shift;
+    my $crstype = 'Course';
+    my $usertype = 'Student';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $crstype = $env{'course.'.$env{'request.course.id'}.'.type'};
+        if ($crstype eq 'Group') {
+            $usertype = 'Member';
+        }   
+    }
     my %lt=&Apache::lonlocal::texthash(
 'mnf' => 'Make New Folder',
 'vcm' => 'View Critical Messages',
 'smu' => 'Send Message to User(s)',
-'bmc' => 'Broadcast Message to Course',
-'dmu' => 'Distribute Messages from Uploaded File to Course',
+'bmc' => "Broadcast Message to $crstype",
+'dmu' => "Distribute Messages from Uploaded File to $crstype",
 'unr' => 
      'User Notes, Records of Face-to-Face Discussions, and Critical Messages',
 
-'cbs' => 'Configure Blocking of Student Communication during Exams',
+'cbs' => "Configure Blocking of $usertype Communication during Exams",
 'blog' => 'Add or Edit Blog Entries' 
 
 );
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.228 loncom/interface/londocs.pm:1.229
--- loncom/interface/londocs.pm:1.228	Tue May 30 08:46:09 2006
+++ loncom/interface/londocs.pm	Tue May 30 16:09:25 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.228 2006/05/30 12:46:09 www Exp $
+# $Id: londocs.pm,v 1.229 2006/05/30 20:09:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -121,16 +121,21 @@
 
 sub dumpbutton {
     my ($home,$other,%outhash)=&authorhosts();
+    my $type = 'Course';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $type = $env{'course.'.$env{'request.course.id'}.'.type'};
+    }
     if ($home+$other==0) { return ''; }
     my $output='</td><td bgcolor="#DDDDCC">';
     if ($home) {
 	return '</td><td bgcolor="#DDDDCC">'.
 	    '<input type="submit" name="dumpcourse" value="'.
-	    &mt('Dump Course DOCS to Construction Space').'" />'.
+	    &mt('Dump [_1] DOCS to Construction Space',$type).'" />'.
 	    &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs');
     } else {
 	return'</td><td bgcolor="#DDDDCC">'.
-     &mt('Dump Course DOCS to Construction Space: available on other servers');
+     &mt('Dump [_1] DOCS to Construction Space: available on other servers',
+         $type);
     }
 }
 
@@ -143,9 +148,12 @@
 
 sub dumpcourse {
     my ($r) = @_;
-
-    $r->print(&Apache::loncommon::start_page('Dump Course DOCS to Construction Space').
-	      '<form name="dumpdoc" method="post">');
+    my $type = 'Course';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $type = $env{'course.'.$env{'request.course.id'}.'.type'};
+    }
+    $r->print(&Apache::loncommon::start_page('Dump [_1] DOCS to Construction Space',
+	      $type).'<form name="dumpdoc" method="post">');
     my ($home,$other,%outhash)=&authorhosts();
     unless ($home) { return ''; }
     my $origcrsid=$env{'request.course.id'};
@@ -246,21 +254,29 @@
 	$r->print("</table>\n");
 	&untiehash();
 	$r->print(
-  '<p><input type="submit" name="dumpcourse" value="'.&mt('Dump Course DOCS').'" /></p></form>');
+  '<p><input type="submit" name="dumpcourse" value="'.&mt('Dump [_1] DOCS',$type).'" /></p></form>');
     }
 }
 
 # ------------------------------------------------------ Generate "export" button
 
 sub exportbutton {
+    my $type = 'Course';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $type = $env{'course.'.$env{'request.course.id'}.'.type'};
+    }
     return '</td><td bgcolor="#DDDDCC">'.
             '<input type="submit" name="exportcourse" value="'.
-            &mt('Export Course to IMS').'" />'.
+            &mt('Export [_1] to IMS',$type).'" />'.
     &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs');
 }
 
 sub exportcourse {
     my $r=shift;
+    my $type = 'Course';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $type = $env{'course.'.$env{'request.course.id'}.'.type'};
+    }
     my %discussiontime = &Apache::lonnet::dump('discussiontimes',
                                                $env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'});
     my $numdisc = keys %discussiontime;
@@ -301,7 +317,7 @@
                 open(OUTPUT, "zip -r $imszip *  2> /dev/null |");
                 close(OUTPUT);
                 chdir $cwd;
-                $outcome .= 'Download the zip file from <a href="'.$imszipfile.'">IMS course archive</a><br />';
+                $outcome .= &mt('Download the zip file from <a href="[_1]">IMS [_2] archive</a><br />',$imszipfile,lc($type));
                 if ($copyresult) {
                     $outcome .= 'The following errors occurred during export - '.$copyresult;
                 }
@@ -309,13 +325,13 @@
                 $outcome = '<br />Unfortunately you will not be able to retrieve an IMS archive of this posts at this time, because there was a problem creating a manifest file.<br />';
             }
         }
-        $r->print(&Apache::loncommon::start_page('Export course to IMS content package'));
+        $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package'));
         $r->print($outcome);
         $r->print(&Apache::loncommon::end_page());
     } else {
         my $display;
         $display = '<form name="exportdoc" method="post">'."\n";
-        $display .= 'Choose which items you wish to export from your course.<br /><br />';
+        $display .= &mt('Choose which items you wish to export from your [_1].<br /><br />',$type);
         $display .= '<table border="0" cellspacing="0" cellpadding="3">'.
                     '<tr><td><fieldset><legend>&nbsp;<b>Content items</b></legend>'.
                     '<input type="button" value="check all" '.
@@ -449,12 +465,12 @@
 
 </script>
         |;
-	$r->print(&Apache::loncommon::start_page('Export course to IMS content package',
+	$r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package',
 						 $scripttag));
 	$r->print($display.'</table>'.
                   '<p><input type="hidden" name="finishexport" value="1">'.
                   '<input type="submit" name="exportcourse" value="'.
-                  &mt('Export Course DOCS').'" /></p></form>'.
+                  &mt('Export [_1] DOCS',$type).'" /></p></form>'.
 		  &Apache::loncommon::end_page());
     }
 }
@@ -1764,9 +1780,13 @@
 # 
 sub verifycontent {
     my ($r) = @_;
+    my $type = 'Course';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $type = $env{'course.'.$env{'request.course.id'}.'.type'};
+    }
    my $loaderror=&Apache::lonnet::overloaderror($r);
    if ($loaderror) { return $loaderror; }
-   $r->print(&Apache::loncommon::start_page('Verify Course Documents'));
+   $r->print(&Apache::loncommon::start_page('Verify '.$type.' Documents'));
    $hashtied=0;
    undef %alreadyseen;
    %alreadyseen=();
@@ -1775,7 +1795,7 @@
        if ($hash{$_}=~/\.(page|sequence)$/) {
 	   if (($_=~/^src_/) && ($alreadyseen{&unescape($hash{$_})})) {
 	       $r->print('<hr /><font color="red">'.
-			 &mt('The following sequence or page is included more than once in your course: ').
+			 &mt('The following sequence or page is included more than once in your [_1]: ',$type).
 			 &unescape($hash{$_}).'</font><br />'.
 			 &mt('Note that grading records for problems included in this sequence or folder will overlap.<hr />'));
 	   }
@@ -1800,7 +1820,11 @@
 
 sub checkversions {
     my ($r) = @_;
-    $r->print(&Apache::loncommon::start_page('Check Course Document Versions'));
+    my $type = 'Course';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $type = $env{'course.'.$env{'request.course.id'}.'.type'};
+    }
+    $r->print(&Apache::loncommon::start_page("Check $type Document Versions"));
     my $header='';
     my $startsel='';
     my $monthsel='';
@@ -1861,7 +1885,7 @@
     &changewarning($r,'');
     if ($env{'form.timerange'} eq 'all') {
 # show all documents
-	$header=&mt('All Documents in Course');
+	$header=&mt('All Documents in [_1]',$type);
 	$allsel=1;
 	foreach (keys %hash) {
 	    if ($_=~/^ids\_(\/res\/.+)$/) {
@@ -1906,7 +1930,7 @@
 			  $env{'course.'.$env{'request.course.id'}.'.domain'},
 			  $env{'course.'.$env{'request.course.id'}.'.num'});
     my %lt=&Apache::lonlocal::texthash
-	      ('st' => 'Version changes since start of Course',
+	      ('st' => 'Version changes since start of '.$type,
 	       'lm' => 'Version changes since last Month',
 	       'lw' => 'Version changes since last Week',
 	       'sy' => 'Version changes since Yesterday',
@@ -1915,9 +1939,9 @@
 	       'fi' => 'File',
 	       'md' => 'Modification Date',
                'mr' => 'Most recently published Version',
-	       've' => 'Version used in Course',
-               'vu' => 'Set Version to be used in Course',
-'sv' => 'Set Versions to be used in Course according to Selections below',
+	       've' => 'Version used in '.$type,
+               'vu' => 'Set Version to be used in '.$type,
+'sv' => 'Set Versions to be used in '.$type.' according to Selections below',
 'sm' => 'Keep all Resources up-to-date with most recent Versions (default)',
 'sc' => 'Set all Resource Versions to current Version (Fix Versions)',
 	       'di' => 'Differences');
@@ -1964,7 +1988,7 @@
                       '<td title="'.$lt{'mr'}.'"><nobr>Most Recent: '.
                       '<font size="+1">'.$currentversion.'</font>'.
                       '</nobr></td>'.
-                      '<td title="'.$lt{'ve'}.'"><nobr>In Course: '.
+                      '<td title="'.$lt{'ve'}.'"><nobr>In '.$type.': '.
                       '<font size="+1">');
 # Used in course
 	    my $usedversion=$hash{'version_'.$linkurl};
@@ -2077,6 +2101,10 @@
 	}
 	$url='/adm/coursedocs?'.$pathvar.'='.$path;
     }
+    my $crstype = 'course';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $crstype = $env{'course.'.$env{'request.course.id'}.'.type'};
+    }
     if (!defined($message)) {
 	$message='Changes will become active for your current session after [_1], or the next time you log in.';
     }
@@ -2087,7 +2115,7 @@
 '" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'.
 &mt($message,' <input type="hidden" name="'.
     $env{'request.role'}.'" value="1" /><input type="button" value="'.
-    &mt('re-initializing course').'" onClick="reinit(this.form)" />').
+    &mt('re-initializing [_1]',$crstype).'" onClick="reinit(this.form)" />').
 $help{'Caching'}.'</font></h3></form>'."\n\n");
 }
 
@@ -2097,6 +2125,12 @@
     &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
     return OK if $r->header_only;
+# Identify type - Course or Group. 
+    my $type = 'Course';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $type = $env{'course.'.$env{'request.course.id'}.'.type'};
+    }
+
 
 # --------------------------------------------- Initialize help topics for this
     foreach ('Adding_Course_Doc','Main_Course_Documents',
@@ -2198,7 +2232,7 @@
     }
 # -------------------------------------------------------------------- Body tag
     $script = '<script type="text/javascript">'."\n".$script."\n".'</script>';
-    $r->print(&Apache::loncommon::start_page('Course Documents', $script,
+    $r->print(&Apache::loncommon::start_page("$type Documents", $script,
 					     {'force_register' => $showdoc,}).
 	      &Apache::loncommon::help_open_menu('','','','',273,'RAT'));
   
@@ -2287,8 +2321,8 @@
   unless ($showdoc ||  $upload_result eq 'phasetwo') {
 # -----------------------------------------------------------------------------
        my %lt=&Apache::lonlocal::texthash(
-                'uplm' => 'Upload a new main course document',
-                'upls' => 'Upload a new supplemental course document',
+                'uplm' => 'Upload a new main '.lc($type).' document',
+                'upls' => 'Upload a new supplemental '.lc($type).' document',
                 'impp' => 'Import a document',
                 'pubd' => 'Published documents',
 		'copm' => 'All documents out of a published map into this folder',
@@ -2332,7 +2366,7 @@
 	   if ($env{'form.folder'} eq '' ||
 	       $env{'form.folder'} eq 'supplemental') {
 	       $folderpath='default&'.
-		   &escape(&mt('Main Course Documents'));
+		   &escape(&mt('Main [_1] Documents',$type));
 	   }
        }
        unless ($env{'form.pagepath'}) {
@@ -2365,7 +2399,7 @@
 </form>
 ENDCOURSEVERIFY
        $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
-		     &mt('Editing the Table of Contents for your Course')));
+		     &mt('Editing the Table of Contents for your [_1]',$type)));
     }
 # --------------------------------------------------------- Standard documents
     $r->print('<table border=2 cellspacing=4 cellpadding=4>');
@@ -2376,7 +2410,7 @@
        my $folder=$env{'form.folder'};
        if ($folder eq '' || $folder eq 'supplemental') {
            $folder='default';
-	   $env{'form.folderpath'}='default&'.&escape(&mt('Main Course Documents'));
+	   $env{'form.folderpath'}='default&'.&escape(&mt('Main [_1] Documents',$type));
        }
        my $postexec='';
        if ($folder eq 'default') {
@@ -2607,7 +2641,7 @@
        if ($folder =~ /^supplemental$/ &&
 	   $env{'form.folderpath'} =~ /^default\&/) {
 	   $env{'form.folderpath'}='supplemental&'.
-	       &escape(&mt('Supplemental Course Documents'));
+	       &escape(&mt('Supplemental [_1] Documents',$type));
        }
        &editor($r,$coursenum,$coursedom,$folder,$allowed);
        if ($allowed) {
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.183 loncom/interface/lonmenu.pm:1.184
--- loncom/interface/lonmenu.pm:1.183	Tue May 30 08:46:09 2006
+++ loncom/interface/lonmenu.pm	Tue May 30 16:09:25 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.183 2006/05/30 12:46:09 www Exp $
+# $Id: lonmenu.pm,v 1.184 2006/05/30 20:09:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -63,7 +63,10 @@
                                        'docs' => 'Course Documents',
                                        'exit' => 'Exit',
 				       'launch' => 'Launch Remote Control',
-                                       'groups' => 'Groups');
+                                       'groups' => 'Course Groups',
+                                       'gdoc' => 'Group Documents',
+                                       'teams' => 'Teams',
+                                       );
 }
 
 # ============================= This gets called at the top of the body section
@@ -192,13 +195,23 @@
 <td><a href="$link" target="_top">$lt{'nav'}</a></td>
 ENDNAV
 	    if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
+                my $text = $lt{'docs'};
+                if ($env{'course.'.$env{'request.course.id'}.'.type'} eq 
+                    'Group') {
+                    $text = $lt{'gdoc'};
+                } 
 		$docs=(<<ENDDOCS);
-<td><a href="/adm/coursedocs" target="_top">$lt{'docs'}</a></td>
+<td><a href="/adm/coursedocs" target="_top">$text</a></td>
 ENDDOCS
             }
             if ($showgroups) {
+                my $text = $lt{'groups'};
+                if ($env{'course.'.$env{'request.course.id'}.'.type'} eq
+                    'Group') {
+                    $text = $lt{'teams'};
+                }
                 $groups =(<<ENDGROUPS);
-<td><a href="/adm/coursegroups" target="_top">$lt{'groups'}</a></td>
+<td><a href="/adm/coursegroups" target="_top">$text</a></td>
 ENDGROUPS
             }
 	    if (
@@ -921,12 +934,16 @@
     my $con=($env{'request.state'} eq 'construct');
     my $rol=$env{'request.role'};
     my $requested_domain = $env{'request.role.domain'};
-    foreach (@desklines) {
-        my ($row,$col,$pro,$prt,$img,$top,$bot,$act,$desc)=split(/\:/,$_);
+    foreach my $line (@desklines) {
+        my ($row,$col,$pro,$prt,$img,$top,$bot,$act,$desc)=split(/\:/,$line);
         $prt=~s/\$uname/$uname/g;
         $prt=~s/\$udom/$udom/g;
         $prt=~s/\$crs/$crs/g; 
         $prt=~s/\$requested_domain/$requested_domain/g;
+        my $type = $env{'course.'.$env{'request.course.id'}.'.type'};
+        if ($type eq 'Group') {
+            $desc = &convert_menu_function($desc,$type);
+        }
         if ($pro eq 'clear') {
 	    $output.=&clear($row,$col);
         } elsif ($pro eq 'any') {
@@ -1255,6 +1272,18 @@
     return $navstatus;
 }
 
+sub convert_menu_function {
+    my ($rolename,$type) = @_;
+    if ($type eq 'Group') {
+        $rolename =~ s/student/member/g;
+        $rolename =~ s/group/team/g;
+        $rolename =~ s/course/group/g;
+        $rolename =~ s/Course/Group/g;
+    }
+    return $rolename;
+}
+
+
 # ================================================================ Main Program
 
 BEGIN {
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.29 loncom/interface/lonmsgdisplay.pm:1.30
--- loncom/interface/lonmsgdisplay.pm:1.29	Tue May 30 08:46:09 2006
+++ loncom/interface/lonmsgdisplay.pm	Tue May 30 16:09:25 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.29 2006/05/30 12:46:09 www Exp $
+# $Id: lonmsgdisplay.pm,v 1.30 2006/05/30 20:09:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -320,7 +320,7 @@
     # Check to see if there were any messages.
     if ($result eq '') {
         $result = "<h2>".&mt('You have no critical messages.')."</h2>".
-	    '<a href="/adm/roles">'.&mt('Select a course').'</a><br />'.
+	    '<a href="/adm/roles">'.&mt('Select a course or group').'</a><br />'.
             '<a href="/adm/email">'.&mt('Communicate').'</a>';
     } else {
         $r->print($header);
@@ -453,7 +453,7 @@
     my %lt=&Apache::lonlocal::texthash(
 				       'nm' => 'New Messages',
 				       'su' => 'Subject',
-                                       'co' => 'Course',
+                                       'co' => 'Course/Group',
 				       'da' => 'Date',
 				       'us' => 'Username',
 				       'op' => 'Open',
@@ -571,7 +571,7 @@
     function uncheckall() {
 	for (i=0; i<document.forms.disall.elements.length; i++) {
             if 
-          (document.forms.disall.elements[i].name.indexOf('delmark_')==0) {
+          (document.forms.disall.elements[i].name.indexof('delmark_')==0) {
 	      document.forms.disall.elements[i].checked=false;
             }
         }
@@ -622,9 +622,9 @@
     }
     $r->print('</th><th>');
     if ($env{'form.sortedby'} eq "revcourse") {
-        $r->print('<a href = "?sortedby=course'.$fsqs.'">'.&mt('Course').'</a>');
+        $r->print('<a href = "?sortedby=course'.$fsqs.'">'.&mt('Course/Group').'</a>');
     } else {
-        $r->print('<a href = "?sortedby=revcourse'.$fsqs.'">'.&mt('Course').'</a>');
+        $r->print('<a href = "?sortedby=revcourse'.$fsqs.'">'.&mt('Course/Group').'</a>');
     }
     $r->print('</th><th>');
     if ($env{'form.sortedby'} eq "revstatus") {
@@ -976,10 +976,14 @@
      }
     # Check to see if there were any messages.
     if ($result eq '') {
+        my $lctype = 'course';
+        if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+            $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'});
+        }
 	if ($target ne 'tex') { 
-	    $r->print("<p><b>".&mt("No notes, face-to-face discussion records, critical messages, or broadcast messages in this course.")."</b></p>");
+	    $r->print("<p><b>".&mt('No notes, face-to-face discussion records, critical messages, or broadcast messages in this [_1].',$lctype)."</b></p>");
 	} else {
-	    $r->print('\textbf{'.&mt("No notes, face-to-face discussion records, critical messages or broadcast messages in this course.").'}\\\\');
+	    $r->print('\textbf{'.&mt('No notes, face-to-face discussion records, critical messages or broadcast messages in this [_1].',$lctype).'}\\\\');
 	}
     } else {
        $r->print($result);
@@ -1008,6 +1012,12 @@
 	$r->print('Not allowed');
 	return;
     }
+    my $crstype = 'Course';
+    my $leaders = 'faculty and staff';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $crstype = $env{'course.'.$env{'request.course.id'}.'.type'};
+        $leaders = 'coordinators and leaders';
+    }
     &printheader($r,
 		 '/adm/email?recordftf=query',
 		 "User Notes, Face-to-Face, Critical Messages, Broadcast Messages");
@@ -1025,9 +1035,9 @@
 	('stdselect','recuname','recdomain');
     my %lt=&Apache::lonlocal::texthash('user' => 'Username',
 				       'dom' => 'Domain',
-				       'head' => 'User Notes, Records of Face-To-Face Discussions, Critical Messages, and Broadcast Messages in Course',
+				       'head' => "User Notes, Records of Face-To-Face Discussions, Critical Messages, and Broadcast Messages in $crstype",
 				       'subm' => 'Retrieve discussion and message records',
-				       'newr' => 'New Record (record is visible to course faculty and staff)',
+				       'newr' => 'New Record (record is visible to '.lc($crstype).' '.$leaders.')',
 				       'post' => 'Post this Record');
     $r->print(<<"ENDTREC");
 <h3>$lt{'head'}</h3>
@@ -1086,10 +1096,14 @@
 	$r->print('Not allowed');
 	return;
     }
+    my $usertype = 'students';
+    if ($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Group') {
+        $usertype = 'members';
+    }
     my %lt=&Apache::lonlocal::texthash(
             'comb' => 'Communication Blocking',
             'cbds' => 'Communication blocking during scheduled exams',
-            'desc' => 'You can use communication blocking to prevent students enrolled in this course from displaying LON-CAPA messages sent by other students during an online exam. As blocking of communication could potentially interrupt legitimate communication between students 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 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.",
              'mecb' => 'Modify existing communication blocking periods',
              'ncbc' => 'No communication blocks currently stored'
     );
@@ -1377,7 +1391,7 @@
     my ($r,$startblock,$endblock,$setters) = @_;
     my %lt = &Apache::lonlocal::texthash(
         'cacb' => 'Currently active communication blocks',
-        'cour' => 'Course',
+        'cour' => 'Course/Group',
         'dura' => 'Duration',
         'blse' => 'Block set by'
     );
@@ -1421,6 +1435,11 @@
     my $startblock = 0;
     my $endblock = 0;
     my $numblocked = 0;
+    my $crstype = 'Course';
+    if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {
+        $crstype = $env{'course.'.$env{'request.course.id'}.'.type'};
+    }
+
 # info to generate "next" and "previous" buttons and check if message is blocked
     &blockcheck(\%setters,\$startblock,\$endblock);
     my @messages=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder);
@@ -1502,8 +1521,8 @@
 	      $content{'sendername'}.' at '.
 	      $content{'senderdomain'}.') ':'<br /><b>'.&mt('To').':</b> '.
               $tolist).
-	      ($content{'courseid'}?'<br /><b>'.&mt('Course').':</b> '.$courseinfo{'description'}.
-	       ($content{'coursesec'}?' ('.&mt('Group/Section').': '.$content{'coursesec'}.')':''):'').
+	      ($content{'courseid'}?'<br /><b>'.&mt($crstype).':</b> '.$courseinfo{'description'}.
+	       ($content{'coursesec'}?' ('.&mt('Section').': '.$content{'coursesec'}.')':''):'').
 	      '<br /><b>'.&mt('Time').':</b> '.$content{'time'}.
 	      ($content{'baseurl'}?'<br /><b>'.&mt('Refers to').':</b> <a href="'.$content{'baseurl'}.'">'.
 	       $content{'baseurl'}.' ('.&Apache::lonnet::gettitle($content{'baseurl'}).')</a>':'').

--raeburn1149019768--