--- loncom/homework/inputtags.pm 2002/10/23 17:05:25 1.66 +++ loncom/homework/inputtags.pm 2002/10/24 19:20:17 1.68 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.66 2002/10/23 17:05:25 sakharuk Exp $ +# $Id: inputtags.pm,v 1.68 2002/10/24 19:20:17 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -234,7 +234,7 @@ sub finalizeawards { } sub decideoutput { - my ($award,$solved,$previous)=@_; + my ($award,$solved,$previous,$target)=@_; my $message=''; my $button=0; my $previousmsg; @@ -242,8 +242,13 @@ sub decideoutput { if ($previous) { $previousmsg='You have entered that answer before'; } if ($solved =~ /^correct/) { - $message = "You are correct. Your receipt is ". + if ($target eq 'tex') { + $message = '\textbf{You are correct}. Your receipt is '. &Apache::lonnet::receipt; + } else { + $message = "You are correct. Your receipt is ". + &Apache::lonnet::receipt; + } $button=0; $previousmsg=''; } elsif ($solved =~ /^excused/) { @@ -408,7 +413,7 @@ sub gradestatus { if ( $award ne '' ) { &Apache::lonxml::debug('Getting message'); ($showbutton,$message,$previousmsg) = - &decideoutput($award,$solved,$previous); + &decideoutput($award,$solved,$previous,$target); if ($target eq 'tex') { $message=' '.$message.' '; } else { @@ -426,7 +431,9 @@ sub gradestatus { if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; } if ( $showbutton ) { if ($target eq 'tex') { - $trystr = ' {\small Tries '.$tries.'/'.$maxtries.'} '; + if ((not $ENV{'request.role'}=~m/^au\./) and (not $ENV{'request.role'}=~m/^ca\./)) { + $trystr = ' {\small \textit{Tries} '.$tries.'/'.$maxtries.'} '; + } } else { $trystr = "Tries $tries/$maxtries"; }