Diff for /loncom/html/adm/helper/parameter.helper between versions 1.2 and 1.11

version 1.2, 2003/05/16 17:21:33 version 1.11, 2004/04/27 15:14:56
Line 1 Line 1
 <helper title="Course Parameter Helper" requiredpriv='opa'>  <helper title="Course Parameter Helper" requiredpriv='opa'>
   
   <exec>    <exec>
       # 'dateTypeHash' should really be renamed now that we have tries...
     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',
                           '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',
                          'resource' => 'the selected problem');                           'resource' => 'the selected problem');
Line 22 Line 26
   
   <state name="START" title="Welcome to the Assignment Parameter Helper">    <state name="START" title="Welcome to the Assignment Parameter Helper">
     <message nextstate="CHOOSE_LEVEL">      <message nextstate="CHOOSE_LEVEL">
         <p>This wizard will allow you to <b>set open, due, and           <p>This helper will assist you in <b>setting the open,
            answer dates for problems</b>. You will be asked to      due, and answer dates</b> for problems, or in
            select a problem, what kind of date you want to set,              <b>setting the number of tries</b> for problems.</p>
            and for whom the date should be effective.</p>  
           <p>You will be asked to <b>select which problems</b> you wish to
              set the parameters for, then <b>what parameter</b> you 
              wish to set, then you will select <b>whom the setting
              affects</b>.</p>
   
         <p>After the wizard is done, you will be shown where in          <p>After the helper is done, you will be shown where in
            the advanced interface you would have gone to change             the advanced interface you would have gone to set
            the parameter you have chosen, so in the future you             the parameter you have chosen, so in the future you
            can do it directly.</p>             can do it directly.</p>
   
Line 38 Line 46
     </state>      </state>
   
   <state name="CHOOSE_LEVEL" title="Which Problem or Problems?">    <state name="CHOOSE_LEVEL" title="Which Problem or Problems?">
     <message>Which problems do you wish to change a date 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 a particular <b>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">
         One particular <b>problem</b>          One particular problem (overrides folder and course defaults)
         </choice>          </choice>
       </choices>        </choices>
     </state>      </state>
   
   <state name="CHOOSE_FOLDER" title="Select Folder">    <state name="CHOOSE_FOLDER" title="Select Folder">
     <message>Select the folder you wish to set the date for:</message>      <message>Select the folder you wish to set the parameter for:</message>
   
     <resource variable="RESOURCE_ID">      <resource variable="RESOURCE_ID">
       <nextstate>CHOOSE_ACTION</nextstate>        <nextstate>CHOOSE_ACTION</nextstate>
       <filterfunc>return $res->is_map()</filterfunc>        <filterfunc>return $res->is_map()</filterfunc>
         <valuefunc>return $res->map_pc();</valuefunc>
       </resource>        </resource>
     </state>      </state>
   
   <state name="CHOOSE_RESOURCE" title="Select Problem">    <state name="CHOOSE_RESOURCE" title="Select Problem">
     <message>Select the problem you wish to change the date for:</message>      <message>Select the problem you wish to set the parameter for:</message>
   
     <resource variable="RESOURCE_ID" nextstate="CHOOSE_ACTION">      <resource variable="RESOURCE_ID" nextstate="CHOOSE_ACTION">
       <nextstate>CHOOSE_ACTION</nextstate>        <nextstate>CHOOSE_ACTION</nextstate>
Line 72 Line 81
     </state>      </state>
   
   <state name="CHOOSE_ACTION" title="Parameter Type">    <state name="CHOOSE_ACTION" title="Parameter Type">
     <eval>return 'What parameters do you want to set for ' .       <eval>return 'What parameter do you want to set for ' . 
       &{$helper->{DATA}->{'levelType'}}()        &{$helper->{DATA}->{'levelType'}}()
       . '?';        . '?';
       </eval>        </eval>
     <choices variable="ACTION_TYPE">      <choices variable="ACTION_TYPE">
       <nextstate>CHOOSE_DATE</nextstate>        <nextstate>CHOOSE_DATE</nextstate>
       <choice computer="open_date">Set an <b>open date</b></choice>        <choice computer="open_date" nextstate="CHOOSE_DATE">Set an <b>open date</b></choice>
       <choice computer="due_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">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="weight" nextstate="CHOOSE_WEIGHT">Set the <b>problem weight</b></choice>
       </choices>        </choices>
     </state>      </state>
   
     <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 '&quot;'.$element->getValue().'&quot; '.&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 ' . 
         &{$helper->{DATA}->{'levelType'}}()
         . '?<br />';
         </eval>
       <string nextstate="CHOOSE_STUDENT_LEVEL" variable="TRIES">
         <validator>if ($val !~ /^[1234567890]+$/) { 
                      return '&quot;' . $element->getValue() . '&quot; '.&mt('is not an acceptable number of tries. Tries must be a positive number with no decimal point.');} 
                    return undef;
           </validator>
         </string>
       </state>
   
   <state name="CHOOSE_DATE" title="Set Date">    <state name="CHOOSE_DATE" title="Set Date">
     <eval>      <eval>
       return 'What should the ' .        return 'What should the ' .
        &{$helper->{DATA}->{'dateType'}}() .         &{$helper->{DATA}->{'dateType'}}() . 
        ' be set to? <br /><br />';         ' be set to? <br /><br />';
       </eval>        </eval>
     <date variable="PARM_DATE" hoursminutes='1'>      <date variable="PARM_DATE" hoursminutes='1'>
Line 99 Line 137
     <eval>      <eval>
       return 'Set ' .         return 'Set ' . 
        &{$helper->{DATA}->{'dateType'}}() .         &{$helper->{DATA}->{'dateType'}}() .
         ' of ' .          ' 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">
Line 126 Line 164
       return 'Please select the student you wish to set the ' .        return 'Please select the student you wish to set the ' .
        &{$helper->{DATA}->{'dateType'}}() .         &{$helper->{DATA}->{'dateType'}}() .
          ' for:<br />';</eval>           ' for:<br />';</eval>
     <student variable="USER_NAME" nextstate="FINISH" />      <student variable="USER_NAME" nextstate="FINISH" coursepersonnel='1'/>
     </state>      </state>
   
   <state name="FINISH" title="Verify Selection">    <state name="FINISH" title="Verify Selection">

Removed from v.1.2  
changed lines
  Added in v.1.11


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