');
+ $r->print('');
}
+ return '';
}
@@ -201,7 +175,7 @@ sub addcom {
sub handler {
my $r=shift;
if ($r->header_only) {
- $r->content_type('text/html');
+ &Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
return OK;
}
@@ -218,19 +192,23 @@ sub handler {
}
if ($ENV{'form.cid'}) {
my %cenv=&Apache::lonnet::coursedescription($ENV{'form.cid'});
- if (exists($ENV{'form.state'}) && ($ENV{'form.state'} eq 'csv')) {
+ if ($ENV{'form.listkeyscsv'}) {
#
# CSV Output
#
$r->content_type('text/csv');
+ $r->send_http_header;
#
# Do CSV
#
+ &show_key_list($r,1,$ENV{'form.listcom'},
+ $ENV{'form.newonly'},$ENV{'form.checkonly'},%cenv);
+
} else {
#
# Normal web stuff
#
- $r->content_type('text/html');
+ &Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
$r->print(&header());
@@ -248,18 +226,19 @@ sub handler {
$r->print($msg.' ');
}
if ($ENV{'form.listkeys'}) {
- &show_key_list($r,$ENV{'form.listcom'},
+ &show_key_list($r,0,$ENV{'form.listcom'},
$ENV{'form.newonly'},$ENV{'form.checkonly'},%cenv);
}
if ($ENV{'form.addcom'}) {
&addcom(%cenv);
}
# --- Menu
- $r->print('
Key Access
');
+ $r->print('
'.&mt('Key Access').'
');
if ($cenv{'keyaccess'} eq 'yes') {
- $r->print('Access to this course is key controlled. ')
+ $r->print(&mt('Access to this course is key controlled.').
+' ')
} else {
- $r->print('Access to this course is open, no access keys. ');
+ $r->print(&mt('Access to this course is open, no access keys').' ');
}
$r->print(<
Generate New Keys
@@ -267,26 +246,27 @@ Number of keys to be generated:
List Keys
-Comments/Remarks/Notes/User/Batch Number:
+Comments/Remarks/Notes/User/Batch Number Filter:
Unused keys only
Used keys only
-
+
+
ENDKEYMENU
$r->print('