version 1.5, 2003/07/23 19:26:01
|
version 1.11, 2004/04/27 15:14:56
|
Line 5
|
Line 5
|
my %dateTypeHash = ('open_date' => "opening date", |
my %dateTypeHash = ('open_date' => "opening date", |
'due_date' => "due date", |
'due_date' => "due date", |
'answer_date' => "answer open 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", |
my %levelTypeHash = ('whole_course' => "all problems in the course", |
'map' => 'the selected folder', |
'map' => 'the selected folder', |
Line 48
|
Line 49
|
<message>Which problems do you wish to set a parameter for?</message> |
<message>Which problems do you wish to set a parameter for?</message> |
<choices variable="GRANULARITY"> |
<choices variable="GRANULARITY"> |
<choice computer="whole_course" nextstate="CHOOSE_ACTION"> |
<choice computer="whole_course" nextstate="CHOOSE_ACTION"> |
<b>Every problem</b> in the course |
Course default for all problems |
</choice> |
</choice> |
<choice computer="map" nextstate="CHOOSE_FOLDER"> |
<choice computer="map" nextstate="CHOOSE_FOLDER"> |
Every problem in <b>a particular folder</b> |
Every problem in a particular folder (overrides course default) |
</choice> |
</choice> |
<choice computer="resource" nextstate="CHOOSE_RESOURCE"> |
<choice computer="resource" nextstate="CHOOSE_RESOURCE"> |
<b>One particular problem</b> |
One particular problem (overrides folder and course defaults) |
</choice> |
</choice> |
</choices> |
</choices> |
</state> |
</state> |
Line 90
|
Line 91
|
<choice computer="due_date" nextstate="CHOOSE_DATE">Set a <b>due date</b></choice> |
<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="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="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> |
</choices> |
</state> |
</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().'" '.&mt('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 ' . |
<eval>return 'How many tries should be set for ' . |
&{$helper->{DATA}->{'levelType'}}() |
&{$helper->{DATA}->{'levelType'}}() |
. '?<br />'; |
. '?<br />'; |
</eval> |
</eval> |
<string nextstate="CHOOSE_STUDENT_LEVEL" variable="TRIES"> |
<string nextstate="CHOOSE_STUDENT_LEVEL" variable="TRIES"> |
<validator>if ($val !~ /^[1234567890]+$/) { |
<validator>if ($val !~ /^[1234567890]+$/) { |
return '"' . $element->getValue() . '" is not '. |
return '"' . $element->getValue() . '" '.&mt('is not an acceptable number of tries. Tries must be a positive number with no decimal point.');} |
'an acceptable number of tries. Tries must be a postive number ' . |
|
'with no decimal point.';} |
|
return undef; |
return undef; |
</validator> |
</validator> |
</string> |
</string> |
Line 123
|
Line 137
|
<eval> |
<eval> |
return 'Set ' . |
return 'Set ' . |
&{$helper->{DATA}->{'dateType'}}() . |
&{$helper->{DATA}->{'dateType'}}() . |
'for ' . |
' for ' . |
&{$helper->{DATA}->{'levelType'}}() . |
&{$helper->{DATA}->{'levelType'}}() . |
' for. . .'; |
' for ...'; |
</eval> |
</eval> |
<choices variable="TARGETS"> |
<choices variable="TARGETS"> |
<choice computer="course" nextstate="FINISH"> |
<choice computer="course" nextstate="FINISH"> |