--- loncom/homework/inputtags.pm 2010/12/19 02:58:16 1.274
+++ loncom/homework/inputtags.pm 2011/03/05 20:32:02 1.280
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.274 2010/12/19 02:58:16 raeburn Exp $
+# $Id: inputtags.pm,v 1.280 2011/03/05 20:32:02 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -595,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};
@@ -623,7 +623,7 @@ sub current_file_submissions {
}
$result .=
'
'.$showname.' | '."\n".
+ '" border="0" alt="" />'.$showname.''."\n".
''.$rows{$url}{size}.' | '."\n".
''.$rows{$url}{lastmodified}.' | '."\n".
&Apache::loncommon::end_data_table_row();
@@ -635,7 +635,7 @@ sub current_file_submissions {
if ($header_shown) {
$result .= &Apache::loncommon::end_data_table().
'
'.
- &mt('Items checked for deletion will not be included amongst the files evaluated when your submission is graded.').'';
+ &mt('Exclude existing file(s) from grading by checking the "Delete?" checkbox(es) and clicking "Submit Answer"').'';
}
if (@bad_file_list) {
my $bad_files = ''.
@@ -1279,6 +1279,9 @@ sub setgradedata {
($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 {
@@ -1406,7 +1409,7 @@ sub get_grade_messages {
$trystr = ''.&mt($tries_text)." $tries";
if ($Apache::lonhomework::parsing_a_task) {
} elsif($env{'request.state'} ne 'construct') {
- $trystr.="/$maxtries";
+ $trystr.="/".&Apache::lonhtmlcommon::direct_parm_link($maxtries,$env{'request.symb'},'maxtries',$id,$target);
} else {
if (defined($Apache::inputtags::params{'maxtries'})) {
$trystr.="/".$Apache::inputtags::params{'maxtries'};
@@ -1519,6 +1522,17 @@ sub previous_tries {
) {
my $txt_correct = &mt('Correct');
+ my $awarded = $Apache::lonhomework::history{"$prefix.awarded"};
+ my $txt_correct = &mt('Correct');
+ if ($awarded < 1 && $awarded > 0) {
+ $txt_correct=&mt('Partially Correct');
+ } elsif ($awarded < 1) {
+ if ($awarded eq '') {
+ $txt_correct='';
+ } else {
+ $txt_correct=&mt('Incorrect');
+ }
+ }
$message =~ s{( | )(.*?)()}
{$1 $txt_correct. $3}s;
}