Diff for /loncom/homework/inputtags.pm between versions 1.236 and 1.240

version 1.236, 2008/01/14 14:32:14 version 1.240, 2008/03/03 19:37:27
Line 672  sub decideoutput { Line 672  sub decideoutput {
  if (($symb ne '')    if (($symb ne '') 
     &&      &&
     ($env{'course.'.$env{'request.course.id'}.      ($env{'course.'.$env{'request.course.id'}.
       '.disable_receipt_display'} ne 'yes')) {         '.disable_receipt_display'} ne 'yes') &&
                       ($Apache::lonhomework::type ne 'practice')) { 
     $message.=(($target eq 'web')?'<br />':' ').      $message.=(($target eq 'web')?'<br />':' ').
  &mt('Your receipt is [_1]',   &mt('Your receipt is [_1]',
     (&Apache::lonnet::receipt($Apache::inputtags::part).      (&Apache::lonnet::receipt($Apache::inputtags::part).
Line 744  sub decideoutput { Line 745  sub decideoutput {
     } elsif ($award eq 'MISORDERED_RANK') {      } elsif ($award eq 'MISORDERED_RANK') {
  $message = &mt('You have provided an invalid ranking');   $message = &mt('You have provided an invalid ranking');
  if ($target ne 'tex') {   if ($target ne 'tex') {
     $message.=', '.&mt('please refer to').' '.&Apache::loncommon::help_open_topic('Ranking_Problems','help on ranking problems');      $message.=', '.&mt('please refer to').' '.&Apache::loncommon::help_open_topic('Ranking_Problems',&mt('help on ranking problems'));
  }   }
  $css_class=$possible_class{'not_charged_try'};   $css_class=$possible_class{'not_charged_try'};
  $button=1;   $button=1;
Line 787  sub decideoutput { Line 788  sub decideoutput {
  $css_class=$possible_class{'not_charged_try'};   $css_class=$possible_class{'not_charged_try'};
  $button=1;   $button=1;
     } elsif ($award eq 'BAD_FORMULA') {      } elsif ($award eq 'BAD_FORMULA') {
  $message = &mt("Unable to understand formula");   $message = &mt("Unable to understand formula").'.';
           if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Formula_Answers')};
  $css_class=$possible_class{'not_charged_try'};   $css_class=$possible_class{'not_charged_try'};
  $button=1;   $button=1;
     } elsif ($award eq 'INCORRECT') {      } elsif ($award eq 'INCORRECT') {
Line 844  sub decideoutput { Line 846  sub decideoutput {
  $message.= $computer;   $message.= $computer;
  $added_computer_text=1;   $added_computer_text=1;
     }      }
       if ($Apache::lonhomework::type eq 'practice') {
          $message.='<br />'.&mt('Submissions to practice problems are not permanently recorded.');
       }
   
     return ($button,$css_class,$message,$previousmsg);      return ($button,$css_class,$message,$previousmsg);
 }  }
   
Line 1251  sub previous_tries { Line 1257  sub previous_tries {
  && $Apache::lonhomework::history{"$prefix.solved"} =~/^correct/   && $Apache::lonhomework::history{"$prefix.solved"} =~/^correct/
  ) {   ) {
   
                   my $txt_correct = &mt('Correct');
  $message =~ s{(<td.*?>)(.*?)(</td>)}   $message =~ s{(<td.*?>)(.*?)(</td>)}
              {$1 <strong>Correct</strong>. $3}s;                               {$1 <strong>$txt_correct</strong>. $3}s;
     }      }
     my $trystr = "(Try ".              my $trystr = "(".&mt('Try [_1]',$Apache::lonhomework::history{"$prefix.tries"}).")";
  $Apache::lonhomework::history{"$prefix.tries"}.')';  
     $message =~ s{(</td>)}{ $trystr $1};      $message =~ s{(</td>)}{ $trystr $1};
  }   }
  my ($class) = ($message =~ m{<td.*class="([^"]*)"}); #"   my ($class) = ($message =~ m{<td.*class="([^"]*)"}); #"

Removed from v.1.236  
changed lines
  Added in v.1.240


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