--- loncom/interface/lonmsgdisplay.pm 2006/05/30 12:46:09 1.29 +++ loncom/interface/lonmsgdisplay.pm 2006/05/30 20:09:25 1.30 @@ -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 @@ $content{'sendername'}.':'. # Check to see if there were any messages. if ($result eq '') { $result = "

".&mt('You have no critical messages.')."

". - ''.&mt('Select a course').'
'. + ''.&mt('Select a course or group').'
'. ''.&mt('Communicate').''; } else { $r->print($header); @@ -453,7 +453,7 @@ sub disnew { 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 @@ sub disfolder { function uncheckall() { for (i=0; iprint(''); if ($env{'form.sortedby'} eq "revcourse") { - $r->print(''.&mt('Course').''); + $r->print(''.&mt('Course/Group').''); } else { - $r->print(''.&mt('Course').''); + $r->print(''.&mt('Course/Group').''); } $r->print(''); if ($env{'form.sortedby'} eq "revstatus") { @@ -976,10 +976,14 @@ $content{'sendername'}.':'. } # 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("

".&mt("No notes, face-to-face discussion records, critical messages, or broadcast messages in this course.")."

"); + $r->print("

".&mt('No notes, face-to-face discussion records, critical messages, or broadcast messages in this [_1].',$lctype)."

"); } 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 @@ sub facetoface { $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 @@ sub facetoface { ('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");

$lt{'head'}

@@ -1086,10 +1096,14 @@ sub examblock { $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 @@ sub build_block_table { 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 @@ sub displaymessage { 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 @@ sub displaymessage { $content{'sendername'}.' at '. $content{'senderdomain'}.') ':'
'.&mt('To').': '. $tolist). - ($content{'courseid'}?'
'.&mt('Course').': '.$courseinfo{'description'}. - ($content{'coursesec'}?' ('.&mt('Group/Section').': '.$content{'coursesec'}.')':''):''). + ($content{'courseid'}?'
'.&mt($crstype).': '.$courseinfo{'description'}. + ($content{'coursesec'}?' ('.&mt('Section').': '.$content{'coursesec'}.')':''):''). '
'.&mt('Time').': '.$content{'time'}. ($content{'baseurl'}?'
'.&mt('Refers to').': '. $content{'baseurl'}.' ('.&Apache::lonnet::gettitle($content{'baseurl'}).')':'').