[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonparmset.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 23 Jun 2006 03:14:01 -0000


albertel		Thu Jun 22 23:14:01 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonparmset.pm 
  Log:
  - elimintaing font's for error
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.393 loncom/interface/loncommon.pm:1.394
--- loncom/interface/loncommon.pm:1.393	Thu Jun 22 23:00:53 2006
+++ loncom/interface/loncommon.pm	Thu Jun 22 23:14:00 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.393 2006/06/23 03:00:53 albertel Exp $
+# $Id: loncommon.pm,v 1.394 2006/06/23 03:14:00 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3135,6 +3135,9 @@
   color: red;
   font-size: larger;
 }
+.LC_warning {
+  color: red;
+}
 .LC_success {
   color: green;
 }
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.313 loncom/interface/lonparmset.pm:1.314
--- loncom/interface/lonparmset.pm:1.313	Mon Jun 12 19:17:48 2006
+++ loncom/interface/lonparmset.pm	Thu Jun 22 23:14:00 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.313 2006/06/12 23:17:48 albertel Exp $
+# $Id: lonparmset.pm,v 1.314 2006/06/23 03:14:00 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -65,7 +65,6 @@
 use Apache::lonnavmaps;
 use Apache::longroup;
 use Apache::lonrss;
-use lib '/home/httpd/lib/perl/';
 use LONCAPA;
 
 # --- Caches local to lonparmset
@@ -495,7 +494,7 @@
     }
     
     if ($reply=~/^error\:(.*)/) {
-	return "<font color=red>Write Error: $1</font>";
+	return "<span class=\"LC_error\">Write Error: $1</span>";
     }
     return '';
 }
@@ -703,7 +702,7 @@
     }
     my $automatic=&rulescache(($which=~/\_([^\_]+)$/)[0].'_triggers');
     if ($automatic) {
-	$parm.='<font color="red"><br />'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'</font>';
+	$parm.='<span class="LC_warning"><br />'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'</span>';
     }
     $r->print('<td bgcolor='.$defbgone.'>'.$parm.'</td>');
    
@@ -1478,8 +1477,8 @@
 	    $id='';
 	} else {
 	    $message=
-		"<font color=red>".&mt("Unknown ID")." '$id' ".
-		&mt('at domain')." '$udom'</font>";
+		'<span class="LC_error">'.&mt("Unknown ID")." '$id' ".
+		&mt('at domain')." '$udom'</span>";
 	}
     } else {
 	$uname=$env{'form.uname'};
@@ -1490,17 +1489,17 @@
 	$uhome=&Apache::lonnet::homeserver($uname,$udom);
         if ($uhome eq 'no_host') {
 	    $message=
-		"<font color=red>".&mt("Unknown user")." '$uname' ".
-		&mt("at domain")." '$udom'</font>";
+		'<span class="LC_error">'.&mt("Unknown user")." '$uname' ".
+		&mt("at domain")." '$udom'</span>";
 	    $uname='';
         } else {
 	    $csec=&Apache::lonnet::getsection($udom,$uname,
 					      $env{'request.course.id'});
             
 	    if ($csec eq '-1') {
-		$message="<font color=red>".
+		$message='<span class="LC_error">'.
 		    &mt("User")." '$uname' ".&mt("at domain")." '$udom' ".
-		    &mt("not in this course")."</font>";
+		    &mt("not in this course")."</span>";
 		$uname='';
 		$csec=$env{'form.csec'};
                 $cgroup=$env{'form.cgroup'};
@@ -2095,9 +2094,9 @@
 	    ('url'            => '<b>'.&mt('Top Level Map').'</b> '.
                                  '<a href="javascript:openbrowser'.
                                  "('envform','url','sequence')\">".
-                                 &mt('Select Map').'</a><br /><font color=red> '.
+                                 &mt('Select Map').'</a><br /><span class="LC_warning"> '.
                                  &mt('Modification may make assessment data inaccessible').
-                                 '</font>',
+                                 '</span>',
              'description'    => '<b>'.&mt('Course Description').'</b>',
              'courseid'       => '<b>'.&mt('Course ID or number').
                                  '</b><br />'.
@@ -2168,8 +2167,8 @@
                     '('.&mt('or set value to "[_1]" to allow all roles',"<tt>yes</tt>").')',
 	     'rndseed'
 	         => '<b>'.&mt('Randomization algorithm used').'</b> <br />'.
-                    '<font color="red">'.&mt('Modifying this will make problems').' '.
-                    &mt('have different numbers and answers').'</font>',
+                    '<span class="LC_error">'.&mt('Modifying this will make problems').' '.
+                    &mt('have different numbers and answers').'</span>',
 	     'receiptalg'
 	         => '<b>'.&mt('Receipt algorithm used').'</b> <br />'.
                     &mt('This controls how receipt numbers are generated.'),
@@ -2395,8 +2394,8 @@
 			    $r->print('<br />'.&mt('Stored modified parameter for').' '.
 				      &Apache::loncommon::plainname($tuname,$tudom));
 			} else {
-			    $r->print('<h2><font color="red">'.
-				      &mt('Error storing parameters').'</font></h2>');
+			    $r->print('<div class="LC_error">'.
+				      &mt('Error storing parameters').'</div>');
 			}
 			&Apache::lonnet::devalidateuserresdata($tuname,$tudom);
 		    } else {
@@ -2410,8 +2409,8 @@
 			    &log_parmset({$tkey=>''},1,$tuname,$tudom);
 			$r->print('<br />'.&mt('Deleted parameter for').' '.&Apache::loncommon::plainname($tuname,$tudom));
 		    } else {
-			$r->print('<h2><font color="red">'.
-				  &mt('Error deleting parameters').'</font></h2>');
+			$r->print('<div class="LC_error">'.
+				  &mt('Error deleting parameters').'</div>');
 		    }
 		    &Apache::lonnet::devalidateuserresdata($tuname,$tudom);
 		} else {
@@ -2428,8 +2427,8 @@
 			    &log_parmset({$tkey=>$data,$tkey.'.type' => $typeof},0,$tuname,$tudom);
 			    $r->print('<br />'.&mt('Stored modified date for').' '.&Apache::loncommon::plainname($tuname,$tudom));
 			} else {
-			    $r->print('<h2><font color="red">'.
-				      &mt('Error storing parameters').'</font></h2>');
+			    $r->print('<div class="LC_error">'.
+				      &mt('Error storing parameters').'</div>');
 			}
 			&Apache::lonnet::devalidateuserresdata($tuname,$tudom);
 		    } else {
@@ -2450,8 +2449,8 @@
 	    &log_parmset(\%loghash,1);
 	    $r->print('<h2>'.&mt('Deleted [_1] parameter(s)</h2>',$delentries));
 	} else {
-	    $r->print('<h2><font color="red">'.
-		      &mt('Error deleting parameters').'</font></h2>');
+	    $r->print('<div class="LC_error">'.
+		      &mt('Error deleting parameters').'</div>');
 	}
 	&Apache::lonnet::devalidatecourseresdata($crs,$dom);
     }
@@ -2460,8 +2459,8 @@
 			    &log_parmset(\%newdata,0);
 	    $r->print('<h3>'.&mt('Stored [_1] parameter(s)',$putentries/2).'</h3>');
 	} else {
-	    $r->print('<h2><font color="red">'.
-		      &mt('Error storing parameters').'</font></h2>');
+	    $r->print('<div class="LC_error">'.
+		      &mt('Error storing parameters').'</div>');
 	}
 	&Apache::lonnet::devalidatecourseresdata($crs,$dom);
     }
@@ -3450,7 +3449,7 @@
 			$r->print($value);
 		    }
 		    if ($value ne $all[$level]) {
-			$r->print('<br /><font color="red">'.&mt('Not active anymore').'</font>');
+			$r->print('<br /><span class="LC_error">'.&mt('Not active anymore').'</span>');
 		    } else {
 			$stillactive=1;
 		    }