--- loncom/auth/lonroles.pm 2004/11/09 15:52:29 1.102 +++ loncom/auth/lonroles.pm 2004/11/09 16:18:51 1.103 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.102 2004/11/09 15:52:29 raeburn Exp $ +# $Id: lonroles.pm,v 1.103 2004/11/09 16:18:51 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -376,18 +376,9 @@ ENDHEADER $tpend=' '; $tfont='#000000'; if ($tstart) { - if ($tstart>$then) { - $tstatus='future'; - if ($tstart<$now) { $tstatus='will'; } - } $tpstart=&Apache::lonlocal::locallocaltime($tstart); } if ($tend) { - if ($tend<$then) { - $tstatus='expired'; - } elsif ($tend<$now) { - $tstatus='will_not'; - } $tpend=&Apache::lonlocal::locallocaltime($tend); } if ($ENV{'request.role'} eq $trolecode) { @@ -717,6 +708,10 @@ sub role_status { ($$tstart,$$tend)=split(/\./,$ENV{$rolekey}); $$tstatus='is'; if ($$tstart) { + if ($tstart>$then) { + $tstatus='future'; + if ($tstart<$now) { $tstatus='will'; } + } if ($$tstart>$then) { $$tstatus='future'; if ($$tstart<$now) { $$tstatus='will'; } @@ -725,7 +720,8 @@ sub role_status { if ($$tend) { if ($$tend<$then) { $$tstatus='expired'; - if ($$tend<$now) { $$tstatus='will_not'; } + } elsif ($$tend<$now) { + $$tstatus='will_not'; } } }