[LON-CAPA-cvs] cvs: loncom /metadata_database searchcat.pl

www lon-capa-cvs@mail.lon-capa.org
Thu, 25 Dec 2003 15:20:00 -0000


www		Thu Dec 25 10:20:00 2003 EDT

  Modified files:              
    /loncom/metadata_database	searchcat.pl 
  Log:
  The FLOAT fields do not work yet.
  
  
Index: loncom/metadata_database/searchcat.pl
diff -u loncom/metadata_database/searchcat.pl:1.48 loncom/metadata_database/searchcat.pl:1.49
--- loncom/metadata_database/searchcat.pl:1.48	Thu Dec 25 08:11:56 2003
+++ loncom/metadata_database/searchcat.pl	Thu Dec 25 10:20:00 2003
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # searchcat.pl "Search Catalog" batch script
 #
-# $Id: searchcat.pl,v 1.48 2003/12/25 13:11:56 www Exp $
+# $Id: searchcat.pl,v 1.49 2003/12/25 15:20:00 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -134,7 +134,7 @@
 		    'count' => 0,
 		    'course' => 0,
 		    'course_list' => '',
-		    'avetries' => 0,
+		    'avetries' => 'NULL',
 		    'avetries_list' => '',
 		    'stdno' => 0,
 		    'stdno_list' => '',
@@ -144,8 +144,14 @@
 		    'goto_list' => '',
 		    'comefrom' => 0,
 		    'comefrom_list' => '',
-		    'difficulty' => 0,
-		    'difficulty_list' => ''
+		    'difficulty' => 'NULL',
+		    'difficulty_list' => '',
+                    'clear' => 'NULL',
+                    'technical' => 'NULL',
+		    'correct' => 'NULL',
+		    'helpful' => 'NULL',
+		    'depth' => 'NULL',
+		    'comments' => ''
 		    );
     my ($adomain,$aauthor)=($url=~/^(\w+)\/(\w+)\//);
     my $prodir=&propath($adomain,$aauthor);
@@ -285,6 +291,8 @@
         "stdno INTEGER UNSIGNED, stdno_list TEXT, ".
 	"avetries FLOAT, avetries_list TEXT, ".
         "difficulty FLOAT, difficulty_list TEXT, ".
+	"clear FLOAT, technical FLOAT, correct FLOAT, helpful FLOAT, depth FLOAT, ".
+	"comments TEXT, ".
         "FULLTEXT idx_title (title), ".
         "FULLTEXT idx_author (author), FULLTEXT idx_subject (subject), ".
         "FULLTEXT idx_url (url), FULLTEXT idx_keywords (keywords), ".
@@ -340,7 +348,13 @@
      "?,".   # avetries
      "?,".   # avetries_list
      "?,".   # difficulty
-     "?".    # difficulty_list
+     "?,".   # difficulty_list
+     "?,".   # clear
+     "?,".   # technical
+     "?,".   # correct
+     "?,".   # helpful
+     "?,".   # depth
+     "?".    # comments
      ")"
      );
 
@@ -393,7 +407,13 @@
 			     $dyn{'avetries'},
 			     $dyn{'avetries_list'},
 			     $dyn{'difficulty'},
-			     $dyn{'difficulty_list'}			     
+			     $dyn{'difficulty_list'},			     
+			     $dyn{'clear'},
+			     $dyn{'technical'},
+			     $dyn{'correct'},
+			     $dyn{'helpful'},
+			     $dyn{'depth'},
+			     $dyn{'comments'}			     
 			     )) {
 	    print LOG "\nMySQL Error Insert: ".$dbh->errstr."\n";
 	    die $dbh->errstr;