Diff for /loncom/homework/inputtags.pm between versions 1.17 and 1.18

version 1.17, 2000/12/12 22:35:52 version 1.18, 2000/12/15 20:31:30
Line 16  sub initialize_inputtags { Line 16  sub initialize_inputtags {
   @Apache::inputtags::responselist=();    @Apache::inputtags::responselist=();
   @Apache::inputtags::answergroup=();    @Apache::inputtags::answergroup=();
   $Apache::inputtags::part='';    $Apache::inputtags::part='';
     @Apache::inputtags::status=();
   %Apache::inputtags::params=();    %Apache::inputtags::params=();
 }  }
   
Line 250  sub gradestatus { Line 251  sub gradestatus {
   my $showbutton = 1;    my $showbutton = 1;
   my $message = '';    my $message = '';
   my $trystr='';    my $trystr='';
     my $button='';    my $button='';
       
   my ($date,$passed) = &Apache::lonhomework::check_date("OPEN_DATE",$id);    my $status = $Apache::lonhomework::part['-1'];
   
   if ( $passed ) {      if ( $status eq 'CAN_ANSWER' || $status eq 'SHOW_ANSWER' ) {  
     my $award = $Apache::lonhomework::history{"resource.$id.award"};      my $award = $Apache::lonhomework::history{"resource.$id.award"};
     &Apache::lonxml::debug("Found Award |$award|");      &Apache::lonxml::debug("Found Award |$award|");
     if ( $award ne '' ) {      if ( $award ne '' ) {
Line 263  sub gradestatus { Line 264  sub gradestatus {
     }      }
     my $tries = $Apache::lonhomework::history{"resource.$id.tries"};      my $tries = $Apache::lonhomework::history{"resource.$id.tries"};
     my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries");      my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries");
     &Apache::lonxml::debug("goit maxtries of :$maxtries:");      &Apache::lonxml::debug("got maxtries of :$maxtries:");
     if ( $tries eq '' ) { $tries = '0'; }      if ( $tries eq '' ) { $tries = '0'; }
     if ( $maxtries eq '' ) { $maxtries = '2'; }       if ( $maxtries eq '' ) { $maxtries = '2'; } 
     if ( $showbutton ) {      if ( $showbutton ) {
       $trystr = "<br></br>Tries $tries/$maxtries";        $trystr = "<br></br>Tries $tries/$maxtries";
     }      }
     if ( $tries >= $maxtries ) { $showbutton = 0; }      if ( $tries >= $maxtries ) { $showbutton = 0; }
       if ( $status eq 'SHOW_ANSWER' ) { $showbutton = 0; }
     if ( $showbutton ) {       if ( $showbutton ) { 
       $button = '<input type="submit" name="submit" value="Submit All Answers"><br></br>';        $button = '<input type="submit" name="submit" value="Submit All Answers"><br></br>';
     }      }

Removed from v.1.17  
changed lines
  Added in v.1.18


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