--- loncom/homework/inputtags.pm 2007/05/21 22:57:17 1.224
+++ loncom/homework/inputtags.pm 2007/09/26 19:30:30 1.231
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.224 2007/05/21 22:57:17 albertel Exp $
+# $Id: inputtags.pm,v 1.231 2007/09/26 19:30:30 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -31,7 +31,6 @@ use strict;
use Apache::loncommon;
use Apache::lonlocal;
use Apache::lonnet;
-use lib '/home/httpd/lib/perl/';
use LONCAPA;
@@ -116,8 +115,7 @@ sub check_for_duplicate_ids {
sub start_input {
my ($parstack,$safeeval)=@_;
- my $id = &Apache::lonxml::get_param('id',$parstack,$safeeval);
- if ($id eq '') { $id = $Apache::lonxml::curdepth; }
+ my $id = &Apache::lonxml::get_id($parstack,$safeeval);
push (@Apache::inputtags::input,$id);
push (@Apache::inputtags::inputlist,$id);
return $id;
@@ -449,7 +447,7 @@ sub file_selector {
$result.='
'.''.&mt('OR:').'
';
}
if ($which eq 'portfolioonly' || $which eq 'both') {
- $result.=$extratext.''.
+ $result.=$extratext.''.
&mt('Select Portfolio Files').'
'.
''.
'
';
@@ -637,9 +635,6 @@ sub decideoutput {
&mt('Your receipt is').' '.&Apache::lonnet::receipt($Apache::inputtags::part).
(($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):'');
}
- &Apache::lonnet::logthis(" er \n$symb\n$message\n".$env{'course.'.
- $env{'request.course.id'}.
- '.disable_receipt_display'});
}
$button=0;
$previousmsg='';
@@ -1136,7 +1131,12 @@ sub gradestatus {
}
if ( $showbutton ) {
if ($target ne 'tex') {
- $button = '';
+ $button =
+ '';
}
}
@@ -1183,12 +1183,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{(