version 1.21, 2001/01/17 17:26:01
|
version 1.24, 2001/05/03 17:54:12
|
Line 8
|
Line 8
|
# 09/04,09/06,09/28,09/29,09/30,10/2,10/5,10/26,10/28, |
# 09/04,09/06,09/28,09/29,09/30,10/2,10/5,10/26,10/28, |
# 12/08,12/28, |
# 12/08,12/28, |
# 01/15/01 Gerd Kortemeyer |
# 01/15/01 Gerd Kortemeyer |
# |
# 02/27/01 Scott Harrison |
|
# 03/02,05/03 Gerd Kortemeyer |
|
|
package Apache::lonroles; |
package Apache::lonroles; |
|
|
use strict; |
use strict; |
Line 180 ENDHEADER
|
Line 182 ENDHEADER
|
$tpstart=localtime($tstart); |
$tpstart=localtime($tstart); |
} |
} |
if ($tend) { |
if ($tend) { |
if ($tend<$then) { $tstatus='expired'; } |
if ($tend<$then) { |
if ($tend<$now) { $tstatus='will_not'; } |
$tstatus='expired'; |
|
} elsif ($tend<$now) { |
|
$tstatus='will_not'; |
|
} |
$tpend=localtime($tend); |
$tpend=localtime($tend); |
} |
} |
if ($ENV{'request.role'} eq $trolecode) { |
if ($ENV{'request.role'} eq $trolecode) { |
Line 217 ENDHEADER
|
Line 222 ENDHEADER
|
my ($tdom,$trest,$tsection)= |
my ($tdom,$trest,$tsection)= |
split(/\//,Apache::lonnet::declutter($where)); |
split(/\//,Apache::lonnet::declutter($where)); |
if ($trest) { |
if ($trest) { |
|
if ($role eq 'ca') { |
|
$ttype='Construction Space'; |
|
$twhere='User: '.$trest.'<br>Domain: '.$tdom; |
|
$ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca'; |
|
} else { |
$ttype='Course'; |
$ttype='Course'; |
if ($tsection) { |
if ($tsection) { |
$ttype.='<br>Section/Group: '.$tsection; |
$ttype.='<br>Section/Group: '.$tsection; |
Line 233 ENDHEADER
|
Line 243 ENDHEADER
|
$ENV{'course.'.$tcourseid.'.description'}=$twhere; |
$ENV{'course.'.$tcourseid.'.description'}=$twhere; |
} |
} |
} |
} |
|
} |
} elsif ($tdom) { |
} elsif ($tdom) { |
$ttype='Domain'; |
$ttype='Domain'; |
$twhere=$tdom; |
$twhere=$tdom; |
Line 277 ENDHEADER
|
Line 288 ENDHEADER
|
unless ($nochoose) { |
unless ($nochoose) { |
$r->print("</form>\n"); |
$r->print("</form>\n"); |
} |
} |
# ------------------------------------------------------------ Priviledges Info |
# ------------------------------------------------------------ Privileges Info |
if ($advanced) { |
if ($advanced) { |
$r->print('<hr><h2>Current Priviledges</h2>'); |
$r->print('<hr><h2>Current Privileges</h2>'); |
|
|
foreach $envkey (sort keys %ENV) { |
foreach $envkey (sort keys %ENV) { |
if ($envkey=~/^user\.priv\.$ENV{'request.role'}\./) { |
if ($envkey=~/^user\.priv\.$ENV{'request.role'}\./) { |
Line 290 ENDHEADER
|
Line 301 ENDHEADER
|
my ($tdom,$trest,$tsec)= |
my ($tdom,$trest,$tsec)= |
split(/\//,Apache::lonnet::declutter($where)); |
split(/\//,Apache::lonnet::declutter($where)); |
if ($trest) { |
if ($trest) { |
|
if ($ENV{'course.'.$tdom.'_'.$trest.'.description'} eq 'ca') { |
|
$ttype='Construction Space'; |
|
$twhere='User: '.$trest.', Domain: '.$tdom; |
|
} else { |
$ttype='Course'; |
$ttype='Course'; |
$twhere=$ENV{'course.'.$tdom.'_'.$trest.'.description'}; |
$twhere=$ENV{'course.'.$tdom.'_'.$trest.'.description'}; |
if ($tsec) { |
if ($tsec) { |
$twhere.=' (Section/Group: '.$tsec.')'; |
$twhere.=' (Section/Group: '.$tsec.')'; |
} |
} |
|
} |
} elsif ($tdom) { |
} elsif ($tdom) { |
$ttype='Domain'; |
$ttype='Domain'; |
$twhere=$tdom; |
$twhere=$tdom; |