Diff for /loncom/html/adm/helper/parameter.helper between versions 1.4 and 1.16

version 1.4, 2003/06/17 14:21:55 version 1.16, 2006/05/16 21:41:18
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 25 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 helper will assist you in <b>setting the open,  
    due, and answer dates</b> for problems, or in          <p>This helper will assist you in <b>setting the open, due,
            <b>setting the number of tries</b> for problems.</p>     and answer dates</b> for problems, <b>setting the problem
      weights</b>, or in <b>setting the number of tries</b> for
      problems.</p>
   
         <p>You will be asked to <b>select which problems</b> you wish to          <p>You will be asked to <b>select which problems</b> you wish to
            set the parameters for, then <b>what parameter</b> you              set the parameters for, then <b>what parameter</b> you 
Line 48 Line 51
     <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 72 Line 75
   <state name="CHOOSE_RESOURCE" title="Select Problem">    <state name="CHOOSE_RESOURCE" title="Select Problem">
     <message>Select the problem you wish to set the parameter 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" addparts="true">
       <nextstate>CHOOSE_ACTION</nextstate>        <nextstate>CHOOSE_ACTION</nextstate>
       <filterfunc>return $res->is_map || $res->is_problem()</filterfunc>        <filterfunc>return $res->is_map || $res->is_problem()</filterfunc>
       <choicefunc>return $res->is_problem()</choicefunc>        <choicefunc>return $res->is_problem()</choicefunc>
Line 90 Line 93
       <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 &mt('&quot; [_1] &quot; is not an acceptable weight. Weight must be a positive number.',$element->getValue());
                    } 
                    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 '&quot;' . $element->getValue() . '&quot; is not '.                     return &mt('&quot; [_1] &quot; is not an acceptable number of tries. Tries must be a positive number with no decimal point.',$element->getValue());} 
                      '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 139
     <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">
          . . . for <b>all students</b> in the course</choice>           . . . for <b>all students</b> in the course</choice>
       <choice computer="section" nextstate="CHOOSE_SECTION">        <choice computer="section" nextstate="CHOOSE_SECTION">
          . . . for a particular <b>section</b></choice>           . . . for a particular <b>section</b></choice>
         <condition>
           <clause>return 1 if (&Apache::loncommon::coursegroups())</clause>
           <choice computer="group" nextstate="CHOOSE_GROUP">
              . . . for a particular <b>group</b></choice>
         </condition>
       <choice computer="student" nextstate="CHOOSE_STUDENT">        <choice computer="student" nextstate="CHOOSE_STUDENT">
          . . . for an individual <b>student</b></choice>           . . . for an individual <b>student</b></choice>
       </choices>        </choices>
Line 145 Line 166
     <section variable="SECTION_NAME" nextstate="FINISH" />      <section variable="SECTION_NAME" nextstate="FINISH" />
     </state>      </state>
   
     <state name="CHOOSE_GROUP" title="Select Group">
       <eval>
         return 'Please select the group you wish to set the ' .
          &{$helper->{DATA}->{'dateType'}}() .
            ' for:<br />';</eval>
       <group variable="GROUP_NAME" nextstate="FINISH" />
       </state>
   
   
   <state name="CHOOSE_STUDENT" title="Select Student">    <state name="CHOOSE_STUDENT" title="Select Student">
     <eval>      <eval>
       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.4  
changed lines
  Added in v.1.16


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