[LON-CAPA-cvs] cvs: loncom /homework grades.pm structuretags.pm
raeburn
raeburn at source.lon-capa.org
Sun Feb 22 10:23:57 EST 2015
raeburn Sun Feb 22 15:23:57 2015 EDT
Modified files:
/loncom/homework grades.pm structuretags.pm
Log:
Bug 6476
- Revert part of changes in grades.pm rev. 1.732
- When the random seed is stored, store rawrndseed (the pre-processed random
seed) in resource.$part.rndseed, since the pre-processed seed is the one
needed to reconstruct the problem in Authoring Space.
- Retains backwards-compatibility with data stored in 2.10 and 2.11, because
the previous tries display, and submission history in the grading screens
for questiontype of randmizetry both expect resource.$part.rndseed in the
submission history (and for randomizetry the rawrndseed and rndseed are
the same).
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.732 loncom/homework/grades.pm:1.733
--- loncom/homework/grades.pm:1.732 Sun Feb 22 01:34:48 2015
+++ loncom/homework/grades.pm Sun Feb 22 15:23:56 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.732 2015/02/22 01:34:48 raeburn Exp $
+# $Id: grades.pm,v 1.733 2015/02/22 15:23:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2231,11 +2231,7 @@
if ($hide eq 'rand') {
$type = 'randomizetry';
$trial = $record{"resource.$partid.tries"};
- if (exists($record{"resource.$partid.rawrndseed"})) {
- $rndseed = $record{"resource.$partid.rawrndseed"};
- } else {
- $rndseed = $record{"resource.$partid.rndseed"};
- }
+ $rndseed = $record{"resource.$partid.rndseed"};
}
if ($env{'form.checkPlag'}) {
my ($oname,$odom,$ocrsid,$oessay,$osim)=
@@ -4861,11 +4857,7 @@
my ($trial,$rndseed,$newvariation);
if ($type eq 'randomizetry') {
$trial = $$record{"$where.$partid.tries"};
- if (exists($$record{"$where.$partid.rawrndseed"})) {
- $rndseed = $$record{"$where.$partid.rawrndseed"};
- } else {
- $rndseed = $$record{"$where.$partid.rndseed"};
- }
+ $rndseed = $$record{"$where.$partid.rndseed"};
}
if ($$record{"$where.$partid.tries"} eq '') {
$displaySub[0].=&mt('Trial not counted');
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.528 loncom/homework/structuretags.pm:1.529
--- loncom/homework/structuretags.pm:1.528 Sun Feb 22 01:34:48 2015
+++ loncom/homework/structuretags.pm Sun Feb 22 15:23:57 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.528 2015/02/22 01:34:48 raeburn Exp $
+# $Id: structuretags.pm,v 1.529 2015/02/22 15:23:57 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1677,14 +1677,14 @@
my $rndseed=&setup_rndseed($safeeval,$target,$probpartlist);
if (($target eq 'grade') && &Apache::response::submitted()) {
if ($Apache::lonhomework::type eq 'randomizetry') {
- $Apache::lonhomework::results{'resource.0.rawrndseed'}=$rndseed;
+ $Apache::lonhomework::results{'resource.0.rndseed'}=$rndseed;
} else {
my @parts;
if (ref($probpartlist) eq 'ARRAY') {
@parts = @{$probpartlist};
}
unless (@parts) {
- $Apache::lonhomework::results{'resource.0.rawrndseed'}=$Apache::lonhomework::rawrndseed;
+ $Apache::lonhomework::results{'resource.0.rndseed'}=$Apache::lonhomework::rawrndseed;
}
}
}
@@ -2747,10 +2747,10 @@
if ($Apache::lonhomework::type eq 'randomizetry') {
my $rndseed=&setup_rndseed($safeeval,$target);
if (($target eq 'grade') && &Apache::response::submitted()) {
- $Apache::lonhomework::results{"resource.$id.rawrndseed"}=$rndseed;
+ $Apache::lonhomework::results{"resource.$id.rndseed"}=$rndseed;
}
} elsif (($target eq 'grade') && &Apache::response::submitted()) {
- $Apache::lonhomework::results{"resource.$id.rawrndseed"}=$Apache::lonhomework::rawrndseed;
+ $Apache::lonhomework::results{"resource.$id.rndseed"}=$Apache::lonhomework::rawrndseed;
}
my $in_order_show=&ordered_show_check();
my $expression='$external::part=\''.$Apache::inputtags::part.'\';';
More information about the LON-CAPA-cvs
mailing list