--- loncom/homework/inputtags.pm 2011/01/06 22:56:42 1.271.2.5
+++ loncom/homework/inputtags.pm 2010/12/19 02:58:16 1.274
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.271.2.5 2011/01/06 22:56:42 raeburn Exp $
+# $Id: inputtags.pm,v 1.274 2010/12/19 02:58:16 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -354,7 +354,6 @@ sub start_textline {
unless ($newvariation) {
$oldresponse = $Apache::lonhomework::history{"resource.$partid.$id.submission"};
&Apache::lonxml::debug("oldresponse $oldresponse is ".ref($oldresponse));
-
if (ref($oldresponse) eq 'ARRAY') {
$oldresponse = $oldresponse->[$#Apache::inputtags::inputlist];
}
@@ -596,9 +595,9 @@ sub current_file_submissions {
}
}
}
- my $num = 0;
foreach my $name (sort(keys(%okfiles))) {
if (ref($okfiles{$name}) eq 'ARRAY') {
+ my $num = 0;
foreach my $url (@{$okfiles{$name}}) {
if (ref($rows{$url}) eq 'HASH') {
my $link = $rows{$url}{link};
@@ -624,7 +623,7 @@ sub current_file_submissions {
}
$result .=
'
'.$showname.' | '."\n".
+ '" border="0" />'.$showname.''."\n".
''.$rows{$url}{size}.' | '."\n".
''.$rows{$url}{lastmodified}.' | '."\n".
&Apache::loncommon::end_data_table_row();
@@ -636,7 +635,7 @@ sub current_file_submissions {
if ($header_shown) {
$result .= &Apache::loncommon::end_data_table().
'
'.
- &mt('Exclude existing file(s) from grading by checking the "Delete?" checkbox(es) and clicking "Submit Answer"').'';
+ &mt('Items checked for deletion will not be included amongst the files evaluated when your submission is graded.').'';
}
if (@bad_file_list) {
my $bad_files = ''.
@@ -686,7 +685,7 @@ sub valid_award {
'UNIT_FAIL', 'NO_UNIT',
'UNIT_NOTNEEDED', 'WANTED_NUMERIC',
'BAD_FORMULA', 'NOT_FUNCTION', 'WRONG_FORMAT',
- 'INTERNAL_ERROR', 'SIG_FAIL', 'INCORRECT',
+ 'INTERNAL_ERROR', 'SIG_FAIL', 'INCORRECT',
'MISORDERED_RANK', 'INVALID_FILETYPE',
'EXCESS_FILESIZE', 'FILENAME_INUSE',
'DRAFT', 'SUBMITTED', 'SUBMITTED_CREDIT',
@@ -704,7 +703,7 @@ sub valid_award {
'UNIT_INVALID_INSTRUCTOR', 'UNIT_INVALID_STUDENT',
'UNIT_IRRECONCIBLE', 'UNIT_FAIL', 'NO_UNIT',
'UNIT_NOTNEEDED', 'WANTED_NUMERIC', 'BAD_FORMULA', 'NOT_FUNCTION',
- 'WRONG_FORMAT', 'INTERNAL_ERROR',
+ 'WRONG_FORMAT', 'INTERNAL_ERROR',
'COMMA_FAIL', 'SIG_FAIL', 'INCORRECT', 'MISORDERED_RANK',
'INVALID_FILETYPE', 'EXCESS_FILESIZE', 'FILENAME_INUSE',
'DRAFT', 'SUBMITTED',
@@ -999,7 +998,7 @@ sub decideoutput {
$message = &mt("Wrong format").'.';
$css_class=$possible_class{'not_charged_try'};
$button=1;
- } elsif ($award eq 'INTERNAL_ERROR') {
+ } elsif ($award eq 'INTERNAL_ERROR') {
$message = &mt("An internal error occurred while processing your answer. Please try again later.");
$css_class=$possible_class{'not_charged_try'};
$button=1;
@@ -1276,13 +1275,10 @@ sub setgradedata {
&Apache::response::add_to_gradingqueue();
}
if (($Apache::lonhomework::type eq 'anonsurvey') ||
- ($Apache::lonhomework::type eq 'anonsurveycred') ||
+ ($Apache::lonhomework::type eq 'anonsurveycred') ||
($Apache::lonhomework::type eq 'randomizetry')) {
$Apache::lonhomework::results{"resource.$id.type"} = $Apache::lonhomework::type;
}
- if ($Apache::lonhomework::type eq 'randomizetry') {
- $Apache::lonhomework::results{"resource.$id.rndseed"} = $env{'form.'.$id.'.rndseed'};
- }
}
sub find_which_previous {
@@ -1506,7 +1502,6 @@ sub previous_tries {
$count++;
$count_lookup{$i} = $count;
my $curr_rndseed = $Apache::lonhomework::history{"$prefix.rndseed"};
-
my ($previousmsg,$latemessage,$message,$trystr);
($previousmsg,$latemessage,$message,$trystr) =
@@ -1532,7 +1527,7 @@ sub previous_tries {
if ($curr_rndseed ne $lastrndseed) {
$trystr .= '
'.&mt('New problem variation this try.').'';
}
- }
+ }
$message =~ s{()}{ $trystr $1};
}
my ($class) = ($message =~ m{