Diff for /loncom/homework/response.pm between versions 1.20 and 1.26

version 1.20, 2001/01/22 19:58:09 version 1.26, 2001/05/04 21:19:37
Line 7  package Apache::response; Line 7  package Apache::response;
 use strict;  use strict;
   
 sub BEGIN {  sub BEGIN {
   &Apache::lonxml::register('Apache::response',('responseparam','caparesponse','numericalresponse','radiobuttonresponse','optionresponse'));    &Apache::lonxml::register('Apache::response',('responseparam','caparesponse','numericalresponse','radiobuttonresponse','optionresponse','imageresponse','essayresponse'));
 }  }
   
 sub start_response {  sub start_response {
Line 28  sub end_response { Line 28  sub end_response {
   return '';    return '';
 }  }
   
   # used by response to set the non-safe space random number generator to something
   # that is stable and unique based on the part number and response number
   sub setrandomnumber {
     my $rndseed=&Apache::lonnet::rndseed();
     &Apache::lonxml::debug("randseed $rndseed");
   #  $rndseed=unpack("%32i",$rndseed);
     $rndseed=$rndseed
       +(&Apache::lonnet::numval($Apache::inputtags::part) << 10)
         +&Apache::lonnet::numval($Apache::inputtags::response['-1']);
     srand($rndseed);
     &Apache::lonxml::debug("randseed $rndseed");
     return '';
   }
   
 sub meta_parameter_write {  sub meta_parameter_write {
     my ($name,$type,$default,$display)=@_;      my ($name,$type,$default,$display)=@_;
     return '<parameter part="'.$Apache::inputtags::part.      return '<parameter part="'.$Apache::inputtags::part.
Line 71  sub mandatory_part_meta { Line 85  sub mandatory_part_meta {
     &meta_stores_write('solved','string',      &meta_stores_write('solved','string',
                           'Problem Status').                            'Problem Status').
     &meta_stores_write('tries','int_zeropos',      &meta_stores_write('tries','int_zeropos',
                           'Number of Unsuccessful Tries').                            'Number of Attempts').
     &meta_stores_write('awarded','float',      &meta_stores_write('awarded','float',
           'Partial Credit Factor');            'Partial Credit Factor');
 #  #
Line 88  sub start_numericalresponse { Line 102  sub start_numericalresponse {
   require Apache::caparesponse;     require Apache::caparesponse; 
   import Apache::caparesponse;     import Apache::caparesponse; 
   my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;    my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
   Apache::caparesponse::start_numericalresponse($target,$token,$parstack,$parser,$safeeval,$style);;    return &Apache::caparesponse::start_numericalresponse($target,$token,$parstack,$parser,$safeeval,$style);
   return "";  
 }  }
   
 sub start_caparesponse {  sub start_caparesponse {
   require Apache::caparesponse;     require Apache::caparesponse; 
   import Apache::caparesponse;     import Apache::caparesponse; 
   my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;    my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
 #  print "\n<br>\nsimple caparesponse\n";  #  print "\n<br />\nsimple caparesponse\n";
   Apache::caparesponse::start_caparesponse($target,$token,$parstack,$parser,$safeeval,$style);;    return &Apache::caparesponse::start_caparesponse($target,$token,$parstack,$parser,$safeeval,$style);
   return "";  
 }  }
   
 sub start_radiobuttonresponse {  sub start_radiobuttonresponse {
   require Apache::radiobuttonresponse;     require Apache::radiobuttonresponse; 
   import Apache::radiobuttonresponse;     import Apache::radiobuttonresponse; 
   my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;    my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
   Apache::radiobuttonresponse::start_radiobuttonresponse($target,$token,$parstack,$parser,$safeeval,$style);;    return &Apache::radiobuttonresponse::start_radiobuttonresponse($target,$token,$parstack,$parser,$safeeval,$style);
   return "";  
 }  }
   
 sub start_optionresponse {  sub start_optionresponse {
   require Apache::optionresponse;     require Apache::optionresponse; 
   import Apache::optionresponse;     import Apache::optionresponse; 
   my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;    my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
   Apache::optionresponse::start_optionresponse($target,$token,$parstack,$parser,$safeeval,$style);;    return &Apache::optionresponse::start_optionresponse($target,$token,$parstack,$parser,$safeeval,$style);
   return "";  }
   
   sub start_imageresponse {
     require Apache::imageresponse; 
     import Apache::imageresponse; 
     my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
     return &Apache::imageresponse::start_imageresponse($target,$token,$parstack,$parser,$safeeval,$style);
   }
   
   sub start_essayresponse {
     require Apache::essayresponse; 
     import Apache::essayresponse; 
     my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
     return &Apache::essayresponse::start_essayresponse($target,$token,$parstack,$parser,$safeeval,$style);
 }  }
   
 sub start_responseparam {  sub start_responseparam {
Line 146  sub start_responseparam { Line 170  sub start_responseparam {
 }  }
   
 sub end_responseparam {  sub end_responseparam {
     return '';
 }  }
   
 1;  1;

Removed from v.1.20  
changed lines
  Added in v.1.26


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