Diff for /loncom/interface/lonprintout.pm between versions 1.390 and 1.392

version 1.390, 2005/09/01 18:35:15 version 1.392, 2005/09/16 20:45:00
Line 42  use Apache::lonratedt; Line 42  use Apache::lonratedt;
 use POSIX qw(strftime);  use POSIX qw(strftime);
 use Apache::lonlocal;  use Apache::lonlocal;
   
 my $resources_printed = '';  
   
 #  #
 #   Convert a numeric code to letters  #   Convert a numeric code to letters
 #  #
Line 927  sub get_page_breaks  { Line 925  sub get_page_breaks  {
 sub output_data {  sub output_data {
     my ($r,$helper,$rparmhash) = @_;      my ($r,$helper,$rparmhash) = @_;
     my %parmhash = %$rparmhash;      my %parmhash = %$rparmhash;
       my $resources_printed = '';
     my $html=&Apache::lonxml::xmlbegin();      my $html=&Apache::lonxml::xmlbegin();
     my $bodytag=&Apache::loncommon::bodytag('Preparing Printout');      my $bodytag=&Apache::loncommon::bodytag('Preparing Printout');
     $r->print(<<ENDPART);      $r->print(<<ENDPART);
Line 1631  sub get_CODE { Line 1630  sub get_CODE {
     my $max='1'.'0'x$size;      my $max='1'.'0'x$size;
     my $newcode;      my $newcode;
     while(1) {      while(1) {
  $newcode=sprintf("%06d",int(rand($max)));   $newcode=sprintf("%0".$size."d",int(rand($max)));
  if (!exists($$all_codes{$newcode})) {   if (!exists($$all_codes{$newcode})) {
     $$all_codes{$newcode}=1;      $$all_codes{$newcode}=1;
     if ($type eq 'number' ) {      if ($type eq 'number' ) {
Line 2322  CHOOSE_FROM_SUBDIR Line 2321  CHOOSE_FROM_SUBDIR
       <nextstate>CHOOSE_FROM_ANY_SEQUENCE</nextstate>        <nextstate>CHOOSE_FROM_ANY_SEQUENCE</nextstate>
       <filterfunc>return \$res->is_sequence;</filterfunc>        <filterfunc>return \$res->is_sequence;</filterfunc>
       <valuefunc>return $urlValue;</valuefunc>        <valuefunc>return $urlValue;</valuefunc>
         <choicefunc>return \$res->hasResource(\$res,sub { return !\$_[0]->is_sequence() },0,0);
    </choicefunc>
       <option text='Newpage' variable='FINISHPAGE' />        <option text='Newpage' variable='FINISHPAGE' />
       </resource>        </resource>
     </state>      </state>

Removed from v.1.390  
changed lines
  Added in v.1.392


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