Diff for /loncom/homework/inputtags.pm between versions 1.162 and 1.164

version 1.162, 2005/03/31 21:32:52 version 1.164, 2005/04/05 15:39:41
Line 808  sub gradestatus { Line 808  sub gradestatus {
  if ( $maxtries eq '' ) { $maxtries = '2'; }    if ( $maxtries eq '' ) { $maxtries = '2'; } 
  if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; }    if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; } 
  my $tries_text=&mt('Tries');   my $tries_text=&mt('Tries');
  if ( $Apache::lonhomework::type eq 'survey') { $tries_text=&mt('Submissions'); }   if ( $Apache::lonhomework::type eq 'survey' ||
        $Apache::lonhomework::parsing_a_task) {
       $tries_text=&mt('Submissions');
    }
  if ( $showbutton ) {   if ( $showbutton ) {
     if ($target eq 'tex') {      if ($target eq 'tex') {
  if ($ENV{'request.state'} ne "construct" && $Apache::lonhomework::type ne 'exam' && $ENV{'form.suppress_tries'} ne 'yes') {   if ($ENV{'request.state'} ne "construct" && $Apache::lonhomework::type ne 'exam' && $ENV{'form.suppress_tries'} ne 'yes') {
Line 818  sub gradestatus { Line 821  sub gradestatus {
  }   }
     } else {      } else {
  $trystr = "<td><nobr>".$tries_text." $tries";   $trystr = "<td><nobr>".$tries_text." $tries";
  if($ENV{'request.state'} ne 'construct') {   if ($Apache::lonhomework::parsing_a_task) {
    } elsif($ENV{'request.state'} ne 'construct') {
     $trystr.="/$maxtries";      $trystr.="/$maxtries";
  } else {   } else {
     if (defined($Apache::inputtags::params{'maxtries'})) {      if (defined($Apache::inputtags::params{'maxtries'})) {
Line 836  sub gradestatus { Line 840  sub gradestatus {
  }   }
  if ($Apache::lonhomework::history{"resource.$id.afterduedate"}) {   if ($Apache::lonhomework::history{"resource.$id.afterduedate"}) {
     #last submissions was after due date      #last submissions was after due date
     if ($target eq 'tex') {      $latemessage=&mt(' The last submission was after the Due Date ');;
  $latemessage=' The last submission was after the Due Date ';      if ($target eq 'web') {
     } else {   $latemessage='<td bgcolor="#ffaaaa">'.$latemessage.'</td>';
  $latemessage="<td bgcolor=\"#ffaaaa\">The last submission was after the Due Date</td>";  
     }      }
  }   }
     }      }

Removed from v.1.162  
changed lines
  Added in v.1.164


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