print("".&mt('LON-CAPA Access Control')."
");
+ $r->print("LON-CAPA Access Control
");
$r->print("
");
if ($priv ne '') {
- $r->print(&mt('Access : ').&Apache::lonnet::plaintext($priv)."\n");
+ $r->print("Access : ".&Apache::lonnet::plaintext($priv)."\n");
}
if ($fn ne '') {
- $r->print(&mt('Resource: ').&Apache::lonenc::check_encrypt($fn)."\n");
+ $r->print("Resource: ".&Apache::lonenc::check_encrypt($fn)."\n");
}
if ($msg ne '') {
- $r->print(&mt('Action : ').$msg."\n");
+ $r->print("Action : $msg\n");
}
$r->print("
");
my $url=$fn;
@@ -669,7 +691,8 @@ ENDHEADER
$output.=$roletext{'user.role.'.$_};
if ($_ =~ m-dc\./($match_domain)/-
&& $dcroles{$1}) {
- $output .= &allcourses_row($1,'recent');
+ $output .= &allcourses_row($1,'recent').
+ &allcoauthors_row($1,'recent');
}
} elsif ($numdc > 0) {
unless ($_ =~/^error\:/) {
@@ -697,7 +720,8 @@ ENDHEADER
$output.=$roletext{$sortrole{$which}};
if ($sortrole{$which} =~ m-dc\./($match_domain)/-) {
if ($dcroles{$1}) {
- $output .= &allcourses_row($1,'');
+ $output .= &allcourses_row($1,'').
+ &allcoauthors_row($1,'');
}
}
}
@@ -882,16 +906,16 @@ sub build_roletext {
}
sub check_privs {
- my ($cdom,$cnum,$then,$now) = @_;
- my $cckey = 'user.role.cc./'.$cdom.'/'.$cnum;
+ my ($cdom,$cnum,$then,$now,$checkrole) = @_;
+ my $cckey = 'user.role.'.$checkrole.'./'.$cdom.'/'.$cnum;
if ($env{$cckey}) {
my ($role,$where,$trolecode,$tstart,$tend,$tremark,$tstatus,$tpstart,$tpend,$tfont);
&role_status($cckey,$then,$now,\$role,\$where,\$trolecode,\$tstatus,\$tstart,\$tend);
unless (($tstatus eq 'is') || ($tstatus eq 'will_not')) {
- &set_privileges($cdom,$cnum);
+ &set_privileges($cdom,$cnum,$checkrole);
}
} else {
- &set_privileges($cdom,$cnum);
+ &set_privileges($cdom,$cnum,$checkrole);
}
}
@@ -930,10 +954,6 @@ sub courselink {
}
sub coursepick_jscript {
- my %lt = &Apache::lonlocal::texthash(
- plsu => "Please use the 'Select Course' link to open a separate pick course window where you may select the course you wish to enter.",
- youc => 'You can only use this screen to select courses in the current domain.',
- );
my $verify_script = <<"END";