--- loncom/homework/grades.pm 2015/02/22 15:23:56 1.733 +++ loncom/homework/grades.pm 2015/03/18 12:53:24 1.735 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.733 2015/02/22 15:23:56 raeburn Exp $ +# $Id: grades.pm,v 1.735 2015/03/18 12:53:24 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4806,7 +4806,7 @@ sub displaySubByDates { my $interaction; my $no_increment = 1; - my %lastrndseed; + my (%lastrndseed,%lasttype); for ($version=1;$version<=$$record{'version'};$version++) { my $timestamp = &Apache::lonlocal::locallocaltime($$record{$version.':timestamp'}); @@ -4864,12 +4864,14 @@ sub displaySubByDates { } else { $displaySub[0].=&mt('Trial: [_1]', $$record{"$where.$partid.tries"}); - if ($rndseed || $lastrndseed{$partid}) { - if ($rndseed ne $lastrndseed{$partid}) { + if (($rndseed ne '') && ($lastrndseed{$partid} ne '')) { + if (($rndseed ne $lastrndseed{$partid}) && + (($type eq 'randomizetry') || ($lasttype{$partid} eq 'randomizetry'))) { $newvariation = ' ('.&mt('New variation this try').')'; } } $lastrndseed{$partid} = $rndseed; + $lasttype{$partid} = $type; } my $responseType=($isTask ? 'Task' : $responseType->{$partid}->{$responseId});