'.$lt{'fold'}.' '."\n".
@@ -241,7 +243,9 @@ function folder_choice(targetform,caller
'" onclick="javascript:folder_choice(this.form,'."'change'".');" />
|
- '.&mt('New Folder').' '."\n".'
+ |
+
+ '.&mt('New Folder').' '."\n".'
'.
''.
@@ -543,7 +548,7 @@ sub discourse {
$result .= ' ';
if (ref($statushash) eq 'HASH') {
$statushash->{'active'} = 1;
@@ -564,7 +569,7 @@ sub discourse {
$result .= ' ';
if (ref($statushash) eq 'HASH') {
$statushash->{'previous'} = 1;
@@ -587,7 +592,7 @@ sub discourse {
$result .= '';
if (ref($statushash) eq 'HASH') {
$statushash->{'future'} = 1;
@@ -662,7 +667,7 @@ sub disgroup {
}
$r->print(''."\n"
+ );
my $postedstartdis=$startdis+1;
$r->print('');
if ($numblocked > 0) {
@@ -1462,9 +1470,12 @@ function courseRecipients() {
document.compemail.groupmail.value = document.$formname.groupmail[document.$formname.groupmail.selectedIndex].value;
|;
}
+ #typeof(...forminput.length) returns 'undefined' if only one entry exists
$broadcast_js .= qq|
if (typeof(document.$formname.selectedusers_forminput.length)=="undefined") {
- document.compemail.courserecips.value += '_&&&_'+document.$formname.selectedusers_forminput.value;
+ if (document.$formname.selectedusers_forminput.checked) {
+ document.compemail.courserecips.value += '_&&&_'+document.$formname.selectedusers_forminput.value;
+ }
} else {
for (var i=0; iprint(&additional_rec_row(\%lt));
$r->print(''.
&mt('Unless you choose otherwise:').'- '.
- &mt("The subject in each forwarded message will be 'Forwarding:' followed by the original subject.").'
- '.
- &mt("The message itself will begin with a first line: 'Forwarded message from' followed by the original sender's name.").'
| ');
+ &mt("The subject in each forwarded message will be [_2]'Forwarding:'[_2] followed by the original subject.",'','').''.
+ &mt("The message itself will begin with a first line: [_1]'Forwarded message from'[_2] followed by the original sender's name.",'','').' |
');
$func1='Forward'; # do not translate here!
$dissub = &mt('Forwarding').': ';
$subj_size = '10';
@@ -1730,7 +1741,7 @@ ENDBLOCK
'
-'.&mt('The messages will be assembled from all lines with the respective'."\n".'username:domain, and appended to the general message text.'));
+'.&mt('The messages will be assembled from all lines with the respective [_1][_2]username:domain[_3], and appended to the general message text.','
','',''));
$r->print(<
@@ -2038,7 +2049,7 @@ sub facetoface {
.&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(<print('Not allowed');
- return;
- }
- 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 $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',
- );
-
- my %ltext = &Apache::lonlocal::texthash(
- 'dura' => 'Duration',
- 'setb' => 'Set by',
- 'even' => 'Event',
- 'blck' => 'Blocked?',
- 'actn' => 'Action',
- 'star' => 'Start',
- 'endd' => 'End'
- );
-
- &printheader($r,'/adm/email?block=display',$lt{'comb'});
- $r->print(''.$lt{'cbds'}.'
');
-
- if ($action eq 'store') {
- &blockstore($r);
- }
-
- $r->print($lt{'desc'}.'
-
-$end_page
-END
- return;
-}
-
-sub blockstore {
- my $r = shift;
- my %lt=&Apache::lonlocal::texthash(
- 'tfcm' => 'The following changes were made',
- 'ncwm' => 'No changes were made.'
- );
- my %adds = ();
- my %removals = ();
- my %cancels = ();
- my $modtotal = 0;
- my $canceltotal = 0;
- my $addtotal = 0;
- my %blocking = ();
- $r->print(''.$lt{'head'}.'
');
- foreach my $envkey (keys(%env)) {
- if ($envkey =~ m/^form\.modify_(\d+)$/) {
- $adds{$1} = $1;
- $removals{$1} = $1;
- $modtotal ++;
- } elsif ($envkey =~ m/^form\.cancel_(\d+)$/) {
- $cancels{$1} = $1;
- unless ( defined($removals{$1}) ) {
- $removals{$1} = $1;
- $canceltotal ++;
- }
- } elsif ($envkey =~ m/^form\.add_(\d+)$/) {
- $adds{$1} = $1;
- $addtotal ++;
- }
- }
-
- foreach my $key (keys(%removals)) {
- my $hashkey = $env{'form.key_'.$key};
- &Apache::lonnet::del('comm_block',["$hashkey"],
- $env{'course.'.$env{'request.course.id'}.'.domain'},
- $env{'course.'.$env{'request.course.id'}.'.num'}
- );
- }
- foreach my $key (keys(%adds)) {
- unless ( defined($cancels{$key}) ) {
- my ($newstart,$newend) = &get_dates_from_form($key);
- my $newkey = $newstart.'____'.$newend;
- my $blocktypes = &get_block_choices($key);
- $blocking{$newkey} = {
- setter => $env{'user.name'}.':'.$env{'user.domain'},
- event => &escape($env{'form.title_'.$key}),
- blocks => $blocktypes,
- };
- }
- }
- if ($addtotal + $modtotal > 0) {
- &Apache::lonnet::put('comm_block',\%blocking,
- $env{'course.'.$env{'request.course.id'}.'.domain'},
- $env{'course.'.$env{'request.course.id'}.'.num'}
- );
- }
- my $chgestotal = $canceltotal + $modtotal + $addtotal;
- if ($chgestotal > 0) {
- $r->print($lt{'tfcm'}.'');
- if ($canceltotal > 0) {
- $r->print('- '.&mt('[quant,_1,communication blocking period was,communication blocking periods were] removed.',$canceltotal).'
');
- }
- if ($modtotal > 0) {
- $r->print('- '.&mt('[quant,_1,communication blocking period was,communication blocking periods were] modified.',$modtotal).'
');
- }
- if ($addtotal > 0) {
- $r->print('- '.&mt('[quant,_1,communication blocking period was,communication blocking periods were] added.',$addtotal).'
');
- }
- $r->print('
');
- } else {
- $r->print($lt{'ncwm'});
- }
- $r->print('
');
- return;
-}
-
-sub get_dates_from_form {
- my $item = shift;
- my $startdate = &Apache::lonhtmlcommon::get_date_from_form('startdate_'.$item);
- my $enddate = &Apache::lonhtmlcommon::get_date_from_form('enddate_'.$item);
- return ($startdate,$enddate);
-}
-
-sub get_blockdates {
- my ($records,$blockcount) = @_;
- $$blockcount = 0;
- %{$records} = &Apache::lonnet::dump('comm_block',
- $env{'course.'.$env{'request.course.id'}.'.domain'},
- $env{'course.'.$env{'request.course.id'}.'.num'}
- );
- $$blockcount = keys(%{$records});
-
- if ((keys(%{$records}))[0] =~ /^error: 2 /) {
- $records = {};
- $$blockcount = 0;
- }
-}
-
-sub get_block_choices {
- my $item = shift;
- my $blocklist;
- my ($typeorder,$types) = &blocktype_text();
- foreach my $type (@{$typeorder}) {
- if ($env{'form.'.$type.'_'.$item}) {
- $blocklist->{$type} = 'on';
- } else {
- $blocklist->{$type} = 'off';
- }
- }
- return $blocklist;
-}
-
-sub display_blocker_status {
- my ($r,$records,$ltext) = @_;
- my $parmcount = 0;
-
- my %lt = &Apache::lonlocal::texthash(
- 'modi' => 'Modify',
- 'canc' => 'Cancel',
- );
- my ($typeorder,$types) = &blocktype_text();
- $r->print(&Apache::loncommon::start_data_table());
- $r->print(<<"END");
-
- $ltext->{'dura'} |
- $ltext->{'setb'} |
- $ltext->{'even'} |
- $ltext->{'blck'} |
- $ltext->{'actn'} |
-
-END
- foreach my $record (sort(keys(%{$records}))) {
- my $onchange = 'onFocus="javascript:window.document.forms['.
- "'blockform'].elements['modify_".$parmcount."'].".
- 'checked=true;"';
- my ($start,$end) = split(/____/,$record);
- my $startform = &Apache::lonhtmlcommon::date_setter('blockform','startdate_'.$parmcount,$start,$onchange);
- my $endform = &Apache::lonhtmlcommon::date_setter('blockform','enddate_'.$parmcount,$end,$onchange);
-
- my ($setuname,$setudom,$title,$blocks) =
- &Apache::loncommon::parse_block_record($$records{$record});
- $title = &HTML::Entities::encode($title,'"<>&');
- my $settername =
- &Apache::loncommon::aboutmewrapper(
- &Apache::loncommon::plainname($setuname,$setudom),
- $setuname,$setudom);
- $r->print(&Apache::loncommon::start_data_table_row());
- $r->print(<<"END");
- $ltext->{'star'}: $startform $ltext->{'endd'}: $endform |
- $settername |
- |
-
-END
- foreach my $block (@{$typeorder}) {
- my $blockstatus = '';
- if ($blocks->{$block} eq 'on') {
- $blockstatus = 'checked="checked"';
- }
- $r->print(' ');
- }
- $r->print(<<"END");
- |
-
-
-END
- $r->print(&Apache::loncommon::end_data_table_row());
- $parmcount++;
- }
- $r->print(<<"END");
- |
-';
# Functionlist
@@ -2497,10 +2199,18 @@ sub displaymessage {
}
$functions .= &Apache::lonhtmlcommon::end_funclist();
+ # Navigationlist
+ $functions.=&Apache::lonhtmlcommon::start_funclist(
+ &mt('Navigation'));
+ foreach my $item (@navigationlist) {
+ $functions.=&Apache::lonhtmlcommon::add_item_funclist($item);
+ }
+ $functions .= &Apache::lonhtmlcommon::end_funclist();
+
# Actionlist
if (@actionlist) {
- my $legendtext=&mt('Currently available actions (will open extra window)');
- $functions.=&Apache::lonhtmlcommon::start_funclist($legendtext);
+ $functions.=&Apache::lonhtmlcommon::start_funclist(
+ &mt('Currently available actions (will open extra window)'));
foreach my $item (@actionlist) {
$functions.=&Apache::lonhtmlcommon::add_item_funclist($item);
}
@@ -3351,15 +3061,13 @@ sub handler {
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['display','replyto','forward','markread','markdel','markunread',
'sendreply','compose','sendmail','critical','recname','recdom',
- 'recordftf','sortedby','block','folder','startdis','interdis',
+ 'recordftf','sortedby','folder','startdis','interdis',
'showcommentbaseurl','dismode','group','subject','text','ref',
'msgstatus']);
$sqs='&sortedby='.$env{'form.sortedby'};
# ------------------------------------------------------ They checked for email
- unless ($env{'form.block'}) {
- &Apache::lonnet::put('email_status',{'recnewemail'=>0});
- }
+ &Apache::lonnet::put('email_status',{'recnewemail'=>0});
# ----------------------------------------------------------------- Breadcrumbs
@@ -3562,8 +3270,6 @@ sub handler {
&compout($r,'','',$env{'form.compose'});
} elsif ($env{'form.recordftf'}) {
&facetoface($r,$env{'form.recordftf'});
- } elsif ($env{'form.block'}) {
- &examblock($r,$env{'form.block'});
} elsif ($env{'form.sendmail'}) {
if ($env{'form.multiforward'}) {
&printheader($r,'','Messages being sent.');