[LON-CAPA-cvs] cvs: loncom /html/adm/helper parameter.helper
bowersj2
lon-capa-cvs@mail.lon-capa.org
Mon, 29 Sep 2003 16:33:41 -0000
bowersj2 Mon Sep 29 12:33:41 2003 EDT
Modified files:
/loncom/html/adm/helper parameter.helper
Log:
Add changing weights to the parameter helper, couple of typo corrections
Index: loncom/html/adm/helper/parameter.helper
diff -u loncom/html/adm/helper/parameter.helper:1.5 loncom/html/adm/helper/parameter.helper:1.6
--- loncom/html/adm/helper/parameter.helper:1.5 Wed Jul 23 15:26:01 2003
+++ loncom/html/adm/helper/parameter.helper Mon Sep 29 12:33:41 2003
@@ -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 @@
<choice computer="due_date" nextstate="CHOOSE_DATE">Set a <b>due date</b></choice>
<choice computer="answer_date" nextstate="CHOOSE_DATE">Set an <b>answer open date</b></choice>
<choice computer="tries" nextstate="CHOOSE_TRIES">Set the <b>number of tries</b></choice>
+ <choice computer="weight" nextstate="CHOOSE_WEIGHT">Set the <b>problem weight</b></choice>
</choices>
</state>
- <state name="CHOOSE_TRIES" title="Set Number of Tries">
+ <state name="CHOOSE_WEIGHT" title="Set Problem Weight">
+ <eval>return 'What weight should be set for ' .
+ &{$helper->{DATA}->{'levelType'}}()
+ . '?<br />';
+ </eval>
+ <string nextstate="CHOOSE_STUDENT_LEVEL" variable="WEIGHT">
+ <validator>if ($val !~ /^[1234567890]+(\.[1234567890]+)?$/) {
+ return '"' . $element->getValue() . '" is not '.
+ 'an acceptable weight. Weight must be a positive number. ';}
+ return undef;
+ </validator>
+ </string>
+ </state>
+
+ <state name="CHOOSE_TRIES" title="Set Problem Tries">
<eval>return 'How many tries should be set for ' .
&{$helper->{DATA}->{'levelType'}}()
. '?<br />';
@@ -101,7 +117,7 @@
<string nextstate="CHOOSE_STUDENT_LEVEL" variable="TRIES">
<validator>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;
</validator>