[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 27 Apr 2004 07:09:46 -0000


albertel		Tue Apr 27 03:09:46 2004 EDT

  Modified files:              
    /loncom/homework	inputtags.pm 
  Log:
  -  better message for when uints are 'wrong' but 'well-formed'
  - stick units into <tt> looks nicer.
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.138 loncom/homework/inputtags.pm:1.139
--- loncom/homework/inputtags.pm:1.138	Wed Mar 31 00:23:59 2004
+++ loncom/homework/inputtags.pm	Tue Apr 27 03:09:45 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.138 2004/03/31 05:23:59 albertel Exp $
+# $Id: inputtags.pm,v 1.139 2004/04/27 07:09:45 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -421,19 +421,17 @@
 	$bgcolor=$possiblecolors{'not_charged_try'};
 	$button=1;
     } elsif ($award eq 'UNIT_INVALID_STUDENT') {
-	$message = &mt('Unable to interpret units. Computer reads units as "[_1]"',
-		       $awardmsg);
+	$message = &mt('Unable to interpret units. Computer reads units as "[_1]"','<tt>'.$awardmsg.'</tt>');
 	if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units');} 
 	$bgcolor=$possiblecolors{'not_charged_try'};
 	$button=1;
-    } elsif ($award eq 'UNIT_FAIL' || $award eq 'UNIT_IRRECONCIBLE') {
-	$message = &mt('Units incorrect. Computer reads units as "[_1]"',
-		       $awardmsg);
+    } elsif ($awrad eq 'UNIT_FAIL' || $award eq 'UNIT_IRRECONCIBLE') {
+	$message = &mt('Incompatible units. No conversion found between "[_1]" and the required units.','<tt>'.$awardmsg.'</tt>');
 	if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Physical_Units');} 
 	$bgcolor=$possiblecolors{'not_charged_try'};
 	$button=1;
     } elsif ($award eq 'UNIT_NOTNEEDED') {
-	$message = &mt('Only a number required. Computer reads units of "[_1]"',$awardmsg);
+	$message = &mt('Only a number required. Computer reads units of "[_1]"','<tt>'.$awardmsg.'</tt>');
 	$bgcolor=$possiblecolors{'not_charged_try'};
 	$button=1;
     } elsif ($award eq 'NO_UNIT') {