[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 13 Jul 2005 19:56:19 -0000


albertel		Wed Jul 13 15:56:19 2005 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
  Log:
  - taking out the highlighting code
  - recentering the 'realm' dividers
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.126 loncom/auth/lonroles.pm:1.127
--- loncom/auth/lonroles.pm:1.126	Fri Jul  8 06:39:49 2005
+++ loncom/auth/lonroles.pm	Wed Jul 13 15:56:17 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.126 2005/07/08 10:39:49 www Exp $
+# $Id: lonroles.pm,v 1.127 2005/07/13 19:56:17 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -430,34 +430,28 @@
 		$tstatus='selected';
             }
             my $tbg;
-	    my $tbghigh;
             if (($tstatus eq 'is') || ($tstatus eq 'selected') ||
                 ($env{'form.showall'})) {
                 if ($tstatus eq 'is') {
                     $tbg='#77FF77';
-		    $tbghigh='#99CC77';
                     $tfont='#003300';
 		    $possiblerole=$trolecode;
 		    $countactive++;
                 } elsif ($tstatus eq 'future') {
                     $tbg='#FFFF77';
-                    $tbghigh='#DDDD55';
                     $button=0;
                 } elsif ($tstatus eq 'will') {
                     $tbg='#FFAA77';
                     $tremark.=&mt('Active at next login. ');
                 } elsif ($tstatus eq 'expired') {
                     $tbg='#FF7777';
-                    $tbghigh='#EE9955';
                     $tfont='#330000';
                     $button=0;
                 } elsif ($tstatus eq 'will_not') {
                     $tbg='#AAFF77';
-                    $tbghigh='#BBDD55';
                     $tremark.=&mt('Expired after logout. ');
                 } elsif ($tstatus eq 'selected') {
                     $tbg='#11CC55';
-                    $tbghigh='339944';
                     $tfont='#002200';
 		    $inrole=1;
 		    $countactive++;
@@ -563,7 +557,7 @@
 		    $sortkey=$role.$twhere;
                 }
  
-                $roletext.=&build_roletext($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$tbghigh,$tfont,$trole,$ttype,$twhere,$tpstart,$tpend,$nochoose,$button,$switchserver);
+                $roletext.=&build_roletext($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$tfont,$trole,$ttype,$twhere,$tpstart,$tpend,$nochoose,$button,$switchserver);
 		$roletext{$envkey}=$roletext;
 		if (!$sortkey) {$sortkey=$twhere."\0".$envkey;}
 		$sortrole{$sortkey}=$envkey;
@@ -625,7 +619,7 @@
             } 
 	}
 	if ($output) {
-	    $r->print("<tr><td colspan='6'><font face='arial'>".
+	    $r->print("<tr><td align='center' colspan='6'><font face='arial'>".
 		      &mt('Recent Roles')."</font></td>");
 	    $r->print($output);
 	    $r->print("</tr>");
@@ -652,7 +646,7 @@
 	if ($output) {
 	    if ($doheaders > 0) {
 		$r->print("<tr>".
-			  "<td colspan='6'><font face='arial'>".&mt($type)."</font></td></tr>");
+			  "<td align='center' colspan='6'><font face='arial'>".&mt($type)."</font></td></tr>");
 	    }
 	    $r->print($output);	
 	}
@@ -684,7 +678,7 @@
     }
 # ------------------------------------------------------------ Privileges Info
     if (($advanced) && (($env{'user.error.msg'}) || ($error))) {
-	$r->print('<hr><h2>Current Privileges</h2>');
+	$r->print('<hr /><h2>Current Privileges</h2>');
 
 	foreach $envkey (sort keys %env) {
 	    if ($envkey=~/^user\.priv\.$env{'request.role'}\./) {
@@ -772,8 +766,8 @@
 }
 
 sub build_roletext {
-    my ($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$tbghigh,$tfont,$trole,$ttype,$twhere,$tpstart,$tpend,$nochoose,$button,$switchserver) = @_;
-    my $roletext='<tr bgcolor="'.$tbg.'" onMouseOver="javascript:style.backgroundColor=\''.$tbghigh.'\'" onMouseOut="javascript:style.backgroundColor=\''.$tbg.'\'" >';
+    my ($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$tfont,$trole,$ttype,$twhere,$tpstart,$tpend,$nochoose,$button,$switchserver) = @_;
+    my $roletext='<tr bgcolor="'.$tbg.'">';
     unless ($nochoose) {
         if (!$button) {
             if ($switchserver) {
@@ -938,7 +932,6 @@
             my $trole = Apache::lonnet::plaintext('cc');
             my $twhere;
             my $tbg='#77FF77';
-	    my $tbghigh='#99CC77';
             my $tfont='#003300';
             my %newhash=&Apache::lonnet::coursedescription($tcourseid);
             if (%newhash) {
@@ -951,7 +944,7 @@
                 $env{'course.'.$tcourseid.'.description'}=$twhere;
             }
             $twhere.="<br />".&mt('Domain').":".$1;
-            $roletext = &build_roletext($trolecode,$1,$2,'is',$tryagain,$advanced,'',$tbg,$tbghigh,$tfont,$trole,&mt('Course'),$twhere,'','','',1,'');
+            $roletext = &build_roletext($trolecode,$1,$2,'is',$tryagain,$advanced,'',$tbg,$tfont,$trole,&mt('Course'),$twhere,'','','',1,'');
         }
     }
     return $roletext;
@@ -961,7 +954,7 @@
     my $dcdom = shift;
     my $ccrole = Apache::lonnet::plaintext('cc');
     my $selectlink = &courselink($dcdom);
-    my $output = '<tr bgcolor="#99FF99" onMouseOver="javascript:style.backgroundColor=\'#BBEE99\'"  onMouseOut="javascript:style.backgroundColor=\'#99FF99\'" >'.
+    my $output = '<tr bgcolor="#99FF99">'.
               '<td><input type="button" value="'.
               &mt('Select').'" name="ccpick_'.$dcdom.'"'.
               'onClick="verifyCoursePick(this)">'.