--- loncom/auth/lonroles.pm 2002/11/13 16:54:59 1.45 +++ loncom/auth/lonroles.pm 2003/03/19 22:22:18 1.46.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.45 2002/11/13 16:54:59 www Exp $ +# $Id: lonroles.pm,v 1.46.2.2 2003/03/19 22:22:18 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -242,6 +242,7 @@ ENDHEADER my $button = 1; if ($envkey=~/^user\.role\./) { my (undef,undef,$role,@pwhere)=split(/\./,$envkey); + next if (!defined($role) || $role eq ''); my $where=join('.',@pwhere); my $trolecode=$role.'.'.$where; my ($tstart,$tend)=split(/\./,$ENV{$envkey}); @@ -325,15 +326,20 @@ 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('Syllabus',$trest,$tdom). + ''; + } } else { my %newhash=Apache::lonnet::coursedescription ($tcourseid); if (%newhash) { - $twhere= -&Apache::loncommon::syllabuswrapper($newhash{'description'},$trest,$tdom); + $twhere=$newhash{'description'}. + ' '. + &Apache::loncommon::syllabuswrapper('Syllabus',$trest,$tdom). + ''; } else { $twhere='Currently not available'; $ENV{'course.'.$tcourseid.'.description'}=$twhere;