|
-$lt{'da'} | $lt{'us'} | $lt{'do'} | $lt{'su'} |
+$lt{'da'} | $lt{'us'} | $lt{'do'} | $lt{'su'} | $lt{'co'} |
TABLEHEAD
foreach my $msg (@newmsgs) {
$r->print(<<"ENDLINK");
@@ -892,7 +1015,7 @@ TABLEHEAD
onMouseOut="javascript:style.backgroundColor='#FFBB77'">
$lt{'op'} |
ENDLINK
- foreach ('sendtime','from','fromdom','shortsub') {
+ foreach ('sendtime','from','fromdom','shortsub','course') {
$r->print("$msg->{$_} | ");
}
$r->print("");
@@ -1006,6 +1129,12 @@ ENDDISHEADER
$r->print(''.&mt('Subject').'');
}
$r->print('');
+ if ($env{'form.sortedby'} eq "revcourse") {
+ $r->print(''.&mt('Course').'');
+ } else {
+ $r->print(''.&mt('Course').'');
+ }
+ $r->print(' | ');
if ($env{'form.sortedby'} eq "revstatus") {
$r->print(''.&mt('Status').' | ');
} else {
@@ -1013,7 +1142,7 @@ ENDDISHEADER
}
$r->print("\n");
for (my $n=$firstdis;$n<=$lastdis;$n++) {
- my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID)= @{$temp[$n]};
+ my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID,$description)= @{$temp[$n]};
if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) {
if ($status eq 'new') {
$r->print('');
@@ -1031,7 +1160,7 @@ ENDDISHEADER
''.&Apache::lonlocal::locallocaltime($sendtime).' | '.
$fromname.' | '.$fromdomain.' | '.
&Apache::lonnet::unescape($shortsubj).' | '.
- $status." |
\n");
+ $description.''.$status.' | '."\n");
} elsif ($status eq 'deleted') {
# purge
&movemsg(&Apache::lonnet::unescape($origID),$folder,'trash');
@@ -1107,7 +1236,9 @@ sub compout {
'ca' => 'Cancel',
'ma' => 'Mail');
- if (&Apache::lonnet::allowed('srm',$env{'request.course.id'})) {
+ if (&Apache::lonnet::allowed('srm',$env{'request.course.id'})
+ || &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
+ '/'.$env{'request.course.sec'})) {
my $crithelp = Apache::loncommon::help_open_topic("Course_Critical_Message");
$dispcrit=
' ' . $crithelp .
@@ -1116,8 +1247,8 @@ sub compout {
&mt('and return receipt') . '' . $crithelp .
'
'.
-''; }
+''; }
my %message;
my %content;
my $defdom=$env{'user.domain'};
@@ -1233,7 +1364,7 @@ $dispcrit
ENDUPLOAD
}
if ($broadcast eq 'group') {
- &discourse;
+ &discourse($r);
}
$r->print(''.
&Apache::lonfeedback::generate_preview_button('compemail','message').
@@ -1246,7 +1377,9 @@ sub retrieve_instructor_comments {
my ($user,$domain)=@_;
my $target=$env{'form.grade_target'};
if (! $env{'request.course.id'}) { return; }
- if (! &Apache::lonnet::allowed('srm',$env{'request.course.id'})) {
+ if (! &Apache::lonnet::allowed('srm',$env{'request.course.id'})
+ && ! &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
+ '/'.$env{'request.course.sec'})) {
return;
}
my %records=&Apache::lonnet::dump('nohist_email',
@@ -1271,7 +1404,10 @@ sub disfacetoface {
my ($r,$user,$domain)=@_;
my $target=$env{'form.grade_target'};
unless ($env{'request.course.id'}) { return; }
- unless (&Apache::lonnet::allowed('srm',$env{'request.course.id'})) {
+ if (!&Apache::lonnet::allowed('srm',$env{'request.course.id'})
+ && ! &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
+ '/'.$env{'request.course.sec'})) {
+ $r->print('Not allowed');
return;
}
my %records=&Apache::lonnet::dump('nohist_email',
@@ -1287,6 +1423,12 @@ sub disfacetoface {
$result.=''.&mt('Record').'
';
} elsif ($content{'subject'}=~/^Broadcast/) {
$result .=''.&mt('Broadcast Message').'
';
+ if ($content{'subject'}=~/^Broadcast\./) {
+ %content=&unpackagemsg($content{'message'});
+ $content{'message'}=
+ ''.&mt('Subject').': '.$content{'subject'}.'
'.
+ $content{'message'};
+ }
} else {
$result.=''.&mt('Critical Message').'
';
%content=&unpackagemsg($content{'message'});
@@ -1319,7 +1461,10 @@ $content{'sendername'}.'@'.
sub facetoface {
my ($r,$stage)=@_;
- unless (&Apache::lonnet::allowed('srm',$env{'request.course.id'})) {
+ if (!&Apache::lonnet::allowed('srm',$env{'request.course.id'})
+ && ! &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
+ '/'.$env{'request.course.sec'})) {
+ $r->print('Not allowed');
return;
}
&printheader($r,
@@ -1362,12 +1507,13 @@ ENDTREC
($env{'form.recdomain'}) && ($env{'form.recuname'})) {
chomp($env{'form.newrecord'});
if ($env{'form.newrecord'}) {
+ my $recordtxt = $env{'form.newrecord'};
&user_normal_msg_raw(
$env{'course.'.$env{'request.course.id'}.'.num'},
$env{'course.'.$env{'request.course.id'}.'.domain'},
&mt('Record').
' ['.$env{'form.recuname'}.':'.$env{'form.recdomain'}.']',
- $env{'form.newrecord'});
+ $recordtxt);
}
$r->print(''.&Apache::loncommon::plainname($env{'form.recuname'},
$env{'form.recdomain'}).'
');
@@ -1393,7 +1539,12 @@ ENDBFORM
sub examblock {
my ($r,$action) = @_;
unless ($env{'request.course.id'}) { return;}
- unless (&Apache::lonnet::allowed('srm',$env{'request.course.id'})) { $r->print('Not allowed'); }
+ if (!&Apache::lonnet::allowed('srm',$env{'request.course.id'})
+ && ! &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
+ '/'.$env{'request.course.sec'})) {
+ $r->print('Not allowed');
+ return;
+ }
my %lt=&Apache::lonlocal::texthash(
'comb' => 'Communication Blocking',
'cbds' => 'Communication blocking during scheduled exams',
@@ -1826,6 +1977,16 @@ sub displaymessage {
}
$r->print('
');
}
+ my $tolist;
+ my @recipients = ();
+ for (my $i=0; $i<@{$content{'recuser'}}; $i++) {
+ $recipients[$i] = &Apache::loncommon::aboutmewrapper(
+ &Apache::loncommon::plainname($content{'recuser'}[$i],
+ $content{'recdomain'}[$i]),
+ $content{'recuser'}[$i],$content{'recdomain'}[$i]).
+ ' ('.$content{'recuser'}[$i].' at '.$content{'recdomain'}[$i].') ';
+ }
+ $tolist = join(', ',@recipients);
$r->print('