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

droeschl droeschl@source.lon-capa.org
Tue, 07 Apr 2009 20:12:06 -0000


droeschl		Tue Apr  7 20:12:06 2009 EDT

  Modified files:              
    /loncom/interface	lonindexer.pm 
  Log:
  Refactoring.
  
  
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.195 loncom/interface/lonindexer.pm:1.196
--- loncom/interface/lonindexer.pm:1.195	Thu Mar 19 15:01:24 2009
+++ loncom/interface/lonindexer.pm	Tue Apr  7 20:12:06 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.195 2009/03/19 15:01:24 jms Exp $
+# $Id: lonindexer.pm,v 1.196 2009/04/07 20:12:06 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1090,17 +1090,13 @@
 # statistics
 	    &dynmetaread($filelink);
 	    $r->print("<td>");
-	    &dynmetaprint($r,$filelink,'count');
-	    &dynmetaprint($r,$filelink,'course');
-	    &dynmetaprint($r,$filelink,'stdno');
-	    &dynmetaprint($r,$filelink,'avetries');
-	    &dynmetaprint($r,$filelink,'difficulty');
-	    &dynmetaprint($r,$filelink,'disc');
-	    &dynmetaprint($r,$filelink,'clear');
-	    &dynmetaprint($r,$filelink,'technical');
-	    &dynmetaprint($r,$filelink,'correct');
-	    &dynmetaprint($r,$filelink,'helpful');
-	    &dynmetaprint($r,$filelink,'depth');
+
+        for (qw(count course stdno avetries difficulty disc clear technical
+            correct helpful depth)) {
+
+            dynmetaprint($r,$filelink,$_);
+        }
+
 	    $r->print("&nbsp;</td>\n");
 
 	}
@@ -1123,11 +1119,9 @@
 	   &dynmetaread($filelink);
 	   $r->print('<td>');
 	   &coursecontext($r,$filelink);
-	   &dynmetaprint($r,$filelink,'goto_list');
-	   &dynmetaprint($r,$filelink,'comefrom_list');
-	   &dynmetaprint($r,$filelink,'sequsage_list');
-	   &dynmetaprint($r,$filelink,'dependencies');
-           &dynmetaprint($r,$filelink,'course_list');
+       for (qw(goto_list comefrom_list sequsage_list dependencies course_list)) {
+             dynmetaprint($r,$filelink,$_);
+       }
 	   $r->print('</td>');
         }