Diff for /loncom/interface/loncreateuser.pm between versions 1.136 and 1.137

version 1.136, 2006/11/22 21:55:53 version 1.137, 2006/11/23 00:04:09
Line 623  END Line 623  END
 # Is this a custom role? Get role owner and title.  # Is this a custom role? Get role owner and title.
        my ($croleudom,$croleuname,$croletitle)=         my ($croleudom,$croleuname,$croletitle)=
            ($role_code=~/^cr\/(\w+)\/(\w+)\/(\w+)$/);             ($role_code=~/^cr\/(\w+)\/(\w+)\/(\w+)$/);
                my $bgcol='ffffff';  
                my $allowed=0;                 my $allowed=0;
                my $delallowed=0;                 my $delallowed=0;
        my $sortkey=$role_code;         my $sortkey=$role_code;
Line 664  END Line 663  END
        }         }
    }     }
                    # Compute the background color based on $area                     # Compute the background color based on $area
                    $bgcol=$1.'_'.$2;  
                    $bgcol=~s/[^7-9a-e]//g;  
                    $bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',2,6);  
                    if ($area=~/^\/(\w+)\/(\d\w+)\/(\w+)/) {                     if ($area=~/^\/(\w+)\/(\d\w+)\/(\w+)/) {
                        $carea.='<br />Section: '.$3;                         $carea.='<br />Section: '.$3;
        $sortkey.="\0$3";         $sortkey.="\0$3";
Line 706  END Line 702  END
                        $allowed=0;                         $allowed=0;
                    }                     }
                }                 }
        $bgcol='77FF77';  
                my $row = '';                 my $row = '';
                $row.='<tr bgcolor="#'.$bgcol.'"><td>';                 $row.= '<td>';
                my $active=1;                 my $active=1;
                $active=0 if (($role_end_time) && ($now>$role_end_time));                 $active=0 if (($role_end_time) && ($now>$role_end_time));
                if (($active) && ($allowed)) {                 if (($active) && ($allowed)) {
Line 745  END Line 740  END
                                                    : '&nbsp;' ).                                                     : '&nbsp;' ).
                       '</td><td>'.($role_end_time  ?localtime($role_end_time)                        '</td><td>'.($role_end_time  ?localtime($role_end_time)
                                                    : '&nbsp;' )                                                     : '&nbsp;' )
                       ."</td></tr>\n";                        ."</td>";
        $sortrole{$sortkey}=$envkey;         $sortrole{$sortkey}=$envkey;
        $roletext{$envkey}=$row;         $roletext{$envkey}=$row;
        $roleclass{$envkey}=$class;         $roleclass{$envkey}=$class;
Line 758  END Line 753  END
        $output{$type} = '';         $output{$type} = '';
        foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) {         foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) {
    if ( ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/ ) && ($rolepriv{$sortrole{$which}}) ) {      if ( ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/ ) && ($rolepriv{$sortrole{$which}}) ) { 
        $output{$type}.=$roletext{$sortrole{$which}};         $output{$type}.=
                                &Apache::loncommon::start_data_table_row().
                                $roletext{$sortrole{$which}}.
                                &Apache::loncommon::end_data_table_row();
    }     }
        }         }
        unless($output{$type} eq '') {         unless($output{$type} eq '') {
    $output{$type} = "<tr bgcolor='#BBffBB'>".     $output{$type} = '<tr class="LC_info_row">'.
      "<td align='center' colspan='7'>".&mt($type)."</td>".       "<td align='center' colspan='7'>".&mt($type)."</td></tr>".
                               $output{$type};                                $output{$type};
                    $rolesdisplay = 1;                     $rolesdisplay = 1;
        }         }
    }     }
            if ($rolesdisplay == 1) {             if ($rolesdisplay == 1) {
                $r->print(<<END);                 $r->print('
 <hr />  <hr />
 <h3>$lt{'rer'}</h3>  <h3>'.$lt{'rer'}.'</h3>'.
 <table>  &Apache::loncommon::start_data_table("LC_createuser").
 <tr><th>$lt{'rev'}</th><th>$lt{'ren'}</th><th>$lt{'del'}</th><th>$lt{'rol'}</th><th>$lt{'e  &Apache::loncommon::start_data_table_header_row().
 xt'}</th><th>$lt{'sta'}</th><th>$lt{'end'}</th>  '<th>'.$lt{'rev'}.'</th><th>'.$lt{'ren'}.'</th><th>'.$lt{'del'}.
 END  '</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'ext'}.
   '</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th>'.
   &Apache::loncommon::end_data_table_header_row());
                foreach my $type ('Construction Space','Course','Group','Domain','System','Unknown') {                 foreach my $type ('Construction Space','Course','Group','Domain','System','Unknown') {
                    if ($output{$type}) {                     if ($output{$type}) {
                        $r->print($output{$type}."\n");                         $r->print($output{$type}."\n");
                    }                     }
                }                 }
        $r->print('</table>');         $r->print(&Apache::loncommon::end_data_table());
            }             }
         }  # End of unless          }  # End of unless
  my $currentauth=&Apache::lonnet::queryauthenticate($ccuname,$ccdomain);   my $currentauth=&Apache::lonnet::queryauthenticate($ccuname,$ccdomain);
Line 1774  sub course_level_table { Line 1774  sub course_level_table {
                     if (%sections_count) {                      if (%sections_count) {
                         my $currsec = &course_sections(\%sections_count,$protectedcourse.'_'.$role);                          my $currsec = &course_sections(\%sections_count,$protectedcourse.'_'.$role);
                         $table .=                           $table .= 
                     '<td><table border="0" cellspacing="0" cellpadding="0">'.                      '<td><table class="LC_createuser">'.
                      '<tr><td valign="top">'.$lt{'exs'}.'<br />'.                       '<tr class="LC_section_row">
                           <td valign="top">'.$lt{'exs'}.'<br />'.
                         $currsec.'</td>'.                          $currsec.'</td>'.
                      '<td>&nbsp;&nbsp;</td>'.                       '<td>&nbsp;&nbsp;</td>'.
                      '<td valign="top">&nbsp;'.$lt{'new'}.'<br />'.                       '<td valign="top">&nbsp;'.$lt{'new'}.'<br />'.

Removed from v.1.136  
changed lines
  Added in v.1.137


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>