--- loncom/homework/inputtags.pm 2007/04/18 00:32:02 1.223 +++ loncom/homework/inputtags.pm 2007/05/29 21:14:45 1.226 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.223 2007/04/18 00:32:02 albertel Exp $ +# $Id: inputtags.pm,v 1.226 2007/05/29 21:14:45 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -629,10 +629,10 @@ sub decideoutput { } $added_computer_text=1; my ($symb) = &Apache::lonnet::whichuser(); - if ((!$env{'course.'. - $env{'request.course.id'}. - '.disable_receipt_display'} eq 'yes')&& - $symb) { + if (($symb ne '') + && + ($env{'course.'.$env{'request.course.id'}. + '.disable_receipt_display'} ne 'yes')) { $message.=(($target eq 'web')?'
':' '). &mt('Your receipt is').' '.&Apache::lonnet::receipt($Apache::inputtags::part). (($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):''); @@ -1180,12 +1180,15 @@ sub previous_tries { my ($match,$which) = &find_which_previous($i); $message=$previousmsg; my $previous = $count_lookup{$which}; - $message =~ s{()}{ as submission # $previous $1}; + $message =~ s{()}{ as submission \# $previous $1}; } elsif ($Apache::lonhomework::history{"$prefix.tries"}) { - if ( $Apache::lonhomework::history{"$prefix.solved"} =~ - /^correct/) { + if (!(lc($Apache::lonhomework::problemstatus) eq 'no' + && $Apache::inputtags::status[-1] ne 'SHOW_ANSWER') + && $Apache::lonhomework::history{"$prefix.solved"} =~/^correct/ + ) { + $message =~ s{()(.*?)()} - {$1 Correct. $3}; + {$1 Correct. $3}s; } my $trystr = "(Try ". $Apache::lonhomework::history{"$prefix.tries"}.')'; @@ -1225,6 +1228,8 @@ sub previous_tries { $output=~s/\\/\\\\/g; $output=~s/\'/\\\'/g; $output=~s/\s+/ /g; + $output.='
'; + my $windowopen=&Apache::lonhtmlcommon::javascript_docopen(); my $start_page = &Apache::loncommon::start_page('Previous Tries', undef,