| ');
if ($env{'form.sortedby'} eq "revdate") {
- $r->print(''.&mt('Date').' | ');
+ $r->print(''.&mt('Date').'');
} else {
- $r->print(''.&mt('Date').'');
+ $r->print(''.&mt('Date').'');
}
$r->print('');
if ($env{'form.sortedby'} eq "revuser") {
- $r->print(''.&mt('Username').'');
+ $r->print(''.&mt('Username').'');
} else {
- $r->print(''.&mt('Username').'');
+ $r->print(''.&mt('Username').'');
}
$r->print(' | ');
if ($env{'form.sortedby'} eq "revdomain") {
- $r->print(''.&mt('Domain').'');
+ $r->print(''.&mt('Domain').'');
} else {
- $r->print(''.&mt('Domain').'');
+ $r->print(''.&mt('Domain').'');
}
$r->print(' | ');
if ($env{'form.sortedby'} eq "revsubject") {
- $r->print(''.&mt('Subject').'');
+ $r->print(''.&mt('Subject').'');
} else {
- $r->print(''.&mt('Subject').'');
+ $r->print(''.&mt('Subject').'');
}
$r->print(' | ');
if ($env{'form.sortedby'} eq "revcourse") {
- $r->print(''.&mt('Course').'');
+ $r->print(''.&mt('Course').'');
} else {
- $r->print(''.&mt('Course').'');
+ $r->print(''.&mt('Course').'');
}
$r->print(' | ');
if ($env{'form.sortedby'} eq "revstatus") {
- $r->print(''.&mt('Status').' | ');
+ $r->print(''.&mt('Status').'');
} else {
- $r->print(''.&mt('Status').'');
+ $r->print(''.&mt('Status').'');
}
$r->print("
\n");
my $suffix = &Apache::lonmsg::foldersuffix($folder);
- my $count = 0;
+ my $count = $firstdis;
for (my $n=$firstdis;$n<=$lastdis;$n++) {
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID,
$description,$recv_name,$recv_domain)=
@@ -1218,8 +1244,12 @@ sub blocked_in_folder {
my $finishblock = &Apache::lonlocal::locallocaltime($endblock);
my $output = '
'.
&mt('[quant,_1,message is, messages are] not viewable because display of LON-CAPA messages sent to you by other students between [_2] and [_3] is currently being blocked because of online exams.',$numblocked,$beginblock,$finishblock);
- $output .= &Apache::loncommon::build_block_table($startblock,$endblock,
- $setters);
+ #$output .= &Apache::loncommon::build_block_table($startblock,$endblock,
+ # $setters);
+
+ my ($blocked, $blocktext) = &Apache::loncommon::blocking_status("com");
+ $output .="
".$blocktext;
+
return $output;
}
@@ -1264,8 +1294,9 @@ sub compout {
&printheader($r,'/adm/email?compose=multiforward',
'Forwarding Multiple Messages');
if ($multiforward > 1) {
- $r->print(&mt('Each of the [quant,_1,message] you checked'
- .' will be forwarded to the recipient(s) you select below.',$multiforward)
+ $r->print(&mt('Each of the [quant,_1,message] you checked'
+ .' will be forwarded to the recipient(s) you select below.'
+ ,''.$multiforward.'')
.'
');
} else {
$r->print(&mt('The message you checked will be forwarded to the recipient(s) you select below.').'
');
@@ -1310,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.='
';
}
}
@@ -1781,8 +1826,10 @@ sub retrieve_instructor_comments {
}
sub disfacetoface {
- my ($r,$user,$domain)=@_;
- my $target=$env{'form.grade_target'};
+ my ($r,$user,$domain,$target)=@_;
+ if ($target eq '') {
+ my $target=$env{'form.grade_target'};
+ }
unless ($env{'request.course.id'}) { return; }
if (!&Apache::lonnet::allowed('dff',$env{'request.course.id'})
&& ! &Apache::lonnet::allowed('dff',$env{'request.course.id'}.
@@ -1794,11 +1841,13 @@ sub disfacetoface {
$env{'course.'.$env{'request.course.id'}.'.domain'},
$env{'course.'.$env{'request.course.id'}.'.num'},
'%255b'.$user.'%253a'.$domain.'%255d');
- my $result='';
+ my $result='';
foreach my $key (sort(keys(%records))) {
my %content=&Apache::lonmsg::unpackagemsg($records{$key});
next if ($content{'senderdomain'} eq '');
- &Apache::lonfeedback::newline_to_br(\$content{'message'});
+ if (!&Apache::lonfeedback::contains_block_html($content{'message'})) {
+ &Apache::lonfeedback::newline_to_br(\$content{'message'});
+ }
if ($content{'subject'}=~/^Record/) {
$result.='
'.&mt('Record').'
';
} elsif ($content{'subject'}=~/^Broadcast/) {
@@ -1858,9 +1907,11 @@ $content{'sendername'}.':'.
} else {
$r->print('\textbf{'.&mt('No notes, face-to-face discussion records, critical messages or broadcast messages in this [_1].',$lctype).'}\\\\');
}
+ } elsif ($target ne 'tex') {
+ $r->print($result.'');
} else {
- $r->print($result);
- }
+ $r->print(&Apache::lonxml::xmlparse($r, 'tex', $result));
+ }
}
sub general_message {
@@ -1886,8 +1937,8 @@ sub facetoface {
return;
}
my $crstype = &Apache::loncommon::course_type();
- my $leaders = ($crstype eq 'Group') ? 'coordinators and leaders'
- : 'faculty and staff';
+ my $leaders = ($crstype eq 'Community') ? 'coordinators and leaders'
+ : 'faculty and staff';
&printheader($r,
'/adm/email?recordftf=query',
"User Notes, Face-to-Face, Critical Messages, Broadcast Messages, Archived Messages");
@@ -1973,12 +2024,18 @@ sub examblock {
$r->print('Not allowed');
return;
}
- my $usertype = (&Apache::loncommon::course_type() eq 'Group') ? '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',
@@ -2275,8 +2332,10 @@ sub displaymessage {
my @messages=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus);
if ( $blocked{$msgid} eq 'ON' ) {
&printheader($r,'/adm/email',&mt('Display a Message'));
- $r->print(&mt('You attempted to display a message that is currently blocked because you are enrolled in one or more courses for which there is an ongoing online exam.'));
- &build_block_table($r,$startblock,$endblock,\%setters);
+ #$r->print(&mt('You attempted to display a message that is currently blocked because you are enrolled in one or more courses for which there is an ongoing online exam.'));
+ #&build_block_table($r,$startblock,$endblock,\%setters);
+ my($blocked, $blocktext) = &Apache::loncommon::blocking_status("com");
+ $r->print("
".$blocktext);
return;
}
if ($msgstatus eq '') {
@@ -2783,6 +2842,9 @@ ENDJS
# =========================================================== Show the citation
sub displayresource {
+ if (&Apache::loncommon::needs_gci_custom()) {
+ return '';
+ }
my %content=@_;
#
# If the recipient is in the same course that the message was sent from and
@@ -2828,10 +2890,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
@@ -3241,7 +3303,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
@@ -3346,7 +3408,7 @@ sub handler {
$total ++;
}
&printheader($r,'','Marked Messages Read');
- $r->print(&mt('Marked [_1] message(s) read',$total).'');
+ $r->print(&mt('Marked [quant,_1,message] read',$total).'
');
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
} elsif ($env{'form.markedaction'} eq 'markedunread') {
@@ -3357,7 +3419,7 @@ sub handler {
$total ++;
}
&printheader($r,'','Marked Messages Unread');
- $r->print(&mt('Marked [_1] message(s) unread',$total).'
');
+ $r->print(&mt('Marked [quant,_1,message] unread',$total).'
');
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
} elsif ($env{'form.markedaction'} eq 'markedmove') {
@@ -3381,14 +3443,17 @@ sub handler {
}
}
if ($failed) {
- $r->print('
- '.&mt('Failed to move [_1] message(s)',$failed).
- '
');
+ $r->print(''
+ .&mt('Failed to move [quant,_1,message]',$failed)
+ .'
');
$r->print(''.
join("
\n",@failed_msg).
"
\n");
}
- $r->print(&mt('Moved [_1] message(s)',$total).'');
+ $r->print('
'
+ .&mt('Moved [quant,_1,message]',$total)
+ .'
'
+ .'');
}
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
@@ -3407,14 +3472,17 @@ sub handler {
}
&printheader($r,'','Deleted Messages');
if ($failed) {
- $r->print('
- '.&mt('Failed to delete [_1] message(s)',$failed).
- '
');
+ $r->print(''
+ .&mt('Failed to delete [quant,_1,message]',$failed)
+ .'
');
$r->print(''.
join("
\n",@failed_msg).
"
\n");
}
- $r->print(&mt('Deleted [_1] message(s)',$total).'');
+ $r->print('
'
+ .&mt('Deleted [quant,_1,message]',$total)
+ .'
'
+ .'');
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
} elsif ($env{'form.markunread'}) {
@@ -3506,10 +3574,14 @@ sub handler {
my $showfolder = $env{'form.newfolder'};
my ($makeresult,$warning) = &makefolder($env{'form.newfolder'});
if ($makeresult eq 'ok') {
- $r->print(&mt('Folder "[_1]" created.',$showfolder).'
');
+ $r->print('
'
+ .&mt('Folder "[_1]" created.',$showfolder)
+ .'
');
} else {
- $r->print(&mt('Creation failed.').' '.$makeresult.'
'.
- $warning);
+ $r->print(''
+ .&mt('Creation failed.').' '.$makeresult.'
'
+ .$warning
+ .'
');
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);
@@ -3521,10 +3593,14 @@ sub handler {
my $showfolder = '';
my $delresult = &deletefolder($folder);
if ($delresult eq 'ok') {
- $r->print(&mt('Folder "[_1]" deleted.',$folder).'
');
+ $r->print(''
+ .&mt('Folder "[_1]" deleted.',$folder)
+ .'
');
$env{'form.folder'} = '';
} else {
- $r->print(&mt('Deletion failed.').' '.$delresult.'
');
+ $r->print(''
+ .&mt('Deletion failed.').' '.$delresult
+ .'
');
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);
@@ -3534,9 +3610,13 @@ sub handler {
my $showfolder = $env{'form.renamed'};
my $renresult = &renamefolder($folder);
if ($renresult eq 'ok') {
- $r->print(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder).'
');
+ $r->print(''
+ .&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder)
+ .'
');
} else {
- $r->print(&mt('Renaming failed.').' '.$renresult.'
');
+ $r->print(''
+ .&mt('Renaming failed.').' '.$renresult
+ .'
');
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);