'
.&mt('Access to other pages will be prevented until you have moved all critical messages to your inbox.')
.'
'
- .'
'
+ .'
'
.'';
my %what=&Apache::lonnet::dump('critical');
my $result = '';
@@ -804,8 +850,11 @@ sub discrit {
}
# Check to see if there were any messages.
if ($result eq '') {
- $result = "
'.
+ ''.&mt('Select a course').' '.
''.&mt('Communicate').'';
} else {
$r->print($header);
@@ -831,6 +880,7 @@ sub sortedmessages {
}
foreach my $msgid (@messages) {
+ next if ($msgid eq '');
my $esc_msgid=&escape($msgid);
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid,$processid,$symb,$error) =
&Apache::lonmsg::unpackmsgid($esc_msgid,$folder,undef,
@@ -970,6 +1020,7 @@ sub disfolder {
my $jscript = &Apache::loncommon::check_uncheck_jscript();
$r->print(<
+//
ENDDISHEADER
- my $fsqs='&folder='.$folder;
+ my $fsqs='&folder='.$folder;
my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus);
my $totalnumber=$#temp+1;
+
if ($totalnumber < 1) {
+ $r->print('
');
if ($msgstatus eq '') {
- $r->print('
'.&mt('Empty Folder').'
');
+ $r->print(&mt('There are no messages in this folder.'));
} elsif ($msgstatus eq 'replied') {
- $r->print('
'.&mt('You have not replied to any messages in this folder.').'
');
+ $r->print(&mt('You have not replied to any messages in this folder.'));
} else {
- $r->print('
'.&mt('There are no '.lc($statushash{$msgstatus}).' messages in this folder.').'
');
+ $r->print(&mt('There are no '.lc($statushash{$msgstatus}).' messages in this folder.'));
}
+ $r->print('');
if ($numblocked > 0) {
$r->print(&blocked_in_folder($numblocked,$startblock,$endblock,
\%setters));
}
- return;
+ return;
}
my $interdis = $env{'form.interdis'};
my $number=int($totalnumber/$interdis);
@@ -1034,48 +1088,50 @@ ENDDISHEADER
$r->print('
'.
'
');
if ($env{'form.sortedby'} eq "revdate") {
- $r->print(''.&mt('Date').'
');
+ $item.(($status eq 'new')?'':'').'');
}
my $showstatus;
my %statushash = &get_msgstatus_types();
@@ -1178,7 +1233,7 @@ ENDDISHEADER
'" onclick="javascript:validate_checkedaction()"/>'."\n".
'
');
my $postedstartdis=$startdis+1;
- $r->print('
');
+ $r->print('
');
if ($numblocked > 0) {
$r->print(&blocked_in_folder($numblocked,$startblock,$endblock,
\%setters));
@@ -1237,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.').' ');
@@ -1283,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.=' ';
}
}
@@ -1317,22 +1384,24 @@ sub compout {
if ($group eq '') {
my $studentsel = &discourse(\%access_status);
if ($studentsel) {
- $r->print('
ENDADD
return $output;
}
@@ -1760,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/) {
@@ -1814,7 +1894,7 @@ $content{'sendername'}.':'.
}
# Check to see if there were any messages.
if ($result eq '') {
- my $lctype = lc(&Apache::loncommon::course_type());
+ my $lctype = &mt(lc(&Apache::loncommon::course_type()));
if ($target ne 'tex') {
$r->print("
".&mt('No notes, face-to-face discussion records, critical messages, or broadcast messages in this [_1].',$lctype)."
");
} else {
@@ -1848,7 +1928,7 @@ sub facetoface {
return;
}
my $crstype = &Apache::loncommon::course_type();
- my $leaders = ($crstype eq 'Group') ? 'coordinators and leaders'
+ my $leaders = ($crstype eq 'Community') ? 'coordinators and leaders'
: 'faculty and staff';
&printheader($r,
'/adm/email?recordftf=query',
@@ -1871,21 +1951,24 @@ sub facetoface {
'subm' => 'Retrieve discussion and message records',
'newr' => 'New Record (record is visible to '.lc($crstype).' '.$leaders.')',
'post' => 'Post this Record');
- $r->print(<<"ENDTREC");
-
'
+ .&mt('Discussion and message records for [_1] ([_2])'
+ ,$aboutmelink
+ ,$env{'form.recuname'}.':'.$env{'form.recdomain'})
+ .'
'
+ );
&disfacetoface($r,$env{'form.recuname'},$env{'form.recdomain'});
$r->print(<
@@ -1924,12 +2016,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',
@@ -2106,7 +2204,7 @@ sub display_blocker_status {
$ltext->{'setb'}
$ltext->{'even'}
$ltext->{'blck'}
-
$ltext->{'actn'}?
+
$ltext->{'actn'}
END
foreach my $record (sort(keys(%{$records}))) {
@@ -2126,7 +2224,7 @@ END
$setuname,$setudom);
$r->print(&Apache::loncommon::start_data_table_row());
$r->print(<<"END");
-
@@ -2134,13 +2232,18 @@ END
foreach my $block (@{$typeorder}) {
my $blockstatus = '';
if ($blocks->{$block} eq 'on') {
- $blockstatus = 'checked="true"';
+ $blockstatus = 'checked="checked"';
}
- $r->print(' ');
+ $r->print(' ');
}
$r->print(<<"END");
-
-
+
+
+
END
$r->print(&Apache::loncommon::end_data_table_row());
$parmcount++;
@@ -2177,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());
@@ -2187,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());
@@ -2201,7 +2306,7 @@ END
sub blocktype_text {
my %types = &Apache::lonlocal::texthash(
'com' => 'Messaging',
- 'chat' => 'Chat',
+ 'chat' => 'Chat Room',
'boards' => 'Discussion',
'port' => 'Portfolio',
'groups' => 'Groups',
@@ -2227,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 '') {
@@ -2263,29 +2368,56 @@ sub displaymessage {
# start output
&printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'});
my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'});
-# Functions
- $r->print('
'.&mt('Functions').':
');
+
+# Functions and Actions
+ my $li_start='• ';
+ my $li_end=' ';
+
+# Prepare available functions
+ my @functionlist;
if (!$content{'noreplies'}) {
- $r->print('
'
+ );
+
+# Prepare available actions
my $symb;
if (defined($content{'symb'})) {
$symb = $content{'symb'};
@@ -2293,34 +2425,49 @@ sub displaymessage {
$symb=&Apache::lonnet::symbread($content{'baseurl'});
}
if ($env{'user.adv'}) {
- my $actionlist='';
+ my @actionlist;
+
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
- $actionlist.='
'.
- &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 {
@@ -3421,10 +3587,13 @@ sub handler {
my $showfolder = $env{'form.newfolder'};
my ($makeresult,$warning) = &makefolder($env{'form.newfolder'});
if ($makeresult eq 'ok') {
- $r->print(&mt('Mail 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);
@@ -3436,10 +3605,14 @@ sub handler {
my $showfolder = '';
my $delresult = &deletefolder($folder);
if ($delresult eq 'ok') {
- $r->print(&mt('Mail 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);
@@ -3449,9 +3622,13 @@ sub handler {
my $showfolder = $env{'form.renamed'};
my $renresult = &renamefolder($folder);
if ($renresult eq 'ok') {
- $r->print(&mt('Mail folder "[_1]" renamed "[_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);