--- loncom/auth/lonroles.pm 2004/11/09 18:18:02 1.104 +++ loncom/auth/lonroles.pm 2004/11/09 20:04:48 1.105 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.104 2004/11/09 18:18:02 raeburn Exp $ +# $Id: lonroles.pm,v 1.105 2004/11/09 20:04:48 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -539,8 +539,7 @@ ENDHEADER ''; } } else { - my %newhash=Apache::lonnet::coursedescription - ($tcourseid); + my %newhash=&Apache::lonnet::coursedescription($tcourseid); if (%newhash) { $sortkey=$role."\0".$tdom."\0".$newhash{'description'}. "\0".$envkey; @@ -810,11 +809,9 @@ sub role_status { $$trolecode=$$role.'.'.$$where; ($$tstart,$$tend)=split(/\./,$ENV{$rolekey}); $$tstatus='is'; - if ($$tstart) { - if ($$tstart>$then) { - $$tstatus='future'; - if ($$tstart<$now) { $$tstatus='will'; } - } + if ($$tstart && $$tstart>$then) { + $$tstatus='future'; + if ($$tstart<$now) { $$tstatus='will'; } } if ($$tend) { if ($$tend<$then) { @@ -848,19 +845,11 @@ sub check_fordc { my $dcdom = $1; my $livedc = 1; my ($tstart,$tend)=split(/\./,$ENV{$envkey}); - if ($tstart) { - if ($tstart>$then) { - $livedc = 0; - } - } - if ($tend) { - if ($tend<$then) { - $livedc = 0; - } - } + if ($tstart && $tstart>$then) { $livedc = 0; } + if ($tend && $tend <$then) { $livedc = 0; } if ($livedc) { $$dcroles{$dcdom} = $envkey; - $numdc ++; + $numdc++; } } }