--- loncom/homework/inputtags.pm 2007/04/18 00:32:02 1.223
+++ loncom/homework/inputtags.pm 2007/09/18 22:18:41 1.230
@@ -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.230 2007/09/18 22:18:41 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').'
'.
''.
'
';
@@ -629,10 +627,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'):'');
@@ -1133,7 +1131,12 @@ sub gradestatus {
}
if ( $showbutton ) {
if ($target ne 'tex') {
- $button = '';
+ $button =
+ '';
}
}
@@ -1180,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{(