--- loncom/html/adm/helper/parameter.helper 2003/07/23 19:26:01 1.5
+++ loncom/html/adm/helper/parameter.helper 2003/09/29 16:33:41 1.6
@@ -5,7 +5,8 @@
my %dateTypeHash = ('open_date' => "opening date",
'due_date' => "due date",
'answer_date' => "answer open date",
- 'tries' => 'number of tries'
+ 'tries' => 'number of tries',
+ 'weight' => 'problem weight'
);
my %levelTypeHash = ('whole_course' => "all problems in the course",
'map' => 'the selected folder',
@@ -90,10 +91,25 @@
Set a due date
Set an answer open date
Set the number of tries
+ Set the problem weight
-
+
+ return 'What weight should be set for ' .
+ &{$helper->{DATA}->{'levelType'}}()
+ . '?
';
+
+
+ if ($val !~ /^[1234567890]+(\.[1234567890]+)?$/) {
+ return '"' . $element->getValue() . '" is not '.
+ 'an acceptable weight. Weight must be a positive number. ';}
+ return undef;
+
+
+
+
+
return 'How many tries should be set for ' .
&{$helper->{DATA}->{'levelType'}}()
. '?
';
@@ -101,7 +117,7 @@
if ($val !~ /^[1234567890]+$/) {
return '"' . $element->getValue() . '" is not '.
- 'an acceptable number of tries. Tries must be a postive number ' .
+ 'an acceptable number of tries. Tries must be a positive number ' .
'with no decimal point.';}
return undef;