--- loncom/interface/loncreateuser.pm 2003/07/18 19:50:28 1.61 +++ loncom/interface/loncreateuser.pm 2003/07/18 20:53:06 1.62 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.61 2003/07/18 19:50:28 www Exp $ +# $Id: loncreateuser.pm,v 1.62 2003/07/18 20:53:06 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -314,8 +314,8 @@ END } # Compute the background color based on $area $bgcol=$1.'_'.$2; - $bgcol=~s/[^8-9b-e]//g; - $bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',0,6); + $bgcol=~s/[^7-9a-e]//g; + $bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',2,6); if ($area=~/^\/(\w+)\/(\d\w+)\/(\w+)/) { $carea.='
Section/Group: '.$3; } @@ -347,7 +347,7 @@ END } } my $row = ''; - $row.=''; + $row.=''; my $active=1; $active=0 if (($role_end_time) && ($now>$role_end_time)); if (($active) && ($allowed)) { @@ -861,7 +861,6 @@ sub custom_role_editor { $r->print('Existing Role "'); # ------------------------------------------------- Get current role privileges ($syspriv,$dompriv,$coursepriv)=split(/\_/,$roledef); - $r->print($syspriv.' '.$dompriv.' '.$coursepriv); } else { $r->print('New Role "'); $roledef=''; @@ -1026,6 +1025,10 @@ sub handler { sub course_level_table { my %inccourses = @_; my $table = ''; +# Custom Roles? + + my %customroles=&my_custom_roles(); + foreach (sort( keys(%inccourses))) { my $thiscourse=$_; my $protectedcourse=$_; @@ -1034,8 +1037,8 @@ sub course_level_table { my $area=$coursedata{'description'}; if (!defined($area)) { $area='Unavailable course: '.$_; } my $bgcol=$thiscourse; - $bgcol=~s/[^8-9b-e]//g; - $bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',0,6); + $bgcol=~s/[^7-9a-e]//g; + $bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',2,6); foreach ('st','ta','ep','ad','in','cc') { if (&Apache::lonnet::allowed('c'.$_,$thiscourse)) { my $plrole=&Apache::lonnet::plaintext($_); @@ -1065,6 +1068,22 @@ ENDTIMEENTRY $table.= "\n"; } } + foreach (sort keys %customroles) { + my $plrole=$_; + $table .= < + +$plrole +$area + + +Set Start Date + +Set End Date +ENDENTRY + } } return '' if ($table eq ''); # return nothing if there is nothing # in the table