--- loncom/interface/loncommon.pm 2015/04/03 17:31:24 1.1211
+++ loncom/interface/loncommon.pm 2015/04/09 14:34:38 1.1216
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1211 2015/04/03 17:31:24 raeburn Exp $
+# $Id: loncommon.pm,v 1.1216 2015/04/09 14:34:38 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4040,8 +4040,13 @@ sub get_previous_attempt {
my %lasthash=();
my $version;
for ($version=1;$version<=$returnhash{'version'};$version++) {
- foreach my $key (sort(split(/\:/,$returnhash{$version.':keys'}))) {
- $lasthash{$key}=$returnhash{$version.':'.$key};
+ foreach my $key (reverse(sort(split(/\:/,$returnhash{$version.':keys'})))) {
+ if ($key =~ /\.rawrndseed$/) {
+ my ($id) = ($key =~ /^(.+)\.rawrndseed$/);
+ $lasthash{$id.'.rndseed'} = $returnhash{$version.':'.$key};
+ } else {
+ $lasthash{$key}=$returnhash{$version.':'.$key};
+ }
}
}
$prevattempts=&start_data_table().&start_data_table_header_row();
@@ -4161,9 +4166,15 @@ sub get_previous_attempt {
}
} else {
if ($key =~ /\./) {
- my $value = &format_previous_attempt_value($key,
- $returnhash{$version.':'.$key});
- $prevattempts.='
'.$value.' | ';
+ my $value = $returnhash{$version.':'.$key};
+ if ($key =~ /\.rndseed$/) {
+ my ($id) = ($key =~ /^(.+)\.[^.]+$/);
+ if (exists($returnhash{$version.':'.$id.'.rawrndseed'})) {
+ $value = $returnhash{$version.':'.$id.'.rawrndseed'};
+ }
+ }
+ $prevattempts.=''.&format_previous_attempt_value($key,$value).
+ ' | ';
} else {
$prevattempts.=' | ';
}
@@ -4172,9 +4183,15 @@ sub get_previous_attempt {
} else {
foreach my $key (sort(keys(%lasthash))) {
next if ($key =~ /\.foilorder$/);
- my $value = &format_previous_attempt_value($key,
- $returnhash{$version.':'.$key});
- $prevattempts.=''.$value.' | ';
+ my $value = $returnhash{$version.':'.$key};
+ if ($key =~ /\.rndseed$/) {
+ my ($id) = ($key =~ /^(.+)\.[^.]+$/);
+ if (exists($returnhash{$version.':'.$id.'.rawrndseed'})) {
+ $value = $returnhash{$version.':'.$id.'.rawrndseed'};
+ }
+ }
+ $prevattempts.=''.&format_previous_attempt_value($key,$value).
+ ' | ';
}
}
$prevattempts.=&end_data_table_row();
@@ -6819,7 +6836,7 @@ div.LC_edit_problem_discards {
div.LC_edit_actionbar {
margin: -5px 0px 0px 0px !important;
background-color: $sidebg;
- height: 31px;
+ height: 35px;
}
div.LC_edit_problem_saves {
@@ -7755,20 +7772,22 @@ ADDMETA
$result.=<
OFFLOAD
}
@@ -16226,7 +16245,7 @@ sub create_recaptcha {
my $captcha = Captcha::reCAPTCHA->new;
return $captcha->get_options_setter({theme => 'white'})."\n".
$captcha->get_html($pubkey,undef,$use_ssl).
- &mt('If either word is hard to read, [_1] will replace them.',
+ &mt('If the text is hard to read, [_1] will replace them.',
'').
'
';
}