--- loncom/homework/inputtags.pm 2006/09/29 23:04:37 1.207
+++ loncom/homework/inputtags.pm 2006/10/17 15:11:11 1.209
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.207 2006/09/29 23:04:37 albertel Exp $
+# $Id: inputtags.pm,v 1.209 2006/10/17 15:11:11 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -283,6 +283,7 @@ sub needs_exam_box {
sub start_textline {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
my $result = "";
+ my $id = &start_input($parstack,$safeeval);
if ($target eq 'web') {
$Apache::lonxml::evaluate--;
my $partid=$Apache::inputtags::part;
@@ -321,7 +322,8 @@ sub start_textline {
}
} else {
#right or wrong don't show what was last typed in.
- $result=''.$Apache::inputtags::answertxt{$id}.'';
+ my $count = scalar(@Apache::inputtags::inputlist)-1;
+ $result=''.$Apache::inputtags::answertxt{$id}[$count].'';
#$result='';
}
} elsif ($target eq 'edit') {
@@ -356,6 +358,7 @@ sub end_textline {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
if ($target eq 'web') { $Apache::lonxml::evaluate++; }
elsif ($target eq 'edit') { return ('','no'); }
+ &end_input();
return "";
}
@@ -459,7 +462,7 @@ sub show_past_portfile_submission {
}
my (@file_list,@bad_file_list);
foreach my $file (split(/\s*,\s*/,&unescape($Apache::lonhomework::history{"resource.$part.$id.portfiles"}))) {
- my (undef,undef,$domain,$user)=&Apache::lonxml::whichuser();
+ my (undef,undef,$domain,$user)=&Apache::lonnet::whichuser();
my $url="/uploaded/$domain/$user/portfolio$file";
my $icon=&Apache::loncommon::icon($url);
push(@file_list,'';