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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 24 Apr 2006 23:20:37 -0000


albertel		Mon Apr 24 19:20:37 2006 EDT

  Modified files:              
    /loncom/interface	lonhelper.pm 
  Log:
  - slight improvment to data defaulting
  - any time is two words
  - it's evaluating the validation code
  
  
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.137 loncom/interface/lonhelper.pm:1.138
--- loncom/interface/lonhelper.pm:1.137	Mon Apr 24 19:05:35 2006
+++ loncom/interface/lonhelper.pm	Mon Apr 24 19:20:37 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.137 2006/04/24 23:05:35 albertel Exp $
+# $Id: lonhelper.pm,v 1.138 2006/04/24 23:20:37 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1602,7 +1602,7 @@
 	}
     }
 
-    if (!defined($date) && !$anytime) {
+    if (!defined($date)) {
 	$date = localtime(time);
 	$date->min(0);
     }
@@ -1716,7 +1716,7 @@
 	if ($anytime) {
 	    $result.=' checked="checked" '
 	}
-	$result.="name='${var}anytime'/>".&mt('Anytime').'</label>'
+	$result.="name='${var}anytime'/>".&mt('Any time').'</label>'
     }
     return $result;
 
@@ -1765,7 +1765,7 @@
 
     if (defined($self->{VALIDATOR})) {
 	my $validator = eval($self->{VALIDATOR});
-	die 'Died during evaluation of evaulation code; Perl said: ' . $@ if $@;
+	die 'Died during evaluation of validator code; Perl said: ' . $@ if $@;
 	my $invalid = &$validator($helper, $state, $self, $self->getValue());
 	if ($invalid) {
 	    $self->{ERROR_MSG} = $invalid;
@@ -3274,7 +3274,7 @@
 
     if (defined($self->{VALIDATOR})) {
 	my $validator = eval($self->{VALIDATOR});
-	die 'Died during evaluation of evaulation code; Perl said: ' . $@ if $@;
+	die 'Died during evaluation of validator code; Perl said: ' . $@ if $@;
 	my $invalid = &$validator($helper, $state, $self, $self->getValue());
 	if ($invalid) {
 	    $self->{ERROR_MSG} = $invalid;