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

www www@source.lon-capa.org
Sun, 22 May 2011 21:53:52 -0000


www		Sun May 22 21:53:52 2011 EDT

  Modified files:              
    /loncom/interface	lonquickgrades.pm 
  Log:
  Starting to import performance data into category output
  
  
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.87 loncom/interface/lonquickgrades.pm:1.88
--- loncom/interface/lonquickgrades.pm:1.87	Sat May 21 01:29:43 2011
+++ loncom/interface/lonquickgrades.pm	Sun May 22 21:53:52 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Quick Student Grades Display
 #
-# $Id: lonquickgrades.pm,v 1.87 2011/05/21 01:29:43 www Exp $
+# $Id: lonquickgrades.pm,v 1.88 2011/05/22 21:53:52 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -569,9 +569,10 @@
 #
     my @order=split(/\,/,$categories{'order'});
 #
+    my %performance=&dumpdata($navmaps);
     my $maxpos=$#order;
     for (my $i=0;$i<=$maxpos;$i++) {
-        my ($value,$weight)=&output_and_calc_category($r,$cangrade,$navmaps,$order[$i],$i,$maxpos,%categories);
+        my ($value,$weight)=&output_and_calc_category($r,$cangrade,$navmaps,$order[$i],$i,$maxpos,\%performance,%categories);
         $sum+=$value*$weight;
         $total+=$weight;
     }
@@ -603,7 +604,7 @@
 #
 
 sub output_and_calc_category {
-    my ($r,$cangrade,$navmaps,$id,$currentpos,$maxpos,%categories)=@_;
+    my ($r,$cangrade,$navmaps,$id,$currentpos,$maxpos,$performance,%categories)=@_;
     my $value=0;
     my $weight=0;
     my $iconpath = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL') . "/");
@@ -646,7 +647,7 @@
     $r->print('<td><ul>');
     foreach my $contentid (split(/\,/,$categories{$id.'_content'})) {
         $r->print('<li>');
-        $r->print(&Apache::lonnet::gettitle($contentid));
+        $r->print(&Apache::lonnet::gettitle($contentid).' '.$$performance{$contentid});
         if ($cangrade) {
            $r->print(' <a href="javascript:storecmd(\'delcont_'.$id.'______'.$contentid.'\');">'.&mt('Delete').'</a>');
         }