| ');
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)=
@@ -1254,8 +1292,8 @@ 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[_1] [quant,_2,message] [_3]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.').'
');
@@ -1300,22 +1338,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.='
';
}
}
@@ -1788,7 +1838,9 @@ sub disfacetoface {
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/) {
@@ -1914,6 +1966,7 @@ sub facetoface {
.&Apache::lonhtmlcommon::end_pick_box()
.'
'
.''
+ .''
);
if (($stage ne 'query') &&
@@ -1963,12 +2016,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',
@@ -2145,7 +2204,7 @@ sub display_blocker_status {
$ltext->{'setb'} |
$ltext->{'even'} |
$ltext->{'blck'} |
- $ltext->{'actn'}? |
+ $ltext->{'actn'} |
END
foreach my $record (sort(keys(%{$records}))) {
@@ -2165,7 +2224,7 @@ END
$setuname,$setudom);
$r->print(&Apache::loncommon::start_data_table_row());
$r->print(<<"END");
- $ltext->{'star'}: $startform $ltext->{'endd'}: $endform |
+ $ltext->{'star'}: $startform $ltext->{'endd'}: $endform |
$settername |
|
@@ -2175,11 +2234,16 @@ END
if ($blocks->{$block} eq 'on') {
$blockstatus = 'checked="checked"';
}
- $r->print(' ');
+ $r->print(' ');
}
$r->print(<<"END");
- |
-
+ |
+
+
END
$r->print(&Apache::loncommon::end_data_table_row());
$parmcount++;
@@ -2216,7 +2280,7 @@ END
| $ltext->{'dura'} |
$ltext->{'even'} $lt{'exam'} |
$ltext->{'blck'} |
- $ltext->{'actn'}? |
+ $ltext->{'actn'} |
END
$r->print(&Apache::loncommon::start_data_table_row());
@@ -2226,11 +2290,13 @@ END
END
foreach my $block (@{$typeorder}) {
- $r->print(' ');
+ $r->print(' ');
}
$r->print(<<"END");
- |
- |
+
+ |
END
$r->print(&Apache::loncommon::end_data_table_row());
$r->print(&Apache::loncommon::end_data_table());
@@ -2266,7 +2332,7 @@ sub displaymessage {
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(&Apache::loncommon::build_block_table($startblock,$endblock,\%setters));
return;
}
if ($msgstatus eq '') {
@@ -2303,6 +2369,10 @@ sub displaymessage {
&printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'});
my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'});
+# Functions and Actions
+ my $li_start='• ';
+ my $li_end=' ';
+
# Prepare available functions
my @functionlist;
if (!$content{'noreplies'}) {
@@ -2336,13 +2406,14 @@ sub displaymessage {
my $legendtext=''
.&mt('Functions')
.'';
+ my $showfunctionlist = $li_start.join($li_end.$li_start,@functionlist).$li_end;
$r->print(''
- .&Apache::lontemplate::start_functionslist($legendtext)
- );
- foreach my $item (@functionlist) {
- $r->print(&Apache::lontemplate::item_functionslist($item));
- }
- $r->print(&Apache::lontemplate::end_functionslist()
+ .'
'
.''
);
@@ -2382,15 +2453,16 @@ sub displaymessage {
# Print actions
if (@actionlist) {
+ my $showactionlist = $li_start.join($li_end.$li_start,@actionlist).$li_end;
$legendtext=&mt('[_1]Currently available actions[_2] (will open extra window):'
,'','');
$r->print(''
- .&Apache::lontemplate::start_functionslist($legendtext)
- );
- foreach my $item (@actionlist) {
- $r->print(&Apache::lontemplate::item_functionslist($item));
- }
- $r->print(&Apache::lontemplate::end_functionslist()
+ .'
'
.''
);
}
@@ -2822,10 +2894,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
@@ -3185,8 +3257,9 @@ sub sendoffmail {
}
if (!$env{'form.multiforward'}) {
if ($sendstatus=~/^(\s*(?:ok|con_delayed)\s*)*$/) {
- $r->print('
'.&mt('Completed.').
- '');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Completed.'));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
if ($env{'form.displayedcrit'}) {
&discrit($r);
}
@@ -3196,8 +3269,10 @@ sub sendoffmail {
&Apache::loncommunicate::menu($r);
}
} else {
- $r->print(''.&Apache::lonhtmlcommon::confirm_success(&mt('Could not deliver message'),1).'
'.
- &mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus).'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Could not deliver message'),1);
+ $message .= '
'.&mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
}
}
}
@@ -3235,7 +3310,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
@@ -3316,9 +3391,10 @@ sub handler {
my ($result,$msg) =
&statuschange($env{'form.markdel'},'deleted',$folder);
if (!$result) {
- $r->print(''.
- &mt('Failed to delete the message.').'
'.
- ''.$msg."
\n");
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Failed to delete the message.'),1);
+ $message .= ''.$msg.'
';
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
}
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
@@ -3340,7 +3416,9 @@ sub handler {
$total ++;
}
&printheader($r,'','Marked Messages Read');
- $r->print(&mt('Marked [_1] message(s) read',$total).'');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Marked [quant,_1,message] read',$total));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
} elsif ($env{'form.markedaction'} eq 'markedunread') {
@@ -3351,7 +3429,9 @@ sub handler {
$total ++;
}
&printheader($r,'','Marked Messages Unread');
- $r->print(&mt('Marked [_1] message(s) unread',$total).'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Marked [quant,_1,message] unread',$total));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
} elsif ($env{'form.markedaction'} eq 'markedmove') {
@@ -3374,15 +3454,16 @@ sub handler {
push(@failed_msg,$msg);
}
}
- if ($failed) {
- $r->print('
- '.&mt('Failed to move [_1] message(s)',$failed).
- '
');
- $r->print(''.
- join("
\n",@failed_msg).
- "
\n");
- }
- $r->print(&mt('Moved [_1] message(s)',$total).'');
+ my $message;
+ if ($failed) {
+ $message = &Apache::lonhtmlcommon::confirm_success(&mt('Failed to move [quant,_1,message]',$failed),1);
+ $message .= '
'.
+ join("
\n",@failed_msg).
+ "
\n";
+ }
+ $message .= &Apache::lonhtmlcommon::confirm_success(&mt('Moved [quant,_1,message]',$total));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
}
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
@@ -3400,15 +3481,16 @@ sub handler {
}
}
&printheader($r,'','Deleted Messages');
+ my $message;
if ($failed) {
- $r->print('
- '.&mt('Failed to delete [_1] message(s)',$failed).
- '
');
- $r->print(''.
+ $message = &Apache::lonhtmlcommon::confirm_success(&mt('Failed to delete [quant,_1,message]',$failed),1);
+ $message .= '
'.
join("
\n",@failed_msg).
- "
\n");
+ "\n";
}
- $r->print(&mt('Deleted [_1] message(s)',$total).'');
+ $message .= &Apache::lonhtmlcommon::confirm_success(&mt('Deleted [quant,_1,message]',$total));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
&Apache::loncommunicate::menu($r);
&disall($r,($folder?$folder:$dismode),$msgstatus);
} elsif ($env{'form.markunread'}) {
@@ -3464,19 +3546,19 @@ sub handler {
}
if (keys(%forwardok) > 0) {
my $count = keys(%forwardok);
- $r->print('
'.
- &mt('[quant,_1,message] forwarded.',$count).
- '');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('[quant,_1,message] forwarded.',$count));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
}
if (keys(%forwardfail) > 0) {
my $count = keys(%forwardfail);
- $r->print('
'.
- &mt('Could not forward [quant,_1,message].',$count).
- ' ');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Could not forward [quant,_1,message].',$count),1);
foreach my $key (keys(%forwardfail)) {
- $r->print(&mt('Could not deliver forwarded message.').' '.
- &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.').
');
+ $message .= '
'.&mt('Could not deliver forwarded message.').' '.
+ &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.')';
}
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
}
&Apache::loncommunicate::menu($r);
} else {
@@ -3500,10 +3582,13 @@ 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).'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" created.',$showfolder));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
} else {
- $r->print(&mt('Creation failed.').' '.$makeresult.'
'.
- $warning);
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Creation failed.').' '.$makeresult.'
'.$warning,1);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);
@@ -3515,10 +3600,14 @@ sub handler {
my $showfolder = '';
my $delresult = &deletefolder($folder);
if ($delresult eq 'ok') {
- $r->print(&mt('Folder "[_1]" deleted.',$folder).'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" deleted.',$folder));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$env{'form.folder'} = '';
} else {
- $r->print(&mt('Deletion failed.').' '.$delresult.'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Deletion failed.').' '.$delresult,1);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);
@@ -3528,9 +3617,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).'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder));
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
} else {
- $r->print(&mt('Renaming failed.').' '.$renresult.'
');
+ my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Renaming failed.').' '.$renresult,1);
+ $message = &Apache::loncommon::confirmwrapper($message);
+ $r->print($message);
$showfolder = $folder;
}
&Apache::loncommunicate::menu($r);