File:
[LON-CAPA] /
loncom /
html /
adm /
helper /
test.helper
Revision
1.1:
download - view:
text,
annotated -
select for diffs
Fri Apr 11 18:21:00 2003 UTC (21 years, 7 months ago) by
bowersj2
Branches:
MAIN
CVS tags:
version_2_9_X,
version_2_9_99_0,
version_2_9_1,
version_2_9_0,
version_2_8_X,
version_2_8_99_1,
version_2_8_99_0,
version_2_8_2,
version_2_8_1,
version_2_8_0,
version_2_7_X,
version_2_7_99_1,
version_2_7_99_0,
version_2_7_1,
version_2_7_0,
version_2_6_X,
version_2_6_99_1,
version_2_6_99_0,
version_2_6_3,
version_2_6_2,
version_2_6_1,
version_2_6_0,
version_2_5_X,
version_2_5_99_1,
version_2_5_99_0,
version_2_5_2,
version_2_5_1,
version_2_5_0,
version_2_4_X,
version_2_4_99_0,
version_2_4_2,
version_2_4_1,
version_2_4_0,
version_2_3_X,
version_2_3_99_0,
version_2_3_2,
version_2_3_1,
version_2_3_0,
version_2_2_X,
version_2_2_99_1,
version_2_2_99_0,
version_2_2_2,
version_2_2_1,
version_2_2_0,
version_2_1_X,
version_2_1_99_3,
version_2_1_99_2,
version_2_1_99_1,
version_2_1_99_0,
version_2_1_3,
version_2_1_2,
version_2_1_1,
version_2_1_0,
version_2_12_X,
version_2_11_X,
version_2_11_5_msu,
version_2_11_5,
version_2_11_4_uiuc,
version_2_11_4_msu,
version_2_11_4,
version_2_11_3_uiuc,
version_2_11_3_msu,
version_2_11_3,
version_2_11_2_uiuc,
version_2_11_2_msu,
version_2_11_2_educog,
version_2_11_2,
version_2_11_1,
version_2_11_0_RC3,
version_2_11_0_RC2,
version_2_11_0_RC1,
version_2_11_0,
version_2_10_X,
version_2_10_1,
version_2_10_0_RC2,
version_2_10_0_RC1,
version_2_10_0,
version_2_0_X,
version_2_0_99_1,
version_2_0_2,
version_2_0_1,
version_2_0_0,
version_1_99_3,
version_1_99_2,
version_1_99_1_tmcc,
version_1_99_1,
version_1_99_0_tmcc,
version_1_99_0,
version_1_3_X,
version_1_3_3,
version_1_3_2,
version_1_3_1,
version_1_3_0,
version_1_2_X,
version_1_2_99_1,
version_1_2_99_0,
version_1_2_1,
version_1_2_0,
version_1_1_X,
version_1_1_99_5,
version_1_1_99_4,
version_1_1_99_3,
version_1_1_99_2,
version_1_1_99_1,
version_1_1_99_0,
version_1_1_3,
version_1_1_2,
version_1_1_1,
version_1_1_0,
version_1_0_99_3,
version_1_0_99_2,
version_1_0_99_1,
version_1_0_99,
version_1_0_3,
version_1_0_2,
version_1_0_1,
version_1_0_0,
version_0_99_5,
version_0_99_4,
version_0_99_3,
version_0_99_2,
version_0_99_1,
version_0_99_0,
loncapaMITrelate_1,
language_hyphenation_merge,
language_hyphenation,
conference_2003,
bz6209-base,
bz6209,
bz5969,
bz2851,
PRINT_INCOMPLETE_base,
PRINT_INCOMPLETE,
HEAD,
GCI_3,
GCI_2,
GCI_1,
BZ5971-printing-apage,
BZ5434-fox,
BZ4492-merge,
BZ4492-feature_horizontal_radioresponse
test.helper exercises the major features of the helper system. It is
meant for testing and will not be included in a normal install.
<helper title="Test Helper">
<state name="START" title="Tom">
<message>
<message_text><p>Hey, bob, <b>this is great</b>!</p></message_text>
<nextstate>Harry</nextstate>
</message>
<message>
<message_text><p>This is <b>another message</b>!</p></message_text>
</message>
</state>
<state name="Harry" title="Harry">
<message>
<message_text>This is Hairy Beatle, may I help you?</message_text>
</message>
<choices variable="harry">
<choice computer='1' nextstate="Good">Yes</choice>
<choice computer='0' nextstate="Bad">No</choice>
</choices>
</state>
<state name="Good" title="Great!">
<message>
<message_text>I'm happy to hear I can help you. - Hairy Beetle</message_text>
<nextstate>Sally</nextstate>
</message>
</state>
<state name="Bad" title="Horrible!">
<message>
<message_text>I'm horrified to hear I can't help you. - Hairy Beetle</message_text>
<nextstate>Sally</nextstate>
</message>
</state>
<state name="Sally" title="Sally">
<message>
<message_text>Please select the kind of games you are interested in.<br /></message_text>
</message>
<choices variable="gametype" multichoice='1'>
<nextstate>DATE</nextstate>
<choice computer="rts"
><b>R</b>eal <b>T</b>ime <b>S</b>trategy</choice>
<choice computer="puzzle"
>P<i>u</i>z<i>z</i>l<i>e</i></choice>
<condition><clause>return 0;</clause>
<choice computer='shouldnotsee'>You should not see this.</choice>
</condition>
<condition><clause>return 1;</clause>
<choice computer='shouldsee'>You should see this.</choice>
</condition>
<exec>
push @{$state->{CHOICES}}, ['The Human Name!', 'compname'];
</exec>
</choices>
</state>
<state name="DATE" title="Choose a Date!">
<message>
<message_text>This is a test of the date state, with minutes:</message_text>
</message>
<date variable="date" hoursminutes='1'></date>
<message>
<message_text>and without:</message_text>
</message>
<date variable="date2">
<nextstate>RESOURCE</nextstate>
</date>
</state>
<state name="RESOURCE" title="Choose a resource">
<message><message_text>Choose a resource</message_text></message>
<resource variable="res1"></resource>
<message><message_text>Choose a resource</message_text></message>
<resource variable="res2">
<filterfunc>return $res->is_map()</filterfunc>
<nextstate>STUDENT</nextstate>
</resource>
</state>
<state name="STUDENT" title="Choose a Student">
<message><message_text>Choose a student:<br /></message_text>
<nextstate>FILES</nextstate></message>
<student variable='stu1' />
<student variable='stu2' multichoice='1' />
</state>
<state name="FILES" title="Choose some files">
<message><message_text>Choose some files. Or else.</message_text></message>
<files variable='files1'>
<nextstate>FINAL</nextstate>
<filechoice>return '/home/jerf/public_html';</filechoice>
</files>
<message><message_text>Choose some other files. Or else.</message_text></message>
<files variable='files2' multichoice="1">
<filechoice>return '/home/jerf/public_html';</filechoice>
<filefilter>return $filename =~ /(.html$)|(.htm$)/;</filefilter>
</files>
</state>
<state name="FINAL" title="Final State">
<message><message_text>This is the final state.</message_text></message>
</state>
</helper>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>