[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstudentsubmissions.pm

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 23 Sep 2004 14:55:24 -0000


matthew		Thu Sep 23 10:55:24 2004 EDT

  Modified files:              
    /loncom/interface/statistics	lonstudentsubmissions.pm 
  Log:
  Use $prob->part_display($partid) instead of outputing $partid directly.
  
  
Index: loncom/interface/statistics/lonstudentsubmissions.pm
diff -u loncom/interface/statistics/lonstudentsubmissions.pm:1.23 loncom/interface/statistics/lonstudentsubmissions.pm:1.24
--- loncom/interface/statistics/lonstudentsubmissions.pm:1.23	Thu Sep 23 10:35:54 2004
+++ loncom/interface/statistics/lonstudentsubmissions.pm	Thu Sep 23 10:55:24 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentsubmissions.pm,v 1.23 2004/09/23 14:35:54 matthew Exp $
+# $Id: lonstudentsubmissions.pm,v 1.24 2004/09/23 14:55:24 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -219,7 +219,7 @@
             if (! $single_part) {
                 my $tmpname = $partid;
                 if ($partid =~/^\d+$/) {
-                    $tmpname = &mt('Part [_1]',$partid);
+                    $tmpname = $prob->part_display($partid);
                 }
                 $headers{'part'} .= qq{<th colspan="$part_span">$tmpname</th>};
                 $nonempty_part_headers = 1;
@@ -392,7 +392,7 @@
     if (! $single_response) {
         my $id = $prob->compTitle;
         if (defined($partid) && $partid ne '0') {
-            $id .= ' '.$partid;
+            $id .= ' '.$prob->part_display($partid);
         }
         if (defined($respid)) {
             $id .= ' '.$respid;
@@ -569,7 +569,8 @@
         $worksheet->write($title_row,$cols_output,
                           $title,$format->{'h3'});
         foreach my $partid (@{$prob->parts}) {
-            $worksheet->write($partid_row,$cols_output,$partid);
+            $worksheet->write($partid_row,$cols_output,
+                              $prob->part_display($partid));
             my $responses = [$prob->responseIds($partid)];
             my $resptypes = [$prob->responseType($partid)];
             for (my $i=0;$i<scalar(@$responses);$i++) {
@@ -781,7 +782,7 @@
         $headers{'problem'}->[$prob_start_idx] = $prob->compTitle;
         my $part_start_idx = $prob_start_idx;
         foreach my $partid (@{$prob->parts}) {
-            $headers{'part'}->[$part_start_idx] = &mt('Part [_1]',$partid);
+            $headers{'part'}->[$part_start_idx] = $prob->part_display($partid);
             my $responses = [$prob->responseIds($partid)];
             for (my $i=0;$i<scalar(@$responses);$i++) {
                 my $resp_idx = $prob_start_idx + $response_multiplier * $i;