version 1.110, 2004/11/14 18:27:08
|
version 1.111, 2004/11/19 20:17:52
|
Line 135 sub handler {
|
Line 135 sub handler {
|
if ($tstatus eq 'is') { |
if ($tstatus eq 'is') { |
$where=~s/^\///; |
$where=~s/^\///; |
my ($cdom,$cnum,$csec)=split(/\//,$where); |
my ($cdom,$cnum,$csec)=split(/\//,$where); |
|
# store role if recent_role list being kept |
|
if ($ENV{'environment.recentroles'}) { |
|
&Apache::lonhtmlcommon::store_recent('roles', |
|
$trolecode,' '); |
|
} |
|
|
|
|
# check for keyed access |
# check for keyed access |
if (($role eq 'st') && |
if (($role eq 'st') && |
($ENV{'course.'.$cdom.'_'.$cnum.'.keyaccess'} eq 'yes')) { |
($ENV{'course.'.$cdom.'_'.$cnum.'.keyaccess'} eq 'yes')) { |
Line 604 ENDHEADER
|
Line 611 ENDHEADER
|
} |
} |
if ($haverole) { $doheaders++; } |
if ($haverole) { $doheaders++; } |
} |
} |
|
|
|
if ($ENV{'environment.recentroles'}) { |
|
my %recent_roles = |
|
&Apache::lonhtmlcommon::get_recent('roles',$ENV{'environment.recentrolesn'}); |
|
my $output=''; |
|
foreach (sort(keys(%recent_roles))) { |
|
if (defined($roletext{'user.role.'.$_})) { |
|
$output.=$roletext{'user.role.'.$_}; |
|
} |
|
} |
|
if ($output) { |
|
$r->print("<tr bgcolor='#BBffBB'><td align='center' colspan='7'>". |
|
&mt('Recent Roles')."</td>"); |
|
$r->print($output); |
|
$r->print("</tr>"); |
|
} |
|
} |
|
|
if ($numdc > 0) { |
if ($numdc > 0) { |
&display_recent_roles($r,\%roletext,\%recentroles); |
&display_recent_roles($r,\%roletext,\%recentroles); |
} |
} |