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

minaeibi lon-capa-cvs@mail.lon-capa.org
Fri, 03 Jan 2003 23:54:05 -0000


minaeibi		Fri Jan  3 18:54:05 2003 EDT

  Modified files:              
    /loncom/interface/statistics	lonstudentassessment.pm 
  Log:
  Tried to fix bug #994 for coloring and numbering the chart rows.
  It needs more work.
  
  
  
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.23 loncom/interface/statistics/lonstudentassessment.pm:1.24
--- loncom/interface/statistics/lonstudentassessment.pm:1.23	Tue Dec 24 16:00:21 2002
+++ loncom/interface/statistics/lonstudentassessment.pm	Fri Jan  3 18:54:05 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # (Publication Handler
 #
-# $Id: lonstudentassessment.pm,v 1.23 2002/12/24 21:00:21 minaeibi Exp $
+# $Id: lonstudentassessment.pm,v 1.24 2003/01/03 23:54:05 minaeibi Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -101,6 +101,7 @@
     if($c->aborted()) {  return $Str; }
 
     my $selected=0;
+    my $Count = 0;
     $r->print('<pre>'."\n");
     foreach (@$students) {
         if($c->aborted()) { return $Str; }
@@ -132,8 +133,16 @@
                     push(@before, $_);
                 }
             }
-            my $displayString = 'DISPLAYDATA'.$spacing;
-            $r->print(&Apache::lonhtmlcommon::FormatStudentInformation(
+            $Count++;
+	    my $out = '';
+#	    $out .= sprintf("%3d", $Count);
+            if($Count % 2) {
+                $out .= '<bgcolor="#FFFFFF">';
+            } else {
+                $out .= '<bgcolor="#F6F6F6">';
+            }
+	    my $displayString = $out.'DISPLAYDATA'.$spacing;
+	    $r->print(&Apache::lonhtmlcommon::FormatStudentInformation(
                                                          \%cache, $_,
                                                          \@before,
                                                          $displayString,
@@ -238,6 +247,7 @@
     my($cache,$spacing,$infoKeys,$infoHeadings,$sequenceKeys,
        $sequenceHeadings)=@_;
 
+#    my $Str = '&nbsp&nbsp&nbsp&nbsp&nbsp';
     my $Str = '';
     $Str .= '<table border="0" cellpadding="0" cellspacing="0">'."\n";
 
@@ -418,7 +428,7 @@
     $ProblemsSolved /= $StudentCount;
     $TotalProblems /= $StudentCount;
     
-    $Str .= '<table border=2 cellspacing="5">'."\n";
+    $Str .= '<table border=2 cellspacing="1">'."\n";
     $Str .= '<tr><td><b>Students Count</b></td><td><b>'.
             $StudentCount.'</b></td></tr>'."\n";
     $Str .= '<tr><td><b>Total Problems</b></td><td><b>'.
@@ -427,13 +437,13 @@
             $ProblemsSolved.'</b></td></tr>'."\n";
     $Str .= '</table>'."\n";
 
-    $Str .= '<table border=2 cellspacing="5">'."\n";
+    $Str .= '<table border=2 cellspacing="1">'."\n";
     $Str .= '<tr><th>Title</th><th>Total Problems</th>'.
             '<th>Average Correct</th></tr>'."\n";
     foreach my $S(@$sequenceKeys) {
         my $title=$cache->{$S.':title'};
 	#$Str .= $cache->{$S.':problems'};
-	#my @problems=split(':', $cache->{$S.':problems'}); 
+	#my @problems=split(':', $cache->{$S.':problems'});
 	#my $pCount=scalar @problems;
 	my $pCount=MaxSeqPr($cache,@$students[0],$S);
 	my $crr=sprintf( "%.2f", $Correct{$S}/$StudentCount );