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

version 1.16, 2006/05/16 21:41:18 version 1.23, 2016/03/05 21:49:52
Line 1 Line 1
 <helper title="Course Parameter Helper" requiredpriv='opa'>  <helper title="Course Parameter Helper" requiredpriv='opa&S'>
   
   <exec>    <exec>
     # 'dateTypeHash' should really be renamed now that we have tries...      # 'dateTypeHash' should really be renamed now that we have tries...
Line 53 Line 53
       <choice computer="whole_course" nextstate="CHOOSE_ACTION">        <choice computer="whole_course" nextstate="CHOOSE_ACTION">
         Course default for all problems          Course default for all problems
         </choice>          </choice>
        <condition>
           <clause>return 1 if (&Apache::lonnet::get_server_loncaparev($env{'course.'.$env{'request.course.id'}.'.home'}) >= 2.12)</clause>
           <choice computer="maprecurse" nextstate="CHOOSE_FOLDER">
           Every problem in a particular folder and (recursively) for sub-folders 
           (overrides course default)
           </choice>
         <condition>
       <choice computer="map" nextstate="CHOOSE_FOLDER">        <choice computer="map" nextstate="CHOOSE_FOLDER">
         Every problem in a particular folder (overrides course default)          Every problem in a particular folder (overrides course default)
         </choice>          </choice>
Line 83 Line 90
     </state>      </state>
   
   <state name="CHOOSE_ACTION" title="Parameter Type">    <state name="CHOOSE_ACTION" title="Parameter Type">
     <eval>return 'What parameter do you want to set for ' .       <eval>return &mt('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>
Line 98 Line 105
     </state>      </state>
   
   <state name="CHOOSE_WEIGHT" title="Set Problem Weight">    <state name="CHOOSE_WEIGHT" title="Set Problem Weight">
     <eval>return 'What weight should be set for ' .       <eval>return &mt('What weight should be set for ' . 
       &{$helper->{DATA}->{'levelType'}}()        &{$helper->{DATA}->{'levelType'}}()
       . '?<br />';        . '?').'<br />';
       </eval>        </eval>
     <string nextstate="CHOOSE_STUDENT_LEVEL" variable="WEIGHT">      <string nextstate="CHOOSE_STUDENT_LEVEL" variable="WEIGHT">
       <validator>if ($val !~ /^[1234567890]+(\.[1234567890]+)?$/) {         <validator>if ($val !~ /^[1234567890]+(\.[1234567890]+)?$/) { 
                    return &mt('&quot; [_1] &quot; is not an acceptable weight. Weight must be a positive number.',$element->getValue());                     return &mt('[_1] is not an acceptable weight. Weight must be a positive number.','&quot;'.$element->getValue().'&quot;');
                  }                    } 
                  return undef;                   return undef;
         </validator>          </validator>
Line 112 Line 119
     </state>      </state>
   
   <state name="CHOOSE_TRIES" title="Set Problem Tries">    <state name="CHOOSE_TRIES" title="Set Problem Tries">
     <eval>return 'How many tries should be set for ' .       <eval>return &mt('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 &mt('&quot; [_1] &quot; is not an acceptable number of tries. Tries must be a positive number with no decimal point.',$element->getValue());}                      return &mt('[_1] is not an acceptable number of tries. Tries must be a positive number with no decimal point.','&quot;'.$element->getValue().'&quot;');} 
                  return undef;                   return undef;
         </validator>          </validator>
       </string>        </string>
Line 126 Line 133
   
   <state name="CHOOSE_DATE" title="Set Date">    <state name="CHOOSE_DATE" title="Set Date">
     <eval>      <eval>
       return 'What should the ' .        return &mt('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'>
       <nextstate>CHOOSE_STUDENT_LEVEL</nextstate>        <nextstate>CHOOSE_STUDENT_LEVEL</nextstate>
Line 137 Line 144
   
   <state name="CHOOSE_STUDENT_LEVEL" title="Students Affected">    <state name="CHOOSE_STUDENT_LEVEL" title="Students Affected">
     <eval>      <eval>
       return 'Set ' .         return &mt('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">        <condition>
          . . . for <b>all students</b> in the course</choice>          <clause>return 1 if ($env{'request.course.sec'} eq '')</clause>
           <choice computer="course" nextstate="FINISH">
              . . . for <b>all students</b> in the course</choice>
         </condition>
       <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>        <condition>
         <clause>return 1 if (&Apache::loncommon::coursegroups())</clause>          <clause>return 1 if (($env{'request.course.groups'} ne '') || (&Apache::lonnet::allowed('mdg',$env{'request.course.id'}) && (&Apache::longroup::coursegroups())))</clause>
         <choice computer="group" nextstate="CHOOSE_GROUP">          <choice computer="group" nextstate="CHOOSE_GROUP">
            . . . for a particular <b>group</b></choice>             . . . for a particular <b>group</b></choice>
       </condition>        </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> or <b>user</b></choice>
       </choices>        </choices>
     </state>      </state>
   
   <state name="CHOOSE_SECTION" title="Select Section">    <state name="CHOOSE_SECTION" title="Select Section">
     <eval>      <eval>
       return 'Please select the section you wish to set the ' .        return &mt('Please select the section you wish to set the ' .
        &{$helper->{DATA}->{'dateType'}}() .         &{$helper->{DATA}->{'dateType'}}() .
          ' for:<br />';</eval>           ' for:').'<br />';</eval>
     <section variable="SECTION_NAME" nextstate="FINISH" />      <section variable="SECTION_NAME" nextstate="FINISH" onlysections="1" />
     </state>      </state>
   
   <state name="CHOOSE_GROUP" title="Select Group">    <state name="CHOOSE_GROUP" title="Select Group">
     <eval>      <eval>
       return 'Please select the group you wish to set the ' .        return &mt('Please select the group you wish to set the ' .
        &{$helper->{DATA}->{'dateType'}}() .         &{$helper->{DATA}->{'dateType'}}() .
          ' for:<br />';</eval>           ' for:').'<br />';</eval>
     <group variable="GROUP_NAME" nextstate="FINISH" />      <group variable="GROUP_NAME" nextstate="FINISH" grouponly="1" />
     </state>      </state>
   
   
   <state name="CHOOSE_STUDENT" title="Select Student">    <state name="CHOOSE_STUDENT" title="Select User">
     <eval>      <eval>
       return 'Please select the student you wish to set the ' .        return &mt('Please select the person you wish to set the ' .
        &{$helper->{DATA}->{'dateType'}}() .         &{$helper->{DATA}->{'dateType'}}() .
          ' for:<br />';</eval>           ' for:').'<br />';</eval>
     <student variable="USER_NAME" nextstate="FINISH" coursepersonnel='1'/>      <student variable="USER_NAME" nextstate="FINISH" coursepersonnel="1" sectiononly="1" />
     </state>      </state>
   
   <state name="FINISH" title="Verify Selection">    <state name="FINISH" title="Verify Selection">

Removed from v.1.16  
changed lines
  Added in v.1.23


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