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

raeburn raeburn@source.lon-capa.org
Mon, 20 Dec 2010 21:23:38 -0000


raeburn		Mon Dec 20 21:23:38 2010 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - Eliminate duplicate code.
  - Consistent separator when rejoining @parts into string for key in version hash.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.640 loncom/homework/grades.pm:1.641
--- loncom/homework/grades.pm:1.640	Sat Dec 18 23:09:57 2010
+++ loncom/homework/grades.pm	Mon Dec 20 21:23:38 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.640 2010/12/18 23:09:57 raeburn Exp $
+# $Id: grades.pm,v 1.641 2010/12/20 21:23:38 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2414,12 +2414,11 @@
                     ($lasthash{$key} eq 'randomizetry')) {
                     my ($ign,@parts) = split(/\./,$key);
                     pop(@parts);
+                    my $id = join('.',@parts);
                     if ($lasthash{$key} eq 'randomizetry') {
-                        my $id = join(',',@parts);
                         $randombytry{$ign.'.'.$id} = $lasthash{$key};
                     } else {
                         unless ($showsurv) {
-                            my $id = join(',',@parts);
                             $typeparts{$ign.'.'.$id} = $lasthash{$key};
                         }
                     }