Diff for /loncom/homework/inputtags.pm between versions 1.65 and 1.68

version 1.65, 2002/10/08 18:04:04 version 1.68, 2002/10/24 19:20:17
Line 234  sub finalizeawards { Line 234  sub finalizeawards {
 }  }
   
 sub decideoutput {  sub decideoutput {
   my ($award,$solved,$previous)=@_;    my ($award,$solved,$previous,$target)=@_;
   my $message='';    my $message='';
   my $button=0;    my $button=0;
   my $previousmsg;    my $previousmsg;
Line 242  sub decideoutput { Line 242  sub decideoutput {
   if ($previous) { $previousmsg='You have entered that answer before'; }    if ($previous) { $previousmsg='You have entered that answer before'; }
   
   if      ($solved =~ /^correct/) {    if      ($solved =~ /^correct/) {
     $message = "<b>You are correct.</b> Your receipt is ".      if ($target eq 'tex') {
         $message = '\textbf{You are correct}. Your receipt is '.
       &Apache::lonnet::receipt;        &Apache::lonnet::receipt;
       } else {
         $message = "<b>You are correct.</b> Your receipt is ".
         &Apache::lonnet::receipt;
       }
     $button=0;      $button=0;
     $previousmsg='';      $previousmsg='';
   } elsif ($solved =~ /^excused/) {    } elsif ($solved =~ /^excused/) {
Line 408  sub gradestatus { Line 413  sub gradestatus {
     if ( $award ne '' ) {      if ( $award ne '' ) {
       &Apache::lonxml::debug('Getting message');        &Apache::lonxml::debug('Getting message');
       ($showbutton,$message,$previousmsg) =        ($showbutton,$message,$previousmsg) =
  &decideoutput($award,$solved,$previous);   &decideoutput($award,$solved,$previous,$target);
       if ($target eq 'tex') {        if ($target eq 'tex') {
  $message=' '.$message.' ';   $message=' '.$message.' ';
       } else {        } else {
Line 426  sub gradestatus { Line 431  sub gradestatus {
     if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; }       if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; } 
     if ( $showbutton ) {      if ( $showbutton ) {
       if ($target eq 'tex') {        if ($target eq 'tex') {
  $trystr = ' Tries '.$tries.'/'.$maxtries.' ';    if ((not $ENV{'request.role'}=~m/^au\./) and (not $ENV{'request.role'}=~m/^ca\./)) {
         $trystr = ' {\small \textit{Tries} '.$tries.'/'.$maxtries.'} ';
     }
       } else {        } else {
          $trystr = "<td>Tries $tries/$maxtries</td>";           $trystr = "<td>Tries $tries/$maxtries</td>";
       }        }

Removed from v.1.65  
changed lines
  Added in v.1.68


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.