[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /homework grades.pm

raeburn raeburn at source.lon-capa.org
Thu Mar 19 06:31:18 EDT 2015


raeburn		Thu Mar 19 10:31:18 2015 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/homework	grades.pm 
  Log:
  - For 2.11
    Backport 1.735.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.596.2.12.2.34 loncom/homework/grades.pm:1.596.2.12.2.35
--- loncom/homework/grades.pm:1.596.2.12.2.34	Tue Mar 17 12:37:40 2015
+++ loncom/homework/grades.pm	Thu Mar 19 10:31:17 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.596.2.12.2.34 2015/03/17 12:37:40 raeburn Exp $
+# $Id: grades.pm,v 1.596.2.12.2.35 2015/03/19 10:31:17 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5013,7 +5013,7 @@
 
     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'});
@@ -5072,11 +5072,13 @@
 			    $displaySub[0].=&mt('Trial: [_1]',
 					    $$record{"$where.$partid.tries"});
                             if (($rndseed ne '')  && ($lastrndseed{$partid} ne '')) {
-                                if ($rndseed ne $lastrndseed{$partid}) {
+                                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});




More information about the LON-CAPA-cvs mailing list