');
+ if ($constructmode) {
+ $r->print(&Apache::loncommon::select_form('','action_0',
+ ('' => '',
+ 'insertbelow' => 'Insert rule below ')));
+
+ } else {
+ $r->print(' ');
+ }
+ $r->print(' | ');
if ($constructmode) {
$r->print(&Apache::loncommon::select_form
($token->[2]->{'effect'},'effect_0',
@@ -91,14 +199,15 @@ ENDSTARTTABLE
}
$r->print(' | Default');
if (($token->[2]->{'realm'}) || ($token->[2]->{'role'})) {
- $r->print(' - Error! No default set.');
+ $r->print(' - '.&mt('Error! No default set.').
+ '');
}
$r->print(' |
');
# Additional roles
while ($token=$parser->get_token) {
if (($token->[0] eq 'S') && ($token->[1] eq 'accessrule')) {
$rulecounter++;
- $r->print('');
# insert, delete, etc
$r->print($rulecounter.'. ');
if ($constructmode) {
@@ -107,11 +216,11 @@ ENDSTARTTABLE
('' => '',
'delete' => 'Delete this rule',
'insertabove' => 'Insert rule above',
- 'insertbelow' => 'Insert rule below',
+ 'insertbelow' => 'Insert rule below ',
'moveup' => 'Move rule up',
'movedown' => 'Move rule down')));
}
- $r->print(' | ');
+ $r->print(' | ');
# effect
if ($constructmode) {
$r->print(&Apache::loncommon::select_form
@@ -127,8 +236,9 @@ ENDSTARTTABLE
my $realm=$token->[2]->{'realm'};
$realm=~s/^\W//;
my ($rdom,$rcourse,$rsec)=split(/[\/\_]/,$realm);
-# realm role
+# realm domain
if ($constructmode) {
+ unless ($rdom) { $rdom=$ENV{'user.domain'}; }
$r->print(&Apache::loncommon::select_dom_form($rdom,
'domain_'.$rulecounter));
} else {
@@ -152,7 +262,7 @@ ENDSTARTTABLE
$r->print($rsec);
}
- $r->print(' | ');
+ $r->print(' | ');
# role
if ($constructmode) {
my %hash=('' => '');
@@ -166,6 +276,15 @@ ENDSTARTTABLE
} else {
$r->print(&Apache::lonnet::plaintext($token->[2]->{'role'}));
}
+# course selection link
+ $r->print(' |