Diff for /loncom/interface/lonprintout.pm between versions 1.381 and 1.382

version 1.381, 2005/08/12 21:33:41 version 1.382, 2005/08/15 21:51:49
Line 44  use Apache::lonlocal; Line 44  use Apache::lonlocal;
   
 my $resources_printed = '';  my $resources_printed = '';
   
   #   Determine if a code entered by the user in a helper is valid.
   #   valid depends on the code type and the type of code selected.
   #   The type of code selected can either be numeric or 
   #   Alphabetic.  If alphabetic, the code, in fact is a simple
   #   substitution cipher for the actual numeric code: 0->A, 1->B ...
   #   We'll be nice and be case insensitive for alpha codes.
   # Parameters:
   #    code_value    - the value of the code the user typed in.
   #    code_option   - The code type selected from the set in the scantron format
   #                    table.
   # Returns:
   #    undef         - The code is valid.
   #    other         - An error message indicating what's wrong.
   #
   sub is_code_valid {
       my ($code_value, $code_option) = @_;
   
       return "Entering a single code is not supported (yet)";
   }
   
 #   Compare two students by name.  The students are in the form  #   Compare two students by name.  The students are in the form
 #   returned by the helper:  #   returned by the helper:
 #      user:domain:section:last,   first:status  #      user:domain:section:last,   first:status
Line 1989  CHOOSE_STUDENTS Line 2009  CHOOSE_STUDENTS
     <string variable="NUMBER_TO_PRINT_TOTAL" maxlength="5" size="5">      <string variable="NUMBER_TO_PRINT_TOTAL" maxlength="5" size="5">
        <validator>         <validator>
  if (((\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}+0) < 1) &&   if (((\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}+0) < 1) &&
     !\$helper->{'VARS'}{'REUSE_OLD_CODES'}) {      !\$helper->{'VARS'}{'REUSE_OLD_CODES'}                &&
               !\$helper->{'VARS'}{'SINGLE_CODE'}) {
     return "You need to specify the number of assignments to print";      return "You need to specify the number of assignments to print";
  }   }
  return undef;   return undef;
        </validator>         </validator>
     </string>      </string>
     <message></td></tr><tr><td></message>      <message></td></tr><tr><td></message>
       <message><b>Value of CODE to print?</b></td><td></message>
       <string variable="SINGLE_CODE" size="10" defaultvalue="zzzz">
           <validator>
              # Not sure of exact call context so...
      use Apache::lonprintout;
      if(!\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}           &&
         !\$helper->{'VARS'}{'REUSE_OLD_CODES'}) {
         return &Apache::lonprintout::is_code_valid(\$helper->{'VARS'}{'SINGLE_CODE'},
         \$helper->{'VARS'}{'CODE_OPTION'});
      } else {
          return undef; # Other forces control us.
      }
           </validator>
       </string>
       <message></td></tr><tr><td></message>
     <message><b>Names to store the CODEs under for later:</b></message>      <message><b>Names to store the CODEs under for later:</b></message>
     <message></td><td></message>      <message></td><td></message>
     <string variable="ANON_CODE_STORAGE_NAME" maxlength="50" size="20" />      <string variable="ANON_CODE_STORAGE_NAME" maxlength="50" size="20" />

Removed from v.1.381  
changed lines
  Added in v.1.382


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