--- loncom/auth/lonroles.pm 2002/11/25 16:05:56 1.46
+++ loncom/auth/lonroles.pm 2003/01/16 01:37:26 1.48
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.46 2002/11/25 16:05:56 matthew Exp $
+# $Id: lonroles.pm,v 1.48 2003/01/16 01:37:26 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -150,7 +150,8 @@ ENDREDIR
my $swinfo=&Apache::lonmenu::rawconfig($r);
my $bodytag=&Apache::loncommon::bodytag('User Roles');
- my $helptag=&Apache::loncommon::help_open_topic("General_Intro","HELP");
+ my $helptag=&Apache::loncommon::help_open_topic
+ ("General_Intro","CLICK HERE FOR HELP");
$r->print(<
@@ -250,6 +251,7 @@ ENDHEADER
my $tstatus='is';
my $tpstart=' ';
my $tpend=' ';
+ my $tfont='#000000';
if ($tstart) {
if ($tstart>$then) {
$tstatus='future';
@@ -273,6 +275,7 @@ ENDHEADER
($ENV{'form.showall'})) {
if ($tstatus eq 'is') {
$tbg='#77FF77';
+ $tfont='#003300';
} elsif ($tstatus eq 'future') {
$tbg='#FFFF77';
} elsif ($tstatus eq 'will') {
@@ -280,11 +283,13 @@ ENDHEADER
$tremark.='Active at next login. ';
} elsif ($tstatus eq 'expired') {
$tbg='#FF7777';
+ $tfont='#330000';
} elsif ($tstatus eq 'will_not') {
$tbg='#AAFF77';
$tremark.='Expired after logout. ';
} elsif ($tstatus eq 'selected') {
$tbg='#11CC55';
+ $tfont='#002200';
$tremark.='Currently selected. ';
}
my $trole;
@@ -326,15 +331,18 @@ ENDHEADER
}
my $tcourseid=$tdom.'_'.$trest;
if ($ENV{'course.'.$tcourseid.'.description'}) {
- $twhere=
-&Apache::loncommon::syllabuswrapper($ENV{'course.'.$tcourseid.'.description'},
-$trest,$tdom);
+ $twhere=$ENV{'course.'.$tcourseid.'.description'};
+ unless ($twhere eq 'Currently not available') {
+ $twhere=
+ &Apache::loncommon::syllabuswrapper($twhere,$trest,$tdom,$tfont);
+ }
} else {
my %newhash=Apache::lonnet::coursedescription
($tcourseid);
if (%newhash) {
$twhere=
-&Apache::loncommon::syllabuswrapper($newhash{'description'},$trest,$tdom);
+&Apache::loncommon::syllabuswrapper($newhash{'description'},$trest,$tdom,
+ $tfont);
} else {
$twhere='Currently not available';
$ENV{'course.'.$tcourseid.'.description'}=$twhere;
@@ -365,17 +373,22 @@ $trest,$tdom);
$r->print(' | ');
}
}
- $r->print(''.$trole.' | '.
- $ttype.' | '.$twhere.' | '.$tpstart.
- ' | '.$tpend.
- ' | '.$tremark.' | '."\n");
+ $r->print(''.$trole.
+ ' | '.$ttype.
+ ' | '.$twhere.
+ ' | '.$tpstart.
+ ' | '.$tpend.
+ ' | '.$tremark.
+ ' | '."\n");
}
}
}
my $tremark='';
+ my $tfont='#003300';
if ($ENV{'request.role'} eq 'cm') {
$r->print('');
$tremark='Currently selected.';
+ $tfont='#002200';
} else {
$r->print('
');
}
@@ -386,8 +399,9 @@ $trest,$tdom);
$r->print(' | ');
}
}
- $r->print('No role specified'.
- ' | '.$tremark.' |
'."\n");
+ $r->print('No role specified'.
+ ' | '.$tremark.
+ ' | '."\n");
$r->print('');
unless ($nochoose) {