Annotation of loncom/html/adm/helper/newslot.helper, revision 1.2

1.1       albertel    1: <helper title="Slot Creation" requiredpriv="mgq">
                      2:   <state name="START" title="Specify Required Attributes">
                      3:     <message nextstate="OPTIONAL">
                      4:       <message_text>
                      5:           Name: <br />&nbsp;&nbsp;&nbsp;
                      6:       </message_text>
                      7:     </message>
                      8:     <string variable="slotname" size="30">
                      9:       <validator>
                     10:           if ($val=~/^\s*$/) { return 'Must specify a name'; }
                     11:           if ($val=~/\s$/) { return 'Must not contain spaces'; }
                     12:           return undef;
                     13:       </validator>
                     14:     </string>
                     15:     <message>
                     16:       <message_text><br />Start time:<br />&nbsp;&nbsp;&nbsp;</message_text>
                     17:     </message>
                     18:     <date variable="starttime" hoursminutes="1"></date>
                     19:     <message>
                     20:       <message_text><br />End time:<br />&nbsp;&nbsp;&nbsp;</message_text>
                     21:     </message>
                     22:     <date variable="endtime" hoursminutes="1"></date>
                     23:     <message>
                     24:       <message_text><br />Type:</message_text>
                     25:     </message>
                     26:     <choices variable="type">
                     27:       <choice computer='preassigned'>Instructor asssignable.</choice>
                     28:       <choice computer='student_schedulable'>Student selectable.</choice>
                     29:       <defaultvalue>
                     30:          return 'preassigned';
                     31:       </defaultvalue>
                     32:     </choices>
                     33:   </state>
                     34: 
                     35:   <state name="OPTIONAL" title="Specify Optional Attributes">
                     36:     <message>
                     37:       <message_text>
1.2     ! albertel   38:           <p>Description:<br />&nbsp;&nbsp;&nbsp;
1.1       albertel   39:       </message_text>
                     40:     </message>
1.2     ! albertel   41:     <string variable="description" size="60"></string>
1.1       albertel   42:     <message>
                     43:       <message_text>
1.2     ! albertel   44:           </p><p>Time students can start reserving:<br />&nbsp;&nbsp;&nbsp;
1.1       albertel   45:       </message_text>
                     46:     </message>
1.2     ! albertel   47:     <date variable="startreserve" hoursminutes="1" anytime="1">
        !            48: 	<defaultvalue>'anytime'</defaultvalue>
        !            49:     </date>
1.1       albertel   50:     <message>
                     51:       <message_text>
                     52:           </p><p>Maxium number of students allowed in this slot:<br />&nbsp;&nbsp;&nbsp;
                     53:       </message_text>
                     54:     </message>
                     55:     <string variable="maxspace" size="4">
                     56:       <validator>
                     57:           if ($val ne '' && $val=~/\D/) { return 'Must be numeric.'; }
                     58:           return undef;
                     59:       </validator>
                     60:     </string>
                     61:     <message>
                     62:       <message_text>
                     63:           </p><p>Period of time in which this slot is can only be uniquely chosen:<br />&nbsp;&nbsp;&nbsp;Start:
                     64:       </message_text>
                     65:     </message>
1.2     ! albertel   66:     <date variable="startunique" hoursminutes="1" anytime="1">
        !            67: 	<defaultvalue>'anytime'</defaultvalue>
        !            68:     </date>
1.1       albertel   69:     <message><message_text><br />&nbsp;&nbsp;&nbsp;End: </message_text></message>
1.2     ! albertel   70:     <date variable="endunique" hoursminutes="1" anytime="1">
        !            71: 	<defaultvalue>'anytime'</defaultvalue>
        !            72:     </date>
1.1       albertel   73:     <message>
                     74:       <message_text>
                     75:           </p><p>Slot is:
                     76:       </message_text>
                     77:     </message>
                     78:     <choices variable="restricttosymb">
                     79:       <choice nextstate="FINISH" computer='any'>usable for any resource.</choice>
                     80:       <choice nextstate="RESOURCESELECT" computer='resource'>restricted to a specific resource.</choice>
                     81:       <defaultvalue>'any'</defaultvalue>
                     82:     </choices>
1.2     ! albertel   83:     <message>
        !            84:       <message_text> 
        !            85: 	</p><p>IP restrictions:<br />&nbsp;&nbsp;&nbsp;
        !            86:       </message_text>
        !            87:     </message>
        !            88:     <string variable="ip" size="30">
        !            89:       <validator>
        !            90:           return undef;
        !            91:       </validator>
        !            92:     </string>
1.1       albertel   93:     <message> <message_text> </p> </message_text> </message>
                     94:   </state>
                     95:   <state name="RESOURCESELECT" title="Specify Optional Attributes">
                     96:     <resource variable="symb">
                     97:       <filterfunc>return $res->is_problem()</filterfunc>
                     98:       <valuefunc>return $res->symb()</valuefunc>
                     99:       <nextstate>FINISH</nextstate>
                    100:     </resource>    
                    101:   </state>
                    102:   <state name="FINISH" title="Specify Optional Attributes">
                    103: 	    <message> <message_text> fin </message_text> </message>	
                    104:   </state>
                    105: </helper>

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