Annotation of loncom/html/adm/helper/test.helper, revision 1.1

1.1     ! bowersj2    1: <helper title="Test Helper">
        !             2:   <state name="START" title="Tom">
        !             3:     <message>
        !             4:       <message_text><p>Hey, bob, <b>this is great</b>!</p></message_text>
        !             5:       <nextstate>Harry</nextstate>
        !             6:       </message>
        !             7:     <message>
        !             8:       <message_text><p>This is <b>another message</b>!</p></message_text>
        !             9:       </message>
        !            10:     </state>
        !            11:   <state name="Harry" title="Harry"> 
        !            12:     <message>
        !            13:       <message_text>This is Hairy Beatle, may I help you?</message_text>
        !            14:       </message>
        !            15:     <choices variable="harry">
        !            16:       <choice computer='1' nextstate="Good">Yes</choice>
        !            17:       <choice computer='0' nextstate="Bad">No</choice>
        !            18:       </choices>
        !            19:     </state>
        !            20:   <state name="Good" title="Great!">
        !            21:     <message>
        !            22:       <message_text>I'm happy to hear I can help you. - Hairy Beetle</message_text>
        !            23:       <nextstate>Sally</nextstate>
        !            24:       </message>
        !            25:     </state>
        !            26:   <state name="Bad" title="Horrible!">
        !            27:     <message>
        !            28:       <message_text>I'm horrified to hear I can't help you. - Hairy Beetle</message_text>
        !            29:       <nextstate>Sally</nextstate>
        !            30:       </message>
        !            31:     </state>
        !            32:   <state name="Sally" title="Sally">
        !            33:     <message>
        !            34:       <message_text>Please select the kind of games you are interested in.<br /></message_text>
        !            35:       </message>
        !            36:     <choices variable="gametype" multichoice='1'>
        !            37:       <nextstate>DATE</nextstate>
        !            38:       <choice computer="rts"
        !            39:         ><b>R</b>eal <b>T</b>ime <b>S</b>trategy</choice>
        !            40:       <choice computer="puzzle"
        !            41:         >P<i>u</i>z<i>z</i>l<i>e</i></choice>
        !            42:       <condition><clause>return 0;</clause>
        !            43:         <choice computer='shouldnotsee'>You should not see this.</choice>
        !            44:       </condition>
        !            45:       <condition><clause>return 1;</clause>
        !            46:         <choice computer='shouldsee'>You should see this.</choice>
        !            47:       </condition>
        !            48:     <exec>
        !            49:       push @{$state->{CHOICES}}, ['The Human Name!', 'compname'];
        !            50:     </exec>
        !            51:       </choices>
        !            52:     </state>
        !            53:   <state name="DATE" title="Choose a Date!">
        !            54:     <message>
        !            55:       <message_text>This is a test of the date state, with minutes:</message_text>
        !            56:       </message>
        !            57:     <date variable="date" hoursminutes='1'></date>
        !            58:     <message>
        !            59:       <message_text>and without:</message_text>
        !            60:       </message>
        !            61:     <date variable="date2">
        !            62:       <nextstate>RESOURCE</nextstate>
        !            63:       </date>
        !            64:     </state>
        !            65:   <state name="RESOURCE" title="Choose a resource">
        !            66:     <message><message_text>Choose a resource</message_text></message>
        !            67:     <resource variable="res1"></resource>
        !            68:     <message><message_text>Choose a resource</message_text></message>
        !            69:     <resource variable="res2">
        !            70:       <filterfunc>return $res->is_map()</filterfunc>
        !            71:       <nextstate>STUDENT</nextstate>
        !            72:       </resource>    
        !            73:     </state>
        !            74:   <state name="STUDENT" title="Choose a Student">
        !            75:     <message><message_text>Choose a student:<br /></message_text>
        !            76:              <nextstate>FILES</nextstate></message>
        !            77:     <student variable='stu1' />
        !            78:     <student variable='stu2' multichoice='1' />
        !            79:     </state>
        !            80:   <state name="FILES" title="Choose some files">
        !            81:     <message><message_text>Choose some files. Or else.</message_text></message>
        !            82:     <files variable='files1'>
        !            83:       <nextstate>FINAL</nextstate>
        !            84:       <filechoice>return '/home/jerf/public_html';</filechoice>
        !            85:       </files>
        !            86:     <message><message_text>Choose some other files. Or else.</message_text></message>
        !            87:     <files variable='files2' multichoice="1">
        !            88:       <filechoice>return '/home/jerf/public_html';</filechoice>
        !            89:       <filefilter>return $filename =~ /(.html$)|(.htm$)/;</filefilter>
        !            90:       </files>
        !            91:     </state>
        !            92:   <state name="FINAL" title="Final State">
        !            93:     <message><message_text>This is the final state.</message_text></message>
        !            94:     </state>
        !            95:   </helper>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>